-
-
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
Report only includes test assembly #188
Comments
Have you looked at the diagnostics log ? What does the generated run settings look like ? |
What should I look for in the diagnostics log? This is the only error I could find, I don't know if it is related in any way:
|
Are you using run settings ? Is your solution open source so I can look at it ? Otherwise you will need to create minimal reproducible solution so that I can look at that. |
No, I'm not using custom run settings. Unfortunately my project is private, I will try to reproduce it in a smaller project but I'm not sure if I will be able to (it's a fairly large solution so I don't think there is a simple way of replicating the same scenario). |
Can you describe your project. The frameworks you are using. Is it code generation ? Are you using microsoft fakes / aop weaving etc |
Yes, it's basically the typical xunit test library testing an ASP.NET Core API in .NET 5. Apart from xunit I'm using Moq and FluentAssertions. I have .NET 5 source generators in the application side (not in the unit test project), can those be the cause of the issue? |
I think that source generators may need to be set up differently. Will come back to you |
From what I remember FCC excludes by attribute GeneratedCode. Can you check that is in the generated run settings.
remove the option. If this does not work then we will need to check the coverlet documentation. |
Also, in the diagnostics do you see "Unable to instrument module...." ? Could this coverlet issue possibly describe this issue. This coverlet issue mentions source generators. |
I had the same issue (only test project being covered) when using NUnit. What fixed it for me was switching from NUnit's VS extension test adapter to NUnit test adapter nuget package. |
@MaQy You can bypass coverlet bug. When Fine Code Coverage print that some assembly (or class) is missing
You can manually copy missing assemblies to In my case Fine Code Coverage began working. |
@marbel82 |
@tonyhallett I write only example. @MaQy wrote above that in the diagnostics log he has In my case Fine Code Coverage (more precisely coverlet) had a problem with:
|
@MaQy |
Installed product versions
Description
The generated report is only including coverage for the test assembly, none of the referenced projects are shown. I also included the property
UseDataCollector
just in case but nothing changed.Side Notes
I'm using xunit.
This is the output from FCC:
Could you please point out what I'm doing wrong?
Thanks!
The text was updated successfully, but these errors were encountered: