ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: NullPointerException in XMLJUnitResultFormatter.endTest causi ng junitreports to hang
Date Wed, 04 Jul 2001 09:47:51 GMT
>From a quick overview in the code, it would mean that you have an exception
in the constructor of your testcase. Which normally should not happen since
your testcase constructor should be a simple:

MyTestCase(String name){ super(name); }

Do you have any resource initialisation in the constructor ? If you do, you
should definitely move them to the setUp() method of your testcase. If you
don't then I have no idea what could cause it to crash and would be
delighted if you could give us some more details.

In any case JUnitTestRunner is incorrectly handling this "can not happen"
case. Will try to submit a patch for it once I can get some time.

Cheers,

-- 
 Stephane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 



> -----Original Message-----
> From: Sanjay Bhatia [mailto:sbix@yahoo.com]
> Sent: Tuesday, July 03, 2001 11:24 PM
> To: Ant Mailing List
> Subject: NullPointerException in 
> XMLJUnitResultFormatter.endTest causing
> junitreports to hang
> 
> 
> I recently added junitreports functionality into our 
> build.xml file and am now
> getting the following error.  It's also causing our junit 
> tests to hang.  Has
> anyone experienced this problem before?
> 
> sb
> 
> [junit] Exception in thread "main" java.lang.NullPointerException
>     [junit] 	at
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFor
> matter.endTest(XMLJUnitResultFormatter.java:177)
>     [junit] 	at
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFor
> matter.formatError(XMLJUnitResultFormatter.java:211)
>     [junit] 	at
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFor
> matter.addError(XMLJUnitResultFormatter.java:206)
>     [junit] 	at 
> junit.framework.TestResult.addError(TestResult.java:36)
>     [junit] 	at 
> junit.framework.TestResult.runProtected(TestResult.java:133)
>     [junit] 	at
> com.raplix.rolloutexpress.RaplixTestSuite.run(RaplixTestSuite.java:63)
>     [junit] 	at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.r
> un(JUnitTestRunner.java:209)
>     [junit] 	at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.m
> ain(JUnitTestRunner.java:342)
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> 

Mime
View raw message