When to Use This
Use this guide when your app changes and existing tests need updates: new UI structure, altered API responses, or refined acceptance criteria.Options at a Glance
- Regenerate impacted tests via plans (recommended for broad changes)
- Apply auto-healing suggestions (selectors, waits, fixtures)
- Manually adjust specific tests and rerun quickly
Typical Workflows
Step 1: Let the Agent Regenerate What Changed
Regenerates plans and tests based on current code and PRD.
- Bootstrap in
diffscope - Recreate test plans (frontend/backend as needed)
- Generate and execute
Step 2: Use Auto-Healing Suggestions
For selector drift, timing, or test-data issues, apply safe healing.
- Review recommendations in the report under
testsprite_tests/ - Accept proposed edits in your IDE when prompted
- Rerun to validate
Step 3: Manually Edit and Rerun a Subset
When only a few tests need tweaks.
Rerun Previously Generated Tests
Use rerun to validate fixes without re-planning.Best Practices
Sync PRD with Product Decisions
Sync PRD with Product Decisions
Keep PRD and acceptance criteria in sync with product decisions
Use Semantic Selectors
Use Semantic Selectors
Prefer semantic selectors and explicit waits
Commit Changes Regularly
Commit Changes Regularly
Commit changes so diff-based regeneration stays accurate
Targeted Reruns for Speed
Targeted Reruns for Speed
Use small targeted reruns for fast iteration