Package name is always "(root)" viewing test results

2,897 views
Skip to first unread message

Neil Bird

unread,
Oct 12, 2011, 9:30:10 AM10/12/11
to jenkins...@googlegroups.com

Using what I believe is the default Jenkins test-results viewer, nomatter
what I put into my JUnit XML as the testsuite packagename, the results
always appear under a single package called “(root)”.

I've tried splitting the results (packages) up into diff. xml files, but
it still collates them under (root).

Am I doing something wrong?


E.g.:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite id="0" package="MyPackage" name="SomeName"
timestamp="2011-10-12T11:46:46" hostname="host" tests="8" time="123"
errors="0" failures="0">
...
(with multiple testsuites for differing packages)


--
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

Simon Wiest

unread,
Oct 12, 2011, 2:01:49 PM10/12/11
to jenkins...@googlegroups.com
Hi Neil,

to my knowledge, there's no official specification of the JUnit XML file
format - so unfortunately, every tool seems to talk a dialect of its
own... ;O(

In case of Jenkins, an attribute 'package' of the 'testsuite' element is
ignored as far as I know. Instead you can use a fully qualified class
name in the 'classname' attribute of the embedded 'testcase' element,
e.g. classname="MyPackage.SomeName". Jenkins will process anything left
from the last dot as a package prefix.

Does this work for you?

Cheers,
Simon.
--

Neil Bird

unread,
Oct 13, 2011, 11:37:06 AM10/13/11
to jenkins...@googlegroups.com
Around about 12/10/11 19:01, Simon Wiest typed ...

> In case of Jenkins, an attribute 'package' of the 'testsuite' element is
> ignored as far as I know. Instead you can use a fully qualified class name
> in the 'classname' attribute of the embedded 'testcase' element, e.g.
> classname="MyPackage.SomeName". Jenkins will process anything left from the
> last dot as a package prefix.

Excellent, yes, that does the trick! Thanks!

Reply all
Reply to author
Forward
0 new messages