【发布时间】:2019-10-28 11:26:44
【问题描述】:
有没有办法从命令行在 Android 的 UI 测试类中运行单个测试
//I can run all the tests with this command
$ adb shell am instrument -w -e class com.me.app.tests.Food.EatingTests com.me.app.dev.test/androidx.test.runner.AndroidJUnitRunner
// this is my test class
@RunWith(AndroidJUnit4.class)
public class EatingTests {
@Before
public void setup() throws Exception {}
}
@Test
@Priority1
public void eatApple() throws Exception {}
@Test
@Priority1
public void eatBanana() throws Exception {}
}
有没有办法只运行eatApple() 而不是运行整个班级的所有测试(eatApple 和eatBanana)
【问题讨论】:
标签: android adb android-espresso android-instrumentation android-debug