Skip to content
>devspeak
← glossary
level 6Testing & Reliability

Integration test

also: integration tests, integration testing

An automated check that several parts of your app work correctly together, such as your code and your database.

a bit more technical

A test that exercises two or more components together, such as an API route plus a real test database, to catch problems in how they connect: wrong queries, mismatched data formats, or misconfigured services.

picture it

Each bulb works on its own. Now you screw one into the lamp, plug it in and flip the switch. You're testing the connection, not just the bulb.

why it matters

Many real bugs live in the seams: code that talks to the database, a payment provider or another service. Integration tests check those seams, which unit tests skip on purpose.

what your agent might say
agent
Unit tests pass, but the integration test for POST /bookings fails. The route sends startTime as text, and the database expects a date and time.
how you might use it
you → your agent
Add an integration test that creates a habit through the API and confirms it's actually saved in the test database. Don't mock the database for this one.
common mistake

Confusing it with an end-to-end test. An integration test checks a few parts together, usually without clicking through the real screens.

builds on