首页 > 解决方案 > Eclipse 2019-03 failing to run certain JUnit 4 tests from the Window but not Test suites or run configuration

问题描述

I have installed Eclipse 2019-03 from both the installer and tar ball. Certain JUnit test will run from a "run as" selection in the window and others will not. The ones that will not run will run:

I have tried deleting then adding the code back in then which seems to work but then fails again in future.

I have tried re-installing eclipse and then adding the src and pom to the maven project and the issue is still there.

Any suggestions?

2019-06-28:

It seems there are also issues with this version of eclipse finding the main method in my Main class. Although removing or changing the code did resolve the issue there were a number of other issues croping up. I tried again to resolve this using both a new "run configuration" and run "Java Application". Both fail to find the class. This is a very simple Java 11 maven projet and I do not see why it is having these issues.

At this point I am going to roll back to a previous version of eclipse to see if it is having similar issues with this code.

2019-06-28 NEW:

Rolling back to photon resolved the issues with both running the code and the junit issues.

Version: Photon Release (4.8.0) Build id: 20180619-1200

标签: eclipsejunitjunit4java-11eclipse-2019-03

解决方案


推荐阅读