Skip to main content

What you’ll do

  • Link a repository to Stably and authenticate
  • Generate a Playwright-compatible test with the interactive AI agent
  • Run the suite locally or in the cloud with automatic fixes

Prerequisites

  • Node 18+ and npm
  • Playwright available in the project (npx playwright install if you’re starting fresh)
  • Stably account: Signup at app.stably.ai or grab an API key from Settings → API Keys

Step-by-step

1

Authenticate and initialize

cd ~/projects/acme-shop
npx stably init
Log in when prompted or export STABLY_API_KEY. This creates stably.config.yaml and links your project to Stably Cloud.
2

Generate a test with AI

npx stably agent "Create a login test that verifies the dashboard cards render"
The agent inspects your app, writes a Playwright test (for example tests/login.spec.ts), and keeps it editable like any other test file.
3

Run and auto-fix locally

npx stably test --auto-fix
Stably executes your suite, diagnoses failures, and applies AI fixes automatically. Use --project smoke to target a group.
4

Optional: run in Stably Cloud

npx stably cloud test smoke --shards 3
Offload execution to managed browsers with parallelization, artifacts, and history in the dashboard.

What you get

  • A Stably-linked repository with config and cached auth
  • Playwright tests generated by the AI agent, ready for version control
  • Automated fixes on every run, locally or in the cloud

Next steps