Playwright test reporter

Playwright test reporter

You can configure your Playwright Test Runner tests to send results to Artillery Cloud with the @artilleryio/playwright-reporter reporter to get:

  • Cloud dashboard for Playwright test reports
  • Real-time reporting with screenshots, traces, and attachments
  • Automatic tracking of Web Vitals performance metrics
  • Built-in trace viewer for easier debugging
  • GitHub Actions integration with PR comments

Artillery Cloud Playwright Reporter

Usage

Install the reporter

npm install -D @artilleryio/playwright-reporter

Enable the reporter

Enable the reporter in your Playwright config (playwright.config.ts):

export default defineConfig({
  reporter: [
    ['@artilleryio/playwright-reporter', { name: 'My Test Suite' }],
  ],
  // ... rest of your config
});

Set your Artillery Cloud API key

Sign up for Artillery Cloud and create an API key (opens in a new tab), then export as ARTILLERY_CLOUD_API_KEY:

export ARTILLERY_CLOUD_API_KEY=YOUR_API_KEY

Run your Playwright tests

npx playwright test

When the test starts the reporter will print the URL of the test run to the console. The URL will look like this:

https://app.artillery.io/orgidkdowwbwpjiyxn/playwright/pwzxhq_abcdefabcdefghi_7atf

You can track the progress of the test run in real time in Artillery Cloud.

Once the test run completes, full report will be available, including any traces recording during the test run.

GitHub Actions

Artillery Cloud Playwright reporter GitHub Actions integration

When the reporter is used in a GitHub Actions workflow, it can post comments to the PR with the test results. To enable PR comments, set GITHUB_TOKEN environment variable in your GitHub Actions job that runs Playwright tests:

jobs:
  test:
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
 
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
 
      - name: Run Playwright tests
        env:
          ARTILLERY_CLOUD_API_KEY: "${{ secrets.ARTILLERY_CLOUD_API_KEY }}" # API key to send results to Artillery Cloud
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Enable PR comments
        run: npx playwright test

Current limitations

  • Tests running in sharded mode are not fully supported yet. Each run will produce multiple partial reports in Artillery Cloud, one per shard. We'll be releasing full support for sharded runs soon.

Roadmap

These are some of the things we're actively working on. If you have feature requests or ideas, let us know on support@artillery.io.

  • Full support for sharded test runs
  • Better GitHub Actions integration