gpt4 book ai didi

java - JUnit XML 格式真的没有错误元素吗?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:15:19 24 4
gpt4 key购买 nike

查看 informal spec 中的 this question ,我注意到没有错误元素。这只是一个疏忽吗? CruiseControl 似乎从某处提取错误。

<testsuites>
<testsuite name="name" errors="1" failures="0">
<testcase name="name">
<error>Some error message</error>
</testcase>
</testsuite>
</testsuites>

最佳答案

你可以查看这个article .本文修改后的示例:

<target name="test">
<junit printsummary="withOutAndErr" fork="off" haltonfailure="no">
<classpath refid="classpath.test"/>
<formatter type="brief" usefile="false"/>
<test name="packagename.MyTest"/>
</junit>
</target>

您可以在控制台(或报告文件)中看到来自 junit 测试的所有消息您可以在 ant site 阅读有关 printsummary、haltonfailure 属性和其他属性的信息.
其他useful link .

关于java - JUnit XML 格式真的没有错误元素吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7759586/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com