Integration Testing: Testing that different parts of a system work correctly together, such as your API with a real database, or your service with another service it calls.
Example
An integration test calls the "create order" API, then checks that the order really appears in the database with the right total, and that the stock count went down.
Unit vs Integration vs End-to-End
| Level | Tests | Speed |
|---|---|---|
| Unit test | One function or class on its own | Very fast |
| Integration test | Several parts working together, such as API + database | Slower |
| End-to-end test | The whole application through the user interface | Slowest |
Teams usually write many unit tests, fewer integration tests, and only a few end-to-end tests.
What Integration Tests Catch
- Wrong database queries or mappings that unit tests with fake data miss.
- Mismatched data formats between services, such as a field renamed on one side.
- Configuration problems, such as wrong connection settings.
- Transactions that don't roll back properly on errors.
Tools You May See
Spring Boot Test, Testcontainers (to start a real database in Docker for tests), Postman or REST Assured for APIs, and pytest with test databases in Python. Integration tests usually run in the CI pipeline on every change.
Related terms
- Unit Testing: tests small pieces in isolation.
- Regression Testing: rerunning tests to make sure old features still work.
- Software Testing: the broader practice integration testing belongs to.
- Continuous Integration (CI): where integration tests usually run.
Previous term: Initiative | Next term: Intern
Related guides
- Software Development vs Testing
- Technical Interview Questions for Freshers
- DevOps Interview Questions Test
Frequently asked questions
What is integration testing?
Integration testing checks that different parts of a system, such as an API and a database, work correctly together.
What is the difference between unit and integration testing?
Unit tests check one small piece in isolation. Integration tests check several pieces working together, often with real dependencies.
Who writes integration tests?
Developers and QA engineers, depending on the team. In many teams, developers write them alongside the feature.
Are integration tests slower than unit tests?
Yes, because they use real databases or services. That is why teams write fewer of them.
Explore more internship terms
The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.
Browse all 199 terms