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
androidTestCompile
andunitTestCompile
- runs tests in both the
/src/androidTest
and/src/unitTest
directories - uses the standard
testInstrumentationRunner
gradle connectedAndroidTest uiTest
- uses dependencies from
androidTestCompile
anduiTestCompile
- runs tests in both the
/src/androidTest
and/src/uiTest
directories - uses "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" as its
testInstrumentationRunner
Is this possible -- maybe with variants or flavors?