Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run npx playwright show-report from the directory containing your Playwright project. Playwright serves the latest HTML report, normally from playwright-report, and opens it in a browser. If the report is elsewhere, pass its directory (or a supported ZIP) as an argument.

Generate the HTML report first

The viewer can only serve a report that has already been created. Run your tests with Playwright’s HTML reporter enabled:

npx playwright test --reporter=html

The reporter writes its output to playwright-report unless your configuration or environment changes that location. A test run that uses another reporter will not automatically create this HTML site.

Use the reporter in configuration

To make HTML output part of a project configuration, add the reporter to playwright.config.ts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [['html', { open: 'on-failure' }]],
});

The open setting controls whether Playwright opens the report after a run. The documented values are always, never, and on-failure. on-failure is the default. You can also set the behavior with the PLAYWRIGHT_HTML_OPEN environment variable.

Open the latest report from the default folder

After the test command finishes, change to the project directory and run:

npx playwright show-report

Playwright serves the site and normally opens a browser window. The default serving host is localhost and the default port is 9323. If that port is occupied, Playwright uses another available port and reports the address in the terminal.

Open a report while staying in another directory

show-report resolves a relative path from your current directory. Either change into the project directory first or provide the path explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npx playwright show-report ./path/to/playwright-report

For a report generated in a custom folder, replace the example path with that folder’s name:

npx playwright show-report my-report

Serve the report on a specific host or port

Use --host when the report must bind to a particular interface, and --port when you need a predictable port:

npx playwright show-report my-report --host 0.0.0.0 --port 9323

Binding to 0.0.0.0 makes the server listen on all interfaces, which can be useful inside a container or remote machine. Only expose that address when your network controls who can reach the report; the HTML report may contain test names, URLs, error messages, and trace links.

When the default port is already in use

You can let Playwright select another available port, or choose one yourself:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npx playwright show-report --port 9400

If a browser does not open automatically, copy the URL printed by the command into a browser on the same machine (or into a browser that can reach the selected host).

Open a downloaded report ZIP

A report ZIP can be passed directly to show-report when index.html is at the top level of the archive:

npx playwright show-report playwright-report.zip

Playwright extracts the archive to a temporary directory and serves the report. If the ZIP contains an extra outer folder so that index.html is not at the archive root, extract it yourself and pass the directory that directly contains the report files:

npx playwright show-report name-of-my-extracted-playwright-report

CI artifact workflow

  1. Configure the CI job to retain the generated playwright-report directory or a ZIP containing it.
  2. Download the artifact to a machine where Playwright is installed.
  3. Extract it if necessary, checking that index.html is directly inside the directory you will pass.
  4. Run npx playwright show-report or pass the extracted directory explicitly.

Viewing an artifact does not require rerunning the original tests; it serves the files produced by that run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change where Playwright writes the report

Set the reporter’s outputFolder option when you want a stable, custom location:

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

export default defineConfig({
  reporter: [['html', {
    outputFolder: 'artifacts/e2e-report',
    open: 'never',
  }]],
});

You can also set the output directory with the PLAYWRIGHT_HTML_OUTPUT_DIR environment variable. After the run, pass the resulting directory to the viewer:

npx playwright show-report artifacts/e2e-report

Using open: 'never' is usually preferable in CI, where there is no desktop browser. It leaves the artifact available for later download without attempting to launch a window on the runner.

What you can inspect in the HTML report

The report is an interactive web page rather than a plain log. Its filters include browsers and test outcomes such as passed, failed, skipped, and flaky tests. Use the search control to find a test, then open that test to inspect its errors and recorded steps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Traces

When tracing was collected during the test run, an individual test includes a route to open its trace. If no trace was recorded, the report cannot create one after the fact; configure trace collection before rerunning the test.

Sharded runs

Separate shard jobs produce blob reports. Merge those blobs into one HTML report before serving it:

npx playwright merge-reports --reporter html ./all-blob-reports

The merge command writes the combined report to playwright-report by default. You can then run npx playwright show-report from the directory containing that output.

Choose the right command for your report

Situation Command Result
Latest report in the default location npx playwright show-report Serves playwright-report
Report in a named directory npx playwright show-report my-report Serves that directory
Report ZIP with root-level index.html npx playwright show-report playwright-report.zip Extracts and serves the archive
Container or remote host npx playwright show-report report --host 0.0.0.0 --port 9400 Listens on the selected interface and port
Combined sharded results npx playwright merge-reports --reporter html ./all-blob-reports Creates one HTML report for later viewing

Troubleshoot a report that will not open

“No report found” or an empty directory

Confirm that the test run used --reporter=html or an HTML reporter entry in the configuration. Then check the actual output path. A custom outputFolder setting or PLAYWRIGHT_HTML_OUTPUT_DIR can mean that playwright-report is not the right directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The command starts, but the browser does not open

Look at the terminal output for the local URL and open it manually. Automatic opening is configurable, and CI or headless environments commonly suppress desktop browser launches. Set open: 'always' only where a graphical browser is available; use open: 'never' for unattended jobs.

The page is unreachable from another machine

localhost refers to the machine running the server. Start the viewer with an appropriate --host value and ensure the selected port is permitted by the container, firewall, or SSH tunnel. Do not expose a test report publicly unless its contents are safe to share.

The ZIP is rejected or shows missing assets

Inspect the archive structure. The direct ZIP workflow requires index.html at the archive’s top level. If it is nested, extract the archive and pass the nested report directory instead.

Sharded results are incomplete

Do not point show-report at a directory of unmerged blob reports. First run npx playwright merge-reports --reporter html ./all-blob-reports, then serve the generated HTML output.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A test has no trace link

Trace links appear only when traces were collected for that run. Enable the relevant trace setting in the Playwright test configuration and execute the test again; an existing report cannot gain a trace retroactively.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version and environment considerations

Playwright CLI flags and reporter settings are version-sensitive. Use the documentation that matches the Playwright version installed in the project, especially when a command behaves differently between local development and CI. Keep the Playwright package and its browsers installed in the environment where you run show-report, and preserve the report’s accompanying assets when moving it between machines.

For repeatable CI diagnostics, archive the HTML directory (or a correctly structured ZIP), record the commit and Playwright version alongside it, and set an explicit output folder. That makes it clear which run a report represents and avoids accidentally serving a newer local run.

Or skip the browser setup

If you need a clean image of a hosted report or another public page rather than an interactive Playwright report, ScreenshotNeo provides a single-request website screenshot API. It is separate from Playwright’s HTML viewer: use show-report to explore tests, and use ScreenshotNeo when a rendered page must be captured as PNG, JPEG, WebP, or PDF.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ScreenshotNeo accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and every response identifies the page verdict and billing result in X-Page-Verdict and X-Billed headers. Its MCP server supplies take_screenshot, get_page_info, and capture_pdf tools to Claude, Cursor, and other MCP clients.

For a publicly reachable report URL, the basic call is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://playwright.dev -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://playwright.dev"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://playwright.dev' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for the full option set, including full-page captures, CSS-selector element capture, device presets, dark mode, retina scale, PDF settings, custom CSS and JavaScript, click and wait actions, request blocking, headers and cookies, geolocation, transparent backgrounds, resizing, caching, signed image links, asynchronous webhooks, bulk capture, and usage reporting.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to try it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.