: Integrates the results into GitLab's native test tracking.
For automation, use the GitLab Jobs API to download artifacts programmatically. Download the latest artifacts of failed gitlab pipeline
: Click the Download icon (three vertical dots or a tray icon) on the right side of the specific pipeline row. gitlab download junit artifacts
: Bundles the actual files into a downloadable zip archive.
test_job: stage: test script: - mvn test # Example for Maven artifacts: when: always # Ensure reports are uploaded even if tests fail paths: - target/surefire-reports/*.xml # Makes the file downloadable reports: junit: target/surefire-reports/*.xml # Makes results viewable in GitLab UI Use code with caution. : Integrates the results into GitLab's native test tracking
To ensure your JUnit XML files are both viewable in the UI and available for download, you must list the file path under both reports and paths .
Once the pipeline finishes, you can download the artifacts using these methods: Via the GitLab UI : Bundles the actual files into a downloadable zip archive
: Navigate to the specific test job and click the Download button in the right sidebar.
: Crucial for test reports so you can debug failures; without this, artifacts aren't uploaded if the script fails. 2. How to Download JUnit Artifacts