小编典典

Hudson支持什么JUnit XML格式规范?

unit

我将Hudson作为持续集成服务器,并且我想使用选项“发布JUnit测试结果报告”。但是我不使用xUnit工具进行测试,相反,我有运行测试并以简单格式返回结果的shell脚本。我正在考虑制作一个脚本,将这些结果转换为JUnit格式。所以我很有趣JUnit文件的外观如何?


阅读 415

收藏
2020-07-25

共1个答案

小编典典

几个月前,我做过类似的事情,结果证明这种简单的格式足以让哈德森接受它作为测试协议:

<testsuite tests="3">
    <testcase classname="foo1" name="ASuccessfulTest"/>
    <testcase classname="foo2" name="AnotherSuccessfulTest"/>
    <testcase classname="foo3" name="AFailingTest">
        <failure type="NotEnoughFoo"> details about failure </failure>
    </testcase>
</testsuite>
2020-07-25