Open milbrandt opened 3 years ago
Why do you run the coverage on your tests files ?
I want to import the code coverage from Visual Studio to SonarQube/SonarCloud. And there only the xml format is supported. see at sonar.cfamily.vscoveragexml.reportsPath: Note that the .coveragexml report format offered by Visual Studio is not supported.
You should exclude your tests from the code coverage, there is not point of analyzing them : https://docs.microsoft.com/en-us/visualstudio/test/customizing-code-coverage-analysis?view=vs-2019#include-or-exclude-assemblies-and-members
The filter of test projects is done on SonarQube side. So it was possible to run the complete CI pipeline without the neeed of a runsettings file.
FakeIt 2.0.5 Build Tools: MSBuild, VSTest, CodeCoverage
I tried to use FakeIt to creat a new unit test with a mock. Language standard is set to
stdcpp17
.The file with the test using FakeIt has 104 lines (including commented lines). When I analysed CodeCoverage xml output file I fould several blocks referencing to the file. The first block seems to be ok, all
start_line
s are in the range of my test method.But there are additional blocks with line numbers out of range for this file, e.g.
These lines out of range caused crashes in the subsequent processing of the xml file in my tool chain.