Promptles
Testing & Quality

Integration Test

beginner

Definition

A test that checks whether several pieces of an app work correctly when they're put together: talking to a real database, hitting a real internal service, the way they would in real life. It catches the kinds of bugs that only show up when separate pieces have to cooperate.

In the wild

On its own, the 'create user' code looks fine. On its own, the database looks fine. An integration test actually creates a new user through the code and then checks that the database really has the new record. If the two pieces don't fit together correctly, this test catches it.

More from Testing & Quality