Hi There,
I have 2 targets that run unit tests during the course of my build,
(JUnit tests pre deployment and HttpUnit tests post deployment).

I would like for all tests in both targets to be executed regardless of
whether or not failures/errors occur. Then once both sets of tests are
run I would like to somehow tell if there were any test failures in
either suite to pass or fail the entire build.

The way I currently have it, even if there are failures, my build
succeeds.

I think the secret lies within the proper use of the "failureproperty"
but I am not clear on how this works.

If anyone could be of assistance it would be greatly appreciated

Sean


My targets appear as follows


<!-- This target runs the EJB JUNIT tests -->
<target name="test-ejb" description="Run the Junit test cases">
        <echo>Running the EJB test suite</echo>
        <junit printsummary="withOutAndErr" 
                fork="true" haltonfailure="false" 
                failureproperty="tests.failed" 
                showoutput="true">
                <classpath>
                        <path refid="test-path" />
                </classpath>
                <jvmarg value="-Xmx256M" />
                <formatter type="xml" />
                <test name="${ejb.test.class}"
outfile="${log.dir}/${ejb-test-                 results.file}" />
        </junit>
</target>

<!-- This target runs the HttpUnit tests -->
<target name="httpunit-test">
        <echo>Running the HttpUnit test suite</echo>
        <junit printsummary="withOutAndErr" 
                fork="true" haltonfailure="false" 
                failureproperty="tests.failed" 
                showoutput="true">
                <classpath>
                        <path refid="test-path" />
                </classpath>
                <jvmarg value="-Xmx512M" />
                <formatter type="xml" />
                <test name="${httpunit.test.class}"
outfile="${log.dir}/${httpunit-test-            results.file}" />
        </junit>
</target>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to