No tests found with test runner 'JUnit 4' No tests found with test runner 'JUnit 4' java java

No tests found with test runner 'JUnit 4'


this just happened to me. Rebuilding or restarting Eclipse didn't help.

I solved it by renaming one of the test methods to start with "test..." (JUnit3 style) and then all tests are found. I renamed it back to what it was previously, and it still works.


When we get these errors it seems like Eclipse is just confused. Restart Eclipse, refresh the project, clean it, let Eclipse rebuild it, and try again. Most times that works like a charm.


In context menu of your 'test' directory choose 'Build path' -> 'Use as a source folder'.Eclipse should see your unitTests.java files as a source files.Warning 'No JUnit tests found' occures because there is no unitTests.class files in your 'build' directory