Glossary

Integration Testing

Integration tests verify that several components work together correctly: a service + a real database, a controller + a real HTTP request. Unlike unit tests, they do not isolate dependencies — they test real integration.

Where a unit test is not enough

A unit test verified that the save() method is called. But is the DB mapping configured correctly? Does the foreign key fire? Is the SQL right? Only an integration test answers those questions.

Testing pyramid

Unit (many, fast) → Integration (fewer, slower) → E2E (few, slow). Unit tests find most bugs, but some only surface in integration.

In practice