ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Continuing with the build
Date Thu, 10 Oct 2002 17:31:45 GMT
I run <junit> with failonerror off (which it is by default) so that all 
tests run, and then <fail> after they run in this manner:

         <junit printsummary="no"
             errorProperty="test.failed"
             failureProperty="test.failed"
             fork="${junit.fork}">

             <formatter type="xml"/>
             <formatter type="brief" usefile="false"/>
             <batchtest todir="${test.dir}/data" if="testcase">
                 <fileset dir="${test.dir}/${module}/classes"
                     includes="**/${testcase}.class"
                     />
             </batchtest>
             <batchtest todir="${test.dir}/data" unless="testcase">
                 <fileset dir="${test.dir}/${module}/classes"
                     includes="**/*Test.class"
                     />
             </batchtest>
         </junit>

         <fail if="test.failed">Unit tests failed.</fail>

But this could be extended to run other tasks/tests before failing as 
well, such as <junitreport>.

	Erik


Alexey Solofnenko wrote:
> It is useful when you want to see all build problems. If build takes a lot
> of time to complete "keep-going" feature becomes essential. The simple
> example is unit testing. It is preferable to run as many unit tests as
> possible, but if some core unit test fails, there is no reason to continue.
> For example:
> "core-unit-test"
>   "component1-unit-test"
>   "component2-unit-test"
> 
> Currently the first unit test fails, the whole build will terminate.
> 
> - Alexey.
> --
> { http://trelony.cjb.net/   } Alexey N. Solofnenko
> { http://www.inventigo.com/ } Inventigo LLC
> Pleasant Hill, CA (GMT-8 usually)
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message