Skip to main content
By the end of this guide you’ll have an API project that’s been discovered, planned, generated as Python tests, and run against your live API, with every request and response captured. No code on your side.
Doing UI testing instead? See the UI Quickstart.

Step 1: Project Setup

From All Projects, click New Project. The form has three steps: Basics, Access details, and Extra Context. On Basics, set the Test Type to Backend API, then enter your Base Endpoint and a project name.
The Basics step of the New Project form, with Backend API selected, Base Endpoint, and Project Name

Step 2: Review Discovered Endpoints

On Access details, click Upload API docs (OpenAPI, Swagger, Postman, or free-form docs). Discovery starts as soon as the file is uploaded, and your endpoints appear grouped by resource family in the Set Up Your Tests dialog.
Discovered endpoint list
For each endpoint you can remove it (trash icon), fix its path (click the row), and set its Authentication Type: Basic, Bearer, API-key, or None. If discovery missed one, click Add API; with no docs at all, use Add Endpoints Manually on Access details instead. When you’re done, click Save N endpoints and continue to Extra Context.

Step 3: PRD Upload & Extra Instructions

On Extra Context, choose I have a PRD and upload your PRD (strongly recommended; any product-spec document works). Optionally, add Extra Instructions to steer what gets tested, such as “skip /admin” or “focus on the checkout flow”. Then click Create project.
The Extra Context step: Test Sources with the PRD upload, and Advanced Context with Test Files
PRDs aren’t only for UI. They let TestSprite test the intent of each endpoint, not just its shape: “covers the order-placement scenarios your product supports”, not just “covers POST /orders”. Skip it for a quick demo; upload one for real coverage.

Step 4: Feature & Use-Case Extraction

The new project opens on Test Coverage, with a flow graph of the features TestSprite found in your PRD and API docs and the use cases under each. Test cases are scoped to these use cases. Click Regenerate from sources to redo the analysis, for example after editing the file.
Use-case flow graph on Test Coverage, extracted from the PRD

Step 5: Review and Adjust the Plan

Click Plan Tests and TestSprite’s testing agent plans the tests, grouped by use case and covering categories such as functional / happy path, authorization, error handling and edge cases, and (where relevant) boundary / load and security probes.
API plan review
Untick any tests that don’t apply, edit titles or descriptions in natural language, and click Run all. On a first run, keeping everything selected is usually right; if a use case has more tests than you want, untick individual low-value ones rather than the whole use case.

Step 6: Watch Tests Generate and Run

TestSprite generates a Python test per plan row, verifies each one, and runs them against your API. Each row shows Planned, Running, Passed, Failed, or Blocked. Tests that depend on each other run in the right order; see Dependency Chains.
API tests executing

Step 7: Review and Refine

Click any test to open its detail page: the generated Code, its Stdout (the HTTP calls and what your API returned), the error trace where an assertion failed, and an AI cause-and-fix suggestion. To change a test, edit its description and click Regenerate.
API test detail page
The run’s Test Report rolls up pass / fail / blocked counts with cause-and-fix highlights, ready to share with the team.
Test Report summary view

Step 8: Cleanup Runs Automatically

After the run, TestSprite removes the records your tests created (users, orders, sessions) so the next run starts fresh. The run’s Cleanup tab shows what got deleted. See Auto Cleanup.

Step 9: Rerun and Schedule

To run again, use Run test on a single test or Run all on the Test Cases toolbar. See Rerun, and set up Auto-Auth so tokens refresh before every run.

Where to Go Next

API Discovery

Deep dive on the discovery phase

Plan Generation & Editing

The mechanics of plan review

Integration Tests

Multi-step workflows that chain endpoints

Test Schedules

Run on a cadence to catch regressions