Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 05:31 Go to next message
Sumode Varghese is currently offline Sumode VargheseFriend
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 11:06 Go to previous message
Sumode Varghese is currently offline Sumode VargheseFriend
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: Thu Apr 25 14:50:52 GMT 2024

Powered by FUDForum. Page generated in 0.03174 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top