# Integration Test

> A test that checks a few parts work as a team, like code and its data.

**Field:** Software Development  
**Category:** Testing & Quality  
**Also known as:** Integration Testing, Integration Tests

## Think of it like

Think of it like toy bricks. You check that they click, not just that each one is fine.

## Definition

An integration test checks that several parts of a system work together. It might run your code against a real database, or call your own API and read the reply. These tests catch bugs that live between parts, like a wrong column name. They are slower than unit tests, often taking seconds each. Most projects have fewer of them than unit tests.

## Example

Jack's unit tests all pass, but one bigger test fails. His code saves user_name, but the database column is called username.

## Why it matters

Many real bugs live in the joins between parts. Unit tests cannot see them.

## Common mistake

Pointing integration tests at the live database. Use a test database, or a test may wipe real data.

## Three principles

- **Parts together.** Code, database, API.
- **Finds the gaps.** Bugs between pieces.
- **Slower.** Seconds, not milliseconds.

## Related terms

- [Unit Test](https://learn.benibix.com/term/development/unit-test)
- [End-to-End Test (E2E)](https://learn.benibix.com/term/development/end-to-end-test)
- [Database](https://learn.benibix.com/term/development/database)
- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [Contract Testing](https://learn.benibix.com/term/development/contract-testing)

## Told apart from

- [Unit Test vs Integration Test](https://learn.benibix.com/compare/unit-test-vs-integration-test): A unit test checks one small piece of code by itself, in a few milliseconds. An integration test checks that parts work as a team, like your code and its database. Unit tests show which piece broke. Integration tests find the gaps between the pieces.
- [Integration Test vs End-to-End Test](https://learn.benibix.com/compare/integration-test-vs-end-to-end-test): An integration test checks a few parts together, often without a browser. An end-to-end test drives the whole app in a real browser, the way a person does. End-to-end tests prove a real task works, but they are slower and break more often.
- [Integration Test vs Contract Testing](https://learn.benibix.com/compare/integration-test-vs-contract-testing): An integration test runs two or more real parts together to see that they work. A contract test checks each side alone against a shared file of requests and answers. It does not need the other side to be running.

---

Source: https://learn.benibix.com/term/development/integration-test
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
