Community
Participate
Working Groups
in M3 i had a mess of tests I was developing using a 1.5 based system. In trying to track down a bug I switched the launch config to us Java 1.4 and launched. Nothing worked, not even the breakpoints. In the end it was a dumb error on my part as the launch config was setup to use Junit 4 which required Java 1.5. It would be real nifty if somehow the user could be warned that the launch they are setting up will not work.
Moving to JUI. They own JUnit launcher.
I couldn't reproduce this. Do you have a precise description of the scenario? - Normal Java project or PDE project - what were the compiler compliance settings - what was the VM version selected - Which JUnit version on the classpath - If it was a PDE project, which execution environment was set - was the test you ran a JUnit 3 test (extends TestCase) or a JUnit 4 test (@Test) We tried hard to not swallow any error messages and support users by giving error dialogs when for example starting JUnit 4 tests with a JUnit 3 runner.
- PDE project - Tests are actually Junit 3 tests - EE set to 1.4 (with corresponding compliance settings) - Launch config says use Junit 4 - Launch JRE is 1.5 - Right click on a test class and say Run as ... > Junit plugin test All is happy - Change JRE to 1.4.2_08 for the launch configuration and run => silent failure Of course, I too am now having trouble reproducing. I did spend about 45 min on this this morning. Pinged Darin and as I was describing it to him I realized that Junit was set to Junit 4. Changed that and all worked. It may have been a particular test?
I think I got the problem: The following exception is in the log Caused by: java.lang.IllegalArgumentException: No Classloader found for plug-in org.eclipse.jdt.junit4.runtime at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.getClassLoader(RemotePluginTestRunner.java:73) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.readPluginArgs(RemotePluginTestRunner.java:88) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.init(RemotePluginTestRunner.java:78) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:57) at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:122) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) - the example plug-in specifies EE 1.4 - it has a plug-in dependency to EE 1.5 - the launcher picks a EE 1.4 JRE to launch. Maybe it would be a good time to warn that the plug-in has requirements with a higher EE? Moving to PDE.
I think I finally figured out a solution :)
With the fix applied in 217011, this is working in PDE UI now. This will help poor souls who inadvertently create an invalid junit configuration.