Saturday Aug 31

Key Concepts

JUnit ERROR: classWithoutSuiteMethod

PDFPrintE-mail
Monday, 30 April 2012 12:40
AddThis Social Bookmark Button

Eclipse Junit Error

NameValue
 JUnit  <= 4.3 

If you get the following error log when you want to execute a single test method from a test case in Eclipse

java.lang.NoSuchMethodError: org.junit.runner.Request.classWithoutSuiteMethod(Ljava/lang/Class;)Lorg/junit/runner/Request;
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.createRequest(JUnit4TestMethodReference.java:31)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.<init>(JUnit4TestMethodReference.java:25)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:54)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)

This issue has been fixed in JUnit 4.4.  

Tags: junit, error, org.junit.runner.request.classwithoutsuitemethod(ljava/lang/class;)lorg/junit/runner/request;, org.eclipse.jdt.internal.junit4.runner.junit4testloader.loadtests(junit4testloader.java, java.lang.nosuchmethoderror

Add comment


Security code
Refresh

Java Tutorial on Facebook