Getting Started
Flakiness.io is a test analytics service collects historical data about test runs and generates a report.
Flakiness.io seamlessly integrates with Playwright through our custom reporter. Available as an NPM package, the reporter automatically collects and uploads comprehensive test results data, including:
- Playwright Traces
- Screenshots
- Videos
- Console logs
Follow these steps to add Flakiness.io to your existing Playwright project:
-
Install the Flakiness.io reporter package:
Terminal window npm i @flakiness/report@latest -
Configure the reporter in your
playwright.config.ts
file:playwright.config.ts import { defineConfig } from '@playwright/test';export default defineConfig({reporter: [['list'],['@flakiness/report/playwright-test'],],retries: 1,}); -
Set up CI authentication
Add your Flakiness.io access token to your repository:
- Navigate to your GitHub repository settings
- Go to Secrets and Variables → Actions
- Add a new secret named
FLAKINESS_ACCESS_TOKEN
- Set its value to the access token from your Flakiness.io project settings
- Pass secret as an environment variable to the
npx playwright test
step# In your GitHub workflow file (.github/workflows/playwright.yml)jobs:test:runs-on: ubuntu-lateststeps:# ... other steps like checkout, setup Node.js, etc.- name: Run Playwright testsenv:FLAKINESS_ACCESS_TOKEN: ${{ secrets.FLAKINESS_ACCESS_TOKEN }}run: npx playwright test
After completing these steps, your Playwright tests will automatically upload results to Flakiness.io. You can view your test analytics and insights in the Flakiness.io dashboard.