Android的测试案例 - 如何查看输出? [英] Android Test Case - how to view output?
本文介绍了Android的测试案例 - 如何查看输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用AndroidTestCase的单元测试。我有一个单元测试是失败了,但我还没有想出如何从中显示输出。例如,我没有看到我打印在控制台也不是logcat的输出使用Log.d或的System.out.println的值。如何查看单元测试控制台?
I'm using AndroidTestCase for unit testing. I have a unit test which is failing, but I haven't figured out how to display output from it. For example, I don't see the values I print using Log.d or system.out.println in the console nor the logcat output. How do I view the unit test console?
推荐答案
您768,16看到 Log.d()
的消息 logcat的
除非你的测试之前(即在构造函数)。崩溃太多
You shoud see the Log.d()
messages in logcat
unless your test is crashing much before (i.e in the constructor).
这篇关于Android的测试案例 - 如何查看输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文