Skip to main content

Keep Tests Healthy with Minimal Effort

Most maintenance is already handled via healing and focused regeneration. Use this page as a hub for quick practices and links.

Essentials

  • Prefer regeneration over manual rewrites for broad changes
  • Apply auto-healing for selector drift, waits, and fixtures
  • Use diff scope to update only impacted tests
  • Keep PRD and acceptance criteria current

Shift Left (TDD with TestSprite)

Generate and run tests while coding—even before features are complete—to reveal gaps early.
diff
  • Use testScope: "diff" to target in-progress changes
  • Run small subsets frequently via testIds
  • Let healing suggestions guide selectors, waits, and data setup from the start

Create Tests for New Change

Learn how to create tests for new features and changes

Common Tasks

Create Tests for New Change

Update changed flows with new tests

Healing & Observability

Fix failing or flaky tests with automatic healing

Add Extra Tests

Expand coverage with additional test cases

Test Types & Lifecycle

Understand test types and their lifecycle

Import Existing Tests

Migrate existing test suites to TestSprite
Rerun quickly: testsprite_rerun_tests({ projectPath: "/abs/path" })

Best Practices

Use semantic selectors and explicit ready states
Keep deterministic test data and clean state between cases
Commit changes frequently so diff-based updates are accurate
Run a small subset (by testIds) while iterating

Where Artifacts Live

delete
  • Results, PRD, plans, and logs under testsprite_tests/
  • Reports: Markdown/HTML plus machine-readable JSON for automation

Create Tests for New Projects

Learn how to create tests for new projects

Modify or Update Tests

Learn how to modify and update existing tests

MCP Testing Workflow

Understand the MCP testing workflow

MCP Tools Reference

Reference guide for MCP tools and commands