# TestClient

*noun*

say it: **“TEST KLY-ent”** **/tɛst ˈklaɪənt/**

FastAPI's tool for tests that sends requests straight to your app and gives back the responses, with no server running.

## What is **TestClient**?

`TestClient` sends requests to your app in tests without running a server.

```python
client = TestClient(app)

def test_home():
    response = client.get('/')
    assert response.status_code == 200
```

## In a sentence

- “With a **TestClient**, the whole test suite runs without starting Uvicorn.”
- “The test uses a **TestClient** to send GET /recipes/1 and checks the status is 200.”

Level: Journeyman · [More FastAPI terms at this level](https://www.ask-codey.com/glossary?category=fastapi&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/testclient
