从Code运行测试时在Eclipse中显示JUnit视图 [英] Showing JUnit view in Eclipse when running tests from Code

查看:239
本文介绍了从Code运行测试时在Eclipse中显示JUnit视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Eclipse中运行我的Testclass时,我得到了JUnit视图,显示了树结构以及测试是否成功。如果我从代码开始我的测试:

When I run just my Testclass in Eclipse I get the JUnit view showing the tree structure and if the test was successful. If I start my Test from code:

JUnitCore core = new JUnitCore();
core.run(SimpleTests.class);

视图未显示。我可以更改吗?

the view does not show. Can I change this?

推荐答案

在工具栏上单击Windows - >显示视图 - >其他。
键入Junit不带引号。从列表中选择,然后单击确定。

On your toolbar click Windows-->Show View-->Others. Type "Junit" without quotes. Select from list and click OK.

这篇关于从Code运行测试时在Eclipse中显示JUnit视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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