Integration tests
In this section, we’re going to look at the next layer up in the test pyramid: integration testing. We’ll see why it’s important, review helpful tools, and understand the role of integration testing in the overall scheme of things.
Integration tests exist to test that our code will successfully integrate with external systems. Our core application logic is tested by unit tests, which, by design, do not interact with external systems. This means that we need to test behavior with those external systems at some point.
Integration tests are the second layer up in the test pyramid. They have advantages and limitations, as summarized in the following table:
Advantages |
Limitations |
Test that software components interact correctly when connected |
Require test environments to be set up and maintained |