简体   繁体   中英

Gradle run instrumentation test - how to exclude a package using command line?

https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint documentation tells you how to include a class while test run. Example

./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.testing.blueprint.ui.espresso.EspressoTest

Is there a command which can be used for gradle instrumentation test run to exclude a package using command line?

I used -Pandroid.testInstrumentationRunnerArguments.notPackage=com.example.foo option in gradle test run command. It works!

Source: https://medium.com/stepstone-tech/exploring-androidjunitrunner-filtering-options-df26d30b4f60

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM