Hi Evan!
>First time Jenkins development, so my apologies for what is probably a newbie
>question.
No need to apologise for that, that's an excellent question. Thanks for posting
it to the mailing list. This is one of the issues that I want to fix in
tap-plugin in the next releases (another one is related to performance).
When the plug-in was created, it was implemented with custom views/actions.
Some time later users wanted to be able to use the same default test UI (i.e.
the same graphs and views generated with JUnit tests). So we tried to reproduce
what was done in (IIRC) testng-plugin.
>I'm hesitant to just replace the one with the other... and even more hesitant
>to add another special-case to the dashboard plugin to handle TAP.
Let's try to tackle JENKINS-22016 first by changing only tap-plugin. I'll have
some spare time this weekend (forecast says it's going to rain here :-) so I
can take a look at the API for Matrix projects (never used that) and see if we
can simply add a new action, or go with your 1) or 2) options, keeping backward
compatibility in tap-plugin and not changing core or other plug-ins.
If you have anything now in a fork, feel free to submit a pull request any
time, as we can review the changes, and I can help testing it locally too. And
then drop or update the pull request. Or if you want to have a quick chat about
parts of the plug-in code, I'm normally lurking in #jenkins as kinow.
CheersBruno
From: Evan Van Dyke <[email protected]>
To: Jenkins Developers <[email protected]>
Sent: Wednesday, 4 May 2016 10:28 AM
Subject: Newbie: TAP Plugin && Matrix Builds
First time Jenkins development, so my apologies for what is probably a newbie
question... I am trying to attack JENKINS-22016, in which the TAP results are
not published correctly for a Matrix project configuration.
I've found the resolution for JENKINS-12205, which solved a similar issue for
XUnit. It appears the issue is with the Dashboard View's "summarizeJob"
implementation (see below). The TAP plugin isn't publishing a generic
hudson.tasks.test.TestResultProjectAction, and instead defines its own
ProjectAction class.
What I'm struggling with is how to add a new instance of the
TestResultProjectAction to the TAP plugin. The plugin is already publishing a
ProjectAction class, and it implements a different API than the generic Hudson
one. I'm hesitant to just replace the one with the other... and even more
hesitant to add another special-case to the dashboard plugin to handle TAP.
Any thoughts/suggestions from those familiar with the Jenkins Core? What's the
best path forward here?I see three potential paths forward: 1) Replace the TAP
Plugin's ProjectAction class with the generic (probably best long-term) 2)
Descend the TAP Plugin's ProjectAction class from the generic 3) Add a new
special-case breakout in the dashboard view
private static void summarizeJob(Job job, TestResultSummary summary) {
boolean addBlank = true; TestResultProjectAction testResults =
job.getAction(TestResultProjectAction.class); if (testResults != null) {
AbstractTestResultAction tra = testResults.getLastTestResultAction();
if (tra != null) {
addBlank = false; summary.addTestResult(new
TestResult(job, tra.getTotalCount(), tra.getFailCount(), tra.getSkipCount()));
} } else { SurefireAggregatedReport surefireTestResults =
job.getAction(SurefireAggregatedReport.class); if (surefireTestResults
!= null) { addBlank = false; summary.addTestResult(new
TestResult(job, surefireTestResults.getTotalCount(),
surefireTestResults.getFailCount(), surefireTestResults.getSkipCount()));
} }--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/abffee1f-2708-4eeb-ac72-50c110c2eeb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/1011592718.7751501.1462315138649.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.