Registry / testing / codeceptjs-ctrf-json-reporter

codeceptjs-ctrf-json-reporter

JSON →
library0.0.5jsnpmunverified

The `codeceptjs-ctrf-json-reporter` is a CodeceptJS plugin designed to save test results as a JSON file, strictly adhering to the Common Test Report Format (CTRF) standard. Currently at version `0.0.5`, this package aims to provide a consistent and universal reporting schema for CodeceptJS users, facilitating easier analysis and comparison of test outcomes across diverse testing tools and programming languages. While a specific release cadence is not yet established given its pre-1.0 status, it integrates seamlessly into CodeceptJS configurations. Its key differentiator is its commitment to the open-source CTRF specification, ensuring uniformity in test reports, which is crucial for modern CI/CD pipelines and cross-platform testing environments, offering a standardized approach where other tools often produce varied formats.

npm install codeceptjs-ctrf-json-reporter
INSTALL
IMPORT
SIG · CODECEPTJS-CTRF-JS
C
codeceptjs-ctrf-json-reporter
testingjavascriptv0.0.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CTRFJsonReporter (via config)
plugins: { ctrfJsonReporter: { require: 'codeceptjs-ctrf-json-reporter', enabled: true } }
import { CTRFJsonReporter } from 'codeceptjs-ctrf-json-reporter'
The primary way to 'import' and use this reporter is through the `require` string in the CodeceptJS configuration file. Direct programmatic imports of the class are not typical for plugin usage.
CTRFJsonReporter (Class)
import CTRFJsonReporter from 'codeceptjs-ctrf-json-reporter';
const CTRFJsonReporter = require('codeceptjs-ctrf-json-reporter');
While not the primary usage, the reporter likely exports its main class as a default export, especially since it ships TypeScript types. This might be used for extension or advanced programmatic integration.
CTRFJsonReporterOptions (Type)
import type { CTRFJsonReporterOptions } from 'codeceptjs-ctrf-json-reporter';
Given it ships TypeScript types and supports configuration options, an interface for these options is likely exported for type-checking and developer tooling. (Inferred based on common TypeScript library patterns).

This quickstart demonstrates how to install the `codeceptjs-ctrf-json-reporter` package and configure it within your CodeceptJS project. It shows how to enable the reporter and customize basic options like output file and directory, along with adding application environment details. Finally, it provides the command to run CodeceptJS tests to generate the CTRF-compliant JSON report.

npm install --save-dev codeceptjs-ctrf-json-reporter // codecept.conf.js or codecept.conf.ts plugins: { ctrfJsonReporter: { require: 'codeceptjs-ctrf-json-reporter', enabled: true, outputFile: 'my-ctrf-report.json', // Optional: Customize output file name outputDir: 'reports/ctrf', // Optional: Customize output directory appName: 'MyAwesomeApp', // Optional: Include environment info appVersion: '1.2.3' }, // ... other plugins ... }, // To run your tests and generate the report npx codeceptjs run
Debug
Known issues
gotchaThe package is currently in a pre-1.0 development phase (version `0.0.5`). APIs and features may undergo significant changes in future minor or patch releases, potentially introducing breaking changes without major version bumps until a stable 1.0 release.
fix
Monitor GitHub releases and changelogs for updates. Pin to specific patch versions (`~0.0.x`) if stability is critical.
affects: <1.0.0
gotchaThe reporter's configuration is managed entirely through the `plugins` section of `codeceptjs.config.js`. Attempting to import or instantiate the reporter directly in test files or other support code is not the intended usage and will not integrate it with CodeceptJS's lifecycle.
Errors
Common errors & fixes
Error: Cannot find module 'codeceptjs-ctrf-json-reporter'
The package `codeceptjs-ctrf-json-reporter` is not installed or the `require` path in `codeceptjs.config.js` is incorrect.
fix
Ensure the package is installed: `npm install --save-dev codeceptjs-ctrf-json-reporter`. Verify the `require` path in your CodeceptJS configuration matches the package name exactly.
TypeError: Cannot read properties of undefined (reading 'ctrfJsonReporter')
The `plugins` configuration for `ctrfJsonReporter` is malformed or not correctly nested within the `plugins` object in `codeceptjs.config.js`.
fix
Double-check your `codeceptjs.config.js` file to ensure the `ctrfJsonReporter` entry is correctly placed within the `plugins` object and follows the expected JavaScript/TypeScript object literal syntax.
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies
codeceptjsrequiredThis package is a plugin for CodeceptJS and requires CodeceptJS to be installed as a peer dependency for its functionality.
Agent activity
10 hits · last 30 days
node
6
OpenAI (training)
1
Resources
codeceptjs-ctrf-json-reporter — npm install codeceptjs-ctrf-json-reporter · libregistry