I am writing Integration Test for an ASPNetCore web API project. While reading about it I came across two terminologies, first is
Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory
and second is
Microsoft.AspNetCore.TestHost
References:
https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.1
https://koukia.ca/integration-testing-in-asp-net-core-2-0-51d14ede3968
I am a little confused, why and which kind of setup I should use to test Web API controllers?