in DevOps by
Q:
Explain How To Test Classes For Junit Using Ant Script?

1 Answer

0 votes
by
<target name="test" depends="-copytestresources, compile">

<mkdir dir="${build.dir}/junit-reports" />

<junit printsummary="false"

fork="on"

haltonfailure="false"

failureproperty="test.failure">

<classpath refid="classpath.junit" />

<formatter type="plain" />

<batchtest todir="${build.dir}/junit-reports">

<fileset dir="${build.dir}/test-classes" includes="**/*Test.class" />

</batchtest>

</junit>

<junitreport tofile="target/junit-reports/TEST.xml">

<fileset dir="${target}/junit-reports" includes="TEST-*.xml" />

<report format="frames" todir="${target}/junit-reports" />

</junitreport>

</target>
Click here to read more about DevOps
Click here to read more about Insurance

Related questions

+1 vote
asked May 9, 2020 in DevOps by Robindeniel
+1 vote
asked Jul 16, 2020 in Python by GeorgeBell
0 votes
asked Feb 12, 2020 in JAVA by rahuljain1
0 votes
+1 vote
asked May 9, 2020 in DevOps by Robindeniel
+1 vote
asked May 9, 2020 in DevOps by Robindeniel
...