Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anooprav7/playwright-merge-html-reports
Merge multiple playwright HTML Reports into a single one
https://github.com/anooprav7/playwright-merge-html-reports
html-report playwright
Last synced: 1 day ago
JSON representation
Merge multiple playwright HTML Reports into a single one
- Host: GitHub
- URL: https://github.com/anooprav7/playwright-merge-html-reports
- Owner: anooprav7
- License: apache-2.0
- Created: 2022-02-20T13:20:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-22T11:22:09.000Z (over 2 years ago)
- Last Synced: 2023-03-02T23:01:09.398Z (almost 2 years ago)
- Topics: html-report, playwright
- Language: HTML
- Homepage: https://www.npmjs.com/package/playwright-merge-html-reports
- Size: 8.38 MB
- Stars: 13
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# This repository has moved. [Please use the new location](https://github.com/Rippling/playwright-merge-html-reports)
# Merge Playwright HTML reports
- Merge Playwright HTML reports to a single HTML report
- The `index.html` file is generated and other artifacts (screenshot, trace file etc) are copied from the source folders to the merged Report folder
- Built on `node 14.18.1`.
- Note: `@playwright/test` is a peer dependency, not a dev dependency.- Inspiration https://github.com/microsoft/playwright/issues/10437
> :warning: **Tested on some use cases**: Use at your own risk. Still at early stages of development
## Usage
```bash
npm install playwright-merge-html-reports --dev
```- You will need to install `@playwright/test` package first (if not already done).
- In your Node.js script
```js
const { mergeHTMLReports } = require("playwright-merge-html-reports");
```
### Arguments
1. `inputReportPaths` - Array of path to html report folders
```js
mergeHTMLReports([
process.cwd() + "/html_report-1",
process.cwd() + "/html_report-2"
])
```
2. `config` - Optional
```jsconst inputReportPaths = [
process.cwd() + "/html_report-1",
process.cwd() + "/html_report-2"
];const config = {
outputFolderName: "merged-html-report", // default value
outputBasePath: process.cwd() // default value
}mergeHTMLReports(inputReportPaths, config)
```## Spec
- TS support
- Uses `jszip` and `yazl` for encoding and decoding zipped content from the `index.html` file.## Upcoming features
- Usage directly on Command line