如何使用&QUOT时取回检测结果;亚行外壳上午仪" [英] How to retrieve test results when using "adb shell am instrument"
问题描述
我用下面的命令执行在我的Android设备的一些测试:
亚行外壳上午仪器-w
package.name/android.test.runner.AndroidJUnitRunner
块引用>我可以看到通过标准输出的测试进度和简单的结果。但是,这是否过程还生成装置(XML,HTML等)内的结果文件?如果是的话,它在哪里存放?
感谢
解决方案
不过,这是否过程还生成装置(XML,HTML等)内的结果文件?
块引用>没有,没有。
报告生成是在比'上午仪器的高层一般处理。如果您在使用摇篮运行测试,它应该为您生成的报告。我相信这是Android的工作室依靠为好。
如果您必须生成从测试本身的报告,你可以使用自定义测试运行。看到这个答案为做到这一点的一种方法:<一href=\"http://www.stackoverflow.com/a/5574418/1999084\">http://www.stackoverflow.com/a/5574418/1999084
I'm executing some tests in my Android device by using the following command:
adb shell am instrument -w package.name/android.test.runner.AndroidJUnitRunner
I can see the test progress and simple results through STDOUT. But, does this process also generates a results file inside the device (xml, html, etc)? If yes, where is it stored?
Thanks
解决方案But, does this process also generates a results file inside the device (xml, html, etc)?
No, it does not.
Report generation is generally handled at a higher layer than 'am instrument'. If you run your tests using Gradle, it should generate the report for you. I believe this is what Android Studio relies on as well.
If you must generate the report from the test itself, you can use a custom test runner. See this answer for one way to do it: http://www.stackoverflow.com/a/5574418/1999084
这篇关于如何使用&QUOT时取回检测结果;亚行外壳上午仪&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!