Step 4.运行
首先通过模拟器运行一下AndroidUT,然后在命令行终端中运行
Java代码
adb shell am instrument -e class com.android.ut.test.TestApp -wcom.android.ut/android.test.InstrumentationTestRunner
adb shell am instrument -e class com.android.ut.test.TestApp -wcom.android.ut/android.test.InstrumentationTestRunner
这样你就可以看到测试结果了。
Java代码
# am instrument -e class com.cn.test.TestApp -w com.cn/android.test.InstrumentationTestRunner
com.cn.test.TestApp:..
Test results for InstrumentationTestRunner=..
Time: 2.866
OK (2 tests)
# am instrument -e class com.cn.test.TestApp -w com.cn/android.test.InstrumentationTestRunner
com.cn.test.TestApp:..
Test results for InstrumentationTestRunner=..
Time: 2.866
OK (2 tests)
后台测试log日志信息
文章来源于领测软件测试网 https://www.ltesting.net/










