JUnit Eclipse显示System.out.print()的 [英] JUnit Eclipse show System.out.print()'s

查看:1622
本文介绍了JUnit Eclipse显示System.out.print()的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用JUnit 3和Eclipse 3.4。当我运行一个JUnit测试用例一切正常,测试完全完成。只有事情是我想看到我运行的类的输出。所有的类都有基本的System.out.print()一些输出值。所以当我运行测试,我看不到任何控制台消息。当测试成功时,如何让Eclipse在Console窗口中显示System.out.print()输出?

I am using JUnit 3 with Eclipse 3.4. When I run a JUnit test case everything works fine and the test completes perfectly. Only thing is I want to see the output of the classes that I am running. All the classes have basic System.out.print() to some output values. So when I run the tests I don't see any console messages at all. How do I get Eclipse to show System.out.print() output in Console window when a test is successful?

推荐答案

其他程序也在Eclipse的控制台上运行。请确保Eclipse显示您的JUnit代码的活动视图。

Maybe other program was running on the console of Eclipse too. Please ensure Eclipse displays the active view of your JUnit code.

从Eclipse帮助:

From Eclipse Help:


选择显示所选控制台命令,使从结果列表中选择的控制台成为焦点。
注意:只有在您打开多个控制台时,才会启用此命令。

Select the "Display Selected Console" command to bring the console selected from the resulting list into focus. Note: this command is only enabled if you have more than one console open.

这篇关于JUnit Eclipse显示System.out.print()的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆