I have some different test suites that I want to run from different Gradle tasks. Each one might have a different set or dependencies and different testInstrumentationRunner. For example, I would like the following command line functionality:
gradle connectedAndroidTest unitTest
- uses dependencies from
androidTestCompileandunitTestCompile - runs tests in both the
/src/androidTestand/src/unitTestdirectories - uses the standard
testInstrumentationRunner
gradle connectedAndroidTest uiTest
- uses dependencies from
androidTestCompileanduiTestCompile - runs tests in both the
/src/androidTestand/src/uiTestdirectories - uses "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" as its
testInstrumentationRunner
Is this possible -- maybe with variants or flavors?