pwmochawesome
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Playwright Mochawesome Reporter

Using playwright test runner to get info about executed tests, it can generate JSON and HTML with Mochawesome pattern and style. Main goal of this project is to provide an alternative for default reporter for Playwright.

Installation

npm install pwmochawesome --save

Usage

Configure it inside your playwright config file:

{project folder}/playwright.config.ts

export default defineConfig({
    reporter: [ [ 'pwmochawesome' ] ],
});

Options

option default description
outputJSON false Defines whether or not to generate a .json file containing the test results
outputFileName 'mochawesome.json' Defines the name of the .json file if it is enabled
generateHTML true Defines whether to generate a report in HTML
reportDir 'mochawesome-report' Determines the name of the folder that will contain the test results
reportTitle 'Playwright Mochawesome' Title that the html report will use
charts false Whether to show charts in html report

How to pass options to reporter: {project folder}/playwright.config.ts

export default defineConfig({
    reporter: [
        [
            'pwmochawesome',
            {
                outputJSON: true,
                outputFileName: 'result.json'
            }
        ]
    ],
});

Information

This project is tested and confirmed to work with @playwright/test: 1.40.1 with typescript. If you have more recent version and this package don't work, please create a bug or contribute with pull request.

Version compatibility:

Playwright Mochawesome Reporter Mochawesome Marge
2.0.0 7.0.1 6.2.0

Package Sidebar

Install

npm i pwmochawesome

Weekly Downloads

385

Version

2.0.1

License

GPL-3.0-only

Unpacked Size

165 kB

Total Files

26

Last publish

Collaborators

  • armindojr