简体   繁体   English

如何在给定的程序包中运行所有唯一的Junit测试?

[英]How to run all unique Junit tests in a given package?

If I right click on a package and run all tests it will run all the JUnit tests it finds in the package, however it will also run suites so you can multiple of the same tests running. 如果我右键单击一个程序包并运行所有测试,它将运行该程序包中找到的所有JUnit测试,但是它还将运行套件,因此您可以运行多个相同的测试。

How can I run only JUnit tests and not suites? 如何仅运行JUnit测试而不运行套件? or only run the same test once? 还是只运行一次相同的测试?

I also faced the same issue. 我也面临同样的问题。 Eclipse doesn't have any mechanism of selecting only tests and not suites. Eclipse没有选择测试而不选择套件的任何机制。 The solution I arrived is to have a testsuites source folder where I save the test suites. 我到达的解决方案是拥有一个testsuites源文件夹,用于保存测试套件。 I use tests source folder to keep individual test cases. 我使用tests源文件夹保存单个测试用例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM