【发布时间】:2017-06-11 12:39:21
【问题描述】:
我正在使用以下命令测试 Android 应用:
adb shell am instrument -w -e class net.mandaria.test.TippyTipperTest,net.mandaria.test.TippyTipperTest2,net.mandaria.test.TippyTipperTest3 net.mandaria.test/android.test.InstrumentationTestRunner
但是,当其中一项测试失败时,整个测试执行就会停止。例如,如果第一个测试“net.mandaria.test.TippyTipperTest”失败,我得到这个输出:
net.mandaria.test.TippyTipperTest:INSTRUMENTATION_RESULT: shortMsg=junit.framework.AssertionFailedError
INSTRUMENTATION_RESULT: longMsg=junit.framework.AssertionFailedError: shows enter
INSTRUMENTATION_CODE: 0
我的问题是: 即使第一个测试失败,我怎样才能让它继续运行所有测试?
【问题讨论】:
标签: android unit-testing testing command-line adb