{"library":"pw-test-logs-reporter","title":"Playwright Test Logs Reporter","description":"pw-test-logs-reporter is a specialized Playwright test reporter designed to automatically send details of failed test cases to a configurable external API endpoint. Currently at version 1.0.1, this package offers a simple, purpose-built solution for integrating Playwright's test results into external logging or incident management systems, with a specific focus on capturing and reporting only test failures. It integrates directly into Playwright's configuration via a string reference in the `reporter` array, and requires the `FAILED_TEST_RESULTS_ENDPOINT` environment variable to be set for operation. Its release cadence is likely stable and infrequent, given its targeted functionality. It differentiates itself by its singular focus on failed tests and straightforward API reporting, providing a lean alternative to more comprehensive, all-encompassing reporting solutions.","language":"javascript","status":"active","last_verified":"Tue Apr 21","install":{"commands":["npm install pw-test-logs-reporter"],"cli":null},"imports":["import PwTestLogsReporter from 'pw-test-logs-reporter';","import type { PwTestLogsReporter } from 'pw-test-logs-reporter';","const PwTestLogsReporter = require('pw-test-logs-reporter').default;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { defineConfig } from '@playwright/test';\n\nconst FAILED_ENDPOINT = process.env.FAILED_TEST_RESULTS_ENDPOINT ?? 'http://localhost:8080/api/failed-tests';\n\n// playwright.config.ts\nconst config = defineConfig({\n  testDir: './tests', // Specify your test directory\n  reporter: [\n    [\"list\"], // Standard list reporter\n    [\"pw-test-logs-reporter\"]\n  ],\n  use: {\n    // Base URL to use in actions like `await page.goto('/')`.\n    baseURL: 'http://127.0.0.1:3000',\n    trace: 'on-first-retry',\n  },\n  projects: [\n    {\n      name: 'chromium',\n      use: {\n        browserName: 'chromium',\n      },\n    }\n  ]\n});\n\nexport default config;\n","lang":"typescript","description":"This configuration shows how to add `pw-test-logs-reporter` to your Playwright test setup, alongside the standard 'list' reporter. It sets up a basic Playwright project and emphasizes the critical `FAILED_TEST_RESULTS_ENDPOINT` environment variable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}