# pwmochawesome

> A playwright custom reporter that integrates with mochawesome reporter

Latest version **2.0.2** (published 2024-09-04) · GPL-3.0-only license · 0 weekly downloads

## Install

```sh
npm install pwmochawesome
pnpm add pwmochawesome
yarn add pwmochawesome
bun add pwmochawesome
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2024-09-04 |
| First published | 2022-04-12 |
| Weekly downloads | 0 |
| License | GPL-3.0-only |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 154.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Armindo Junior |
| Maintainers | armindojr |
| Keywords | reporter, mocha, mochawesome, playwright, automation |

## Links

- npm: https://www.npmjs.com/package/pwmochawesome
- npm.io page: https://npm.io/package/pwmochawesome

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^10.0.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) 6.0.1
- [@playwright/test](https://npm.io/package/@playwright/test.md) ^1.46.1
- [mochawesome-report-generator](https://npm.io/package/mochawesome-report-generator.md) ^6.2.0

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2024-09-04
- 2.0.1 — 2024-01-16
- 2.0.0 — 2024-01-16
- 1.1.1 — 2024-01-11
- 1.1.0 — 2024-01-10
- 1.0.1 — 2022-04-16
- 1.0.0 — 2022-04-12

## README

# Playwright Mochawesome Reporter

Using playwright test runner to get info about executed tests, it can generate JSON and HTML with [Mochawesome](https://github.com/adamgruber/mochawesome) pattern and style. Main goal of this project is to provide an alternative for default reporter for [Playwright](https://playwright.dev/).

## Installation

```bash
npm install pwmochawesome --save
```

## Usage

Configure it inside your playwright config file:

`{project folder}/playwright.config.ts`

```js
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`

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

## Information

This project is tested and confirmed to work with `@playwright/test: 1.46.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.1.3       | 6.2.0 |

---
_Source: https://npm.io/package/pwmochawesome · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
