I am running Junit tests from Maven. The ant script has
<junit failureproperty="failproperty" errorproperty="errorproperty">
<classpath refid="classpath" />
<test name="${unit-test-suite}" />
<formatter type="brief" usefile="false" />
</junit>
<echo> ----------> ${failproperty} </echo>
<echo> ----------> ${errorproperty} </echo>
<fail message="something wrong" if="${failureproperty}"/>
<fail message="something wrong" if="${errorproperty}"/>
I tried
-
Halting on error or failure in Junit – This halts when I run the ant script only but the build succeeds in Maven and does not halt even thought JUnit has an error.
- I tried to send a fail message by setting the errorproperty and the failure property- This does not set the variables.
How do I tell Maven to stop everything when Junit fails?
Maven Details:
Maven version: 2.0.10
Java version: 1.6.0_17
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
This “fail fast” feature isn’t currently supported by Maven 2, see SUREFIRE-580 (and maybe vote for it).