Re: [junit] testing ant failure

2005-11-12 Thread Stefan Bodewig
On Fri, 11 Nov 2005, Thomas L. Roche <[EMAIL PROTECTED]> wrote: > What's the "best way" to test for appropriate failure? The only > thing that comes to my mind is to parse the logfile, e.g. > > * check for a "BUILD FAILED" line > > * check that a line after the "BUILD FAILED" line contains the >

Re: testing ant failure

2005-11-11 Thread Ninju Bohra
Have you looked at the BuildFileTest class (part of the ant-testutil.jar) that has some helpful methods to determine whether a build file fails for the "right" reason. My test methods are like: public void testMissingInputDateFailure() { expectSpecificBuildException("missingInputD

testing ant failure

2005-11-11 Thread Thomas L Roche
How to test that an ant script fails appropriately? Specifically: I'm working on a build app (a java app for building lots of different things in lots of different places) that basically {creates, shleps, invokes} ant scripts. I have a few JUnit tests on the app (and am writing more). I'm hookin