Robotium - testing specific flavors in Android Studio with Gradle
Asked Answered
F

1

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!

Fichu answered 22/1, 2015 at 15:1 Comment(1)
i added an example of basic setup hereExperimentalize
F
2

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

Fichu answered 22/1, 2015 at 15:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.