Running a specific instrumentation unit test with Gradle

后端 未结 8 910
既然无缘
既然无缘 2020-11-30 04:27

Is there a way to run a specific Android instrumentation unit test using Gradle? I\'ve tried

gradle -Dtest.single=UnitTestName connectedInstrumentTest
         


        
8条回答
  •  离开以前
    2020-11-30 04:59

    the Gradle command does not work for me. I used below mentioened adb command. for this you need to build your apk first.

    adb shell am instrument -w -r -e package -e debug false .debug.test/android.support.test.runner.AndroidJUnitRunner

提交回复
热议问题