是否可以在 Eclipse 中运行增量/自动化 JUnit 测试?
Eclipse支持增量编译。如果我保存源文件,它将编译修改后的文件。
在这种增量编译之后是否还可以运行同一包的 JUnit 测试并在错误视图中显示失败。然后我可以在同一视图中看到 JUnit 测试失败和编译错误,无需额外操作。有没有什么插件可以做到这一点?
Eclipse support incremental compiling. If I save a source file then it will compile the modified files.
Is it possible after such incremental compile also to run the JUnit tests of the same package and show the fail in the error view. Then I can see the JUnit test failing and compiling errors in the same view without extra action. Are there any plugins that can do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你必须看看这些插件:
因此,根据您的需求,我建议您安装 MoreUnit 和 Infinitest 插件。
You have to look at these plugins:
So regarding your needs, I suggest that you install MoreUnit and Infinitest plugins.
使用ExternalToolBuilder。
它可以由源修改触发。
有 Eclipse 定制功能(集成外部工具构建器)这可能会满足您的需求。但编写我从未使用过的脚本需要额外的努力。自动测试用例不是一个方便的方法,至少在 Eclipse 中单击一下看到绿色条对我来说就足够了:)
Use ExternalToolBuilder.
It can be triggered by source modify.
There’s Eclipse customized feature(integrate external tool builder) which may meet your need. But it needs extra effort to write the scripts I never used. Automatic test cases is not a convenient way, at least single click to see green bar in Eclipse is enough for me:)
您可以使用
Alt+Shift+X,T
运行项目中的所有测试。我认为,让它变得更加自动化可能会严重影响性能。增量编译一次最多编译 1 个文件,但您正在谈论可能运行数百个测试。You can run all tests in a project using
Alt+Shift+X,T
. I think that making it any more automated than this could take a serious performance toll. Incremental compilation is compiling at most 1 file at a time, but you're talking about running potentially hundreds of tests.