This repository is a practical Jest + Jira integration example using @testream/jest-reporter. It shows how to upload Jest test results from local runs and GitHub Actions to Jira via Testream.
If you are searching for "Jest Jira reporter", "Jest GitHub Actions Jira integration", or "send Jest results to Jira", this repo is the implementation template.
- CI-ready: Includes a complete GitHub Actions workflow.
- Fast setup: Reporter auto-detects most CI metadata.
- Safe defaults: Upload is enabled only when
TESTREAM_API_KEYexists. - Real failure triage: Intentional failing tests demonstrate Jira-visible errors.
Testream is an automated test management and reporting platform for Jira teams. It ingests test runs from frameworks like Jest, Vitest, Playwright, and Cypress, then provides failure diagnostics, trends, and release-level 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.
src/
cart.ts - Cart class and checkout behavior
product.ts - Product validation and pricing helpers
discount.ts - Coupon validation and discount functions
__tests__/
cart.test.ts - Cart tests (passing + 1 intentional failure)
product.test.ts - Product tests (passing + 1 intentional failure)
discount.test.ts - Discount tests (passing + 1 intentional failure)
jest.config.ts
.github/workflows/jest.yml
.env.example
The intentional failures help you verify exactly how failed Jest runs appear in Testream/Jira.
- Sign in at testream.app.
- Create a project.
- Copy your API key.
npm installcp .env.example .envSet at least:
TESTREAM_API_KEY=<your key>npm testWith TESTREAM_API_KEY, results are uploaded automatically. Without it, tests still run and upload is skipped.
Key behavior in this example:
- Reporter is conditionally added only when API key is present.
failOnUploadError: trueis enabled to prevent silent CI data loss.testEnvironment,appName,appVersion, andtestTypeare explicitly set.- CI metadata (
branch,commitSha,repositoryUrl,buildNumber,buildUrl) is auto-resolved.
Reporter docs: https://docs.testream.app/reporters/jest
The workflow at .github/workflows/jest.yml runs on pushes and pull requests to main.
Add this repository secret:
Settings -> Secrets and variables -> Actions -> New repository secret
| Name | Value |
|---|---|
TESTREAM_API_KEY |
Your Testream API key |
Workflow env examples already set:
| Variable | Example |
|---|---|
TESTREAM_APP_VERSION |
${{ github.sha }} |
TESTREAM_TEST_ENVIRONMENT |
ci |
After connecting Testream to Jira, you get:
- Dashboard visibility for pass/fail health
- Failure details with stack traces and assertion diffs
- Historical trend analytics
- Jira issue creation directly from failed tests
- Confirm
.envcontainsTESTREAM_API_KEY. - Re-run tests in a shell session where env vars are loaded.
- Confirm
TESTREAM_API_KEYexists in GitHub Actions secrets. - Check whether the workflow had access to secrets (especially fork PRs).
- Keep
failOnUploadError: trueinjest.config.ts.
It is an example repository with production-style reporter and CI wiring meant to be copied.
To demonstrate failure triage and Jira issue workflows end-to-end.
Yes. Jest runs normally without an API key; upload is simply disabled.
| Approach | Benefit | Tradeoff |
|---|---|---|
| Store raw test logs/artifacts | Minimal setup | Limited Jira-native insights |
| Build custom uploader scripts | Fully custom | More maintenance burden |
| Testream Jest reporter (this repo) | Native integration + Jira analytics | Requires Testream setup |
- 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
- Jest reporter docs: https://docs.testream.app/reporters/jest
- Jest docs: https://jestjs.io
