Xunit included in the code coverage
See original GitHub issueGenerating the code coverage runsettings file as follows:
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<!--https://github.com/tonerdo/coverlet/blob/master/Documentation/VSTestIntegration.md-->
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<!--https://github.com/tonerdo/coverlet/blob/master/Documentation/MSBuildIntegration.md#excluding-from-coverage-->
<Exclude>[ARRT.Data.*]*,[*]FluentValidation*,[*]xunit*</Exclude>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
When the report is created in Azure DevOps however, the xunit assemblies are included in the code coverage report. Why?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Use code coverage for unit testing - .NET
Code coverage is a measurement of the amount of code that is run by unit tests - either lines, branches, or methods. As...
Read more >Code Coverage In xUnit.net Unit Test Projects In Visual ...
In this tutorial, we will understand the code coverage concepts in Visual Studio 2017 Enterprise and will learn how to include and exclude ......
Read more >NET Core unit testing code coverage - Code Samples
This sample solution includes a class library that is unit tested by two xUnit test projects. The corresponding article, use code coverage ......
Read more >Setup Unit Testing & Code Coverage in ASP.NET Core
Open the WebAPI/Services/UserService.cs class and enable Coverage Gutters by clicking Watch in the VS Code status bar. The gutter next to the ...
Read more >Code Coverage in VSTS with xUnit, Coverlet and ...
Coverlet is a package that can be included into your projects and generates code coverage info during build. The project states that it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, coverlet by design skip dll(also that comes with package) for what you don’t have source file(.cs) in local.
Interesting. Whatever was done in 1.2.0 also allowed me to remove the FluentValidation exclusions (it was an external assembly I have no control over from nuget).