Skip to content

Files

Latest commit

 

History

History
81 lines (70 loc) · 3.09 KB

playwright-html-report.md

File metadata and controls

81 lines (70 loc) · 3.09 KB
id title hide_title sidebar_label description keywords url site_name slug
playwright-html-report
Consolidated Playwright HTML Report
false
Playwright HTML
Learn how to generate html test report for playwright framework testing on lambdatest and download the reports from the dashboard
playwright testing with Playwright test runner - playwright e2e testing with Playwright test runner - playwright mobile testing with Playwright test runner - playwright testing on lambdatest Playwright test runner - playwright testing lambdatest - playwright parallel tests - parallel testing with playwright
LambdaTest
playwright-html-report/
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify({ "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "LambdaTest", "item": "https://www.lambdatest.com" },{ "@type": "ListItem", "position": 2, "name": "Support", "item": "https://www.lambdatest.com/support/docs/" },{ "@type": "ListItem", "position": 3, "name": "Playwright Testing With Playwright Test", "item": "https://www.lambdatest.com/support/docs/playwright-html-report/" }] }) }} ></script>

Playwright offers built-in HTML reports to help visualize the results of your test runs. These reports are detailed, user-friendly, and interactive, allowing you to analyze each test's status, logs, and errors in an organized manner.

Steps to Generate Consolidated HTML Report

Follow these steps to generate a consolidated Playwright HTML report:

Step 1: Update Your Playwright Configuration

In your Playwright configuration file playwright.config.js, add the following code to enable the reporter:

import { devices } from '@playwright/test';

const config = {
  ...//
  reporter: [['html', { open: 'never' }]],
  ...//
};

:::note

  • In the case of HyperExecute, we always have to set the value of open: never.

  • By default, the report is written into the playwright-report folder in the current working directory. The same location can be used in the report parameters in the YAML file. :::

Step 2: Configure the HyperExecute YAML File

In your HyperExecute YAML configuration, define the report parameters like this:

report: true
partialReports:
  frameworkName: playwright
  location: playwright-report
  type: html

Step 3: Execute Your Tests

Run your Playwright tests on HyperExecute using the CLI. After your job completes, you can visit the HyperExecute dashboard to download and view the consolidated Plywright HTML report.

<img loading="lazy" src={require('../assets/images/hyperexecute/knowledge-base/reports/playwright-html-report.gif').default} alt="Image" className="doc_img"/>