Skip to main content
The Stably Reporter streams your Playwright test results, traces, and screenshots to Stably for debugging and AI-powered maintenance with stably fix. With the reporter enabled, you get a rich test results dashboard with detailed run history, failure analysis, and auto-heal reports that show exactly what changed and how Stably fixed your tests.
Stably Reporter Dashboard showing test results

Installation

npm install -D @stablyai/playwright-test@latest
Requires Playwright 1.52.0+

Configuration

Using stably test? The reporter is automatically configured—no setup needed. Skip to Verify Setup.
1. Set environment variables in your .env file:
STABLY_API_KEY=your_api_key_here      # Get from https://auth.stably.ai/org/api_keys/
STABLY_PROJECT_ID=your_project_id_here # Find in your project URL on app.stably.ai
2. Add the reporter to playwright.config.ts:
import { defineConfig } from "@playwright/test";
import { stablyReporter } from "@stablyai/playwright-test";
import dotenv from "dotenv";
import path from "path";

dotenv.config({ path: path.resolve(__dirname, ".env") });

export default defineConfig({
  reporter: [
    ["list"],
    stablyReporter({
      apiKey: process.env.STABLY_API_KEY,
      projectId: process.env.STABLY_PROJECT_ID,
    }),
  ],
  use: {
    trace: "on", // Required for debugging in Stably dashboard
  },
});
Set trace: "on" instead of the default "on-first-retry" to capture traces for all runs.

Verify Setup

Run a test to confirm the reporter is working:
npx stably test
You should see a dashboard URL printed after tests complete. View results at app.stably.ai.

Using with stably fix

The reporter enables AI-powered test maintenance:
npx stably test          # Run tests (results stream to Stably)
stably fix [runId]       # AI analyzes failures and generates fixes

Troubleshooting

IssueSolution
Missing tracesSet trace: "on" in config, or use stably test
Auth errorsVerify STABLY_API_KEY and STABLY_PROJECT_ID
pnpm issuesUse ["@stablyai/playwright-reporter"] instead of stablyReporter()
See full troubleshooting guide for more details.

Next Steps