Start here. This is the direct spoken answer to practice first.
Overview
Chooses synchronous or asynchronous FastAPI test clients from the boundary exercised and resources involved.
FastAPI's TestClient gives a synchronous interface over the ASGI app, so ordinary def tests can exercise routing, validation, dependencies, middleware, and responses without awaiting requests. I use an async HTTP client when the test must also await async database or service operations in the same flow. Both can test the app in process; neither proves the behavior of a real network proxy or production server.