Reports
Generate Custom JUnit Report
The Custom JUnit Report Generator in Testsigma creates JUnit-compatible XML reports from test plan results. These reports integrate with CI/CD tools, enabling pipelines to consume and display test results. Use this format when you need standardized automation workflows and reporting in external systems.
Prerequisites
Before you begin, ensure that:
- You have a valid Testsigma API key. Refer to the documentation on generating API keys.
- Java 21 or a newer version is installed on your system.
- You have the custom report JAR file. Contact the Customer Support team to obtain it.
- A JUnit XML template file is available on your system.
Retrieve the Run ID
Section titled “Retrieve the Run ID”- Navigate to the Run Result page of your test plan.
- Copy the Run ID from the Execution ID field or from the page URL.
Generate the Report
Section titled “Generate the Report”- Open Terminal (Mac/Linux) or Command Prompt (Windows).
- Navigate to the folder containing the JAR file.
- Run the command for your operating system.
Mac/Linux:
java -jar custom-report-0.0.6.jar \ --config.plan.runId=YOUR-RUN-ID \ --config.apiKey=YOUR-API-KEY \ --config.report.type=JUNIT \ --config.template.location=/path/to/junit-template.html \ --config.report.output.file=/path/to/output/report.xmlWindows:
java -jar custom-report-0.0.6.jar --config.plan.runId=YOUR-RUN-ID --config.apiKey=YOUR-API-KEY --config.report.type=JUNIT --config.template.location=C:\path\to\junit-template.html --config.report.output.file=C:\path\to\output\report.xmlParameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
| config.plan.runId | Yes | Run ID of the test plan execution |
| config.apiKey | Yes | Testsigma API key |
| config.report.type | Yes | Must be set to JUNIT |
| config.template.location | Yes | Path to the JUnit XML template file |
| config.report.output.file | Yes | Output path for the XML report |
| config.baseURL | No | Testsigma instance URL (default: https://app.testsigma.com/) |
What the Report Includes
Section titled “What the Report Includes”- Suites: Test results grouped by test suites with execution summary
- Test Cases: Individual test results with status and execution time
- Failures: Error details for failed test cases
- Properties: Additional metadata such as linked external IDs
Use in CI/CD
Section titled “Use in CI/CD”The generated JUnit XML report works with Jenkins, GitHub Actions, and GitLab CI for publishing test results.
GitHub Actions Example:
- name: Generate JUnit Report run: | java -jar custom-report-0.0.6.jar \ --config.plan.runId=${{ env.RUN_ID }} \ --config.apiKey=${{ secrets.TESTSIGMA_API_KEY }} \ --config.report.type=JUNIT \ --config.template.location=${{ github.workspace }}/junit-template.html \ --config.report.output.file=${{ github.workspace }}/test-results/report.xml