...

/

Integration Testing

Integration Testing

Learn what integration tests are and how to write them. Find out how using fixtures might help you.

Unit tests are good, but they won’t tell us anything if we’re misusing the external services. We have integration tests to check that.

An external service could mean anything outside of our code—an external server providing an API, a database, another application, a command-line tool, or even a different module in our codebase.

How to write integration tests

In general, integration tests follow the same Arrange-Act-Assert structure, but in this case, the Arrange and Assert phases are trickier. ...