问题描述
所以...我试图让我的应用程序的一些测试。我有几个口味在我的应用程序,我想建立针对每种口味单独的测试。
从Robotium文件我用了androidTest / Java的文件夹一个包里面......我活动的一些建议后,曾经尝试输入一个味道的.TEST。
从这里另一个建议:是使名为androidTest几个文件夹,但它并没有奏效。
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.
我有最新的Android Studio和摇篮2.2.1。
I have the latest Android Studio with Gradle 2.2.1.
我要开始测试1为单味运行。目前在所有配置我试图在androidTest文件夹中的所有测试运行..没有母校什么。
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.
所以,有flav1,flav2,flav3等。我如何可以编写和运行测试只是为了flav2。
目前,运行connectedAndroidTestFlav3,例如运行在androidTest
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"
在此先感谢!
推荐答案
刚刚又试了一次,这一次它的工作:
正确的文件夹strucure是:
Just tried again, and this time it worked: The correct folder strucure is:
希望这是明确的......它可以作为目前预计..
Hope It's clear... It works as expected now..
项目
这篇关于Robotium - Android Studio中测试特定的口味与摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!