<target name="test" depens="clean.log,test.integration.smoke,report"> <fail if="test.failed"/> </target> <target name="test.integration.smoke"> <junit errorproperty="test.failed" failureproperty="test.failed" haltonerror="false" haltonfailure="false" ...> ... </junit> </target>
1. Dont let the <junit> fail, because this lets the build fail immediately. 2. Catch the result in a property. 3. Use a conditional <fail> for letting the build fail if required. Jan > -----Ursprüngliche Nachricht----- > Von: leo.lathsp...@gmail.com [mailto:leo.lathsp...@gmail.com] > Im Auftrag von Leo Arias F. > Gesendet: Freitag, 16. Januar 2009 22:00 > An: user@ant.apache.org > Betreff: execute the final target always > > Hello ant. > > I'm using the junit task to execute selenium tests using ant and java. > By the way, it's working great. Thanks to those involved in the > development. > > Now I need a report of all the tests that were executed. I created a > target called report that combines all the logs and creates a single > file. The problem is that I don't know how to force ant to run this > task always. > > This is my target: > <sequential> > <antcall target="clean.log"/> > <antcall target="test.integration.smoke" /> > <antcall target="report" /> > </sequential> > > So, when test.integration.smoke fails, report is not > executed. Todo mal :( > > I'll appreciate your help a lot. > thanks, > pura vida. > -- > Leo Arias > http://elopio.net > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org