You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ot...@ivillage.com on 2001/10/31 16:57:49 UTC
How to run a single Junit test?
Hello,
All examples of integrating Ant and Junit show you how to run a set of unit tests in a single step.
What is the best way to run a single, specific unit test?
For example, if I have a TestCase at com.nut.KikirikiTest is there an easy way to invoke Ant and tell it to run just that one test?
I imagine one could specify it on the command line, like this for example:
ant singletest -Dtest=com.nut.KikirikiTest
And then in 'singletest' target one would just run this single test.
I was wondering if there is a better (more elegant and/or shorter) way of doing this?
Thanks,
Otis
_________________________________________________________________
iVillage.com: Solutions for Your Life
Check out the most exciting women's community on the Web
http://www.ivillage.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to run a single Junit test?
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Have a look at Ant's very own build.xml. It does this very thing.
Line 788 of
http://cvs.apache.org/viewcvs/jakarta-ant/build.xml?annotate=1.192
Erik
----- Original Message -----
From: <ot...@ivillage.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, October 31, 2001 10:57 AM
Subject: How to run a single Junit test?
> Hello,
>
> All examples of integrating Ant and Junit show you how to run a set of
unit tests in a single step.
>
> What is the best way to run a single, specific unit test?
>
> For example, if I have a TestCase at com.nut.KikirikiTest is there an easy
way to invoke Ant and tell it to run just that one test?
>
> I imagine one could specify it on the command line, like this for example:
>
> ant singletest -Dtest=com.nut.KikirikiTest
>
> And then in 'singletest' target one would just run this single test.
>
> I was wondering if there is a better (more elegant and/or shorter) way of
doing this?
>
> Thanks,
> Otis
>
> _________________________________________________________________
> iVillage.com: Solutions for Your Life
> Check out the most exciting women's community on the Web
> http://www.ivillage.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>