[英]JUnit HTML report (index.html) is not generated in the JUNIT folder, If I run the test case through ANT in eclipse
我正在Eclipse中通過ANT運行JUnit測試用例,構建成功,但是在JUnit文件夾中未生成測試用例的JUnit Html報告(index.html)。
以下是版本:
ANT:apache-ant-1.9.4 JUnit:junit 4.11 Jar文件Eclipse:版本:3.7.2
請幫忙!
我假設您正在使用ant junit任務運行測試用例。 但是,要生成HTML報告,您需要添加junit報告任務。 請參閱上面的示例
<target name="test-html">
<junit fork="yes" printsummary="no" haltonfailure="no">
<batchtest fork="yes" todir="${test.reports}" >
<fileset dir="${classes}">
<include name="**/*Test.class" />
</fileset>
</batchtest>
<formatter type="xml" />
<classpath refid="test.classpath" />
</junit>
<junitreport todir="${test.reports}">
<fileset dir="${test.reports}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.reports}" />
</junitreport>
</target>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.