I fixed the issue by right clicking the test and selecting ‘Run Configurations’ and changing the “Test runner:” selection to ‘JUnit 4’ as shown here:
I ran the test again and it worked.
More Related Contents:
- JUnit 5: How to assert an exception is thrown?
- Difference between @Before, @BeforeClass, @BeforeEach and @BeforeAll
- JUnit testing with simulated user input
- Surefire is not picking up Junit 5 tests
- Easy way of running the same junit test over and over?
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- No tests found with test runner ‘JUnit 4’
- Eclipse – debugger doesn’t stop at breakpoint
- In JUnit 5, how to run code before all tests
- java.lang.NoClassDefFoundError in junit
- how to export (JUnit) test suite as executable jar
- Eclipse Java IDE JUnit5: junit.jupiter.api.Assertions is not accessible
- Difference between junit-jupiter-api and junit-jupiter-engine
- Using assertArrayEquals in unit tests
- How does Eclipse actually run Junit tests?
- Why my program crash when i press back Button
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved
- Eclipse java debugging: source not found
- How to do a JUnit assert on a message in a logger
- How to set eclipse console locale/language
- Any reason to clean up unused imports in Java, other than reducing clutter?
- How do I save Eclipse launch profiles across workspaces?
- PowerMock, mock a static method, THEN call real methods on all other statics
- How to solve maven 2.6 resource plugin dependency?
- Bug in eclipse compiler or in javac (“type parameters of T cannot be determined”)
- Writing a new refactoring plugin for Eclipse?
- Cannot load properties file from resources directory
- Is this a memory leak or a false positive?
- What is the difference between Eclipse and Netbeans if I want to use only the Java in it? [closed]
- android admob resize on landscape