Generate Endpoint Test Cases
Use Generate tests on the endpoint test-case screen to create critical tests first, then fill coverage gaps—across many test strategies with business-impact severity.
Overview
The endpoint test-case screen builds test cases directly from a selected endpoint's schema. Clicking Generate tests runs a phased generation—critical tests first, then additional tests to fill coverage gaps—so a single endpoint can produce a broad suite across positive, negative, boundary, and edge cases. Use it to seed coverage fast, then refine by hand.
Generation always produces at least deterministic (schema-derived) tests. When the AI engine is on and a provider key is configured, it also produces AI-enhanced tests. For the spec-driven capability, see schema-aware test generation; for the gap analysis, see coverage gap detection.
Before you begin
- You need a project with at least one feature and endpoint. If you have none, see Import and discover endpoints.
- AI-enhanced generation requires the AI engine to be on with a provider key configured in Settings → AI. Without that, you still get deterministic tests, but the platform shows a banner explaining the degraded mode. See AI Settings.
- Nav path: open a project → select a feature in the sidebar → select an endpoint. The endpoint test-case screen (the tests table) opens.
Step 1 — Open the endpoint and locate the toolbar
- In the sidebar, expand a feature and click an endpoint. The tests table for that endpoint loads. If it has no tests yet, you'll see No tests yet with the hint "Add tests to this endpoint to get started."
- In the toolbar above the table, find the purple Generate tests button (sparkle icon). Its tooltip reads "Generate critical tests first, then additional tests for coverage gaps."
- Other toolbar buttons: Add Test (create one by hand), Fill body, Run Selected, and Delete Selected.
Step 2 — Run phased generation
- Click Generate tests. The button label stays Generate tests but is disabled while work is in progress.
- The platform first checks your AI configuration and may show a warning banner immediately (see Step 3), then generates the critical tests first and follows with additional tests for coverage gaps in the same run.
- When it finishes, the tests table refreshes with the new tests and the Endpoint functional coverage panel updates.
- If nothing new was produced, a banner reports No tests generated with a reason such as "Full suite generation did not produce any new tests."
Step 3 — Read the degraded-mode banners
Before the request runs, the platform surfaces your AI state so you're never surprised by a deterministic-only result:
| Banner | What it means |
|---|---|
| AI Engine is OFF — generating deterministic tests only. | The AI engine toggle is off. Reason line: "Turn AI Engine on in Settings → AI to enable AI-enhanced test generation." |
| AI is not configured — generating deterministic tests only. | No provider key (and no self-hosted base URL) is set. Reason line: "Add a provider API key in Settings → AI to enable AI-enhanced test generation." |
| AI is not configured — deterministic tests generated. | Returned by the server after the run when AI was unavailable; deterministic tests were still saved. |
These banners auto-dismiss after about 8 seconds. Fix the underlying setting in AI Settings, then generate again.
Step 4 — Fill coverage gaps
- Expand the Endpoint functional coverage panel (click the chevron next to Endpoint functional coverage).
- Review the scores: Overall (functional = status codes, parameters, request body) and, where available, Production-grade (schema, headers, auth, routing, performance, data integrity, error body). A Coverage verdict grid marks each dimension pass/fail.
- Under Gaps, the panel lists missing items (for example an unused parameter such as
api_key). When overall coverage is below 100% and gaps exist, it prompts: "To reach 100%: use "Generate tests for gaps" below…" - Click Generate tests for gaps. This fetches fresh coverage and generates only tests that target the listed gaps—it does not regenerate the whole suite. On an endpoint with no tests yet, the same action appears as Generate initial tests.
- If coverage has no gaps, you'll see No gaps to generate with the reason "Coverage has no gaps. Refresh coverage or add more scenarios…"
Step 5 — What gets generated
Generation applies multiple test strategies for broad, varied coverage:
- Positive (happy path) and Negative (rule violations)
- Boundary values and Equivalence partitioning
- Decision table and Pairwise (combinatorial)
- HTTP semantics (405/415/etc.), Auth depth (token/scope), Schema fuzz (type/format), Security probes (SQLi/XSS), and Performance / latency
Each test carries a business-impact severity (ISTQB S1–S4: Critical, High, Medium, Low). Which strategies, requirement types, and severities fire is configurable per project—see Test Generation Settings.
Step 6 — Filter, refine, and act on results
- Use Search tests… and the coverage filter dropdown (All coverage / Critical / High / Medium / Low / Boundary / Equivalence / Decision table). The count reads Showing N of M tests.
- Click Edit on a row to open the test and customize inputs, headers, body, and assertions; set authentication and environment-dependent values.
- Run tests with Run Selected (or the per-row play action) and review outcomes.
- When a test breaks, use Fix with AI in the editor—see Fix tests with AI.
Troubleshooting
- Banner: "AI Engine is OFF …" / "AI is not configured …" — expected in degraded mode; deterministic tests are still created. Enable the engine / add a key in AI Settings.
- "No tests generated" — the run produced nothing new for this endpoint (the contract may already be fully covered). Try Generate tests for gaps, or refine strategies in Test Generation Settings.
- "No gaps to generate" — coverage is complete or stale. Reopen the coverage panel to refresh, or add scenarios to the endpoint.
- Generate button disabled — a generation run is already in progress; wait for it to finish.
Best practices
- Treat generated tests as a strong starting point, then refine business-specific assertions.
- Prioritize by severity: resolve Critical/High findings first.
- Regenerate (or run gap generation) when the endpoint contract changes.
Related articles
Related articles
- Test Cases: Open, Edit, and Save · Product documentation
- Test Configuration · Product documentation
- Execution Mode · Product documentation
- Run Tests and Review Results · Product documentation
- Test Generation Settings · Product documentation
- Fix Tests with AI · Product documentation
Next steps
- Getting started · Install + connect your spec
- Configuration fundamentals · Stabilize runs
- Initial configuration · Users, licensing, projects
- Release notes · Updates and fixes
Still stuck?
Tell us what you’re trying to accomplish and we’ll point you to the right setup—installation, auth, or CI/CD wiring.