摇篮:如何运行测试仪表类 [英] Gradle: How to run instrumentation test for class
本文介绍了摇篮:如何运行测试仪表类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I'm running instrumentation test in Android Studio with Run Configuration defined as below (don't mind warning):
所以这是调用测试套装特定类。我怎么可以用命令行实现这一目标,我想用./gradlew命令?
So this is invoking test suit for a specific class. How can I achieve this with command line, I guess using ./gradlew command ?
推荐答案
正如<一说href=\"https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint\">AndroidTestingBlueprint您可以使用 android.testInstrumentationRunnerArguments.class
属性:
./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.testing.blueprint.ui.espresso.EspressoTest
这篇关于摇篮:如何运行测试仪表类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文