Robotium - testing specific flavors in Android Studio with Gradle

0
0

So… i’m trying to make some tests for my application. I have several flavors in my application, and I want to build individual tests for each flavor.
From the Robotium documentation I used the “androidTest/java” folder with a package inside… I event tried after some suggestions to input a flavor’s .test.
Another suggestion from here: http://tools.android.com/tech-docs/new-build-system/user-guide was to make several folders named “androidTest”, but it didn’t worked.

I have the latest Android Studio with Gradle 2.2.1.

I want to start 1 test to run for a single flavor. Currently in all the configurations I tried all the tests in the “androidTest” folder are running.. no mater what.

So, having flav1, flav2, flav3, etc.. How can I write and run a test just for flav2.
Currently, running “connectedAndroidTestFlav3” for example runs all the tests in “androidTest”

Thanks in advance!

  • You must to post comments
0
0

Just tried again, and this time it worked:
The correct folder strucure is:

enter image description here

Hope It’s clear… It works as expected now..

List item

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website