2011-11-10 45 views
10

很多工具爲單元測試報告生成和使用相同的XML文件格式。單元測試報告的XML格式規範(DTD,XSD ..)

例(source):

<?xml version="1.0" encoding="UTF-8" ?> 
<testsuite errors="0" failures="0" hostname="hazelnut.osuosl.org" name="net.cars.engine.MoteurTest" tests="6" time="0.021" timestamp="2007-11-02T23:13:50"> 
    <properties> 
    <property name="java.vendor" value="IBM Corporation" /> 
    <property name="os.name" value="Linux" /> 
    <!-- more property tags--> 
    </properties> 
    <testcase classname="net.cars.engine.MoteurTest" name="hasBougie" time="0.0010" /> 
    <testcase classname="net.cars.engine.MoteurTest" name="hasCarburatueur" time="0.0010" /> 
    <!-- more testcase tags--> 
    <system-out><![CDATA[]]></system-out> 
    <system-err><![CDATA[]]></system-err> 
</testsuite> 

一點點研究,我發現,格式提議,由Apache基金會(由螞蟻項目)。

製作:

  • 的junit Ant任務
  • antunit
  • Maven的萬無一失
  • TestNG的
  • ...

消耗的:

  • junitreport Ant任務
  • 行家萬無一失的報告
  • CruiseControl的
  • Luntbuild的
  • 哈德森/詹金斯
  • 的IntelliJ的TeamCity
  • 蟻窩
  • Parabuild
  • JUnit的PDF報告
  • ...

我能找到的唯一文件是螞蟻維基此頁: Proposals/EnhancedTestReports

是否有該格式(DTD,XSD)的任何規範?

我想寫的手這樣的文件...(或者使用librairy如果你知道的話)......

回答