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
@pushy - I tried that before, but when I tried to prove you wrong I got it this time ;-).
<testsuites>
<testsuite name="package.name.of.your.testclass">
<testcase classname="package.name.of.your.testclass.class\name\that\is\really\folders" name="test_name.log" time="231">
</testcase>
</testsuite>
</testsuites>
You must prefix the classname of each test case with the testsuite name for it to be accepted as a "package".
No need for redundancy! Jenkins nicely infers the package and class names if you:
name
attribute instead of classname
<testsuite>
element's name
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:
<testsuites>
<testsuite name="packagename.classname">
<testcase name="test_name.log" time="231"></testcase>
</testsuite>
</testsuites>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With