System · fintech
Integration test harness on testcontainers
Quality + KnowledgeBackend / Platform GotestcontainerstestifyKafkaPostgreSQLgRPCRedis
testcontainers: Postgres · Kafka (TLS+SASL) · Redis · NATS · WireMock service booted in-process ──► real contract, real migrations assert: exact status · emitted event · wallet side-effects
Problem
A 20+ service payments platform had thin, flaky coverage — mocks drifted from reality, tests slept instead of polling, and defects reached production undetected.
Approach
Built a shared testcontainers harness that spins up real infrastructure per run — PostgreSQL with real migrations, Kafka over TLS + SASL, Redis, NATS, plus WireMock for provider APIs — boots each service in-process against it, and exposes a reusable testkit (stub/seed/consume helpers, builder fixtures). Replaced sleeps with Eventually-style polling and added contract-level assertions on status codes, emitted events, and wallet side effects.
Result
Lifted 15/15 platform services to ≥80% scenario coverage (HTTP endpoints, Kafka consumers, and gRPC methods counted as distinct paths) with a single green run — ~126 tests in ~96s in CI — and added integration coverage for all 13 payment-provider adapters. The suite became a defect net that repeatedly caught production-class bugs before release.
Evidence
Described in work history (Korvax, 2022–present). Caught bugs include a 500-instead-of-404 on a missing wallet, a JWT middleware that let unauthenticated requests through, and a production migration missing from main — walkthrough available on a call.
Available for: private walkthrough
Integration tests are only worth their runtime if they exercise the real contract: real Postgres, real Kafka with TLS and SASL, real migrations. Booting services in-process against containerized infra is what makes a suite trustworthy enough to block a release on — and what turns it from a chore into the cheapest place to find production bugs.