Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

WebApplicationFactory

A test helper that starts your whole API in memory so tests can call it.

WebApplicationFactory (Microsoft.AspNetCore.Mvc.Testing) boots the app on an in-memory TestServer and provides an HttpClient for integration tests, with overridable services and configuration.

Loading interactive…

Examples

  • var client = factory.CreateClient(); on a WebApplicationFactory<Program> gives a test an HttpClient wired straight to your API in memory.

Read the full section →