The `wdio-ctrf-json-reporter` is a WebdriverIO test reporter designed to generate JSON test reports adhering to the Common Test Report Format (CTRF) standard. As of version `0.0.17`, this package enables consistent, standardized reporting of test results, facilitating easier validation, merging, comparison, and analysis across various testing frameworks and languages. It is actively maintained with frequent minor updates, focusing on bug fixes, dependency updates, and feature enhancements like improved URL building and handling of retried specs. Its key differentiator is the adoption of the community-driven CTRF open standard, which aims to unify test reporting, providing a structured output for CI/CD integration and developer tooling. This reporter is essential for projects seeking interoperability and consistent data formats for their WebdriverIO test outcomes.
npm install wdio-ctrf-json-reporterVerified import paths — ran on the pinned version, not inferred.
Demonstrates installation, configuration within `wdio.conf.ts` with common options, and the recommended `ctrf-cli` merge step for parallel test execution.
Pin to exact patch versions (`0.0.x`) and regularly review release notes for updates. Consider `npm audit` and `npm outdated` frequently.
Use the `ctrf-cli` package to merge individual reports into a single, consolidated CTRF JSON file after test execution: `npx ctrf merge <outputDir>`.
Explicitly set `outputDir` in the reporter options: `outputDir: 'my-reports-folder'` and verify directory permissions.
Run `npm install --save-dev wdio-ctrf-json-reporter` to ensure the package is installed.
Use the `ctrf-cli` tool to merge all individual reports into one: `npx ctrf merge <directory-with-reports>`.
Review `wdio.conf.ts/js` for correct reporter setup. Check WebdriverIO logs for test failures or unhandled exceptions that might prevent reporter events from firing correctly. Ensure `minimal: false` is set if you need full report details.