且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 Gradle Android 运行单个仪器测试

更新时间:2023-01-11 16:16:33

可以分两步运行单个android测试:

you can run the single android test in two steps:

  1. ./gradlew installDebugAndroidTest
  2. adb shell am instrument -w -e class com.example.MyInstrumentationTest#testFoo com.example.test/android.support.test.runner.AndroidJUnitRunner
    https://developer.android.com/tools/testing/testing_otheride.html