
How Test Maintenance Works
When test failures occur, the maintenance agent provides comprehensive analysis and repair guidance:1. Trigger Triage from Dashboard
Navigate to your test run results in the Stably Dashboard and locate any failed test execution. Click the “Triage” button to initiate the analysis. The agent will automatically:- 📊 Analyze Playwright traces and execution timeline
- 🔍 Review console logs and network requests
- 🧬 Cross-reference your source repository
- 🤖 Identify root cause category (bug vs. test vs. infrastructure)
2. Review Automated Analysis
The triage report provides: Summary — High-level overview of all failures grouped by root cause Root Cause Classification:- 🐞 Product Bug — Actual application defect requiring code fix
- 🧪 Test Needs Update — Test logic or locators require maintenance
- ⚙️ Infrastructure/Flake — Environment, timing, or network issues
3. Copy Prompt for Your Coding Agent
Each diagnosis includes a generated AI repair prompt optimized for coding agents. Simply click “Copy Prompt” and paste it into:- Cursor — for inline code editing and test repair
- Claude Code — for conversational test maintenance
- GitHub Copilot — for IDE-integrated suggestions
- Any LLM-powered coding assistant
Types of Failures Detected
Test-Level Issues
The agent identifies common test maintenance scenarios: Fixed Timeout Misuse — Tests usingpage.waitForTimeout(5000) instead of proper wait conditions, causing race conditions and flakiness
Product Bugs
Real application defects identified by the agent:- API Failures — Backend errors, timeouts, or unexpected responses
- JavaScript Errors — Console exceptions from application code
- Navigation Issues — Broken links, incorrect redirects, or routing problems
- Visual Regressions — Layout shifts, missing elements, or styling problems
Infrastructure Issues
Environment and timing problems:- Network Timeouts — External API calls or CDN failures
- Resource Loading — Assets failing to load due to CDN/cache issues
- Flaky Selectors — Elements appearing inconsistently due to race conditions
- Environment Configuration — Test data, auth tokens, or setup problems
Best Practices
Leverage AI Repair Prompts
Instead of manually debugging failures:- Trigger triage after each test run with failures
- Review the automated analysis to understand failure categories
- Copy the AI-generated prompt for test-related failures
- Paste into your coding agent and review suggested changes
- Apply fixes and re-run tests to verify
Integrate with Your Workflow
In CI/CD:- Set up alerts for test failures (see Alerting)
- Review triage reports before investigating manually
- Use prompts to fix tests in feature branches before merging
- Run triage on local test failures
- Generate repair prompts for immediate fixes
- Build muscle memory for common failure patterns
Continuous Improvement
Use triage insights to improve test quality over time:- Track common failure patterns across your suite
- Refactor tests with recurring issues
- Update test authoring guidelines based on agent findings
- Share AI repair prompts with your team
Related Features
The Test Maintenance Agent works seamlessly with other Stably capabilities:- AI Auto-Heal — Automatically repairs locators and visuals at runtime
- Triage Agent Overview — Learn more about AI-powered test maintenance
- What is Stably? — Understand how triage fits into the broader AI testing platform
- View Test Results — Navigate traces and execution details before triggering triage
Next Steps
Run Your First Test
Execute Playwright tests locally or in CI to generate triage reports
Configure Alerts
Set up Slack or email notifications for test failures
Learn Auto-Heal
Prevent failures before they happen with runtime auto-healing
Create Tests with AI
Author tests faster using Cursor or Claude Code integration