ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Dantas Rocha <ad-ro...@uol.com.br>
Subject RES: Choosing junit tests
Date Fri, 24 Sep 2004 10:39:56 GMT
Thanks for your reply Ivan and Jan. I'll try it...

 

-----Mensagem original-----
De: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com] 
Enviada em: sexta-feira, 24 de setembro de 2004 07:26
Para: Ant Users List
Assunto: Re: Choosing junit tests

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

--- Andri 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,
>  
> Andri
> 



		
__________________________________
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


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


Mime
View raw message