ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: JUnit Task
Date Tue, 02 Jan 2001 12:53:05 GMT

The JUnit test runner tries first to find a static suite method and use it,
if it is not found it tries to extract a TestSuite from the class.

Could you provide a small sample code of your 2 classes because I cannot get
the picture.

-- 
 St├ęphane 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: Noel Rappin [mailto:noel.rappin@openwave.com]
> Sent: Friday, December 29, 2000 4:22 PM
> To: ant-user@jakarta.apache.org
> Subject: JUnit Task
> 
> 
> I think this just got answered to the list, but I deleted the 
> message, so I
> apologize if this is a repeat.
> 
> I'm trying to use the JUnit task -- I'm starting with one subclass of
> TestCase that has a constructor, a startUp() a tearDown() and one
> testSomething() method.  I also have a second class that 
> contains a static
> suite() method that returns the suite from the TestCase.  
> This works from
> the JUnit TextRunner.
> 
> Trying to do this in Ant, I see the following problems:
> 
> * When I point the <test> to the TestCase, I get the message:
> No tests found in com.whatever.my.TestCase
> 
> * When I point the <test> at the second class, Ant complains 
> that it doesn't
> have a TestCase(String) constructor, which is true, but I was 
> expecting it
> to call the static suite() method.
> 
> So how does the Ant JUnit task find tests?  What am I missing here?
> 
> Thanks,
> 
> Noel
> 
> -------------
> Noel Rappin
> Openwave
> Principal Software Engineer, Internal Development
> Noel.Rappin@openwave.com
> (781) 274-7000 x305
> ----------------
> The opinions expressed in this message are not those of Openwave.
> 
> 
> 
> 

Mime
View raw message