Playwright Test Report

On This Page What is Playwright?What is Playwright Test Report?May 23, 2026 · 19 min read · Tool Comparison

Playwright Test Report: Comprehensive Guide [2026]

I assumed a Playwright test study would always point to the drive of a failure. In practice, many reports only show that a test failed, not why. Debugging then turns into rerun, log hunt, and guesswork across CI jobs.

The subject usually isn ’ t Playwright itself. It ’ s uncomplete reporting—missing traces, screenshots, or execution detail. Once reports are configured aright and bind into CI, failures turn easier to realize and quicker to settle.

Overview

What is Playwright Test Report?

A Playwright test report is a detailed document generated after running a set of automated tests using the Playwright testing framework.

Built-in Reporters in Playwright

  • List Reporter
  • Dot Reporter
  • JSON Reporter
  • JUnit Reporter
  • HTML Reporter

Benefits of Playwright Test Report

  • Detailed penetration
  • Simplifies debugging
  • Customizable account
  • Integrates with third-party reporters
  • Tracks execution metrics seamlessly
  • Trend analysis

This article explains how Playwright test reports work and how to use them to get clear, reliable feedback from every tryout run.

What is Playwright?

is an open-source framework developed by Microsoft for automating web browsers to. It supports across,, and WebKit, providing an all-in-one solution for real-time functional and.

Playwright enables by simulating user interaction such as clicking, filling out forms, and navigation. Its features include brainless browser support,, network asking capturing, and enhanced control over browser interaction, making it idealistic for prove mod web applications.

Key characteristic include

  • Cross-browser support (Chrome, Firefox, WebKit).
  • Reflex await for elements to be ready.
  • Parallel tryout execution for higher execution.
  • Mobile device emulation and simulation.
  • Easy integration with tools.

What is Playwright Test Report?

A Playwright test report is a elaborate papers generate after run a set of automated tests using the Playwright testing framework.

It offers a comprehensive view of the test results, showing which tests passed, failed, or be skipped, along with valuable insights into the application & # 8217; s overall performance. This report helps developers and QA squad identify subject, trail course, and fine-tune their testing process.

The Playwright trial account includes the following key components:

  • Test Status: Information on which tests passed, failed, or were skipped.
  • Error Details: Descriptions of any failures, including the eccentric of erroneousness and the location within the coating where the failure occurred.
  • Execution Time: The amount of time each test took to run, which helps identify dumb tests and performance constriction.
  • : Insights into which areas of the application were screen and whether they were adequately covered.
  • Screenshots and Videos: Playwright can capture screenshots or video recordings of the trial performance, render a optical citation to better see the trial event.
  • Logs and Debug Information: Detailed logarithm that can assist developers debug issues by provide insights into browser actions, network requests, and responses.

Read More:

Steps to Get Started with Playwright

Getting started with Playwright involve several simple measure to set up the environment, install necessary dependencies, and write your maiden test.

Follow this step-by-step guide to get up and running with Playwright quickly.

Step 1: Install Node.js and Playwright

Install Node.js

  • Ensure that is installed on your machine.
  • After installation, check if Node.js is install by running the following bidding in your terminus or command prompt:
node -v

Install Playwright

Once Node.js is installed, use npm (Node & # 8217; s package coach) to install Playwright. Open your terminal and run:

npm init -y

This command initializes a new Node.js task and make a package.json file.

Now, install Playwright using the following dictation:

npm install Playwright

This will establish Playwright and its required colony.

Step 2: Write the Test Script

  • Create a New JavaScript File
  • In your undertaking folder, make a new JavaScript file namedtest.js.
  • Add the Playwright Test Code
  • Open the test.js file and pen the following codification:
const playwright = require ('playwright '); const fs = require ('fs '); async function runTest () {const browser = await playwright.chromium.launch ({headless: true}); const page = await browser.newPage (); await page.goto ('https: //example.com '); // Take a screenshot as a buffer const screenshotBuffer = await page.screenshot (); // Save it to a file in the current directory fs.writeFileSync ('./example.png ', screenshotBuffer); console.log ('Screenshot salvage! '); look browser.close ();} runTest () .catch (console.error);

This book will launch a Chromium browser in headless mode (without a UI).

Navigate tohttps: //example.com.

Take a screenshot of the page and save it as example.png.

Step 3: Run the Test Script

Open your end, navigate to the booklet where test.js is preserve, and run the next command:

node test.js

This will start Playwright.

  • Open the browser
  • Open the webpage forhttps: //example.comand occupy a screenshot of the page
  • Save the screenshot to your folder.

View the Output:

After running the script, the terminus should display the contentScreenshot saved!, indicating that the screenshot has been successfully captured.

You should also see theexample.png filesaved in the like directory.

Step 4: Access and View the Screenshot

  • Find the Screenshot
  • Open your project folder and situate the example.png file.
  • This is the screenshot taken from https: //example.com.
  • Open the Screenshot
  • Double-click on the example.png file to open it employ your default image viewer.

Read More:

Choosing the Right Type of Report

Test reports aren & # 8217; t one-size-fits-all; they require to adapt to the want of your team, your project scale, and the level of detail you require. Here & # 8217; s how to evaluate and take the best fit for your testing finish.

Purpose of the Report

Define the primary goal of your report. If debugging is the focus, prioritise detailed reports with logs and screenshots. For monitor trends or sharing results with stakeholder, opt for structured or visually appealing format highlighting key outcomes.

Size of the Test Suite

Small test suites benefit from detailed reports that provide deep brainwave into each test case. Summary-based reports are well suited for larger test suites to manage information overburden while highlighting overall execution.

Read More:

Environment

Local development environments benefit from lightweight, real-time outputs like terminal-based story. In, choose report that integrate seamlessly, automating storage and analysis for efficient workflows.

Level of Detail Required

Basic overviews, like pass/fail summaries, work well for quick cheque. For detailed debugging or in-depth analysis, select reports that include logs, screenshots, or videos of the test execution.

Data Storage Needs

For short-term use, story displayed in the terminal or in-memory are sufficient. Long-term analysis or conformity needs expect exportable formatting like JSON or for persistent storage and tendency analysis.

Team Collaboration

Technical teams need detailed yield to debug issues efficaciously. For non-technical stakeholders, optical or simplified reports make the information approachable and easier to interpret.

Customization Requirements

Consider whether the default report types meet your needs or if custom-made reports are necessary. Playwright supports create tailored reporters to include specific data or formats unique to your workflow.

Read More:

Types of Playwright Reporting

Playwright proffer several built-in newsman to cater to the needs of diverse essay projects. You can also custom-create reports alone for your testing suite and integrate third-party newsperson for innovative analytics.

Playwright Reporting Types:

  • Custom Reporters
  • Third-Party Reporters
  • Built-in Reporters in Playwright

Custom Reporters in Playwright

Playwright allows you to make usance reporters to orient test reporting according to your specific motivation. Custom reporters let you yield test results in a formatting that fits your workflow or integrate them with early tools and platforms, such as custom dashboards, notifications, or external service.

A tradition newsperson in Playwright is a JavaScript class that implements a set of predefined method.

These methods are trigger during different stages of the test run (before, after, when a test starts, finishes, or fails). You can control what is exhibit, logged, or saved free-base on these methods.

Syntax of a Custom Reporter

To make a custom newsperson, you need to define a class that extends Reporter. The key methods that you can override include:

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

  • onBegin ():Called when the test suite begins.
  • onTestBegin ():Called when a individual trial begins.
  • onTestEnd ():Called when a test coating.
  • onEnd():Called when the test suite ends.

Here & # 8217; s a unproblematic example of how to make a custom reporter that lumber each test ’ s position and performance clip:

const {Reporter} = require (' @ playwright/test '); grade MyCustomReporter extends Reporter {onBegin (config, entourage) {console.log ('Test suite has commence ');} onTestBegin (test) {console.log (` Test started: $ {test.title} `);} onTestEnd (test, result) {console.log (` Test finished: $ {test.title} `); console.log (` Status: $ {result.status} `); console.log (` Duration: $ {result.duration} ms `);} onEnd () {console.log ('Test suite has ended ');}} module.exports = {MyCustomReporter};

In this example:

  • onBegin logarithm when the examination suite get-go.
  • onTestBegin log when each test depart.
  • onTestEnd logs when each test ends, present the test condition and duration.
  • onEnd log when the trial suite ends.

Read More:

Using the Custom Reporter

Once your customs newsman is ready, you need to recite Playwright to use it. You can do this by configuring the examination runner in playwright.config.js:

const {defineConfig, device} = require (' @ playwright/test '); const {MyCustomReporter} = require ('./myCustomReporter '); module.exports = defineConfig ({newsman: [[MyCustomReporter], // Register your impost reporter ['html ', {open: 'never '}] // Add extra reporters if postulate],});

This will use yourMyCustomReporterin the Playwright test run. You can also unite it with other built-in reporters, such as HTML or JSON.

Custom reporters should be lightweight and only log the almost necessary information. Overloading the reporter with undue logging can slow down examination performance and make the output difficult to digest.

Your custom reporter should be flexible enough to incorporate with other tools. For case, deal logging data in a structured format like JSON or sending reports to external services like Slack, email, or a custom dashboard.

Third-Party Reporters in Playwright

Playwright allows you to extend its built-in reporting capabilities by mix third-party reporters. These external tools enhance the reporting process by providing forward-looking features, such as elaborate HTML reports, real-time monitoring, and interactive dashboards.

Third-party reporters allow you to picture tryout answer in various formats, making tail test performance, failure, and trend easier over clip.

Read More:

Integrating Allure Reporter

Allure is one of the most democratic test reportage tools. It generates visually rich and interactive reports that evidence test execution details, include steps, logs, and attachments. Integrating Allure with Playwright enables you to get insightful, user-friendly reports for your examination runs.

Steps to Integrate Allure with Playwright:

1. Install the Allure Reporter Package:

First, install the Allure Playwright newsperson:

npm install -- save-dev @ playwright/test allure-playwright

2. Update playwright.config.js:

After installing the necessary package, modify the Playwright configuration file to use Allure reporter.

const {defineConfig} = require (' @ playwright/test '); module.exports = defineConfig ({reporter: [['allure-playwright '], // Use Allure Reporter ['html ', {exposed: 'never '}]],});

3. Generate Allure Report:

After running your Playwright tests, render the Allure study with the undermentioned command:

npx allure generate allure-results -- light npx temptingness open

This will open the Allure report in your browser, shew detailed perceptiveness into your tests.

Better Practices:

  • Keep your Allure consequence directory clean by adding the & # 8211; clear flag while generating reports to avoid keeping cold data.
  • Use Allure & # 8217; s ability to attach screenshots, logs, and picture to raise your account.

Integrating HTML Reporter

Playwright provides an HTML reporter by default, but you can customize it or use a third-party HTML reporter to better visualize your exam results.

1. Install the HTML Reporter Package:

Install the Playwright HTML newsman bundle:

npm install -- save-dev @ playwright/test

2. Configure Playwright for HTML Reporting:

In playwright.config.js, enable the HTML reporter:

const {defineConfig} = require (' @ playwright/test '); module.exports = defineConfig ({reporter: [['html ', {exposed: 'never '}], // Use the built-in HTML newsperson],});

3. View HTML Report:

After action the tests, the HTML report will be saved in the playwright-report/ directory. You can open the index.html file in any browser to watch the report.

Good Practices:

  • Customise the HTML reporter by append your logotype, branding, or title to match your company & # 8217; s plan lyric.
  • Use unfastened: & # 8216; never & # 8217; to avoid mechanically opening the report on every run if it is not needed.

Integrating Other Third-Party Reporters

Besides Allure and HTML, you can mix various third-party reporters to match your specific needs, include JSON, JUnit, and others. Playwright & # 8217; s flexibleness allow you to choose the best newsperson for your workflow, whether you & # 8217; re interested in tool, data analysis, or only a clean log format.

JUnit reports are frequently used in pipelines because they integrate seamlessly with creature like Jenkins, GitLab CI, and CircleCI.

1. Install JUnit Reporter:

npm install -- save-dev @ playwright/test junit-playwright

2. Configure Playwright for JUnit Reporting:

In playwright.config.js, use the JUnit newsperson:

const {defineConfig} = require (' @ playwright/test '); module.exports = defineConfig ({newsman: [['junit ', {outputFile: 'test-results.xml '}], // Use JUnit Reporter],});

3. View JUnit Report:

The JUnit story will be saved as an XML file, test-results.xml, which you can integrate into your CI/CD pipeline to analyse test results.

Best Practices:

  • To manage multiple test upshot, keep JUnit account in a designated brochure, peculiarly when mix with CI creature.
  • Configure the outputFile itinerary to avoid overwrite be test result files.

Built-in Reporters in Playwright

Playwright ply several built-in newsperson designed to output test termination in different formats, each serving unique needs for visibility and integration. These reporters are pre-configured for several use cases, create it easygoing for developers to mix them without additional setup.

Below are the virtually usually habituate built-in reporters in Playwright, along with their syntax and use cases:

Read More:

List Reporter

The List Reporteroutput examination resolution in a human-readable inclination format. It shows the names of the tests, along with their status (passed, failed, or jump). This is ideal for a agile, high-level overview of test results, particularly when running a small number of tests. It provides a unproblematic but clear view of the testing process.

Syntax:

npx playwright test -- reporter=list

Dot Reporter

The Dot Reporteroutputs a series of dots representing the status of each test. Each dot corresponds to one test: a dot (.) for passed examination, an F for failed tests, and an S for skipped trial. This is best for quick feedback when running a large act of examination, as it distil issue into a compact and easy-to-digest formatting.

Syntax:

npx playwright exam -- reporter=dot

JSON Reporter

The JSON Reportergenerates a machine-readable JSON file that contains detailed information about each test. This reporter is idealistic for desegregation with former tool and for store elaborate outcome in a structured formatting. The JSON file can be parse later to extract specific test details, such as execution time, failure messages, and test metadata.

Syntax:

npx playwright test -- reporter=json

JUnit Reporter

The JUnit Reporterproduce tryout solvent in the JUnit XML format, which is widely used by many CI/CD tool (like Jenkins, GitLab CI, etc.). It offers a standardised format that allows easy integration with CI scheme, providing info about passed and failed tests, along with mistake message and stack traces.

Syntax:

npx playwright test -- reporter=junit

HTML Reporter

The HTML Reportergenerates a comprehensive and visually appealing HTML report. This report include details about test status, screenshots, video (if enabled), and logarithm. It & # 8217; s perfect for sharing results with stakeholders who need to quickly understand the exam outcomes, providing a user-friendly, visually rich summary.

Syntax:

npx playwright trial -- reporter=html

When to Use Each Reporter

Playwright & # 8217; s built-in newsman are versatile and can be easy shift calculate on your specific requirement for visibility, integrating, and presentation of test consequence.

  • List and Dot newsperson are good for quick feedback during ontogenesis or local test runs.
  • JSON and JUnit reporters are idealistic for mechanization in CI/CD pipelines where machine-readable formats are needed for desegregation with other tools.
  • HTML Reporter is best for generating visually rich reports for stakeholders and team members needing a elaborated examination overview.

Generating Multiple Reports in Playwright

Generating multiple reports in Playwright allows tester to output test results in diverse formats simultaneously. This feature is especially useful when catering to diverse stakeholder needs, such as providing concise HTML account for managers and detailed JSON reports for developers.

By leverage this capability, teams can streamline communicating and ensure that every study serves its intended hearing effectively.

Playwright & # 8217; s configuration file (playwright.config.ts or playwright.config.js) support specifying multiple reporters. These reporters are listed under the reporter field, allowing you to generate multiple output formats for a single test run.

Each reporter can be customize to focus on specific aspects of the test results, ensuring flexibleness and clarity.

Here ’ s a sampling configuration to generate both an HTML report and a JSON report:

const config = {reporter: [['html ', {outputFolder: 'html-report '}], ['json ', {outputFile: 'results.json '}],], // Other configurations}; export default config;

In this instance, the HTML report will be saved in the html-report directory, while the JSON results will be stored in results.json.

This access ascertain that both human-readable and machine-parsable outputs are generated.

Read More:

Playwright Reporting in CI/CD Pipelines

Integrating Playwright reporting into streamlines automated trial execution and delivers immediate feedback. Reports generated during prove provide actionable insight into test outcomes, helping developers address issue early.

Machine-readable formats like JSON or JUnit are particularly valuable as they integrate seamlessly with CI/CD creature such as Jenkins, GitHub Actions, and CircleCI, enabling clear visualization of test result and trends.

  • Use concise, machine-readable reports for maximal efficiency.
  • Store reports in organized, accessible locations within the pipeline.
  • Automate alerting for failed tests using tools like Slack or email for quick attention.
  • Generate lightweight, critical brainwave to aid debugging without slack the line.
  • Ensure faster releases and preserve consistent application quality.

Read More:

Importance of Test Automation Reports in Playwright

account provide clear insights into test results, assist teams and improve code calibre. In Playwright, these story proffer valuable details like screenshots, picture, and log, which aid in faster debugging. Integrated into CI/CD pipelines, Playwright account allow for continuous feedback, ensuring consistent character across release.

enhances Playwright testing by supply access to real devices and browsers, insure cross-browser compatibility and accurate consequence. This cloud-based solution enables testing across various environments without complex setups.

With seamless integration into CI/CD line, BrowserStack Automate whirl detailed report and fast feedback. This helps team catch issues betimes and streamline their testing summons, boosting efficiency and ensuring web application execute systematically in.

70 % of examination failures lack decent study setting

Get Playwright test report with real browser log, screenshots & amp; videos using BrowserStack.

Common Challenges in Playwright Reporting

Efficient reportage is essential to interpret the results of automated tests and improving overall testing efficiency.

However, in Playwright, assorted challenges can arise when return and rede reports.

  • Large test suites can overwhelm reports with undue information, make it hard to place key issues. Finding the balance between thoroughness and clarity is essential.
  • Different surround, such as browsers and device, can enclose inconsistency in test results, leading to unreliable story. Ensuring consistent testing conditions across platforms is crucial.
  • Flaky tests can produce false positives or negative, distorting report accuracy. Isolating and addressing flaky examination aid generate more true results.
  • Performance matter like dim page loads can inflate execution multiplication in report, affecting accuracy. Addressing performance constriction ensures clearer test results.
  • Complex user flows, and dynamic content can overwhelm reports with unnecessary data. Configuring the report format to entrance critical information ensures clarity.

Good Practices for Effective Playwright Test Reporting

Effective test reportage ensures that trial outcome are open and actionable, guide to meaningful insights.

Here are some best pattern to enhance your Playwright test reporting:

  • Define Clear Test Objectives: Before lam tests, clearly delineate what you ’ re examination and what success looks like. Tailor your reports to focus on these specific metrics: functional accuracy, UI responsiveness, or execution.
  • Use a Consistent Reporting Format: Adopt a logical reporting format that is easy to interpret. Structured reports with details like exam status, execution time, and error logs assistant developers and QA team to pinpoint subject quickly.
  • Integrate Visual Feedback: Capture and embed screenshots or videos into your test reports to provide visual context. This is especially useful for UI tests, helping team visualize the application & # 8217; s state during test failures.
  • Leverage Test Grouping: Group prove logically by categories, such as by feature, user flowing, or platform. This helps stakeholders quickly see the status of key application components and name patterns in failures or performance issues.
  • Ensure Reports are Easy to Share: Reports should be in formats that are easy to share and analyse (e.g., HTML, JSON, or interactive reports). Ensure that stakeholders—whether developers, testers, or ware managers—can access the information without extra tools.
  • Automate Report Generation and Distribution: Automating the operation of generating and distributing test reports ensures that the relevant squad appendage are e'er up to date. Use continuous integration (CI) tools to automatically trigger the account creation and distribution after each test run.

strengthens Playwright test coverage by capturing existent browser logs, screenshots, videos, and net data for every run. This added context do Playwright reports more actionable, especially when diagnose CI-only failure across browsers and operating systems.

Talk to an Expert

BrowserStack Test Reporting and Analytics for Playwright Reporting

With, you can keep track of every Playwright Automation make run by creating a detailed Playwright Test Report on the Observability Dashboard with all historic data. Here are the characteristic of Test Reporting and Analytics that can enhance Playwright Reporting:

  • Get Detailed Test Build Insights: Access comprehensive test build insights, such as execution, flakiness, new failure, e'er betray, build stability, run summary, and more.
  • Track Failure Rate of Test Build: Understand the execution of each examination build and track the failure pace of tests, flakiness, and mean failure rate to monitor the test suite & # 8217; s wellness.
  • Better Team Collaboration: You can download & amp; share report PDFs of build insights, unequaled errors, test health, testing trends, etc., with your squad.
  • Consummate End-to-End Visibility: Access interactive testing trends chart that offer 360-degree end-to-end visibleness into automation metrics for all undertaking and faculty.
  • Enhanced Debugging with Rich Artifacts: Detect and debug issues in your tryout build via detailed analytics and rich artifacts on the central test automation dashboard.
  • Get Historical Data and Trends: Spot trends with elaborated historical information for all re-runs and merged runs of test builds to analyse reoccurring issues.

Advanced Reporting Techniques with Playwright

For teams looking to direct their Playwright test coverage to the succeeding level, here are some advanced techniques that can provide deep brainstorm into your application ’ s execution and stableness.

  • Custom Reporters for Tailored Insights: Creating custom reporter allows you to adapt the Playwright & # 8217; s output to your specific needs. You can initialise the report to capture critical data point like API responses, network requests, or performance metrics, all of which can be highly valuable for advanced essay scenarios.
  • Integrating with Third-Party Reporting Tools: For more robust coverage, integrate Playwright with third-party tool like Allure or HTML reporters. These instrument provide advanced features such as detailed optical reports, easy tracking of test history, and the ability to create interactional dashboards.
  • Execution with Custom Reporting: When extend tests in parallel, it ’ s crucial to maintain limpidity in your reports. Grouping exam results by executing thread or worker helps place issues specific to particular test environments. Playwright ’ s built-in features endorse parallel exam execution, and you can unite this with custom study to supply a deeper breakdown of performance across multiple threads.
  • Real-Time Reporting for Continuous Feedback: For team expend continuous testing in, real-time reporting can cater instantaneous feedback during test runs. Playwright can mix with (like or GitHub Actions) to deliver reports on examination progress and results while the tests are running.

Read More:

Conclusion

Playwright ’ s Test Report boast offer a potent way to meliorate your try process. With puppet like elaborated log, screenshots, and picture, you can quickly identify subject and understand test failure better. A well-structured reporting setup speeds up debugging and ensures reliable and efficient test results.

You can streamline your workflow and enhance your test mechanisation by continuously refining your approach to reportage and incorporate Playwright ’ s puppet into your CI/CD pipeline.

Adopting best pattern for reporting will aid ensure smoother, more precise examination, leading to faster issue resolution and improved package lineament.

Useful Resources for Playwright

Understanding Playwright

Tool Comparisons:

Tags
98,000+ Views

# Ask-and-Contributeabout this theme with our Discord community.

Related Guides

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free