我知道它已经有一段时间,但是,有一个错误的元素,你可以错误和失败之间的区别:
<?xml version="1.0" encoding="utf-8"?>
<testsuites errors="1" failures="2" tests="5" time="10">
<testsuite errors="1" failures="2" id="0" name="TestSuite1" tests="4" timestamp="2015-04-20T00:00:00">
<testcase classname="ModuleIAmTesting" name="testDoNothingDoesNothing" time="1"/>
<testcase classname="ModuleIAmTesting" name="testLongThingTakesALongTime" time="5"/>
<testcase classname="ModuleIAmTesting" name="testSkyIsBlue" time="1">
<failure message="Test testSkyIsBlue() failed!" type="failure">
It's storming; sky is gray today. Failure output, details, etc.
</failure>
</testcase>
<testcase classname="ModuleIAmTesting" name="testIsNotStorming" time="1">
<failure message="Test testIsNotStorming() failed!" type="failure">
Another failure. Failure output, details, etc.
</failure>
</testcase>
<testcase classname="ModuleIAmTesting" name="testCreatePlugin" time="2">
<error message="Error while executing test testCreatePlugin()!" type="error">
Unhandled catastrophic exception in ModuleIAmTesting.cpp at like 4420, details, etc.
</error>
</testcase>
</testsuite>
</testsuites>
的重要组成部分,是<error>
标签和errors
属性<testsuite>
。
我没有使用Ant,而是创建了一个试图兼容的脚本(CI工具),因此只需要知道标准如何处理错误。 – dromodel