Eric Wilson
Eric Wilson

Reputation: 59425

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

I have a small Java project in Eclipse. I have a class of JUnit tests for each class in the project. I'm using JUnit 4, and this is not a maven project.

Is there an easy way to tell Eclipse to run all tests in all test classes at once?

Upvotes: 70

Views: 29819

Answers (2)

Mike Yockey
Mike Yockey

Reputation: 4593

Select the source directory containing all test classes, right-click, select "Run as..." and select JUnit test.

Upvotes: 10

Constantiner
Constantiner

Reputation: 14221

Right click on a source folder then Run As… > JUnit Test.

Upvotes: 120

Related Questions