Researching the Nunit plugin for Jenkins led me to this problem , where I found a solution:
step([$class: 'NUnitPublisher', testResultsPattern: 'TestResult.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false, failIfNoResults: true])
Adding this to the script pipeline worked for me!
However, it seemed that the following should also work (but currently, apparently, this is not the case): using the fragment generator, select this:
step: General Build Step Publish NUnit test result report
This creates the following in the Pipeline script:
following:
step <object of type hudson.plugins.nunit.NUnitPublisher>
It fails.
source share