Skip to main content

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.
prd
Steps:
  1. Bootstrap in diff scope
  2. Recreate test plans (frontend/backend as needed)
  3. Generate and execute
Refresh tests for the updated checkout and auth flows.

Step 2: Use Auto-Healing Suggestions

For selector drift, timing, or test-data issues, apply safe healing.
prd
  1. Review recommendations in the report under testsprite_tests/
  2. Accept proposed edits in your IDE when prompted
  3. Rerun to validate

Step 3: Manually Edit and Rerun a Subset

When only a few tests need tweaks.
prd
Run TC005 and TC006 only after I fix the locators.

Rerun Previously Generated Tests

Use rerun to validate fixes without re-planning.
testsprite_rerun_tests({
  projectPath: "/absolute/path/to/project"
})

Best Practices

Keep PRD and acceptance criteria in sync with product decisions
Prefer semantic selectors and explicit waits
Commit changes so diff-based regeneration stays accurate
Use small targeted reruns for fast iteration

Next Step