Jenkins junit plugin - contributing Skipped tests reporting

454 views
Skip to first unread message

Nir Gilboa

unread,
Jun 19, 2018, 7:42:41 AM6/19/18
to Jenkins Developers
Hi,

I've added the ability to report skipped tests

However I've not been able to figure out how to implement the /summary page for a Skipped test, so that expanding (by click on the '+') on the Test Results page will correctly show the skip message.
I can't seem to find the correct file Java/jelly which is generating this page.

Example summary url:
lastBuild/testReport/all/testName/summary

I'd really appreciate a bit of help :-)
Thanks,
Nir

Robert Sandell

unread,
Jun 19, 2018, 10:27:22 AM6/19/18
to jenkin...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5a030431-2b76-45c6-88d0-93ebdcc362cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Robert Sandell
Software Engineer
CloudBees, Inc.
CloudBees-Logo.png
Twitter: robert_sandell

Nir Gilboa

unread,
Jun 19, 2018, 4:37:34 PM6/19/18
to Jenkins Developers
Thank you !
Yes I did manage to find that, and I see that index.jelly is including it via:

<table style="margin-top: 1em; margin-left:0em;">
<j:forEach var="action" items="${it.testActions}">
<st:include page="summary.jelly" from="${action}" optional="true" it="${action}" />
</j:forEach>
</table>

However I don't understand why this would be executed for failed tests, but not for skipped ones..
getTestActions() doesn't seem to depend on the test result, at least not that I could find.

Hope you're able to shed some light :)

Thanks again!
Nir

Robert Sandell

unread,
Jun 20, 2018, 5:41:14 AM6/20/18
to jenkin...@googlegroups.com
That include is for the summary.jelly of whatever actions the CaseResult contains, so that's not the summary.jelly of the CaseResult itself.
But there is a bit further down
<j:if test="${!empty(it.skippedMessage)}">

So if the test is skipped it's message/reason should show up like for example here.

/B



For more options, visit https://groups.google.com/d/optout.

Nir Gilboa

unread,
Jun 25, 2018, 10:25:29 AM6/25/18
to Jenkins Developers
Thanks, that helped :)

Do you mind having a look again to see if I missed anything before I submit a PR ?

Also do you think I should make this configurable ?
i.e. "Include Skipped Tests in Test Result" checkbox in the plugin config

Robert Sandell

unread,
Jun 25, 2018, 10:50:13 AM6/25/18
to jenkin...@googlegroups.com
Den mån 25 juni 2018 kl 16:25 skrev Nir Gilboa <gilbo...@gmail.com>:
Thanks, that helped :)

Do you mind having a look again to see if I missed anything before I submit a PR ?

Better to just file the PR, that's what it's meant for :)
You can mention @jenkinsci/code-reviewers in the PR to get some seasoned eyes on it to help you out.
 

Also do you think I should make this configurable ?
i.e. "Include Skipped Tests in Test Result" checkbox in the plugin config

Since there already is code that shows the skipped tests I'm not sure what you mean by this?
 

For more options, visit https://groups.google.com/d/optout.

Nir Gilboa

unread,
Jun 26, 2018, 3:18:29 AM6/26/18
to Jenkins Developers

The change I would like to submit adds a summary of Skipped Tests to the main Test Result (See screenshot below).
Question is whether to make it being there configurable..

Auto Generated Inline Image 1

Ullrich Hafner

unread,
Jun 26, 2018, 4:25:29 AM6/26/18
to Jenkins Developers
I don’t think that it needs to be configurable. 

In the skipped tab there is also the + button visible. What would be shown here for skipped tests?

Am 26.06.2018 um 09:06 schrieb Nir Gilboa <gilbo...@gmail.com>:


The change I would like to submit adds a summary of Skipped Tests to the main Test Result (See screenshot below).
Question is whether to make it being there configurable..

<Auto Generated Inline Image 1.png>

For more options, visit https://groups.google.com/d/optout.
<Auto Generated Inline Image 1.png>

signature.asc

Nir Gilboa

unread,
Jun 27, 2018, 4:48:34 AM6/27/18
to Jenkins Developers
I added the ability to display the "Skip Message" there, based on the standard "message" attribute present in the JUnit XML
Tthis was already displayed if you clicked on the specific test details.

Additionally as before, it may include "Standard Output", "Standard Error", "Error Details" and "Stack Trace", which are usually present in Failed tests

Auto Generated Inline Image 1

Nir Gilboa

unread,
Jun 28, 2018, 4:02:54 PM6/28/18
to Jenkins Developers
Robert / Ullrich: could you please review the PR I submitted or mention someone who can ?
Apparently mentioning teams inside the GitHub org is reserved to members..

Thanks!
Nir

Nir Gilboa

unread,
Jul 23, 2018, 6:39:06 AM7/23/18
to Jenkins Developers
My PR [1] was reviewed and approved by Ullrich - thank you !

Any additional feedback ?

Thanks,
Nir

[1]
Reply all
Reply to author
Forward
0 new messages