我想在 android.Testcase 中运行 junit 测试用例后生成 HTml 报告,类型为 AndroidTestCase、ProviderTestCase 和 ServiceTestCase。和junit报告任务是: -
<project name="junitreport-problem" default="test" basedir=".">
<target name="test">
<path id="jarfilepath" >
<fileset dir="lib" >
<include name="*.jar" />
</fileset>
</path>
<junit printsummary="true" >
<classpath refid="jarfilepath" />
<classpath location="./bin" />
<!--type is xml, plain or brief. Best practice is xml-->
<!-- usefile attribute determines whether output should be sent
to a file -->
<formatter type="xml" usefile="true" />
<!-- we can use batchtest instead of test task in ant -->
<!-- <test todir="report" name ="com.android.test.PatientContentManagerTestCase" /> -->
<batchtest todir="report">
<fileset dir="src">
<include name="com.android.test.PatientContentManagerTestCase.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="report">
<fileset dir="report">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="report/html"/>
</junitreport>
</target>
</project>
此任务正在生成空白 html 报告,请在这方面帮助我,candyDhami。