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.