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

reportarch-pw-ul

v2.8.0

Published

A Playwright reporter that uploads test execution results, traces, and performance metrics to ReportArch platform with automatic configuration management.

Readme

ReportArch Playwright Reporter

A custom Playwright reporter that uploads test results and reports to ReportArch, extracting test execution stats, failure traces in text format, and performance metrics for API calls and page navigations.

Installation

npm install reportarch-pw-ul

Setup

1. Create Configuration File

Create a reportarch.config.json file at the root of your test project:

{
  "apiKey": "your-api-key-here",
  "projectId": "your-project-id-here", 
  "organizationId": "your-organization-id-here",
  "apiUrl": "http://localhost:3001/api/report",
  "reportName": "Playwright Test Report"
}

2. Configure Playwright

Add the reporter to your playwright.config.js:

module.exports = {
  // ... other config
  reporter: [
    ['html'], // Keep the default HTML reporter
    ['./node_modules/reportarch-pw-ul/playwrightReporter.js'] // Add ReportArch reporter
  ],
  use: {
    trace: 'on-first-retry', // Enable traces for better reporting
  },
  // ... rest of config
};

Configuration Options

The reportarch.config.json file supports the following options:

| Option | Required | Description | |--------|----------|-------------| | apiKey | Yes | Your ReportArch API key | | projectId | Yes | Your project ID in ReportArch | | organizationId | Yes | Your organization ID in ReportArch | | apiUrl | Yes | The ReportArch API endpoint URL | | reportName | No | Custom name for your reports (default: "Playwright Test Report") | | uploadTimeout | No | Upload timeout in milliseconds (default: 30000) | | retryAttempts | No | Number of retry attempts for failed uploads (default: 3) | | cleanupTempFiles | No | Whether to clean up temporary files after upload (default: true) |

How It Works

  1. Configuration Loading: The reporter looks for reportarch.config.json in your test project root directory
  2. Test Execution: During test runs, it collects test results, trace data, and performance metrics
  3. Report Generation: After tests complete, it generates a JSON report with all collected data
  4. Upload Process:
    • Uploads the JSON report with metadata to ReportArch
    • Zips the HTML report directory and uploads it as well
    • Cleans up temporary files if configured to do so

Error Handling

  • If reportarch.config.json is missing or invalid, the reporter will continue to work but skip uploads
  • Upload failures are logged but don't interrupt the test process
  • Missing required configuration fields are clearly reported

Getting Your Configuration Values

  1. API Key: Generate from ReportArch Settings page
  2. Project ID: Found in your ReportArch project settings
  3. Organization ID: Available in your ReportArch organization settings
  4. API URL: Use your ReportArch instance URL + /api/report

Report Structure

The generated report includes:

  • Summary: Test counts (total, passed, failed, skipped) and duration
  • Details: Individual test results with traces and performance metrics
  • Metadata: Project information and timestamps for ReportArch integration

Usage

Add the reporter to your Playwright configuration:

// playwright.config.js
module.exports = {
  testDir: './tests',
  reporter: [
    ['html'], // Keep default HTML reporter
    ['./node_modules/reportarch-pw-ul/playwrightReporter.js'] // Add ReportArch reporter
  ],
  use: {
    trace: 'on-first-retry', // Enable traces for better reporting
  },
};

Troubleshooting

  • Ensure your reportarch.config.json is valid JSON
  • Check that all required fields are present and not empty
  • Verify your API key has the necessary permissions
  • Check network connectivity to your ReportArch instance
  • Review console output for detailed error messages during upload

Example Output

After running your Playwright tests, a playwright-report.json file will be generated in your project root. This file contains:

  • Test execution stats (pass/fail/skipped/duration)
  • Failure trace in text format
  • Performance metrics for API calls and page navigations
  • Metadata for ReportArch integration
{
  "summary": {
    "total": 10,
    "passed": 8,
    "failed": 2,
    "skipped": 0,
    "duration": 12345
  },
  "details": [
    {
      "title": "should login successfully",
      "status": "passed",
      "duration": 1200,
      "traceText": "Trace details extracted from: trace.zip",
      "performance": [
        {
          "type": "api", 
          "url": "https://api.example.com/login",
          "startTime": 1620000000000,
          "endTime": 1620000001200,
          "duration": 1200
        }
      ]
    }
  ],
  "metadata": {
    "projectId": "your-project-id",
    "organizationId": "your-org-id",
    "timestamp": "2025-08-16T12:00:00.000Z",
    "reportType": "playwright"
  }
}

License

MIT