Integration Testing

Integration Testing

Integration testing is the process of taking individual units, combine them together into the desired system and test it as a group. Integration testing may also mean testing the software along with the dependent systems such as database, message queues, etc. This is opposed to unit testing in which all external dependencies are mocked or stubbed out, focusing only on the unit.

Integration tests determine if independently developed units of software work correctly when they are connected to each other.

How to write integration tests?

  • Integration tests should have actual dependent systems live when running the tests and not mocks.
  • Test code paths through exposed services, not through code responsible for interactions.
  • The dependent systems can be setup local to the test environment or it can interact with remote systems.
  • Integration tests should be run on every code change (or) change (upgrade) of dependent systems.

What are the benefits of integration testing?

  • Integration testing allows programmers to ensure software quality on upgradation of external components.
  • It provides a systematic technique for assembling the complete software system and conducting tests across all the dependent services to uncover errors associated with interfacing.
  • The application is tested by mimicking the consumer of the software in order to verify that it meets the standards set by the client.

Write clean and secure code with DeepSource

Powerful static analysis that takes 5 minutes to set up and helps you fix code health and security problems on every pull request.