You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Billy Bacon <bi...@thirty3.net> on 2003/05/08 19:55:33 UTC
Determining if your unit tests pass/fail when running them from
Ant
I'm in the process of writing a shell script (for a cron job) that will call
my Ant targets on a nightly basis. What I'd like to do is prevent my war
file from being deployed to my production server if when my JUnit tests are
executed, 1 or more fail.
Is there a way to determine if my unit tests fail when executed through Ant?
Is there a return value that I should look for? I need to detect something
like this through a shell script....
Any suggestions would be greatly appreciated.
Thank you
- Billy -
Re: Determining if your unit tests pass/fail when running them from Ant
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 08 May 2003, Billy Bacon <bi...@thirty3.net> wrote:
> Is there a way to determine if my unit tests fail when executed
> through Ant?
I'll assume that you use the <junit> task.
First of all, you could make <junit> stop the complete build process
upon failures - see the haltonerror and haltonfailure attributes.
The alternative is to set a property if an error or failure, see the
errorproperty and failureproperty attributes.
Stefan