Robotium - testing specific flavors in Android Stu

2019-03-03 13:58发布

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!

1条回答
Lonely孤独者°
2楼-- · 2019-03-03 14:34

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

查看更多
登录 后发表回答