Testing and quality · Concept

Integration tests

Tests that check several pieces working together, such as an API route with its real database, or a screen with its form and validation.

Kinds of tests · updated

How it works

Where a unit test isolates one function, an integration test lets real parts talk to each other. It might start the API, send a request to /orders, and check both the response and the row written to a test database. On the frontend, rendering a whole component with Testing Library and clicking through it is a common form.

They catch the bugs that live where parts meet: a wrong column name, a missing header, a validation rule that disagrees with the server. They are slower and need setup (a throwaway database, seeded data, often run in Docker), so most suites have fewer of them than unit tests, focused on the paths that matter most.

Integration tests vs the alternatives

More in Testing and quality

Kinds of tests

All 10 Testing and quality terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.