this question is actually very simple, but I have been puzzled by it before. If, as I wrote in the previous log , if you add Junitreport to the back:
<junitreport> <fileset dir= "Build/testoutput" includes= "*.xml"/> <report todir= "build/ Testoutput "/></junitreport>
The report is only generated in XML format, but if it is under Batchtest, if all the test cases are executed, a series of HTML reports will be generated, for example:
<target name= "test" depends= "compile-tests" description= "compile and execute the JUnit tests." > <mkdir dir= "build/testoutput"/> <junit printsummary= "on" fork= "${test.fork}" forkmode= "Once" Showo Utput= "true" failureproperty= "Junit.failure" > <jvmarg value= "-xx:-usesplitverifier"/> <classpath Refid= "Allclasspath.path"/> <classpath> <pathelement location= "${build.dir}/test"/> </clas spath> <jvmarg value= "-javaagent:lib\aspectjweaver-1.6.11.jar"/> <batchtest todir= "Build/testoutput" & Gt <formatter type= "brief" usefile= "false"/> <formatter type= "xml"/> <fileset dir= "${build.dir}/te St "> <include name=" **/${test.class}.class "/> </fileset> </batchtest> </junit> <junitreport> <fileset dir= "Build/testoutput" includes= "*.xml"/> <report todir= "Build/testoutput" /> </junitreport><fail if= "Junit.failure" message= "Unit tests failed. See build/testoutput/index.html "/></target>
just a little experience and a summary.