Interactive Mode
The fastest way to start creating tests. Launch the interactive agent and have a conversation:- Describe what to test and the agent generates Playwright tests
- Iterate on the output — ask for changes, add edge cases, refine selectors
- Fix failing tests — paste error output and get fixes applied
- Explore your suite — ask about coverage gaps, flaky tests, or test structure
- Get guidance — learn best practices or troubleshoot problems
Example Session
Example Session
stably create — Headless Test Generation
stably create is the headless counterpart to the interactive agent. It generates tests and exits — making it ideal for CI/CD workflows, shell scripts, and integration with AI coding agents.
Self-Planning (No Prompt)
When you runstably create without a prompt, Stably automatically analyzes your changes and decides what tests to write:
- In CI with PR context — analyzes the pull request diff
- Locally — analyzes git changes against
origin/HEAD
From a Prompt
Pass a description of what you want to test:From a Test Plan
Point the agent at a structured test plan for repeatable, comprehensive test generation:Example Prompts
Here are prompts that work well withstably create:
Output Location
Output Directory Resolution
Output Directory Resolution
If
--output is not specified, Stably automatically detects the output directory:playwright.config.ts— UsestestDirif defined- Auto-detect — First existing:
tests/→e2e/→__tests__/→test/ - Fallback — Current working directory
Example Output
Example Output
Use Cases
CI/CD Integration
stably create is designed for unattended execution. Here are common integration patterns.
GitHub Actions: Generate Tests for PR Changes
GitHub Actions: Generate Tests for PR Changes
GitHub Actions: Generate Tests from Staging Deployment
GitHub Actions: Generate Tests from Staging Deployment
Background Agent Integration
Background Agent Integration
Monitoring Create Sessions
Whenstably create runs, it automatically creates an automation — a real-time view of the agent’s progress visible on the Stably web dashboard. This is especially useful in CI pipelines, Docker containers, and other non-interactive environments where you can’t see the terminal.
From the dashboard you can:
- Watch progress live — see the current phase, activity log, and files being created
- Send messages to the agent — provide guidance or additional context while the agent works, even in CI
initializing → generating → testing → complete
Automation creation is best-effort and non-blocking. If the connection fails, the CLI continues normally — your commands are never interrupted.
Customizing Test Generation
Control how the AI agent generates tests usingSTABLY-CREATE.md — a markdown file in your project root with test-generation-specific rules.
STABLY-CREATE.md
Next Steps
Run Tests
Execute your generated tests locally or in CI
Auto-fix Failures
Automatically diagnose and repair failing tests
STABLY-CREATE.md
Customize test generation rules and conventions
CLI Commands
Full command reference for the Stably CLI