Coverlet is a .Net code coverage collector that can be used with MSTest. Use this tags for questions regarding the coverlet collector and it's usage and/or output.
Questions tagged [coverlet]
75 questions
0
votes
1 answer
Get branches coverage on Visual Studio
Using the CodeCoverage of Visual Studio I'm not able to see the branches coverage results. What would be the best way to get it ?

PierreP
- 107
- 7
0
votes
0 answers
Running a Target only once per solution
I'm trying to find a way to run a specific target only once per solution after tests are done.
I have a solution with multiple test projects. Each has integration with coverlet.msbuild, hence they each produce a coverage report (opencover) file in a…

Eugene Krapivin
- 1,671
- 2
- 17
- 32
0
votes
1 answer
Exclude Blazor pages from code coverage via .runsettings
I have this little Blazor application. Now I'd like to exclude all Blazor pages from code coverage via .runsettings. The pages are located under /RaspiFanController/Pages/. My tests are using NUnit and the coverage calculation uses coverlet.
I've…

mu88
- 4,156
- 1
- 23
- 47
0
votes
1 answer
TeamCity + ReportGenerator
Good morning guys
I am using coverlet to run my tests in TeamCity. This works fine after I run the tests I would like to generate the report.
Write-Host "Installing report generator" -ForegroundColor Green -BackgroundColor White
dotnet tool…

miechooy
- 3,178
- 12
- 34
- 59
0
votes
1 answer
Latest/previous ver return error "The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long."
Try to install latest ver (3.1.0) of coverlet.msuild using nuget package manager for C# Unit Test Project on VS 2019 Community.
I am return the error:
"The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too…

rpietkiewicz
- 11
- 3
0
votes
1 answer
Run MsBuild.Coverlet without dotnet command
I have an old project (VS2105) I'm unable to use the dotnet command so I'm trying to use coverlet.msbuild task.
MSBuild.exe my-solution.sln /t:My_Project_Test:InstrumentModules /t:My_Project_Test:GenerateCoverageResult /p:CollectCoverage=true…

Symon Suna
- 3
- 2
0
votes
0 answers
Provide code coverage for blazor inline code
I've got code like this in a blazor component...
Now coverlet says that this line isn't tested.
In the containing control I'm testing that the delegate is called, and I have tests covering…

Stuart Hemming
- 1,553
- 2
- 21
- 44
0
votes
1 answer
Code coverage of legacy applications in end to end tests
I am building a test suite, specflow and XUnit based, that has all kinds of end to end tests that run a few legacy .net 4.5 applications
The legacy applications hardly have any unit tests. I would like to see the coverage of the code that runs in…

jeroentjeathome
- 43
- 6
0
votes
1 answer
How to upload xUnit coverage reports to Codecov?
I have a .Net 5 solution with multiple xUnit test projects which is a public repository hosted on Github. I would like to generate code coverage reports and display them on Codecov.
First I run
dotnet add package coverlet.msbuild
for each test…

Question3r
- 2,166
- 19
- 100
- 200
0
votes
1 answer
Parse VSTest output in Github Action and use as a YAML variable
I'm SOOO close to having this working, but I don't know enough yaml-foo to see a solution.
It's clear that there's no way to tell coverlet (https://github.com/coverlet-coverage/coverlet) to NOT use a random GUID in the results path:
(from…

tig
- 3,424
- 3
- 32
- 65
0
votes
1 answer
Require 100% code coverage for ASP.NET Core web application controllers in Azure DevOps build pipeline
In our project we have a requirement that all controller methods should have at least one test.
Our build fails if we have a test that fails but right now we are using this guide to check code coverage…

Ogglas
- 62,132
- 37
- 328
- 418
0
votes
0 answers
Coverlet returning 0 % coverage
I'm trying to use the coverlet tool in dotnet test to recieve coverage for my xunit test. the xunit test executes UI Automation tests using a tool called Rapise. Since coverlet works only with dotnet sdk style projects, i have converted the xunit…

Aditya Nair
- 514
- 1
- 9
- 18
0
votes
1 answer
Error running unit tests on azure devops with nugget coverlet.msbuild / 2.3.1
When I run the dotnet test task, the tests run correctly but when generating the report file in xml format I get the following error:
/home/adminuser/.nuget/packages/coverlet.msbuild/2.3.1/build/netstandard2.0/coverlet.msbuild.targets(17,5):
error…

Alejandro Herrera
- 411
- 1
- 5
- 22
0
votes
0 answers
CMD - Ignoring spaces inside Quotes
I know this is a very trivial question. I have tried and failed.
Though it's not relevant to the question, what I'm trying to do is to get code coverage for an application using coverlet.console like this:
coverlet someapp.dll --targetargs "vstest…

Venkatesh Gunda
- 41
- 1
- 4
-1
votes
1 answer
Where are dotnet tool versions defined?
How is are dotnet tools versioned and where is that version number set in code?
The latest version of this dotnet tool is 1.7.0 https://github.com/tonerdo/coverlet
Where is 1.7.0 defined? I don't see it anywhere and it's not the assembly version.
I…

red888
- 27,709
- 55
- 204
- 392