post { always { archiveArtifacts artifacts: '**/target/surefire-reports/*.xml', fingerprint: true } } Use code with caution.

http://[jenkins-server]/job/[job-name]/[build-number]/testReport/api/xml

You can use tools like curl or a browser to access this URL. For a more detailed or filtered view, you can append depth parameters, such as ?depth=2 .

To download test results in XML format from Jenkins, you can use the , archive reports as artifacts , or access the underlying file system . These methods allow you to programmatically or manually extract raw XML data for external analysis, reporting, or integration with other tools. 1. Download via Remote Access API

In your Jenkins Pipeline, add the archiveArtifacts step: