-
Notifications
You must be signed in to change notification settings - Fork 396
Description
I have a open source project that is using Coverlet to calculate test coverage.
The coverage seems to work correctly for unit tests.
However, coverage doesn't get reported for integration tests.
The integration tests I'm running use Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory to bring up a ASP.Net Web API application in memory and then uses a HTTP client to make API calls to this in-memory application.
However, none of the code executed is being included in the coverage. It doesn't even get the top-level controllers that get hit when the HTTP request is executed.
See this pull request for more details.
The dotnet test command is in the GitHub Action (dotnet test ./Lewee-CI.sln --configuration Release --no-build --collect "XPlat Code Coverage" --results-directory ./coverage).