Skip to content

Playwright reporter that makes the data used for it's html-reporter accessible

License

Notifications You must be signed in to change notification settings

samhuk/playwright-html-data-reporter

Repository files navigation

playwright-html-data-reporter

Playwright reporter that makes the data used for it's html-reporter accessible

license npm version

Overview

This package provides a Playwright Reporter that makes the data that their HTML Reporter produces and uses easily accessible.

Usage

import { PlaywrightTestConfig } from '@playwright/test/types/test'

const playwrightConfig: PlaywrightTestConfig = {
  ...
  reporter: [
    ['html', { open: 'never', outputFolder: './my-playwright-results' }],
    ['playwright-html-data-reporter', { outputFile: 'data.txt' }],
  ],
  ...
}
// Observe file at './my-playwright-results/data.txt' containing the data that the HTML Reporter uses

Why

This package makes it easier to display Playwright test results in third-party apps.

Currently, their HTML Reporter does not expose how it produces it's data, nor makes it available via config, nor makes it otherwise easily accessible, instead only embedding it within it's "self-contained report" index.html file. This data, which is a zip-compressed, base-64-encoded string, can then be read and fed into front-end components like their ReportView or a completely different component.

This comes off of the declination of a request to make that data and the React component the HTML Reporter uses to render it accessible. If/when this is accepted in the future, this package can likely be deprecated.

Development

See ./contributing/development.md


Buy Me A Coffee

About

Playwright reporter that makes the data used for it's html-reporter accessible

Topics

Resources

License

Stars

Watchers

Forks