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 20+ installed on your machine
- A test directory for your e2e tests
Setup
See the SDK Setup Guide to integrate Stably SDK into your Playwright tests.
Run Tests
You have two options for running tests locally:Using Stably CLI (Recommended)
Using
npx stably test automatically injects the Stably reporter when running locally, providing enhanced test analytics and reporting.- Run tests in headed mode:
npx stably test --headed - Run a specific test file:
npx stably test tests/example.spec.ts - Run tests in UI mode:
npx stably test --ui - Run a single project:
npx stably test --project=smoke - Run multiple projects:
npx stably test --project=smoke --project=critical - Filter tests by name:
npx stably test --grep "login" - Combine project and grep:
npx stably test --project=critical --grep @p0
Using Playwright CLI Directly
playwright.config.ts.
Running Specific Test Groups
If you’ve organized your tests using Playwright projects, you can run specific groups:Advanced Options
Environment Variables
Environment Variables
Pass environment variables to your tests:
Debug Mode
Debug Mode
Run tests in debug mode with Playwright Inspector:
Parallel Execution
Parallel Execution
Control the number of parallel workers:
Retries
Retries
Configure test retries: