Skip to content

About

Playwright reporter that uploads results to Playwright Reports Server

Resources

Stars

9 stars

Watchers

2 watching

Forks

Repository files navigation

reporter-playwright-reports-server

⚠️ DEPRECATED

This package is deprecated and no longer maintained. It is compatible only with Playwright Reports Server versions below 6.0.0. It stays published so existing setups keep working, but it will not receive updates.

If your server is 6.0.0 or newer, use @cyborgtests/reporter instead. It is developed inside the server repository: https://github.com/CyborgTests/playwright-reports-server/tree/main/packages/reporter

Playwright Reports Server Reporter package
< 6.0.0 @cyborgtests/reporter-playwright-reports-server (this one, deprecated)
>= 6.0.0 @cyborgtests/reporter

Migration

npm uninstall @cyborgtests/reporter-playwright-reports-server
npm i -D @cyborgtests/reporter

Then replace the reporter name in playwright.config:

- ['@cyborgtests/reporter-playwright-reports-server', { ... }],
+ ['@cyborgtests/reporter', { ... }],

Note: @cyborgtests/reporter requires @playwright/test ^1.59.1. See its readme for the current options.

Playwright reporter that uploads results to Playwright Reports Server - https://github.com/CyborgTests/playwright-reports-server

Install

npm i -D @cyborgtests/reporter-playwright-reports-server

Then, in playwright.config file:

  reporter: [
    // blob reporter is required, produced zip would be uploaded
    ['blob', { outputFile: 'test-results/blob.zip' }],
    [
      '@cyborgtests/reporter-playwright-reports-server',
      {
        // true by default. Use this if you need to skip this reporter for some cases (local executions for example)
        enabled: true,
        /**
         * Your server url
         * @see https://github.com/CyborgTests/playwright-reports-server
         */
        url: 'https://your server instance.com',
        // Set token if your server instance has authentication enabled
        token: '1234',
        // Timeout for reporter HTTP requests to finish, default 60000ms, increase if you have slow server and big requests.
        requestTimeout: 60000,
        // Relative path to your blob. Required.
        reportPath: 'test-results/blob.zip',
        // Any custom metadata to attach to this blob (strings)
        resultDetails: {
          branch: process.env.CI_COMMIT_BRANCH,
          foo: 'bar',
          bar: 'baz'
        },
        // Automatically trigger HTML report generation after tests finish. Shards supported. false by default
        triggerReportGeneration: false
      },
    ],
  ],

Then run your tests, if you see [ReporterPlaywrightReportsServer] 🎭 HTML Report is available at: ... - your blob results were successfully sent to server!

Shards

Auto-generation of report after all shards completed is supported. But you must specify testRun and triggerReportGeneration: true:

  • In reporter configuration pass
resultDetails: {
  ...
  // testRun required, it should be same for all shards!
  testRun: 'my-awesome-test-run-12'
  ...
},
triggerReportGeneration: true

Reporter passes current shard number and total shard count to server, and after all shards uploaded - report will be generated by server for all blobs in this testRun

About

Playwright reporter that uploads results to Playwright Reports Server

Resources

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages