Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

playwright-html

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright-html

HTML report for Playwright

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source


Playwright NPM HTML5
Bootstrap Chart.js JavaScript Express.js




Playwright HTML

Generates a complete HTML report for your playwright test runs.

Install

npm i -D playwright-html

Usage

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,
    }]
  ],
}

Options

NameDefault ValueMandatoryDescription
testFoldertestsnoFolder of the test files
titlePlaywright HTML ReportnoTitle of the report that will be shown at the top of the page
projectnoProject name
releasenoRelease version
testEnvironmentnoTest environment of the execution
embedAssetstruenoEmbed or not the assets to the HTML report file
embedAttachmentstruenoEmbed or not the attachments to the HTML report file
outputFolderplaywright-html-reportnoOutput folder where the HTML will be saved
minifyAssetstruenoMinify or not the assets
startServertruenoStart or not the server to serve the HTML report

Execution

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

Dasboard

Test List

Test Details

License

playwright-html is MIT licensed.

Keywords

FAQs

Package last updated on 19 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc