Set up Artillery Playwright Reporter with GitHub Actions

Artillery Cloud Playwright
Artillery Cloud with all your Playwright test runs

If you’re running Playwright tests via GitHub Actions, you know the pain of having to download artifacts every time you need to take a closer look at some test.

By using Artillery’s Playwright Reporter, you will be able to:

Setup Instructions

  1. Install the reporter package in your project
    npm install @artilleryio/playwright-reporter --save-dev
    
  2. Configure the reporter in your playwright.config.ts
    const config: PlaywrightTestConfig = {
      reporter: [
        ['blob'], // also required for Artillery’s reporter to work
        ['@artilleryio/playwright-reporter', { name: 'my tests' }],
      ],
      // …rest of your config
    };
    
  3. Get a Artillery API Key and add it to your repo’s GitHub Secrets
  4. Add the required environment variables to your workflow
    - name: Run Playwright tests
      run: npm run test
      env:
        ARTILLERY_CLOUD_API_KEY: ${{ secrets.ARTILLERY_CLOUD_API_KEY }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    
    The GITHUB_TOKEN is used to comment in your PRs so you can see your test status, as shown below:
Artillery Playwright Reporter, GitHub Actions comment
The Artillery Playwright Reporter comment in your PR

That’s it! Now every time your tests are triggered from GitHub Actions they will automatically be sent to Artillery Cloud, so you can follow them in real-time and see traces and screenshots for all completed test runs.

Ps.: Artillery Playwright Reporter is currently in beta — if you have any questions or feature requests, drops us a line at support@artillery.io.