stably fix to automatically resolve failing tests with AI assistance.
Choose Your Approach
Your Own Runner
Run tests on your CI infrastructure (GitHub Actions, GitLab CI, etc.). You control the environment and pay for compute.
Stably Cloud Runner
Run tests on Stably’s scalable infrastructure. Run hundreds of tests in parallel without managing infrastructure.
| Feature | Your Own Runner | Stably Cloud |
|---|---|---|
| Parallelization | Limited by CI plan | Up to 100+ workers |
| Setup | Install browsers, manage deps | Just add API key |
| Cost | Pay your CI provider | Pay Stably (usage-based) |
| Best for | Small suites, custom environments | Large suites, fast feedback |
Option 1: Your Own CI Runner
Run Stably CLI commands directly in your CI environment. This approach gives you full control over the test execution environment.Setup Requirements
Setup Requirements
Before configuring your CI workflow, you’ll need credentials:
1
Get Your API Key
Go to the API Keys settings page and create or copy your API key.
2
Find Your Project ID
Navigate to your project in the Stably dashboard. The project ID is visible in the project settings or URL.
3
Add Secrets to CI
Add
STABLY_API_KEY and STABLY_PROJECT_ID as secrets in your CI provider.GitHub: Settings → Secrets and variables → Actions → New repository secretGitHub Actions Example
GitHub Actions Example
.github/workflows/stably.yaml
Other CI Platforms
Other CI Platforms
The same commands work in any CI environment. See platform-specific guides:
- CLI in CI guide - GitLab CI, CircleCI, Jenkins, Bitbucket Pipelines, Azure DevOps
- GitLab CI guide
CLI Commands Reference
CLI Commands Reference
| Command | Description |
|---|---|
npx stably install | Installs Playwright browsers needed to run tests |
npx stably test | Runs your Playwright tests and reports results to Stably |
npx stably fix | Uses AI to analyze and fix failing tests |
How stably fix Works in CI
How stably fix Works in CI
When you run
stably fix in CI, it automatically detects which test run to fix. You don’t need to pass any ID or reference.Behind the scenes:stably testgenerates a unique run ID based on your CI environment (e.g.,github-myorg/repo-123-1)stably fixdetects the same CI environment and uses the matching run ID- The AI analyzes the failures and suggests fixes
Option 2: Stably Cloud Runner
For teams that need to run large test suites quickly, Stably offers a scalable cloud infrastructure that can run hundreds of tests in parallel.Why Use Stably Cloud?
Why Use Stably Cloud?
Massive Parallelization
Run up to 100+ tests simultaneously. A 2-hour test suite can complete in minutes.
No Infrastructure Management
No need to provision runners, manage browser installations, or scale capacity.
Consistent Environment
Tests run in a clean, consistent environment every time—no flaky failures from CI resource contention.
Built-in Retries
Automatic retries and smart failure analysis included.
GitHub Action (Recommended)
GitHub Action (Recommended)
Use the Stably GitHub Action to run tests on Stably Cloud:For full configuration options, see the GitHub Actions guide.
.github/workflows/stably-cloud.yaml
API (Non-GitHub Platforms)
API (Non-GitHub Platforms)
If you’re using GitLab, CircleCI, Jenkins, or another CI platform, use the Stably API to trigger cloud runs:See the API Reference for full documentation.
Troubleshooting
stably fix fails with missing dependencies
stably fix fails with missing dependencies
If
stably fix fails due to missing dependencies or configuration issues, you need to run stably init on your repository first. This command sets up the necessary Playwright and Stably SDK dependencies.Solution:- Run
stably initlocally in your repository:
- The AI agent will install and configure the required dependencies
- Commit the changes to your repository
- Re-run your CI pipeline