FineCodeCoverage icon indicating copy to clipboard operation
FineCodeCoverage copied to clipboard

FCCSolutionOutputDirectoryName not working within finecodecoverage-settings.xml

Open Mindc0re opened this issue 2 years ago • 2 comments

Installed product versions

  • Visual Studio 2022 Professional, v17.4.4
  • Fine Code Coverage 2022, v1.1.194

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.

Mindc0re avatar Sep 25 '23 09:09 Mindc0re

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.

tonyhallett avatar Sep 27 '23 10:09 tonyhallett

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.

Mindc0re avatar Oct 03 '23 13:10 Mindc0re