簡體   English   中英

dudit測試結果消息在哈德森

[英]dunit test result messages in hudson

我正在使用Hudson作為Delphi 2010項目的CI服務器。 XMLTestRunner.pas單元將DUnit測試結果寫入xml文件,該文件由hudson xUnit插件用於報告測試結果。 xUnit插件顯示失敗但沒有消息:

Stacktrace

MESSAGE:

+++++++++++++++++++
STACK TRACE:

在“發布測試工具結果報告”的hudson項目配置中,我選擇“NUnit-Version 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: &lt; hello world! &gt; but was: &lt; hallo welt &gt;</message>
</test-case>
...

在哈德森配置中還有一個“自定義工具”選項,我必須指定“自定義樣式表”,但我不知道如何編寫這樣的樣式表(是否有任何文檔?)。

在我的C ++項目中,使用boost測試,可以很好地報告所有消息的失敗情況。

我不得不更改XMLListener以使其與hudson一起使用,因為失敗的XML結構必須如下所示:

<testcase name="GetFreeDirNameTest" classname="Test.exe.MyFiles.TTests" result="failed" time="0.000">
  <failure message="Expected:
        &#34;-1&#34;
        But was:
        &#34;0&#34;" type="failed">GetFreeDirNameTest: Expected:
        &#34;-1&#34;
        But was:
        &#34;0&#34;
  </failure>
</testcase>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM