Reputation: 48232
I have 2 flavors of my application: paid and free. I have 2 build types: debug and release.
When I issue gradlew
tasks I get, among other things:
connectedFreeDebugAndroidTest - Installs and runs the tests for freeDebug on connected devices.
connectedPaidDebugAndroidTest - Installs and runs the tests for paidDebug on connected devices.
But I do not get connectedFreeReleaseAndroidTest neither connectedPaidReleaseAndroidTest.
However, there are for example: testFreeReleaseUnitTest, installFreeRelease and other such tasks dealing with release build type. But no testing tasks for the release build type.
Why is that?
In my build.gradle
I have:
androidTestCompile ('com.android.support.test.espresso:espresso-core:+')
androidTestCompile ('com.android.support.test:runner:+')
and also release
type only in buildTypes
Upvotes: 5
Views: 858
Reputation: 305
In your build.gradle, add:
android {
testBuildType "release"
}
Upvotes: 6