Hi,
I am the maintainer for TestNG plugin for Jenkins. I have been trying to figure
out how to get email-ext plugin to support reporting on test failures reported
as part of TestNG reports.
The problem stems from the fact that AbstractTestResultAction is supposed to be
a generic class but it contains a method:
public List<hudson.tasks.junit.CaseResult> getFailedTests() {
return Collections.emptyList();
}
which returns CaseResult objects which are specific to JUnit. Also, CaseResult
class is final and hence can't be extended.
TestNG plugin generates test result objects that extend
hudson.tasks.test.TestResult but Email-ext and other plugins use the
getFailedTests() methods and expect a list of CaseResult and then invoke
specific methods on CaseResult object like getStatus, getClassname,
getDisplayName etc.
In light of this, how can we have plugins like email-ext support results from
test reporting plugins other than the one built into Jenkins core?
1. Can we break backward compatibility and change the signature of
getFailedTests() to return a List<hudson.tasks.test.TestResult> instead?
2. Should we make things more messy by making CaseResult non-final?
3. Is there something I can do with TestNG plugin to solve this issue?
4. Any other solution?
I would really like to make TestNG plugin as useful as possible and frankly
it's missing a big functionality if jobs can't be configured to email report on
failed test details.
Please advise.
Thanks,
Nalin
p.s. I had asked a similar question before as well:
http://jenkins-ci.361315.n4.nabble.com/AbstractTestResultAction-getFailedTests-td4652355.html
--
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].
For more options, visit https://groups.google.com/groups/opt_out.