我使用Hudson作为Delphi2010项目的CI服务器。XMLTestRunner.pas单元将DUnit测试结果写入xUnit插件用来报告测试结果的xml文件。xUnit插件会显示失败,但不会显示消息:
Stacktrace
MESSAGE:
+++++++++++++++++++
STACK TRACE:在“发布测试工具结果报告”的hudson项目配置中,我选择“nunit -版本N/A (默认)”作为测试工具,因为列表中没有dunit选项,并且xml文件看起来类似于nunit格式:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
<test-results total="123" notrun="0" date="20.12.2010" time="09:19:24">
<test-suite name="HelloWorldTestSuite" total="46" notrun="0">
<results>
<test-case name="TestCase.HelloWorldTest" execute="True" success="False" time="0,003" result="Failure">
<failure name="ETestFailure" location=""/>
<message>expected: < hello world! > but was: < hallo welt ></message>
</test-case>
...在hudson配置中还有一个"Custom Tool“选项,我必须指定一个"Custom stylesheet",但我不知道如何编写这样的样式表(有没有文档?)。
在我的C++ projets with boost测试中,所有消息都很好地报告了失败。
发布于 2011-04-15 20:49:49
我必须更改XMLListener才能使其与hudson一起工作,因为失败的XML结构必须如下所示:
<testcase name="GetFreeDirNameTest" classname="Test.exe.MyFiles.TTests" result="failed" time="0.000">
<failure message="Expected:
"-1"
But was:
"0"" type="failed">GetFreeDirNameTest: Expected:
"-1"
But was:
"0"
</failure>
</testcase>发布于 2013-11-21 17:19:45
使用XMLTestRunner for NUnit compatible output from DUnit怎么样?
https://stackoverflow.com/questions/4488203
复制相似问题