dcsimg
Ant/JUnit: AbstractMethodError on test failure
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Stacey
Posted On:   Thursday, October 3, 2002 05:49 AM

I'm using Ant and JUnit to test application code, but when a test fails, I get the following: java.lang.AbstractMethodError at junit.framework.TestResult.addFailure(TestResult.java:46) at junit.framework.TestResult.runProtected(TestResult.java:127) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:202) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:326) Exception in th   More>>

I'm using Ant and JUnit to test application code, but
when a test fails, I get the following:

			
java.lang.AbstractMethodError
at junit.framework.TestResult.addFailure(TestResult.java:46)
at junit.framework.TestResult.runProtected(TestResult.java:127)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:202)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:326)
Exception in thread "main"


Do I have something misconfigured?    <<Less

Re: Ant/JUnit: AbstractMethodError on test failure

Posted By:   Erik_Hatcher  
Posted On:   Friday, October 4, 2002 12:46 AM

Are you, by chance, trying to run an abstract class as test? Be sure to exclude abstract classes from . I do this by naming conventions and only run **/*Test.class and any abstract test cases I name *TestCase.
About | Sitemap | Contact