trcli parse_junit, and works with every CI test reporter that reads JUnit (GitHub dorny/test-reporter, GitLab artifacts:reports:junit, Jenkins, Buildkite, CircleCI).
Get the report
- Dashboard
- API
Open a group run under Results, open its actions menu, and choose Download JUnit report. The option appears once every run in the group has finished.
Import into TestRail
Install the TestRail CLI and point it at the file:-y lets trcli create cases that do not exist yet. Omit it and pass -n to reject unknown cases instead.
Matching TesterArmy tests to TestRail cases
TestRail decides which case a result belongs to using--case-matcher:
The
classname is the TesterArmy group name and the name is the test title, so with auto each group becomes a TestRail section and each test a case.
What lands in TestRail
- Status: passing runs are Passed. A
FAILEDverdict is a<failure>and imports as Failed. ABLOCKEDverdict, a run that crashed before a verdict, or a run that finished without one is an<error>(typeBLOCKED, the run error code, orMISSING_VERDICT); TestRail imports errors as Failed, and thetesterarmy_resultproperty keeps the distinction. Cancelled, planner-skipped, and unfinished runs are<skipped>. - Comment: the
testrail_result_commentproperty holds the verdict, the agent’s summary, a link to the run in the dashboard, and screenshot URLs. - Steps: one
testrail_result_stepproperty per test step (passed:<step title>,failed:<step title>, oruntested:<step title>for any other step status), so step results show up on the TestRail result when the case uses separated steps. - Elapsed: the
timeattribute is the run duration in seconds.
Use it as a CI report
The same file works as a CI test report. Queue the group throughPOST /api/v1/groups/{groupId}/runs, keep the batchId from the response, and download the report once the batch has finished. On GitHub Actions:
artifacts: reports: junit: so results render on the merge request.
Troubleshooting
409 BatchNotFinished
Runs are still queued or running. Wait for the batch, or add ?allowIncomplete=true to export the unfinished runs as skipped.
Every import creates new cases
You are using--case-matcher auto without an automation_id field, or the test titles changed. Switch to --case-matcher name and add [C<id>] to the TesterArmy test titles.
Screenshots are links, not attachments
trcli only uploads attachments from local file paths. The report carries screenshot URLs in the result comment; download them in CI and addtestrail_attachment properties yourself if you need inline attachments.