@testream/jasmine-reporter
v1.0.1
Published
Publish Jasmine test results, source evidence, and CI metadata to Testream and Jira.
Maintainers
Readme
@testream/jasmine-reporter: Jasmine test reporting for Jira
@testream/jasmine-reporter publishes Jasmine 5 test results from CI/CD to Testream, making failures, source evidence, and run context visible from Jira. Jasmine remains the execution source, so teams do not need to recreate every automated test as a manual Jira case.
What the reporter sends to Testream and Jira
- Passed, failed, skipped, pending, and other Jasmine 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
- Application and test-type metadata
- 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 Jasmine execution feedback to the product and delivery context teams already follow in Jira.
Install and configure
npm install --save-dev @testream/jasmine-reporterRegister the reporter from a Jasmine helper such as spec/helpers/testream-reporter.js:
const TestreamJasmineReporter = require('@testream/jasmine-reporter');
jasmine.getEnv().addReporter(
new TestreamJasmineReporter({
apiKey: process.env.TESTREAM_API_KEY,
uploadEnabled: Boolean(process.env.TESTREAM_API_KEY),
}),
);The reporter writes ctrf/ctrf-report.json and publishes the completed run when uploads are enabled. Set uploadEnabled: false to generate a local CTRF report without making a network request. Use outputDir and outputFile when the report should be written elsewhere.
Jasmine evidence in CI/CD
Jasmine does not provide source locations through its standard reporter lifecycle. Testream therefore adds bounded source evidence when Jasmine test names can be matched to JavaScript or TypeScript test files. For ESM or programmatic runners, provide the executed files through sourceFiles; sourceRoot, discoverFiles, maxChars, and maxLines are available when the defaults need adjustment.
Keep running Jasmine with the command already used by your CI provider and store TESTREAM_API_KEY as a protected secret. The reporter publishes completed results from GitHub Actions, GitLab CI/CD, Azure Pipelines, Jenkins, Bitbucket Pipelines, and other command-based CI providers.
Frequently asked questions
Do we need to recreate automated tests as manual Jira cases?
No. Your Jasmine suite remains the code-first execution source. Testream adds durable reporting and Jira visibility without requiring duplicate manual cases.
Are source locations required?
No. The reporter attempts bounded source evidence when exact Jasmine locations are unavailable. Explicit sourceFiles are recommended for ESM or programmatic runners.
How do I make upload failures fail CI?
Set failOnUploadError: true in the reporter configuration. Uploads are best-effort by default.
