Skip to main content

CLI tool for analyzing Playwright trace files without the browser-based viewer

Project description

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 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

# 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
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playwright_trace_analyzer-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

playwright_trace_analyzer-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file playwright_trace_analyzer-0.1.0.tar.gz.

File metadata

  • Download URL: playwright_trace_analyzer-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for playwright_trace_analyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8081f1ffec9d6dac977f6ae88118d5b8c8632aad4f148679fc2ba84bb8fe3270
MD5 dfecc31d62eb10e584727ee117942f18
BLAKE2b-256 e356931fa7097e843e691e8aceb7d6ca69fef70321cbe546538cab16f0beaabe

See more details on using hashes here.

File details

Details for the file playwright_trace_analyzer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: playwright_trace_analyzer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for playwright_trace_analyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a3b749ea236614c521c2041f0ae503a9c607f568452cca18447c7ee3eb4ec95
MD5 aba0dd0856d27984b38ef0bd5024215c
BLAKE2b-256 f8fcae0b9e5ccd442ff306d1c506e63df305d9f7f6e2b007be3eefe43221ab21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page