Search code examples
javaeclipsejunitjunit4

JUnit Test Case not appearing in JUnit Explorer


I have two test cases in two separate classes. Only the first one appears in the JUnit explorer.

The first test case I added appears in the JUnit explorer and the second test case does not. When I run tests through the JUnit Explorer it runs the first test and not the second.

Here is the Package Explorer for the project: enter image description here

Here is the JUnit Explorer: enter image description here

Here is the Test Case that appears in the JUnit Explorer: enter image description here

Here is the Test Case that does not appear in the JUnit Explorer: enter image description here


Solution

  • That's not a JUnit explorer, but some kind of JUnit results view, only the tests that have been executed are displayed.

    Right-click the src folder and choose Run As > JUnit Test to execute all tests and to get the results in the JUnit view.