I am using testng eclipse plugin 5.5. I have test cases written in junit 4.1. I converted them to testng using right click method in eclipse. But now when i try to execute the test case using testng xml file it is giving me following error :
Failure in JUnit mode for class CreateFoo: could not create/run JUnit test suite:
cannot retrieve JUnit method
at org.testng.junit.JUnitTestRunner.runFailed(JUnitTestRunner.java:231)
at org.testng.junit.JUnitTestRunner.start(JUnitTestRunner.java:224)
at org.testng.junit.JUnitTestRunner.run(JUnitTestRunner.java:205)
at org.testng.TestRunner$1.run(TestRunner.java:535)
at org.testng.TestRunner.runWorkers(TestRunner.java:673)
at org.testng.TestRunner.privateRunJUnit(TestRunner.java:547)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
at org.testng.SuiteRunner.run(SuiteRunner.java:168)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
at org.testng.TestNG.run(TestNG.java:719)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
Please help me..... I really want this error should be solved as soon as possible.....
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=79930&messageID=145090#145090
1/ If you converted your test to TestNG then there is no reason to run
it in JUnit mode.
2/ You must be assured that the converter output is a valid TestNG
test. As written in the documentation the converter is not 100%, so
human interaction may be needed.
3/ In case you try to run JUnit test through TestNG compatibility
mode, you should be aware (and the documentation states this clearly)
that we do not support running JUnit 4.x tests.
bests,
./alex
--
.w( the_mindstorm )p.
TestNG co-founder
EclipseTestNG Creator
I think the first sentence is missing some detail: where in eclipse? what view?
If you can send me something that would help me reproduce the problem,
then I will try to confirm if it is or not a bug.
bests,
./alex
--
.w( the_mindstorm )p.
TestNG co-founder
EclipseTestNG Creator
> I don't know what exactly the problem, but this is the solution.....