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
516 stars 39 forks source link

FCCSolutionOutputDirectoryName not working within finecodecoverage-settings.xml #348

Open Mindc0re opened 11 months ago

Mindc0re commented 11 months ago

Installed product versions

Description

I'm trying to provide different FCC configurations for my different projects, using finecodecoverage-settings.xml files. I placed the files in the solution's folders, and it seems to work fine : for example, I can use the "Enabled" or "Include" options just fine. But the "FCCSolutionOutputDirectoryName" option, used to specify a folder for the output, does not work at all. I cannot make it work within the xml settings files. When I set it through the Visual Studio settings, it works perfectly, but as long as the option is empty in the Visual Studio Settings, the reports are generated in the default folder (which, in my case, is the folder of one of the unit test assemblies being run for the coverage).

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. Try to use the FCCSolutionOutputDirectoryName option, while it is empty in the Visual Studio settings.
  4. Launch a coverage

Here is the content of my finecodecoverage-settings.xml file :

<?xml version="1.0" encoding="utf-8"?>
<root>
    <Enabled>true</Enabled>
    <FCCSolutionOutputDirectoryName>L:\WRK\HEPHAISTOS\src\.fcc</FCCSolutionOutputDirectoryName>
</root>

Current behavior

As explained in the description above, the FCCSolutionOutputDirectoryName option does not work when provided by the finecodecoverage-settings.xml file.

Expected behavior

The FCCSolutionOutputDirectoryName option should work as expected when providing a correct path.

tonyhallett commented 11 months ago

Perhaps the readme is not clear and I can update if necessary. https://github.com/FortuneN/FineCodeCoverage#fcc-output

It is the name of a directory within the solution directory. Not every option is a project configuration option and as such cannot be supplied in the project file or finecodecoverage-settings.xml It is possible for FCC to provide another method of providing the coverage output directory for each test project. How that works with visual studio options, project files and finecodecoverage-settings.xml would need some consideration.

Mindc0re commented 11 months ago

If I understood correctly, it's not possible to specify an output directory for the report apart from using the Visual Studio options.

But I was indeed doing it wrong when testing with the Visual Studio options, since you can juste specify a directory name (in my case, ".fcc"), and the directory will effectively be created in the solution directory.

I think this will work just fine for now, I'll keep an eye around here to see in there are any future updates in that direction :) Thanks for your answer.