Integration tests verify the correctness of multiple components working together. ## Writing integration tests The first challenge when writing integration tests for a use case is to identify a set of test cases, each with their own defined scope. Each test case will follow the [[Use the Arrange-Act-Assert pattern to structure automated test cases | Arrange-Act-Assert pattern]]. ## Criticisms of integration tests There are several problems or overheads that come with integration tests: - Require more effort and time to deploy (due to introduction of dependencies such as infrastructure resources or third party services) - Give slow feedback (due to latencies running tests and doing upfront provisioning) - Can break easily (due to reliance on downstream services) - Require lots of maintenance (e.g. when changes are made to downstream services) [[Test double]]s can be used to mitigate or remove many of these issues, but then are the tests really integration tests? (see [[Test doubles can mask incorrect assumptions]]) ## See also - [[Integration testing tools]]