Closed pauldavis-dwe closed 2 months ago
Please can you post the contents of the FCC Output Window Pane.
Also are you using ms code coverage ?
Coverage tab:
Coverage Log:
No, I'm not using MS Code Coverage
Please can you post the contents of the FCC Output Window Pane.
I think you'll find that this is not an issue with FCC but a limitation with MAUI
FCC output: https://pastebin.com/0JQeeqiC But if I remove the package, my test library works. So how is it MAUI?
Created a repo to demonstrate: https://github.com/pauldavis-dwe/FccBugRepro.git
Can you set RunMsCodeCoverage Yes and see if you get the same result
I thought for a moment that worked, but no. It DOES now show coverage for the UnitTests project but not for the Core project:
Does the cobertura agree with what you now see ?
The Cobertura.xml file now has lots more in it for the Dwellant.ResidentApp.Core.UnitTests "package" but nothing for Dwellant.ResidentApp.Core which is the assembly I am testing
I have installed the Maui components and run coverage on your https://github.com/pauldavis-dwe/FccBugRepro.git With the package reference and RunMsCodeCoverage Yes code coverage is collected.
Although with coverlet it is not. It looks like FCC will need to update the version of Coverlet that it uses to https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0
Can you show the FCC Output Window Pane output just for the MS Code Coverage Run.
Until I update coverlet you can do the following.
--
But can you still show the FCC Output Window Pane output just for the MS Code Coverage Run.
I have installed the Maui components and run coverage on your https://github.com/pauldavis-dwe/FccBugRepro.git With the package reference and RunMsCodeCoverage Yes code coverage is collected.
I just tried that and I still get no coverage. Do you perhaps have a dev version or have other non-default FCC settings?
But can you still show the FCC Output Window Pane output just for the MS Code Coverage Run.
Have tried the coverlet suggestion but still no coverage
Sorry forget to mention that you need to add UseDataCollector project property to your test projects.
Can you show the TestProject1-fcc-mscodecoverage-generated.runsettings in the bin directory.
Fantastic! Including UseDataCollector means I get my coverage:
Here's TestProject1-fcc-mscodecoverage-generated.runsettings: TestProject1-fcc-mscodecoverage-generated.runsettings.txt
I recognized that when I received ms coverage I hadn't included the test project so I ran again. Bizarrely, I cannot get any coverage today with any configuration.
Anyway, at least you can proceed with Coverlet.
Installed product versions
Description
If a project includes the "CommunityToolkit.Maui" nuget package then no code coverage results are generated
Steps to recreate
Current behavior
No code coverage results are shown
Expected behavior
Code coverage results should be shown
Cobertura XML: Cobertura.xml.txt