Skip to main content

Release Notes Downloads GitHub CI Status License: MIT

Playwright Trace File Analyzer

A command-line tool for analyzing Playwright trace files without opening the browser-based trace viewer. When you have failing Playwright tests and need to debug them programmatically or in CI/CD environments, this tool extracts structured data from trace.zip files.

I built this because I wanted to parse Playwright traces in automated workflows - extracting errors, console messages, and network failures without spinning up the Playwright trace viewer UI. It's particularly useful for debugging tests in CI where you can't easily open the trace viewer, or when you need to process trace data programmatically.

Installation

uv add --dev playwright-trace-analyzer

Or, globally:

uv tool install playwright-trace-analyzer

Usage

The tool provides several subcommands for analyzing different aspects of your Playwright traces:

# Get a high-level summary of the trace
playwright-trace-analyzer summary trace.zip

# View all actions executed during the test
playwright-trace-analyzer actions trace.zip --errors-only

# Extract console messages and warnings
playwright-trace-analyzer console trace.zip --level error

# Check failed network requests
playwright-trace-analyzer network trace.zip --failed-only

# Extract screenshots from the trace
playwright-trace-analyzer screenshots trace.zip -o ./screenshots

# Extract screenshots with deduplication control
playwright-trace-analyzer screenshots trace.zip --dedupe-threshold 0.01  # default: drops visually identical frames
playwright-trace-analyzer screenshots trace.zip --dedupe-threshold 0     # disable deduplication

# View trace metadata
playwright-trace-analyzer metadata trace.zip

All commands support JSON and markdown output formats:

playwright-trace-analyzer summary trace.zip --format markdown
playwright-trace-analyzer actions trace.zip --format json

Filter by page ID when dealing with multi-page traces:

playwright-trace-analyzer summary trace.zip --page "page@1"

Features

  • Extract structured data from Playwright trace.zip files
  • View test actions with timing, parameters, and error details
  • Analyze console messages (errors, warnings, logs) with source locations
  • Inspect network requests including failures and status codes
  • Extract screenshots embedded in traces with automatic visual deduplication
  • Filter data by page ID, error status, or custom patterns
  • Output in JSON or markdown formats for further processing
  • No need for browser or Playwright trace viewer UI

MIT License


This project was created from iloveitaly/python-package-template

Metadata

Release files for playwright-trace-analyzer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for playwright-trace-analyzer 0.2.0
File Size Uploaded
playwright_trace_analyzer-0.2.0.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for playwright-trace-analyzer 0.2.0
File Interpreter ABI Platform
playwright_trace_analyzer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / playwright_trace_analyzer-0.2.0.tar.gz

Download URL playwright_trace_analyzer-0.2.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
57c9bdca62d6fcbc49993b4eb702e174bffe672b09ef9133a80444d08cc4792c
BLAKE2b-256 checksum
How to use checksums
2253bfdd5ff13514a80c2e183b794d9e5ce2dc4cb336316fc72e17cea2de5809
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / playwright_trace_analyzer-0.2.0-py3-none-any.whl

Download URL playwright_trace_analyzer-0.2.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffc4c69ffb60c4e25fcc81ad43bb583c2bcedc3a8491a53ff67be9a8d02e68e9
BLAKE2b-256 checksum
How to use checksums
c9c3ff779da55ed26e3f2ef869d02b525c8a63767b7e0b20bd2b35fedce1a2ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.1 {"installer":{"name":"uv","version":"0.10.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page