Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Error is throwing while run the test classes, Run as JUnit(Error is throwing while run the test classes, Run as JUnit)
Error is throwing while run the test classes, Run as JUnit [message #940973] Fri, 12 October 2012 01:31 Go to next message
Sumode Varghese is currently offline Sumode Varghese
Messages: 2
Registered: October 2012
Junior Member
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 Go to previous message
Sumode Varghese is currently offline Sumode Varghese
Messages: 2
Registered: October 2012
Junior Member
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
Previous Topic:TPTP idle
Next Topic:What do you think about Q7 UI testing tool?
Goto Forum:
  


Current Time: Mon Jul 28 18:49:05 EDT 2014

Powered by FUDForum. Page generated in 0.02438 seconds