Error is throwing while run the test classes, Run as JUnit [message #940973] |
Fri, 12 October 2012 01:31  |
Eclipse User |
|
|
|
I have two projects (Project-X and Project-Y) where when I run the test in Project-X as Run as JUnit, it throws an exception and the JUnit is not executing.
java.lang.IllegalArgumentException: Error: parameter '-classNames' or '-className' not specified
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:300)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:212)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
While the test classes in the second project (Project-B) executes fine.
Both projects were ran using same JUnit 4 which I can see from the command log;
Project-X:org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -keepalive -version 3 -port 3397 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames com.server.tasks.rollback.controller.RollbackControllerTest
Project-Y:org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 3417 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames com.server.rmi.RRPMBcgServiceImplTest
I have noticed one thing that while debuging the test class from Project-X, the loader class shown was org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader and the arguments passesd by JUnit was [-keepalive, -version, 3, -port, 3397]
But for Project-Y, it displays the loader class as org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader and the arguments passed by the JUnit was [-version, 3, -port, 3417, -testLoaderClass, org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader, -loaderpluginname, org.eclipse.jdt.junit4.runtime, -classNames, com.server.rmi.RRPMBcgServiceImplTest] which is fine.
If the Project-X test classes would haved showned the same loader details as Project-Y, it would have ran successfully. So what configuration is missing for the Project-X test classes?
Could you all please help me to find a solution for the problem.
Thanks
Sumode
|
|
|
Re: Error is throwing while run the test classes, Run as JUnit [message #941280 is a reply to message #940973] |
Fri, 12 October 2012 07:06  |
Eclipse User |
|
|
|
After spending a lot amout of time and seen nothing is working, I thought of re-creating the project. Once the project is re-created after deleting the previous one, instead of running the test class by right clicking and select the "Run as JUnit Test" option, selected the "Run Configuration" and manually entered the details. I selected the "Test runner" particularly as JUnit 4 and click the Run button from Run Configuration. This time the JUnit worked properly.
Still not know, what was the reason for the issue happened.
Thanks
Sumode
|
|
|
Powered by
FUDForum. Page generated in 0.07771 seconds