Replies: 4 comments 2 replies
-
Note that Visual Studio Tools / Options / Fine Code Coverage Enabled false will always prevent any coverage. Using project settings / finecodecoverage-settings.xml works for old style coverage and for when fcc generates runsettings behind the scenes. I am assuming that you are providing runsettings for one or more projects. The presence of the data collector will result in coverage being collected unless you set the enabled attribute to false. I have changed the FCC code that intercepts the user runsettings file. It will then apply the enabled attribute as false - if all the projects that are associated with the runsettings file are disabled through either if the two methods outlined. Unfortunately this change has resulted in some failing tests so I will need to look at these before I push the changes through. |
Beta Was this translation helpful? Give feedback.
-
There was a problem with the code that may have been the causes of your issue. Please update visual studio to see changes. If you still encounter it note that the settings are determined as follows. a) Begin with those set in vs |
Beta Was this translation helpful? Give feedback.
-
No runsettings used here. DemoFCC.-.Microsoft.Visual.Studio.-.Experimental.Instance.2023-07-02.17-21-20.mp4 |
Beta Was this translation helpful? Give feedback.
-
Thank you for your time. I think I dug deeper than I needed to and assumed if FCC ran anything at all then the root problem I was trying to overcome would still persist. Since I didn't describe the root problem here I think it may be helpful to others to describe it. When FCC is enabled and I run unit tests in my legacy .NET 4.8 solution FCC causes the NUnit 3 test adapter to crash with the following exception: Full Stack Trace
When I disabled FCC in Tools > Options the problem went away. But that meant every time I loaded a solution I wanted to use FCC on, I had to enable FCC in Tools > Options. And every time I loaded my legacy solution I had to disable FCC again. To fix this I had to:
After doing this the crash no longer occurs and FCC partially runs. By partially runs, I mean it will still add
These are acceptable side-effects for me so I'm moving forward. Thanks again for your help @tonyhallett ! |
Beta Was this translation helpful? Give feedback.
-
I have a legacy solution (monolith) that has way too many tests to do code coverage locally.
But our new solutions (microservices) are small and I want FCC to run on them.
I have been unable to get the finecodecoverage-settings.xml file to work as expected.
Here is what I have in the finecodecoverage-settings.xml file that is in the same folder as the solution:
disabled
in Tools > Settings then I set the Enabled value toTrue
and still tests do not run.enabled
in Tools > Settings then I set the Enabled value toFalse
and still tests run.It also doesn't seem to matter whether or not I use topLevel="true". I just found that in the documentation and thought I'd give it a try.
This still doesn't work whether or not I use my custom
.runsettings
file.What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions