如何配置Eclipse以自动运行测试? [英] How do I configure Eclipse to run your tests automatically?

查看:436
本文介绍了如何配置Eclipse以自动运行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了这篇文章:配置您的IDE以自动运行测试
http://eclipse.dzone.com/videos/configure-your-ide-run-your

I read this article: Configure your IDE to run your tests automatically http://eclipse.dzone.com/videos/configure-your-ide-run-your

配置Eclipse非常容易IDE在每次保存文件时运行Ant目标。
MyProject - >右键单击:Properties - > Builders - > New - > Ant Builder

It's pretty easy to configure Eclipse IDE to run an Ant target every time a file is saved. MyProject -> Right-click : Properties -> Builders -> New -> Ant Builder

问题是,构建器必须重建每个保存,这是非常长的。 JUnit测试使用jar中的.classes运行。

The problem is that the builder has to rebuild the jar on every save, which is very long. The JUnit tests run using the .classes in the jar.

我们已经有了JUnit配置(EclipseIde .launch文件,包含运行测试的整个类路径)。我希望我可以创建一个包装这些JUnit启动文件的构建器。这将有利于针对Eclipse .classes运行测试(比重建jar更快)。测试结果也显示在JUnit视图中。

We already have JUnit configurations (EclipseIde .launch files which contains the whole classpath to run the tests). I wish I could create a builder that wraps those JUnit launch files. This would have the benefit of running the tests against Eclipse .classes (faster than rebuilding the jar). Also the test results are displayed in the JUnit view.

有没有人能这样做?

推荐答案

您可以尝试 CT-Eclipse ,Eclipse的连续测试插件

You could try CT-Eclipse, a continuous testing plugin for Eclipse.

从插件页面:


启用CT-Eclipse您编辑代码,Eclipse会在后台静默运行您的测试,并通知您是否有任何失败或导致错误。

With CT-Eclipse enabled, as you edit your code, Eclipse runs your tests quietly in the background, and notifies you if any of them fail or cause errors.

这篇关于如何配置Eclipse以自动运行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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