npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

smart-playwright-reporter

v0.1.2

Published

An intelligent Playwright test reporter with AI-powered failure analysis, detailed test insights, and beautiful HTML reports

Readme

Smart Playwright Reporter

🧪 An intelligent Playwright test reporter with AI-powered failure analysis and beautiful HTML reports.

Screenshot

Features

  • 📊 Beautiful HTML Reports - Clean, modern interface with detailed test results, CSS variables theming, and dark mode support
  • 🤖 AI-Powered Analysis - Integrate Azure OpenAI to analyze test failures automatically with pre-filled configuration
  • 📸 Rich Error Context - Captures page snapshots, console logs, and full error details
  • 🔄 Retry Visualization - Clear tabs showing each test attempt (Run, Retry #1, Retry #2, etc.)
  • 🎯 Smart Organization - Automatically groups tests by status (Failed, Flaky, Passed)
  • 📁 Clean File Structure - Organized output with separate detail pages for each test

Installation

npm install --save-dev smart-playwright-reporter

Usage

Add the reporter to your playwright.config.ts:

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

export default defineConfig({
  reporter: [
    ['list'],
    ['smart-playwright-reporter']
  ],
  // ... other config
});

Configuration

No additional configuration required! The reporter works out of the box.

Reports are generated in the smart-playwright-report/ directory:

smart-playwright-report/
├── index.html          # Main report page
└── tests/              # Individual test detail pages
    ├── test-0.html
    ├── test-1.html
    └── ...

AI-Powered Failure Analysis

For failed tests, the reporter provides an interactive AI analysis feature:

  1. Open any failed test detail page
  2. Select the data sources you want to analyze (Error, Page Snapshot, Stdout, Stderr)
  3. Enter your Azure OpenAI credentials
  4. Click "Analyze with AI" to get intelligent insights

Azure OpenAI Setup

You'll need:

  • API Key: Your Azure OpenAI API key
  • Model/Deployment Name: Your deployment name (e.g., gpt-4, gpt-5-mini) - pre-filled with gpt-5-mini
  • API Version: Azure OpenAI API version (e.g., 2024-04-01-preview) - pre-filled with 2024-04-01-preview
  • Endpoint: Your Azure OpenAI endpoint URL - pre-filled with demo endpoint

Report Features

Main Report Page

  • Summary statistics (Total, Passed, Failed, Flaky tests)
  • Categorized test lists with visual status indicators
  • Click any test to view its detail page

Test Detail Pages

  • Tabbed Interface: Switch between different retry attempts
  • Error Information: Full stack traces and error messages
  • Page Snapshots: Captured page state at failure time
  • Console Output: Stdout and stderr logs
  • AI Analysis: Optional intelligent failure analysis

Example

// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  reporter: [
    ['list'],
    ['html', { open: 'never' }],
    ['smart-playwright-reporter']
  ],
  use: {
    trace: 'on',
    screenshot: 'only-on-failure',
  },
});

Run your tests:

npx playwright test

View the report:

open smart-playwright-report/index.html

Why Smart Playwright Reporter?

  • Better Insights: AI-powered analysis helps you understand failures faster
  • Clear Visualization: Tabbed interface makes it easy to compare retry attempts
  • Rich Context: Captures everything you need to debug (snapshots, logs, traces)
  • Production Ready: Clean, professional reports suitable for CI/CD pipelines
  • Easy to Use: Zero configuration, works with existing Playwright tests

Requirements

  • Node.js >= 16.0.0
  • Playwright >= 1.40.0

License

MIT