Junit+ant when can I generate a report in HTML form?

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.