Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 05, 2019 15:21

Filter test run to tests without given annotation : small | medium | large

Step-by-step guide

If you're running stand-alone Gradle Espresso tests  GitHub StandAlone RemoteRunSample

  1. In the InstrumentationArgs of the Json configuration file you must use "notAnnotation" and specifying the fully qualified path of  Small | Medium or LargeTest


"instrumentationArgs" : ["notAnnotation=android.support.test.filters.LargeTest"],

This way you do not have to use the testSize parameter which does not allow multiple values and you can run all other tests but the filtered annotation type.


Related articles

Gradle plugin configuration parameters: Android configuration parameters for the Gradle Plugin 

Google Blog Espresso Test Sizes: https://testing.googleblog.com/2010/12/test-sizes.html 

Android JUnit Runner: https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner 

Android LargeTest Annotation: https://developer.android.com/reference/android/support/test/filters/LargeTest