简体   繁体   English

如何在没有Maven的情况下同时运行Eclipse Java项目的所有JUnit测试?

[英]How to simultaneously run all JUnit tests for a Eclipse Java project without Maven?

I have a small Java project in Eclipse. 我在Eclipse中有一个小型Java项目。 I have a class of JUnit tests for each class in the project. 我为项目中的每个类都有一类JUnit测试。 I'm using JUnit 4, and this is not a maven project. 我正在使用JUnit 4,这不是一个maven项目。

Is there an easy way to tell Eclipse to run all tests in all test classes at once? 是否有一种简单的方法可以让Eclipse一次性在所有测试类中运行所有测试?

右键单击源文件夹,然后单击Run As… > JUnit Test

选择包含所有测试类的源目录,右键单击,选择“Run as ...”并选择JUnit test。

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

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