Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JUnit unable to find tests in Eclipse [duplicate]

I have a strange issue with JUnit 4 tests in Eclipse 3.5 that I couldn't solve - any hints gratefully received!

Initially: I had a test suite working properly, with 100+ tests all configured with JUnit 4 annotations. I'd run these typically by right clicking on my source folder and selecting "Run as JUnit test". All worked perfectly.

Now: When I try to run the test messages all I get is an error "No tests found with test runner 'JUnit 4'".

Any idea what is happening? I simply can't work out what could have changed to make this fail.

My guess is that it is some configuration issue based on the build path or class path?

like image 776
mikera Avatar asked Feb 26 '23 21:02

mikera


1 Answers

Had this issue too, doing a "Project --> Clean" and then trying to run the unit tests as usual already did it!

like image 84
Akku Avatar answered Mar 06 '23 17:03

Akku