This repository is a practical CTRF + Jira integration example using @testream/cli. It demonstrates a framework-agnostic pattern: generate a CTRF JSON report, then upload it to Testream so results appear in Jira.
This example uses Python + pytest with pytest-json-ctrf, but the same upload model works for any test tool that can output CTRF.
If you are searching for "CTRF Jira reporter", "pytest results to Jira", or "framework-agnostic test reporting to Jira", this repo is the implementation template.
- Framework-agnostic: Works beyond native reporters.
- CI-portable: Same upload command can run in GitHub Actions, CircleCI, GitLab, Jenkins, or Azure.
- Fallback path: Useful when your framework has no native Testream reporter.
- Real triage demo: Intentional failing tests show Jira failure insights.
Testream is an automated test management and reporting platform for Jira teams. It ingests test results from native integrations and CTRF uploads, then provides failure diagnostics, trends, and release quality visibility in Jira.
If this sample repository is not the framework you need, browse all native reporters in the Testream docs: https://docs.testream.app/.
Click to see how Testream turns raw CI test results into actionable Jira insights (failures, trends, and release visibility):
Install Testream Automated Test Management and Reporting for Jira in your Jira workspace to view uploaded runs.
Use this approach when:
- Your framework does not have a native Testream reporter.
- You already generate CTRF in your pipeline.
- You want one upload pattern across multiple CI providers.
If a native reporter exists (Vitest, Jest, Playwright, Cypress, Mocha, WebdriverIO), use that first for simpler setup and richer auto-metadata.
src/
cart.py
product.py
discount.py
tests/
test_cart.py - Passing + intentional failure
test_product.py - Passing + intentional failure
test_discount.py - Passing + intentional failure
requirements.txt
.github/workflows/ctrf.yml
.env.example
The intentional failures help verify how failed test output appears in Testream/Jira.
- Sign in at testream.app.
- Create a project.
- Copy your API key.
pip install -r requirements.txtpython -m pytest --ctrf ctrf/ctrf-report.jsonTESTREAM_API_KEY=<your key> npx @testream/cli \
--report-path ctrf/ctrf-report.json \
--test-tool pytest \
--app-name ctrf-jira-reporter-example \
--test-environment local \
--test-type unit \
--fail-on-errorThe workflow at .github/workflows/ctrf.yml runs on push, pull request, and manual dispatch.
Add this repository secret:
Settings -> Secrets and variables -> Actions -> New repository secret
| Name | Value |
|---|---|
TESTREAM_API_KEY |
Your Testream API key |
Important CI behavior in this repo:
- Pytest step uses
continue-on-error: trueso upload still runs if tests fail. - Upload step includes
--fail-on-errorto fail CI on upload issues. - CI metadata (branch, SHA, repository URL, build number, build URL) is auto-detected.
You can run the same CLI uploader in other systems:
- CircleCI
- Bitbucket Pipelines
- GitLab CI
- Jenkins
- Azure Pipelines
Use the same parameters and map provider-specific env vars for branch/SHA/build metadata when needed.
After connecting Testream to Jira, you get:
- Dashboard pass/fail summaries
- Failure diagnostics with stack traces
- Trend analytics across runs
- Jira issue creation from failed tests
- Verify
TESTREAM_API_KEY. - Verify
ctrf/ctrf-report.jsonexists and is valid JSON. - Verify Testream project is connected to the correct Jira workspace.
- Ensure provider env vars are present or pass metadata flags explicitly.
- Yes, if available for your framework. Keep CTRF flow for unsupported stacks.
No. Pytest is the example here, but any framework that outputs CTRF can use this flow.
To demonstrate end-to-end failure triage in Testream/Jira.
It is an example with production-style CI wiring intended to be adapted.
| Approach | Benefit | Tradeoff |
|---|---|---|
| Native Testream reporter | Lowest setup for supported frameworks | Not available for every framework |
| Custom uploader scripts | Flexible | More maintenance and edge-case handling |
CTRF + @testream/cli (this repo) |
Framework-agnostic, CI-portable, standardized | Requires CTRF generation step |
- Testream app: https://testream.app
- Testream Automated Test Management and Reporting for Jira: https://marketplace.atlassian.com/apps/3048460704/testream-automated-test-management-and-reporting-for-jira
- CTRF format: https://ctrf.io
- CLI uploader docs: https://docs.testream.app/reporters/cli
