Getting started
Using JUnit PDF Report essentials
The fastest method to integrate JUnit PDF Report into your project, is by using the essentials distribution.
This distribution contains everything you need, including dependencies.
You need:
A working copy of Ant with JUnit support.
The JUnit PDF Report essentials distribution installed somewhere on your computer.
Creating your report:
Add this line to your Ant build.xml script:
导入你的junitpdfreport路径
<import file="/path/to/build-junitpdfreport.xml"/>
(/path/to/ is the location where you installed JUnit PDF Report essentials distribution)
Add this target to your Ant build.xml script:
<target name="testreport-pdf">
<junitpdfreport todir="." styledir="default">
/location/to/your/junit/xml/testresults为junit的XML
<fileset dir="/location/to/your/junit/xml/testresults">
<include name="TEST-*.xml"/>
</fileset>
</junitpdfreport>
</target>
(/location/to/your/junit/xml/testresults is the location where your junit test results are)
From the command prompt, run:
运行testreport-pdf
> ant testreport-pdf
You will find the PDF report in your project base directory.
Using JUnit PDF Report essentials
The fastest method to integrate JUnit PDF Report into your project, is by using the essentials distribution.
This distribution contains everything you need, including dependencies.
You need:
A working copy of Ant with JUnit support.
The JUnit PDF Report essentials distribution installed somewhere on your computer.
Creating your report:
Add this line to your Ant build.xml script:
导入你的junitpdfreport路径
<import file="/path/to/build-junitpdfreport.xml"/>
(/path/to/ is the location where you installed JUnit PDF Report essentials distribution)
Add this target to your Ant build.xml script:
<target name="testreport-pdf">
<junitpdfreport todir="." styledir="default">
/location/to/your/junit/xml/testresults为junit的XML
<fileset dir="/location/to/your/junit/xml/testresults">
<include name="TEST-*.xml"/>
</fileset>
</junitpdfreport>
</target>
(/location/to/your/junit/xml/testresults is the location where your junit test results are)
From the command prompt, run:
运行testreport-pdf
> ant testreport-pdf
You will find the PDF report in your project base directory.
本文介绍如何使用JUnit PDF Report Essentials快速生成JUnit测试报告。通过在Ant构建脚本中添加几行配置,即可将JUnit测试结果转换成PDF格式,便于团队成员查看和分析。
740

被折叠的 条评论
为什么被折叠?



