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.

What Test Generation Does
For each test case in the reviewed plan, TestSprite writes:- A Python + Playwright test file that opens a real browser, drives your app through the flow, and asserts on the visible state at each step
- A step list that gets followed at runtime — clicks, fills, navigations, assertions
What Code Gets Generated
For each plan row, TestSprite writes a Python + Playwright test that drives a real browser through the flow and asserts on visible state. Roughly:Generated UI test (illustrative)
- Coverage from observed behavior, not speculation. Tests are grounded in flows TestSprite actually walked through during exploration — including the edge cases (form validation, error states, redirects) that handwritten suites typically skip until a customer hits them.
- Survives your refactors. Paired with Auto-Heal (Pro), tests recover automatically when your UI changes but the underlying flow is intact. A button rename or component swap doesn’t turn into a green-the-suite ticket.
- Auditable, not magical. Generated code is plain Python + Playwright — actions and assertions are line-by-line readable. Your QA team can review what’s being checked; there’s no proprietary DSL or opaque runtime to trust.
- Maintained for you. Refine a test in your own words and TestSprite regenerates the steps. Keeping the suite green is a paragraph of feedback, not a sprint of selector hunting.
How Generation Runs
TestSprite generates each test from its plan row, verifies the output, and surfaces failures clearly. If a test can’t be generated cleanly, it’s marked Failed, the credit is refunded, and a Regenerate button appears on the row so you can try again.Watching Generation Live
Generation runs across plan rows in parallel. As each test finishes, it streams into the project test list with status:
| Status | Meaning |
|---|---|
| Generating_Code | TestSprite is writing and verifying the test (typically 10–30 seconds per test for UI) |
| Idle | Code generated, ready to run |
| Running | Test is executing in the cloud sandbox |
| Passed / Failed / Blocked | Final outcome after run |
What “Run” Does
When a UI test executes (initially after generation, or via Rerun later), TestSprite spins up a Playwright browser in the cloud sandbox, signs in with your test account, drives your app through the flow, captures per-step screenshots, records a full session video, and decides Pass/Fail from the assertions. Once the run finishes, open the test detail page to play back the recorded video and step through the screenshots.How UI Tests Differ from API Tests
| UI Tests | API Tests | |
|---|---|---|
| Execution model | Playwright browser | requests HTTP client |
| Selector resolution | At runtime, against live DOM | Not applicable (URLs are stable) |
| Drift handling | Auto-Heal (Pro) | Not needed — APIs don’t drift like UIs |
| Multi-step concept | Each test is end-to-end self-contained | Integration chains link related tests through shared values |
| Recorded artifacts | Video + per-step screenshots | Request/response bodies |
| Typical test runtime | 5–30 seconds | 1–5 seconds |
Reviewing a Failed Test
Click any Failed row to land on its detail page (see Step-by-Step Walkthrough for the rich view). You get:
| Element | What you get |
|---|---|
| Recorded video | The full run, in the right pane’s Preview tab |
| Per-step screenshots | Click any step in the Steps list to load its HTML snapshot — see exactly when the test went off the rails |
| Error / Trace / Fix tabs | The Playwright error, raw stack trace, and an AI-authored cause-and-fix suggestion |
| Chat tab | Natural-language refinement of the test |
| Rerun | Plain replay — see Rerun; recovers from UI changes with Auto-Heal (Pro) |
Iterating on a Test
To iterate on a generated test, open its detail page and edit the test description — saving re-triggers generation against the new wording.
Edge Cases & Troubleshooting
A generated test uses a selector that doesn't match my actual DOM
A generated test uses a selector that doesn't match my actual DOM
Two paths:
- Refine in chat: “The Sign In button uses
data-testid='login-btn', not the role-based selector” - Regenerate: click Regenerate on the test row — generates a fresh test from scratch. Often picks up better selectors on a re-roll.
The test got generated against a feature I didn't explore
The test got generated against a feature I didn't explore
Plan generation produced a spec-based case for that feature. The test code is best-effort; first run may fail. Refine with actual UI details after the failure.
The Generate Tests button hangs / never finishes
The Generate Tests button hangs / never finishes
My test imports a Playwright API I haven't seen before
My test imports a Playwright API I haven't seen before
Standard generation uses
playwright.sync_api + standard library + pytest. If your description accidentally implied something exotic (“use playwright async”), generation may follow. Refine to standard or accept the variant.The video captures are missing on a failed test
The video captures are missing on a failed test
Recording is on by default. If video is missing, the cloud sandbox failed to capture (rare). The screenshots and Playwright trace should still be there — file a bug if all three are missing.
Where to Go Next
Step-by-Step Walkthrough
Per-step screenshots, video, and run trace
Auto-Heal (Pro)
Subsequent runs handle UI drift automatically
Refining Tests
Natural-language adjustments
Test Detail
Drill into one test’s full result