Handle NUnit tests with status 'Warning'#19
Conversation
|
The best thing to do is come up with an example nunit output file and then an expected junit xml file and implement a test. |
|
Would it be too far a departure from the current plugin state to cause all NUnit warnings to mark the Jeknins build as "UNSTABLE" as proposed below: |
…ior to remain intact
|
Hello, Not very familiar with Github, so excuse any mistakes... I had an issue with some tests that were failing with "Wrong number of arguments provided". To solve the issue, i modified nunit-to-junit.xsl. See the change in the attached below... I could not find a place for all the possible options for the attribute "result", so we have a more whole solution. Testing wise, i got a couple executions containing cases -> plugin behaviour With kind regards, |
Co-authored-by: Michael Kruglos <99177644+michaelclinch@users.noreply.github.com>
|
@michaelclinch Good catch. I'm no longer part of the company where I was using this plugin, so I no longer have a stake in seeing this merged. Feel free to adapt and modify this as you see fit :-) |
|
I've recently adopted the plugin, but my goal is only to keep it updated. if someone is still interested by this feature feel free to rebase, resolve conflict etc... And I would be more than happy to review and release it. Regards, |
|
2026 calling - I have this same problem. I'm using "Warning" as a mechanism to signal a potential error state of the devices under test which requires further investigation (kind of a workaround for something so Specflow BDD can continue to run) - @jonesbusy could this still be merged? I believe we're using this plugin. |
|
See #19 (comment) Other solution in 2026 to use the JUnit Plugin that consume the JUnit format. All modern test framework have reporters to generate reports in many formats. |
Currently, NUnit tests with a status of "Warning" are interpreted as "skipped" in the Jenkins UI (https://issues.jenkins-ci.org/browse/JENKINS-56241)
There does not appear to be a direct mapping of "Warning" to the JUnit test result type, which appears to be the "intermediate" step for importing NUnit tests into Jenkins.
This causes the NUnit Jenkins plugin to treat tests with status of "Warning" as a "Fail" rather than a "Skip."
Since "Warning" tests don't include a stack trace, the stack trace field in the JUnit test result is a string indicating:
This test case was reported as a "Warning" in NUnit, but converted to "Fail" by Jenkins NUnuit Plugin.I am opening this PR as a draft, since I want to make this behavior configurable, with the end goal of the following:
warningTestsUnstableBuild:true