{"id":28089189,"url":"https://github.com/stephenkilbourn/playwright-report-summary","last_synced_at":"2025-10-18T06:57:13.291Z","repository":{"id":60460123,"uuid":"543220311","full_name":"stephenkilbourn/playwright-report-summary","owner":"stephenkilbourn","description":"generate a customizable text summary of your playwright test results","archived":false,"fork":false,"pushed_at":"2023-04-05T17:32:28.000Z","size":116,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-25T00:30:23.736Z","etag":null,"topics":["automated-testing","playwright","playwright-typescript","report-generator","reporter"],"latest_commit_sha":null,"homepage":"https://github.com/stephenkilbourn/playwright-report-summary","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenkilbourn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-29T16:31:29.000Z","updated_at":"2024-11-01T22:15:15.000Z","dependencies_parsed_at":"2024-06-19T17:08:22.117Z","dependency_job_id":null,"html_url":"https://github.com/stephenkilbourn/playwright-report-summary","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":0.1578947368421053,"last_synced_commit":"ceb310e1382a784192821fe92e03e32bca7cc6aa"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenkilbourn%2Fplaywright-report-summary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenkilbourn%2Fplaywright-report-summary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenkilbourn%2Fplaywright-report-summary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenkilbourn%2Fplaywright-report-summary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenkilbourn","download_url":"https://codeload.github.com/stephenkilbourn/playwright-report-summary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948328,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-testing","playwright","playwright-typescript","report-generator","reporter"],"created_at":"2025-05-13T12:54:38.650Z","updated_at":"2025-10-18T06:57:08.241Z","avatar_url":"https://github.com/stephenkilbourn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📜 🎭 Playwright Report Summary  🎭  📜\n\n[![Coverage Status](https://coveralls.io/repos/github/stephenkilbourn/playwright-report-summary/badge.svg?branch=main)](https://coveralls.io/github/stephenkilbourn/playwright-report-summary?branch=main)\n\nSmall text based custom reporter for Playwright.\nIt can be handy to publish test results for things such as an SNS message or minimal Slack update. This Tool allows you to generate smaller reports with basic info about your test run.\n\n## Table of Contents\n\n* [✨ Installation ✨](#-configuration-)\n* [📍 Configuration 📍](#-configuration-)\n* [ Default Output 📜](#default-output-)\n* [Customizing Outputs 👨‍💻](#customizing-outputs-)\n* [Available Stats 🧰](#available-stats-)\n\n## ✨ Installation ✨\n\nRun following commands:\n\n### npm\n\n`npm install @skilbourn/playwright-report-summary --save-dev`\n\n### yarn\n\n`yarn add @skilbourn/playwright-report-summary --dev`\n\n## 📍 Configuration 📍\n\nModify your `playwright.config.ts` file to include the reporter:\n\n```typescript\n  reporter: [\n    ['@skilbourn/playwright-report-summary', { outputFile: 'custom-summary.txt' }]],\n    ['html'], // other reporters\n    ['dot']\n  ],\n```\n\nThe default output location will be to your root as `summary.txt`  Including the optional `outputFile` parameter allows you to specify a custom report location.\n\n## Default Output 📜\n\nIf you do not pass an `outputFile` option, then the summary will be generated to a `summary.txt` file in the following format:\n\n```txt\nTotal Tests in Suite: 30,\nTotal Tests Completed: 30,\nTests Passed: 27,\nTests Failed: 0,\nFlaky Tests: 0,\nTest run was failure free? true,\nTest Skipped: 3,\nDuration of CPU usage in ms: 75188,\nDuration of entire test run in ms: 12531,\nAverage Test Duration in ms:2506.3,\nTest Suite Duration: 00:13 (mm:ss),\nAverage Test Duration: 00:03 (mm:ss),\nNumber of workers used for test run: 6\n```\n\n## Customizing Outputs 👨‍💻\n\nYou may also create a custom report by leveraging the values in the [`stats`](#available-stats-🧰) object. To add a custom report leveraging your stats, create a function in the format:\n\n```typescript\nimport type { Stats } from '@skilbourn/playwright-report-summary';\n\nfunction customReport(stats: Stats) {\n  return `Greetings, hello, ${stats.expectedResults} tests passed as expected in ${stats.formattedDurationSuite}`;\n}\n\nexport default customReport;\n```\n\nand then modify your `playwright.config.ts` file with the following:\n\n```typescript\nimport type { PlaywrightTestConfig } from '@playwright/test';\nimport { devices } from '@playwright/test';\n\nimport customReport from './customReport';\n // Your custom report path and preferred name\n\n\nconst config: PlaywrightTestConfig = {\n  ...\n  reporter: [\n    ['@skilbourn/playwright-report-summary', { outputFile: 'custom-summary.txt', inputTemplate: customReport }]]\n  ],\n\n```\n\nthis will generate a `custom-summary.txt` file such as :\n\n```txt\nhello, 50 tests passed as expected in 03:51 (mm:ss)\n```\n\n## Available Stats 🧰\n\nThe `stats` object provides information on your test suite:\n\n| **Name**                 | **type** | **Description**                                                                                                                                                  |\n|--------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| testsInSuite             | number   | Total number of tests in suite                                                                                                                                   |\n| totalTestsRun            | number   | total tests run. Retried tests can make this value larger than testsInSuite                                                                                      |\n| expectedResults          | number   | total test finished as [expected](https://playwright.dev/docs/api/class-testcase#test-case-expected-status)                                                      |\n| unexpectedResults        | number   | total tests not finished as expected                                                                                                                             |\n| flakyTests               | number   | total of tests that passed when retried                                                                                                                          |\n| testMarkedSkipped        | number   | total tests marked as test.skip() or test.fixme()                                                                                                                |\n| failureFree              | boolean  | returns `true` if suite completes with all test completing as expected after retries                                                                             |\n| durationCPU              | number   | total milliseconds spent run tests. If tests run parallel with multiple workers, this value will be larger than the duration of running the suite                |\n| durationSuite            | number   | milliseconds to complete all tests in suite                                                                                                                      |\n| avgTestDuration          | number   | average test duration of all tests in milliseconds                                                                                                               |\n| formattedDurationSuite   | string   | duration to complete all tests in mm:ss format                                                                                                                   |\n| formattedAvgTestDuration | string   | average test duration of all tests in mm:ss format                                                                                                               |\n| failures                 | object   | an object containing each failure  in the format `{[test.title: result.status]}` Retries with failures will populate this with multiple entries of the same test |\n| workers                  | number   | total number of workers used to run the suite                                                                                                                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenkilbourn%2Fplaywright-report-summary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenkilbourn%2Fplaywright-report-summary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenkilbourn%2Fplaywright-report-summary/lists"}