本文介绍了单元测试报告的XML格式规范(DTD,XSD ..)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 许多工具会为单元测试报告生成并使用相同的XML文件格式。A lot of tools produces and consumes the same XML File format for Unit Test report.示例(源):<?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基金会提出的(由After a little bit research, I have found that the format was proposed by the apache foundation (by the ant project).生产者: 准蚂蚁任务 antunit maven surefire testng ...junit ant taskantunitmaven surefiretestng...消费者: junitreport ant task maven surefire报告 CruiseControl Luntbuild 竹 哈德森/詹金斯 IntelliJ TeamCity AntHill Parabuild JUnit PDF报告 ...junitreport ant taskmaven surefire-reportsCruiseControlLuntbuildBambooHudson/JenkinsIntelliJ TeamCityAntHillParabuildJUnit PDF Report...我能找到的唯一文档是ant wiki上的此页面: Proposals / EnhancedTestReportsThe only document I could find is this page on the ant wiki:Proposals/EnhancedTestReports是否有这种格式(DTD,XSD)的规范?Is there any specification of this format (DTD, XSD) ?我要写这样的文件……(或者如果您知道的话,也可以使用图书馆)...I want to write a such file from hand... (or maybe use a librairy if you know any)...推荐答案此页面 http://windyroad.org/2011/02/07/apache -ant-junit-xml-schema / 建议在这里 http://windyroad.org/dl/Open%20Source/JUnit.xsd该架构的结构似乎与您的示例匹配已经给出。The structure of that schema seems to match the example you have given. 这篇关于单元测试报告的XML格式规范(DTD,XSD ..)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-06 23:03