Not a unit test, but an instrumentation test.
My app has multiple flavors, so I run:
./gradlew connectedClientDebugAndroidTest
to run my instrumentation tests (flavor name is client).
But I want to run one particular instrumentation test case class called MyActivityTestCase.java
. Is this possible? If it is what is the command to run this
So the way I fixed this was by putting the single TestCase that I want into a specific folder by flavor.
app/src/androidTestClient/MyActivityTestCase.java
./gradlew connectedClientDebugAndroidTest
Not a solution if you have multiple test cases for a specific build flavor, but for me that wasn't the case so it works.
app/src/androidTestOther/
. So to run the other instrumentation tests I just run the command ./gradlew connectedOtherDebugAndroidTest