{"library":"playwright-ctrf-json-reporter","title":"Playwright CTRF JSON Reporter","description":"The `playwright-ctrf-json-reporter` package is a Playwright test reporter designed to generate test results in the Common Test Report Format (CTRF) as a JSON file. The CTRF standard, an open, community-driven initiative, aims to provide a consistent and language-agnostic format for test reports, allowing for uniform validation, merging, comparison, and analysis across diverse testing frameworks and programming languages. Currently at version 0.0.29, the package is in active early development, receiving frequent updates that introduce new features and address minor issues. Its primary differentiator is its strict adherence to the CTRF specification, ensuring that generated reports are fully compatible with CTRF-consuming tools, thereby providing enhanced test insights with detailed test information and configurable environment details. This allows for seamless integration into CI/CD pipelines that leverage the CTRF standard for unified test reporting.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install playwright-ctrf-json-reporter"],"cli":null},"imports":["reporter: [['playwright-ctrf-json-reporter', { outputFile: 'report.json' }]]"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { defineConfig, devices } from '@playwright/test';\n\nexport default defineConfig({\n  testDir: './tests',\n  fullyParallel: true,\n  forbidOnly: !!process.env.CI,\n  retries: process.env.CI ? 2 : 0,\n  workers: process.env.CI ? 1 : undefined,\n  reporter: [\n    ['list'], // Optional: Use default 'list' reporter alongside CTRF\n    ['playwright-ctrf-json-reporter', {\n      outputFile: 'ctrf-report.json', // Optional: Customize output file name\n      outputDir: 'test-results/ctrf', // Optional: Specify output directory\n      minimal: false,                  // Optional: Generate comprehensive report (default: false)\n      screenshot: true,                // Optional: Include screenshots in the report\n      annotations: true,               // Optional: Include annotations\n      testType: 'e2e',                 // Optional: Specify test type\n      appName: 'MyPlaywrightApp',      // Optional: Application name\n      appVersion: '1.2.3',             // Optional: Application version\n      osPlatform: process.platform,    // Optional: OS platform (example using Node.js process info)\n      osRelease: process.release.name  // Optional: OS release name\n    }]\n  ],\n  use: {\n    trace: 'on-first-retry',\n  },\n  projects: [\n    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },\n    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },\n    { name: 'webkit', use: { ...devices['Desktop Safari'] } }\n  ]\n});\n\n// To run tests and generate report:\n// npx playwright test","lang":"typescript","description":"Demonstrates how to install the reporter and configure it in `playwright.config.ts` to generate a CTRF-compliant JSON report with custom options, including environment details.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}