38 / 56 · 18 Test Management Tools · Traceability← prev⊞ allnext →☰ Read as one page
5.5CI/CD Integration for Traceability
The best test management setups auto-update results from pipeline runs, eliminating manual status updates.
Typical Flow
- Pipeline runs automated tests and produces JUnit XML or JSON results
- A post-test step calls the test management API to upload results
- Test cases in the platform are automatically marked as Passed/Failed
- Defect tickets are auto-created for new failures (optional)
- Dashboards update in real time
Upload Results to TestRail
# Using TestRail CLI
trcli -y \
-h "https://yourcompany.testrail.io" \
--project "Web App" \
--title "Nightly Regression Run" \
parse_junit \
--file "./test-results/junit.xml"
Upload Results to Xray
# Using Xray REST API
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $XRAY_TOKEN" \
-X POST \
--data @test-results/junit.xml \
"https://xray.cloud.getxray.app/api/v2/import/execution/junit"
Upload Results in GitHub Actions
# Example: Upload to TestRail after tests complete
- name: Upload results to TestRail
if: always()
run: |
pip install trcli
trcli -y \
-h "${{ secrets.TESTRAIL_URL }}" \
-u "${{ secrets.TESTRAIL_USER }}" \
-p "${{ secrets.TESTRAIL_API_KEY }}" \
--project "Web App" \
--title "PR #${{ github.event.number }} Test Run" \
parse_junit \
--file "./test-results/junit.xml"