The logs were clean, the build was green, but something broke in production. The gap was integration testing against your self-hosted instance.
Unit tests run fast. They catch small bugs. But they do not account for the complex systems, APIs, and networks that make up your real environment. Integration testing on a self-hosted instance closes that gap. It verifies that services talk to each other, authenticates like your users do, and confirms data flows work in production-like conditions. Without it, release pipelines ship code that passes fake tests.
A self-hosted instance brings full control. You own the data, security, and execution context. But it also brings the responsibility to replicate real-world architecture for testing. You need network configurations that match production. You need real secrets and tokens. Services must run with the same dependencies, configs, and versioned binaries. Integration tests must cover business-critical paths: login, payment, messaging, file uploads—whatever your system cannot fail on.
The most effective approach is to automate against a disposable environment that mirrors production exactly. Script the spin-up. Seed it with realistic data. Run headless integration tests through your actual endpoints. Tear it down after. No mocks. No stubs. Only the truth.