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

ank-playwright-reporter

v1.0.3

Published

A comprehensive and visually appealing reporter for Playwright test results with detailed insights, analytics, and Slack notifications

Readme

ANK Playwright Reporter

A comprehensive and visually appealing reporter for Playwright test results with detailed insights, analytics, and Slack notifications.

✨ Features

  • 📊 Clean JSON Reports: Hierarchical structure with describe blocks and test cases
  • 🔍 Detailed Assertion Tracking: Captures all assertions with pass/fail status and emojis
  • 📱 Slack Integration: Sends beautiful notifications to Slack channels via webhooks
  • ⏱️ Timing Analysis: Detailed duration tracking for tests and assertions
  • 🔄 Retry Information: Tracks retry attempts and configurations
  • 🌐 Multi-Browser Support: Works with Chromium, Firefox, and WebKit
  • 📈 Success Rate Calculation: Automatic test success percentage calculation
  • 🎯 Zero Dependencies: Uses Node.js built-in modules (no external dependencies for Slack)

🚀 Installation

npm install ank-playwright-reporter

📋 Quick Start

Add the reporter to your playwright.config.js:

module.exports = {
  // ... other config
  reporter: [
    ['ank-playwright-reporter', {
      outputFile: 'test-report.json',
      outputDir: 'test-results',
      slackWebhookUrl: 'your-slack-webhook-url' // Optional
    }]
  ]
};

⚙️ Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | outputFile | string | 'enhanced-test-report.json' | Name of the JSON report file | | outputDir | string | 'test-results' | Directory to save reports | | slackWebhookUrl | string | null | Slack webhook URL for notifications | | slackChannel | string | '#test-results' | Slack channel to post to | | slackUsername | string | 'Playwright Reporter' | Bot username in Slack | | slackEnabled | boolean | true | Enable/disable Slack notifications |

📊 Report Structure

The generated JSON report follows this clean structure:

{
  "summary": {
    "totalTests": 10,
    "passed": 8,
    "failed": 2,
    "successRate": "80.0%",
    "duration": "15.32s"
  },
  "testSuites": {
    "Login Tests": [
      {
        "testName": "should login with valid credentials",
        "result": "passed",
        "duration": "2500ms",
        "assertions": [
          {
            "name": "toHaveURL",
            "status": "passed",
            "emoji": "✅"
          }
        ],
        "browser": "chromium"
      }
    ]
  }
}

💬 Slack Integration

Enable Slack notifications by providing a webhook URL:

reporter: [
  ['playwright-enhanced-reporter', {
    slackWebhookUrl: 'https://hooks.slack.com/services/YOUR/WEBHOOK/URL',
    slackChannel: '#qa-team',
    slackUsername: 'QA Bot'
  }]
]

Slack Notification Features:

  • Rich formatting with color-coded attachments
  • Test summary with pass/fail counts and success rate
  • Failed test details with specific assertion failures
  • Test suite breakdown organized by describe blocks
  • Emoji indicators for quick visual feedback

🔧 Advanced Usage

Multiple Reporters

Use alongside other Playwright reporters:

reporter: [
  ['html'],
  ['ank-playwright-reporter'],
  ['list']
]

Environment-Specific Configuration

const config = {
  reporter: [
    ['ank-playwright-reporter', {
      slackWebhookUrl: process.env.SLACK_WEBHOOK_URL,
      slackEnabled: process.env.CI === 'true'
    }]
  ]
};

📝 Example Output

Console Output

🚀 Enhanced Reporter: Starting test run with 5 tests
✅ should login successfully (1250ms) - 3 assertions
❌ should handle invalid login (890ms) - 2 assertions

📊 Enhanced Test Report Summary:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total: 5 | ✅ Passed: 4 | ❌ Failed: 1 | ⏭️ Skipped: 0
📋 Assertions: 12 | 🔄 Retries: 0 | 📈 Success Rate: 80.0%
⏱️ Duration: 5.23s | 📄 Report: test-results/enhanced-test-report.json

Slack Notification

  • 🎯 Title: Shows describe block name or test suite
  • 📊 Summary: Test counts with emojis and success rate
  • 💥 Failed Tests: Detailed breakdown of failures
  • 📋 Suite Breakdown: Results per test suite

🛠️ Development

# Clone the repository
git clone https://github.com/iankoh/ank-playwright-reporter.git

# Install dependencies
npm install

# Run tests
npm test

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

🙏 Acknowledgments

  • Built for the Playwright testing framework
  • Inspired by the need for better test reporting and team collaboration