且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在使用TestSuite时,可以避免在eclipse中运行junit测试两次吗?

更新时间:2023-10-28 08:07:22

不,测试类将始终被启动直接然后通过套件中的链接。这是如预期的。

No, the test class will always be started directly and then through the "link" in the suite. This is as expected.

可以在运行配置中设置一个解决方法,只能从包含您的套件的包运行测试。打开运行配置,然后选择在选定的项目,包或源文件夹中运行所有测试,然后单击搜索... 并选择包裹。

One workaround might to set in the run configuration to only run tests from the package which contains your suites. Open the run configuration and select Run all tests in the selected project, package or source folder then click Search... and select the package.