Integration tests use WebApplicationFactory with Testcontainers to start the full ASP.NET Core application with a real PostgreSQL database in Docker. IntegrationTestFactory Full-Stack Integration Test Running Tests with Filters
Key Takeaways
WebApplicationFactory starts the full ASP.NET Core app for testing.
Testcontainers spins up real PostgreSQL in Docker — accurate testing.
JWT token is generated in the test factory for authenticated endpoints.
Use --filter to run specific test classes, methods, or categories.