Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
playwright-html
Advanced tools
Generates a complete HTML report for your playwright test runs.
npm i -D playwright-html
Add reporter to your playwright.config.ts
configuration file
// playwright.config.ts
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
reporter: [
['playwright-html', {
testFolder: 'tests',
title: 'Playwright HTML Report',
project: 'QA Tests',
release: '9.87.6',
testEnvironment: 'DEV',
embedAssets: true,
embedAttachments: true,
outputFolder: 'playwright-html-report',
minifyAssets: true,
startServer: true,
}]
],
}
Name | Default Value | Mandatory | Description |
---|---|---|---|
testFolder | tests | no | Folder of the test files |
title | Playwright HTML Report | no | Title of the report that will be shown at the top of the page |
project | no | Project name | |
release | no | Release version | |
testEnvironment | no | Test environment of the execution | |
embedAssets | true | no | Embed or not the assets to the HTML report file |
embedAttachments | true | no | Embed or not the attachments to the HTML report file |
outputFolder | playwright-html-report | no | Output folder where the HTML will be saved |
minifyAssets | true | no | Minify or not the assets |
startServer | true | no | Start or not the server to serve the HTML report |
Then run your tests with npx playwright test
command and you'll see the result in console:
-------------------------------------
⏺ Starting the run with 22 tests
✅ Chromium | Simple test 10
✅ Chromium | More simple test
⛔ Chromium | Wrong image validation
✅ Chromium | Open playwright website many times
✅ Chromium | Simple test 2
✅ Chromium | Simple test
✅ Firefox | More simple test
✅ Firefox | Simple test 10
⛔ Firefox | Wrong image validation
✅ Firefox | Open playwright website many times
✅ Firefox | Simple test 4
✅ Firefox | Simple test
⛔ Firefox | Wrong text validation
⛔ Webkit | More simple test
⛔ Webkit | Wrong image validation
⛔ Webkit | Open playwright website many times
🚫 Webkit | Wrong text validation
⛔ Webkit | Simple test 10
⛔ Webkit | Simple test 3
🚫 Webkit | Simple test 7
🚫 Webkit | Simple test 6
🚫 Webkit | Simple test 4
-------------------------------------
Serving HTML report at http://localhost:8001. Press Ctrl+C to quit.
The port number may change
Open the URL in the browser to see the HTML report
playwright-html is MIT licensed.
FAQs
HTML report for Playwright
The npm package playwright-html receives a total of 5,727 weekly downloads. As such, playwright-html popularity was classified as popular.
We found that playwright-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.