Documentation Index
Fetch the complete documentation index at: https://docs.testsprite.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The first run is rarely the last word. As you review results, you’ll often want to tighten an assertion, point a step at a different element, expand the scope of a check, or rewrite a case entirely. TestSprite gives you three paths for that — pick the one that matches the size of the change.
| Path | When to use |
|---|---|
| Edit the description | You want to refocus or extend a single test (most common) |
| Chat with the AI | You want to ask why a test failed and let the AI propose a fix |
| Regenerate the project | The app changed materially and the existing plan no longer matches |
Edit the Description
The fastest, most surgical path. You rewrite the test’s description in natural language and TestSprite regenerates the steps to match.
- When to use
- What happens
- Example
- You want to add a specific input value (“use email
test@example.com”) - You want to narrow scope (“only verify the success message — don’t follow the link”)
- You want to extend coverage (“after sign-in, also click the profile menu and verify the avatar loads”)
- You want to fix a misinterpretation — the AI’s first read of the case missed your real intent
Chat with the AI
When you want a conversation about the test instead of writing the change yourself. Useful for “why did this fail?” and “what would you change?” workflows.
- When to use
- What happens
- Suggested prompts
- You don’t fully understand why a test failed and want a plain-English explanation
- You want to brainstorm what the test should check before committing to an edit
- You want the AI to propose a fix and apply it on your behalf
- You want to ask about the test’s design — why was it written this way, what is it really checking
The AI sees the test’s steps and the latest run’s outcome. It does not see your application source code or PRD by default — it reasons from the test artifacts.
Regenerate from Scratch
The largest hammer. Use this when your app has changed materially since the project was created and the existing plan is more outdated than fixable.
- When to use
- What happens
- Watch out
- You shipped a major redesign and most existing tests reference old UI
- You changed your API contract for many endpoints at once
- You want to start fresh with the same project name and settings
Auto-Heal as a Refinement (UI Only)
For UI tests, Auto-Heal is a fourth refinement path that doesn’t require any explicit edit. When you rerun a UI test with Auto-Heal opted in, TestSprite recovers the test against the new page if the underlying flow is still intact — UI drift gets absorbed without your involvement. This is the right tool when:- You haven’t actually changed your test’s intent
- You’ve redesigned the UI and the test is now hitting outdated selectors
- You want a no-touch path for nightly schedules to absorb routine drift
Re-Running After a Refinement
After any refinement you have two options:Re-run a single test
From the test detail page, use the rerun action on the row. Fastest way to confirm a fix without touching the rest of the suite.
Tips
Be specific in descriptions
Be specific in descriptions
“Verify login” is harder for the AI to interpret than “Verify the Sign In link opens the login page and that submitting test credentials lands on the dashboard.” More signal in the description = more accurate steps.
Use the chat for failures, edits for additions
Use the chat for failures, edits for additions
Failures benefit from the chat’s ability to read the run trace. Additions and scope changes are usually faster as direct description edits.
Refine in small batches
Refine in small batches
Edit one or two tests, re-run, confirm, then move on. Editing 20 tests at once and re-running everything is harder to debug if a few don’t behave as expected.
Save reusable phrasing
Save reusable phrasing
If you find yourself adding the same instruction (e.g. “only check the response body, not the headers”) to many tests, capture it once and reuse it. The AI is consistent across descriptions written with similar phrasing.
Where to Go Next
Test Detail
Where these refinement actions live in the UI
Comparing Runs
Verify your refinement actually changed the right tests
UI Testing
UI test wizard reference
API Testing
API test wizard reference