Stably’s no-code AI tests run in the cloud only. Local execution is supported for the Playwright SDK workflow described here.
Prerequisites
- Node.js 18+ installed on your machine
- A test directory for your e2e tests
Setup
1
Remove existing Playwright (if installed)
If you already have Playwright installed:
2
Install Stably Playwright SDK
Navigate to your e2e tests directory:
3
Setup API Key
Get a Team API Key from your Stably Settings and set it as an environment variable:
You can also programmatically set the key using the
setApiKey
function:4
Update Your Test Imports
Replace all imports from
@playwright/test
with @stablyai/playwright-test
:Run Tests
Use the same Playwright commands you’re already familiar with:- Run tests in headed mode:
npx playwright test --headed
- Run a specific test file:
npx playwright test tests/example.spec.ts
- Run tests in UI mode:
npx playwright test --ui
- Run a single project/browser:
npx playwright test --project=chromium
- Filter tests by name:
npx playwright test --grep "login"
Enable AI Auto-Heal (Optional)
To enable AI auto-heal capabilities, create astably.config.ts
file in the same folder as your playwright.config.ts
:
Model support: Stably currently supports only
claude-sonnet-4-5
for auto-heal functionality. This model has demonstrated the best accuracy and reliability for both locator and screenshot healing.stably.config.ts
Next Steps
- Learn more about Stably Playwright SDK
- Explore AI Auto-Heal capabilities
- Set up GitHub Actions integration
- Configure GitLab CI integration