ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Choosing junit tests
Date Fri, 24 Sep 2004 10:25:59 GMT
Yes, there is but it is JUnit Specific. Create a
TestSuite and add your tests in it (copied from [1]
and modified for your sample):

TestSuite suite= new TestSuite();
suite.addTest(new MoneyTest("testCase2"));
suite.addTest(new MoneyTest("testCase3"));
TestResult result= suite.run();

However, I used the above way to instantiate a
TestSuite only once, when I needed my test case run in
a specific sequence. For all other cases, I use (also
taken from [1])

TestSuite suite= new TestSuite(MyTestCase.class);
TestResult result= suite.run();

Happy juniting
Ivan

[1]http://junit.sourceforge.net/doc/cookbook/cookbook.htm

--- André Dantas Rocha <ad-rocha@uol.com.br> wrote:

> Hi,
>  
> Is there a way to specify the junit tests to run?
>  
> Something like this:
>  
> public classe MyTestCase extends TestCase {
>   public void testCase1 {}
>   public void testCase2 {}
>   public void testCase3 {}
> }
>  
> I would like to run only testCase2 and testCase3. Is
> it possible?
>  
> Thanks,
>  
> André 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message