@testream/jest-reporter
v1.2.5
Published
Publish Jest unit and integration test results, failures, source locations, and CI metadata to Testream and Jira.
Downloads
617
Maintainers
Readme
@testream/jest-reporter: Jest test reporting for Jira
@testream/jest-reporter publishes Jest unit and integration test results from CI/CD to Testream, making failures and run context visible from Jira. Jest remains the execution source: Testream does not force teams to recreate every code-first test as a manual Jira case.
What the reporter sends to Testream and Jira
- Passed, failed, skipped, and pending Jest results
- Failure messages, stack traces, source locations, and bounded snippets
- Branch, commit, build, environment, and CI metadata, including merge-base data for pull-request comparisons
- Suite changes and trends for Jira work and release reviews
For pull requests, the reporter uses an explicit TESTREAM_MERGE_BASE_SHA or provider-supplied merge-base metadata; otherwise it resolves git merge-base from the existing checkout without fetching. Keep history available (fetch-depth: 0 on GitHub Actions); if no merge base can be resolved, Testream falls back to execution-time comparison.
This connects fast code-level feedback to the product and delivery context already followed in Jira.
Install and configure
npm install --save-dev @testream/jest-reporter// jest.config.js
module.exports = {
testLocationInResults: true,
reporters: [
'default',
[
'@testream/jest-reporter',
{
apiKey: process.env.TESTREAM_API_KEY,
uploadEnabled: true,
},
],
],
};testLocationInResults: true is recommended because it gives the reporter exact line metadata. Without it, the reporter still attempts to infer source snippets from the test file, but that fallback is less reliable than Jest’s built-in location data.
Jest evidence in CI/CD
Keep your existing Jest command and store TESTREAM_API_KEY as a protected secret. The reporter publishes the completed run from GitHub Actions, GitLab CI/CD, Azure Pipelines, Jenkins, or another command-based CI provider, preserving source and failure context for later inspection.
Frequently asked questions
Do we need to recreate automated tests as manual Jira cases?
No. Your Jest suite remains the code-first execution source. Testream adds durable reporting and Jira visibility without requiring duplicate manual cases.
Is testLocationInResults required?
No, but it is strongly recommended. Exact Jest location data produces more reliable source evidence than filename and test-name inference.
