No tests found with test runner 'JUnit 4'

user281070 picture user281070 · Feb 25, 2010 · Viewed 225.6k times · Source

My Java test worked well from Eclipse. But now, when I relaunch test from the run menu, I get the following message:

No tests found with test runner 'JUnit 4'

In the .classpath file I have all jar files, and at the end have:

<classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

How can I resolve this error and get tests running again?

Answer

Germ&#225;n picture Germán · Jun 6, 2010

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.