CodeceptJS CTRF JSON Reporter

0.0.5 · active · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

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

view raw JSON →