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

Using Artillery Cloud with the reporter allows you to:

  • Send Playwright test results to Artillery Cloud as the test runs to monitor results in real time
  • View full HTML reports with screenshots and traces for all tests
  • Integrate with GitHub Actions with PR comments for test results
  • Keep a history of all test runs

Artillery Cloud Playwright Reporter

Usage

Install the reporter

npm install @artilleryio/playwright-reporter

Enable the reporter

Enable the reporter in your Playwright config. Playwright's built-in Blob reporter (opens in a new tab) must also be enabled:

const config: PlaywrightTestConfig = {
  reporter: [
    ['blob'], // required for Artillery's reporter to work
    ['@artilleryio/playwright-reporter', { name: 'My Test Suite' }],
  ],
  // ... rest of your config
};

Set your Artillery Cloud API key

Export your ARTILLERY_CLOUD_API_KEY:

export ARTILLERY_CLOUD_API_KEY=a9_your_api_key

You can create an API key in Artillery Cloud here: https://app.artillery.io/settings/api-keys (opens in a new tab).

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