6

surefireで生成されたXML(TEST-.xml)ファイルのDTDまたはXMLスキーマはどこにありますか?

4

2 に答える 2

7

I think that Maven is using the XML result format "owned" by Ant and I am not sure there is an official DTD or Schema. From JUnit 4 XML schematized? on the JUnit-user list:

There's a pretty standard format for JUnit XML output. You've probably seen it: there's a <testsuite> root element containing zero-or-more <testcase> elements, each of which may contain a <failure> or <error> element. (There's also a <properties> element with zero-or-more <property> elements.) A lot of tools know how to read this format and report on it, including at least Ant, Maven, Cruise Control, Hudson, Bamboo, Eclipse and IntelliJ IDEA.

Is this XML standardized anywhere in a DTD or XML Schema or something?

If there isn't a standard, could we go about making a standard and blessing it? (Perhaps JUnit 4.5 could include an XMLReporter that could be a reference implementation.)

In particular, I'm curious to know how one would represent that a test has been ignored in "standard" JUnit XML.

I never found such a "standard". And imo it is a good idea as you may enhance the report by using your own information and still have the tools working. But if you go with a DTD/schema and validation then this will stop working.

See also

Related questions

于 2010-07-29T23:57:33.507 に答える
4

私はこの質問が6歳であることを知っていますが、将来の読者のためだけに...

実際には、surefireで生成されたXMLの公式スキーマがあります。これはsurefire-test-report.xsdにあります。

于 2016-11-22T11:12:37.407 に答える