-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
CentOS 6.4, Tomcat 7.0.53, Jenkins 1.562
I have inherited a plugin (https://github.com/andrewcooke-isti/JiraTestResultReporter) that creates Jira issues from test results. It works fine with JUnit, but not with TAP. It's quite possible this is some kind of error in my plugin, so apologies in advance, but what seems to be happening is that when I call getFailedTests() on a TestResultAction instance, it returns an empty set, even when tests have failed.
I have no idea how this information is created, but the underlying AbstractTestResultAction returns an empty set. So I wondered if perhaps you need to over-ride that? For Junit, that method returns a set of CaseResult instances that I can use to generate test reports.
I should emphasize that your plugin seems to work fine otherwise - it parses the TAP output and generates tables of results.
Please contact me (andrew@acooke.org) if you have more questions. I can modify my plugin to get more info if you need it.
Thanks for your help and sorry this is so vague.
Hi. Some more info on this.
I have worked around the issue by checking the type returned from AbstractBuild.getResult() and, if it's an instance of TapStreamResult, calling getFailedTests2() instead of getFailedTests().
I have absolutely no idea why you're implementing getFailedTests() to return an empty list! That's how it's implemented in the base class, sure, but other plugins over-ride that to return their results.
Anyway, that's the basic issue. I'm no longer waiting on a fix as I have the work-around above. Maybe there's an explanation that I'm missing. Hope this helps.
Cheers,
Andrew