bamboo-jest-reporter is a Jest test reporter designed to integrate test, coverage, and snapshot results with Atlassian Bamboo's Mocha Test Parser. It transforms Jest's native output into a `jest.json` file, making it consumable by Bamboo. Currently at version 1.0.3, the package appears to be stable with a focus on specific enterprise CI/CD integration. Its key differentiator lies in its tailored output format for Bamboo and granular control over which aspects of Jest's results (tests, code coverage, or obsolete snapshots) are reported as failures, configurable via environment variables, allowing for flexible build pipeline management. This specificity makes it a niche but valuable tool for teams using Jest with Bamboo.
npm install bamboo-jest-reporterVerified import paths — ran on the pinned version, not inferred.
Demonstrates `package.json` configuration for Jest to use `bamboo-jest-reporter` and generate a `jest.json` report, including coverage.
Ensure environment variables are set correctly in your CI/CD environment or explicitly unset them if default reporting is desired. The default behavior is to report all three aspects.
Add `collectCoverage: true` and a `coverageThreshold` object to your `jest.config.js` or `package.json` Jest configuration. Alternatively, run Jest with `jest --coverage`.
For local development or environments where console output is desired, use `reporters: [ "default", "bamboo-jest-reporter" ]`. Only omit `"default"` in CI environments where console output is parsed differently or explicitly not needed.
This is expected behavior for Bamboo to correctly report test outcomes. If you want the shell command to pass but for Bamboo to show failures in the 'Tests' tab, this setup is correct. To prevent Bamboo from failing the *build* due to test failures, you would need to modify Bamboo's build plan logic, not the reporter.
Ensure `collectCoverage: true` is set in your `jest.config.js` or `package.json` Jest configuration, and that a `coverageThreshold` object is defined for desired coverage targets.
Verify that `"bamboo-jest-reporter"` is present in the `reporters` array within your Jest configuration. Also, confirm that your `npm test` script correctly executes Jest.