如何在 Eclipse 中仅执行测试并忽略测试套件?
我有一个项目,它使用测试套件来调用项目中的测试。
使用 Maven 运行测试,它将仅正确运行测试。
使用 eclipse 运行测试,它同时运行测试和测试套件!
我可以编写一个 testsuite() 来调用所有包中的所有测试套件,但是有没有办法只执行项目中的测试而不执行测试套件?
部分原因是为了启用 clover 插件eclipse 报告项目的代码覆盖率
I have a project that uses testsuites to call the tests within a project.
Running the tests with maven, it will correctly runs only the tests.
Running the tests with eclipse, it runs both the tests and the testsuites!
I could write a testsuite() to call all the testsuites in all the packages but is there a way to only execute the tests in the project and not the testsuites?
Partly this is to enable the clover plugin in eclipse to report the code coverage for the project
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 Eclipse 中所期望的。要运行测试,您必须为 Eclipse 提供一个测试类、一个包或一个项目。它将运行该选择中的所有测试和测试套件。我不相信有任何方法可以做你想做的事。
我只能建议重构,以便您的测试套件位于与测试用例不同的项目或包中。
This is expected in Eclipse. To run tests, you must either give Eclipse a test class, a package, or a project. It will run all tests and test suites in that selection. I do not believe there is any way to do what you want.
I could only suggest refactoring so that your test suites are in a different project or package from your test cases.