Advanced Integration Tests: Beyond unit tests with Jeff Zuerlein
Details
Most production bugs don't live inside a single function — they live at the seams, where your code hands off to the database, crosses the auth pipeline, or turns JSON into an object. Unit tests, built on mocks, can't reach those seams, because a mock is only an assumption about how the real thing behaves.
This talk builds, piece by piece, a single integration test that hits a real ASP.NET Core minimal API over real HTTP and asserts on a real response — no mocks, no hand-rolled tokens. Using WebApplicationFactory and Testcontainers, we'll design a fixture lifecycle with four explicit, self-checking phases: start the database, build the factory, materialize the host, seed. We'll see why composition — not inheritance — is the right tool here, letting the exact same test body run against both SQLite and a real PostgreSQL container with zero duplicated logic.
We'll fake authentication while keeping authorization completely real, using a swappable scheme and a fluent builder — `WithJwtAuth`, `WithCookieAuth`, `AsAdmin()` — that turns identity into a one-line, readable test setup. We'll also cover first-class CSRF/antiforgery testing for cookie-based auth, something most integration suites skip entirely.
Along the way: deterministic timestamps via an injected TimeProvider, generated request data, and the traps that catch people off guard — incompatible `DisposeAsync` signatures, captive dependencies, and the silent failures that let a broken fixture pass anyway.
You'll leave with a reusable pattern — demonstrated in a public reference repo — for integration test fixtures that are correct by construction, fail loudly when something's actually wrong, and cheap enough to write for real.
Schedule
6:00 - 6:30: Social Time
6:30 - 8:00: Featured Presentation
Sponsors
The meetup is open to the public, free to attend, and will be held virtually. Please RSVP to view the GoTo Meeting URL.


