考虑以下JUnit 测试的 XML 结果:
<?xml version="1.0" ?>
<testsuite errors="0" failures="1" name="TheTest-20130618162859"
tests="3" time="0.000">
<testcase classname="TheTest" name="testOne" time="0.000"/>
<testcase classname="TheTest" name="testTwo" time="0.000"/>
<testcase classname="TheTest" name="testThree" time="0.000">
<failure message="3 != 4" type="AssertionError">
<![CDATA[Traceback (most recent call last):
File "blah.py", line 11, in testThree
self.assertEquals(3, 4)
AssertionError: 3 != 4
]]> </failure>
</testcase>
<system-out>
<![CDATA[]]> </system-out>
<system-err>
<![CDATA[]]> </system-err>
</testsuite>
如何根据这些结果创建 HTML 报告?
附录: 测试套件的每次执行都会创建一个新文件:
TEST-TheTest-20130618162859.xml
TEST-TheTest-20130618163459.xml
TEST-TheTest-20130618163600.xml
我更喜欢可以查看每个测试历史记录的报告生成器。