-
Notifications
You must be signed in to change notification settings - Fork 389
Unable to get coverage when running tests with Microsoft.AspNetCore.Mvc.Testing #901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could be related to known issue https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#1-vstest-stops-process-execution-earlydotnet-test It it doesn't work please can you provide the solution so I can test on my local? |
After checking, it does work with collector. Unfortunately, I picked the msbuild way because I needed the mergewith. Do you have any update about supporting MergeWith with collector ? |
We're working on some solutions, but I don't have eta at the moment, btw you can use a trick used by one of our user #225 (comment) Also check if your coverage report generator can merge files like reportgenerator https://www.palmmedia.de/OpenSource/ReportGenerator |
Yep, I’ve already seen it. Might try tomorrow but not a huge fan of this workaround as it complicates my pipeline and might not integrate well with the dotnet test task I use (working on azure devops). |
I undestand you 😞
You can follow our changelog and roadmap(expected, btw could change), atm we don't use the board because coverlet is OSS and it's not easy do long term planning https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Changelog.md |
Hello there,
I have an issue with a simple repro solution:
Three projects :
The first test instantiate my api controller executes the method and assert on the result.
The second one do almost the same but by instantiating the whole aspnetcore pipeline via the WebApplicationFactory.
The version are as follows:
When I run as is I got this coverage :
When I skip Test2 I got this coverage:
It seems that hosting with WebApplicationFactory makes the coverage unavailable.
I can provide the whole solution if needed.
My env :
The text was updated successfully, but these errors were encountered: