integration-testing
Principles for writing and reviewing integration tests in any language, framework or stack, meaning tests of the place where your code meets something it does not contain, such as a database, a file system, a queue, a cache, another service's API, a framework's routing or wiring, or configuration. Use this whenever you write, change, review or debug a test that needs a real database, real files, a real HTTP request, a container, a local server or a stand-in for another service. Use it when deciding whether to run the real dependency or replace it, how to fake or stub a service you do not own and keep that stand-in honest, how to set up and clean up test data, or what belongs in an integration test instead of a unit test or an end-to-end test. Use it when such a test is slow, flaky, order-dependent, or passes although the integration is broken in production. Also use it when briefing someone else to write integration tests. It is about how to think, not about any one tool's API.
Pinned to revision d53dc7371d06, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.