JUnit XML“包”在哈德逊
我自己生成 XML,它看起来很像 JUnit,供 Hudson 读取它们。它工作得很好,除了我无法弄清楚 Hudson Web GUI 中的“包”列表是什么。如何制作一个由 Hudson 解释为“包”的 XML?
<testsuites>
<testsuite>
<testcase classname="class\name\that\is\really\folders" name="test_name.log" time="231">
</testcase>
</testsuite>
</testsuites>
Hudson 会将其列为:
软件包:(root)
类:类\名称\that\is\rely\folders
测试名称:test_name.log
I'm generating XML's myself that look enough like JUnit for Hudson to read them. It works great except I can't figure out what the "packages" list is in the Hudson web GUI. How do I make an XML that will be interpreted by Hudson as a "package?"
<testsuites>
<testsuite>
<testcase classname="class\name\that\is\really\folders" name="test_name.log" time="231">
</testcase>
</testsuite>
</testsuites>
Hudson will list this as:
Package: (root)
Class: class\name\that\is\really\folders
Test Name: test_name.log
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
@pushy - 我之前尝试过,但是当我试图证明你错了时,这次我得到了;-)。
你必须在每个测试用例的类名前面加上测试套件名称被接受为“包”。
@pushy - I tried that before, but when I tried to prove you wrong I got it this time ;-).
You must prefix the classname of each test case with the testsuite name for it to be accepted as a "package".
无需冗余! Jenkins 可以很好地推断包和类名称,如果您:
name
属性而不是classname
元素的name
属性至少有两个点分隔的“部分”。现在所有包含的
元素都将获得一个包和类。最后一部分是类名。其余部分将是包名称。像这样:
No need for redundancy! Jenkins nicely infers the package and class names if you:
name
attribute instead ofclassname
<testsuite>
element'sname
attribute has at least two dot delimited "sections." Now all the enclosed<testcase>
elements will get a package and class. The very last part will be the class name. The remainder will be be the package name.Like this:
我认为 Jenkins 从 testsuite 标签中的 name 属性中获取包名称。
你可以尝试像这样改变你的XML
I think Jenkins takes the package name from the name attribute in the testsuite tag.
You could try changing your XML like this