Reputation: 4065
I've currently set my TeamCity instance to run connectedCheck
on all my Android-projects. This is fine, all tests run and everything is good. Except, connectedCheck runs all tests for all product flavors. I currently have a lot of flavors, so this is wasted work for my projects as I do not really have any different code in the flavors. Any idea how I can make connectedCheck
only run for one flavor?
Upvotes: 14
Views: 7715
Reputation: 41
As vida said you can run ./gradlew tasks
to check all possibilities to run gradle commands.
I'd like to suggest the following:
./gradlew tasks | grep connected
.
This filter all connectedAndroidTest variants that can be runned.
Upvotes: 4
Reputation: 1661
and if you want to generate the apk for the android test :
./gradlew assemble[flavour]DebugAndroidTest
Upvotes: 0
Reputation: 2327
./gradlew connectedBuildVariantAndroidTest
Example:
./gradlew connectedDevelopmentDebugAndroidTest
Upvotes: 12
Reputation: 4065
I see there is a new task since I checked this the last time, "connectedAndroidTestProductFalvor_buildvariant".
I haven't had time to check this task yet, but the description reads "Installs and runs the tests for build ProductFlavor_buildvariant on connected devices."
Will post a result when I've been able to test this.
Upvotes: 0