The `jest-ctrf-json-reporter` package provides a Jest test reporter designed to generate JSON test reports that strictly adhere to the Common Test Report Format (CTRF) standard. Currently stable at version `0.0.11`, the package sees active development with frequent, minor updates addressing dependency bumps and feature enhancements, though it remains in the `0.x.x` release series, indicating potential for breaking changes prior to a `1.0.0` release. Its primary differentiator is its commitment to the CTRF open standard, which aims to standardize JSON test report schemas across various programming languages and testing frameworks. This standardization enables consistent parsing, validation, merging, and analysis of test outcomes, regardless of the underlying testing tool, thereby facilitating more robust CI/CD pipelines and cross-platform reporting solutions. This reporter is a crucial component for projects seeking universal and machine-readable test results.
npm install jest-ctrf-json-reporterVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install the reporter, configure it in `jest.config.js` with common options, and execute Jest tests to generate a CTRF-compliant JSON report.
Consult the GitHub release notes and changelog before upgrading and perform thorough regression testing.
Explicitly configure `outputFile` and `outputDir` options in `jest.config.js` to control the report location and name, ensuring they align with your project's structure.
Understand the implications of `minimal: true` and only use it when a less comprehensive report is intentionally desired. Avoid setting `minimal: true` if detailed information like `testType` or `screenshot` paths are required.
Run `npm install --save-dev jest-ctrf-json-reporter` and double-check the reporter string `'jest-ctrf-json-reporter'` in your `jest.config.js` file.
Ensure your Jest tests are executing and completing without errors. Verify the `outputDir` and `outputFile` settings in `jest.config.js`, confirming the specified paths are valid and writable by the process running Jest.