Will It Vibe logoWill It Vibe?
FASTAPI-019Low severity-4 points

No API test evidence for a FastAPI project

Part of Testing & CI, which counts for 10% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.

What it detects

The project defines FastAPI route handlers but no file anywhere imports fastapi.testclient.TestClient or constructs an httpx.AsyncClient against the app, the two standard ways to exercise FastAPI routes in tests. Heuristic: tests driven through an external HTTP client or a separate test repo would not be visible here.

Why it matters

The project defines FastAPI routes but nothing in the repository imports fastapi.testclient.TestClient or builds an httpx.AsyncClient against the app, the two standard ways to exercise FastAPI endpoints directly in tests. Without that, a route's request validation, response shape, status codes, and error handling can regress on any change with nothing catching it before it reaches users, since manual or external testing leaves no trace a static scan can see.

How to fix it

Add tests that exercise the routes through fastapi.testclient.TestClient (synchronous) or httpx.AsyncClient with ASGITransport (async), covering at least the success path and the main error cases (validation failure, not-found, unauthorized) for each route. Wire these into CI so they run on every change, not just locally.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Testing & CI checks