In Pipeline jobs, the step to archive the JUnit-formatted test results fails if the files are not located in the workspace folder.
The bug has been found when using JUnit plugin in a post stage block( {{post\{ always{ junit ...} }}} ). The stage is configured to run on an agent (slave, not in master) that runs windows. The master runs on a Linux.
*Example that fails (Bug):* * Test Result XML is located in $WORKSPACE\test_report\report.xml * {{junit env.WORKSPACE+'\test_report\report.xml'}} * Output: {{No test report files were found. Configuration error?}}
*Example that works:* * Test Result XML is located in $WORKSPACE\report.xml * {{junit 'report.xml'}} * Output: \ {{Recording test results }}(test results are successfully uploaded)