生成正确且完整的 xml 单元测试报告(针对 Hudson)
我正在扩展 svUnit (R 的单元测试套件,sciViews 的一部分),以便它还生成输出哈德森可以阅读。实际上我已经有一些可以做到这一点的东西,但它不处理“停用”测试。
要明白我的意思,请查看 svTestData.R 文件。
问题是我没有找到 Hudson 接受的模式的任何定义,并且我确实设法说服 Java 项目失败和错误,以便它的测试套件会添加
元素位于几个
元素内,但我没能看到 发生了什么>@Ignore @Test
装饰。
许多其他人也问过同样的问题,例如这里也,但最终有人到达此页面 这是一个很好的起点,但并不完整。例如,它没有提及我通过反复试验发现的
我试图阅读Hudson阅读的源代码,但我没有找到从哪里开始。
有什么提示吗?
I'm extending svUnit (a unit testing suite for R, part of sciViews) so that it produces also output that can be read by Hudson. actually I already have something that does this, but it does not handle 'deactivated' tests.
to see what I mean, have a look at the protocol_junit.svTestData
method in the svTestData.R file.
the problem is that I did not manage to find any definition of the schema accepted by Hudson and I did manage to convince a Java project to fail and error, so that its test suite would add a <failure/>
and <error/>
element inside of a few <testcase/>
elements, but I did not manage to see what happens with a @Ignore @Test
decoration.
many others have asked this same question, for example here too, but in the end one gets to this page which is a good starting point but is not complete. for example, it does not mention the <error/>
element I discovered by trial and error.
I tried to read the source read by Hudson, but I did not find where to start.
any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仔细研究了 Hudson 来源(特别是 CaseResult.java) 我看到在
中包含
元素就是我正在寻找的。
元素;仅供将来参考,我正在生成的模式的 RELAX NG 紧凑语法(随意编辑/维护):
gave a closer look at the Hudson sources (in particular, CaseResult.java) I saw that including a
<skipped/>
element in a<testcase/>
element is what I was looking for.and just for future reference, the RELAX NG compact syntax of the schema I am producing (feel free to edit/maintain):