No tests found with test Runner 'Junit 4'

Asked

Viewed 404 times

1

When creating a new package and within that package create a new test when trying to run the test the eclipse returns the message: "No tests found with test Runner 'Junit 4'" Within the project I have another package with other tests that run normally.

Can someone tell me what to do?

1 answer

1

See if there is at least one method annotated with @Test in your test class.

Example:

@Test
public void testFoo() {...}
  • 1

    @Test is only supported as of Junit version 4, so if it is an earlier version there will be no annotation in the method. It is also good to see if the project has Junit 4 configured in the dependencies, since it is running with this version.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.