FortuneN / FineCodeCoverage

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
Other
506 stars 38 forks source link

The "Finecodecoverage-settings.xml" file placed under the solution does not work #414

Closed dfukamachi closed 3 months ago

dfukamachi commented 3 months ago

Installed product versions

Description

I'm trying to use the Finecodecoverage-settings.xml file to provide different FCC configurations for different projects. I placed the file in the project's folder and the Enabled or Included options are You can use it without any problems. However, when I placed it in the solution folder, the Enable or Include options were not available.

Steps to recreate

  1. Install the extension
  2. Create a finecodecoverage-settings.xml in the solution's folder and add it as a Solution Item in Visual Studio
  3. Set the Enabled option to True and RunMsCodeCoverage to Yes in Visual Studio settings.
  4. Start coverage collection

Below are the contents of my finecodecoverage-settings.xml file.

<?xml version="1.0" encoding="utf-8"?>
<FineCodeCoverage>
   <Enabled>False</Enabled>
   <RunMsCodeCoverage>Yes</RunMsCodeCoverage>
   <ShowLineCoverageHighlighting>False</ShowLineCoverageHighlighting>
   <ShowLineCoveredHighlighting>False</ShowLineCoveredHighlighting>
   <ShowLineDirtyHighlighting>False</ShowLineDirtyHighlighting>
   <ShowLineNewHighlighting>False</ShowLineNewHighlighting>
   <ShowLineNotIncludedHighlighting>False</ShowLineNotIncludedHighlighting>
   <ShowLinePartiallyCoveredHighlighting>False</ShowLinePartiallyCoveredHighlighting>
   <ShowLineUncoveredHighlighting>False</ShowLineUncoveredHighlighting>
</FineCodeCoverage>

Current behavior

Settings are not applied even if you place the Finecodecoverage-settings.xml file under the solution

Expected behavior

The settings will be applied if you place the Finecodecoverage-settings.xml file under the solution.

Other questions

Set "ShowLineCoverageHighlighting" and "ShowLineCoveredHighlighting" to FALSE in the xml placed in the project folder When I did that, the settings were not applied and were highlighted, but is this an option that is not available in the xml settings?

tonyhallett commented 3 months ago

Of the settings you have supplied only Enabled can be set in this way.

This setting does get applied when the file is in the project folder or in an ascendant directory if it has not already been supplied. Note that when Enabled is set to false and DisabledNoCoverage is true in VS options then the settings will not be considered. Finally if you are supplying your own runsettings and you are using the same one for multiple projects then when FCC intercepts it will only disable if all the projects are disabled.

dfukamachi commented 3 months ago

After considering the contents of the notes, I was able to confirm that the settings work even in the configuration file under the solution. I also understand that only enabled settings can be used. Thank you for your quick reply.