Cypress CTRF JSON Reporter

0.0.14 · active · verified Tue Apr 21

cypress-ctrf-json-reporter is a Cypress test reporter designed to generate JSON reports conforming to the Common Test Report Format (CTRF) open standard. Currently at version `0.0.14`, this package is in its early development stages, with releases primarily focused on dependency updates and repository hygiene, indicating a maintenance-oriented cadence rather than active feature development. Its primary differentiator is the strict adherence to CTRF, a community-driven specification that ensures uniform, framework-agnostic test reports. This standardization allows for consistent validation, merging, comparison, and analysis of test results across diverse programming languages and testing frameworks, thereby improving CI/CD pipeline integration and analytics. It seamlessly integrates into Cypress configurations, outputting a `ctrf-report.json` file by default.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to install and configure the reporter within Cypress's `cypress.config.js` to generate a CTRF-compliant JSON report.

const { defineConfig } = require('cypress');
const { GenerateCtrfReport } = require('cypress-ctrf-json-reporter');

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      // Implement node event listeners here
      new GenerateCtrfReport({
        on,
        outputFile: 'my-custom-report.json',
        appName: 'My Cypress App',
        buildNumber: process.env.CI_BUILD_NUMBER ?? 'local'
      });
    },
  },
});

// To run:
// npx cypress run

view raw JSON →