How can I run a single instrumentation test with Gradle Android

后端 未结 4 1465
闹比i
闹比i 2020-12-28 13:06

I\'m trying to run the tests with this line... but this launches all tests:

./gradlew -DconnectedAndroidTest.single=LandingActivityTests connectedAndroidTest         


        
4条回答
  •  北海茫月
    2020-12-28 13:30

    Since Android Gradle plugin version 1.3.0 you can use

    ./gradlew -Pandroid.testInstrumentationRunnerArguments.class=your.package.LandingActivityTests connectedAndroidTest
    

提交回复
热议问题