Bug 1291112 - [RFE] improve appearance of result names when JUnit XML is imported into Jenkins
Summary: [RFE] improve appearance of result names when JUnit XML is imported into Jenkins
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 22.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-14 02:05 UTC by Dan Callaghan
Modified: 2016-01-14 05:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-14 05:34:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2015-12-14 02:05:57 UTC
The Beaker results model does not match JUnit's very closely at all, so when Beaker is generating JUnit XML formatted results we have to kind of cram it in. There are a few corner cases which currently do not work very well.

The JUnit XML format has package, class, and name (as in, Java package, Java class, and test method name) which is supposed to correspond to the JUnit test methods. Jenkins displays these as <package>.<class>.<name>.

In Beaker we have tasks with filesystem-path-style names (e.g. /distribution/beaker/dogfood) and task results. In the RHTS tradition the results are named after the task with a path suffix (e.g. /distribution/beaker/dogfood/yum_install) but there are many other possibilities. For example, Beakerlib uses plain hyphen-separated result names (no slashes) and Beaker itself has the special /start result for the installation.

Currently to produce the JUnit XML we put the task name into class="" and the result name into name="", re-using the web UI's result prefix stripping logic. That works well for some common cases:

Task /distribution/beaker/dogfood
Result /distribution/beaker/dogfood/yum_install
in Jenkins appears as /distribution/beaker/dogfood.yum_install

Task /distribution/beaker/setup
Result Build-Beaker-from-git
in Jenkins appears as /distribution/beaker/setup.Build-Beaker-from-git

However the common case of:
Task /distribution/beaker/dogfood
Result /distribution/beaker/dogfood
appears in Jenkins as /distribution/beaker/dogfood../
but should probably instead be /distribution/beaker/dogfood.(none)
We want name="(none)" to distinguish it from the overall task which has no name="" attribute.

Also the ubiquitous installation result:
Task /distribution/install
Result /start
appears in Jenkins as /distribution/install./start
We should strip leading slashes from the result names.

Internal slashes are okay, as in
/distribution/beaker/dogfood.rhts_task/exit
which is suboptimal but makes reasonable sense.

Comment 1 Dan Callaghan 2015-12-14 02:07:14 UTC
Bill, adding you to cc in case you have any other thoughts about this.

Comment 2 Dan Callaghan 2015-12-14 23:39:43 UTC
http://gerrit.beaker-project.org/4539

Comment 3 Bill Peck 2015-12-14 23:42:04 UTC
Thanks Dan,

Your explanation and proposal makes sense to me.

Comment 6 Dan Callaghan 2016-01-14 05:34:03 UTC
Beaker 22.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.