-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Hide/Remove Projects/Classes/etc. from coverage #67
Comments
The Exclude project element or Fine Code Coverage option is there for this reason. You can apply an exclusion attribute in a project as well.
We could do that but I don't think that it would be silent.
Are you thinking of an option - filter report by selected project. Then dependent upon the selected project in solution explorer we filter to only show that filter ? |
You can exclude test projects with IncludeTestAssembly as a global visual studio option or on a project basis. |
Is there a way to get Fine Code Coverage to use the include/exclude settings I've already defined within my *.runsettings file instead of requiring them to be re-setup within Fine Code Coverage vs options? |
I simply use the {
[ExcludeFromCodeCoverage] // <== this line
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
} |
This appears to work at the class level, but not for methods. Methods marked with the |
@craigktreasure |
Hmmm...good question. Not sure. I have |
@craigktreasure |
Not that I can quickly share. To be clear, what i'm seeing is that the Fine Code Coverage window doesn't properly reflect excluded methods. For that matter, it's the same for assemblies marked with The reports I generate using Coverlet are correct. It's just the Fine Code Coverage window that doesn't reflect properly. |
FCC uses Coverlet version 3.0.3 and a fork of https://github.com/danielpalme/ReportGenerator. All cobertura files ( multiple test projects ) are merged into a single one by ReportGenerator and this is then used to generate the report in the Find Code Coverage tool window. Perhaps you can compare your Coverlet report with the coberturas within
YourProject.coverage.xml is generated by Coverlet The issue could be the Coverlet version, now at 3.1.2, or ReportGenerator. |
@craigktreasure |
@craigktreasure |
Yep. It does seem to have resolved the issue. Thanks! |
Installed product versions
Description
Unable to hide or remove coverage reports for unnecessary projects
Steps to recreate
Current behavior
Summary Code coverage for unit test projects are shown with calculations over entire solution
Expected behavior
Should be a way to hide/remove projects as needed and have coverage calculated only on desired projects fpr summary reporting
i.e. Right click project, select hide from coverage report
Additionally, it'd be good to have the ability to readd projects as desired, if one were to go project by project inside a solution
Side Notes
Awesome extension
The text was updated successfully, but these errors were encountered: