Skip to content

Instantly share code, notes, and snippets.

@rponte
Created January 11, 2011 03:11
Show Gist options
  • Save rponte/773956 to your computer and use it in GitHub Desktop.
Save rponte/773956 to your computer and use it in GitHub Desktop.
<target name="test" depends="instrument">
<mkdir dir="${test.report.dir}" />
<junit printsummary="on" fork="yes" forkmode="once" haltonfailure="true" haltonerror="true">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${coverage.xml.dir}/cobertura.ser" />
<sysproperty key="basedir" value="." />
<formatter type="xml" />
<classpath>
<!-- Adiciona libs necessarias para o build -->
<path refid="build-classpath" />
<path refid="acceptance-tests-classpath" />
<!-- Adiciona libs da App -->
<path refid="webinf-classpath"></path>
<!-- Cobertura -->
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar" />
</fileset>
<!-- Classpaths -->
<pathelement path="${instrumented.dir}" />
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
</classpath>
<test name="${testcase}" todir="${test.report.dir}" if="testcase" />
<batchtest todir="${test.report.dir}" unless="testcase">
<!-- Unit Tests -->
<fileset dir="${test.source.dir}/unit">
<include name="${test.pattern}" />
</fileset>
<!-- Integration Tests -->
<fileset dir="${test.source.dir}/integration">
<include name="${test.pattern}" />
</fileset>
<!-- Acceptance Tests -->
<fileset dir="${test.source.dir}/acceptance">
<include name="${test.pattern}" /> <!-- **/**Test.java -->
</fileset>
</batchtest>
</junit>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment