Coverage from FCC result via vstest.console.exe possible? #298
Unanswered
HilcoTalen
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It only works from visual studio. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
FCC is running fine in Visual Studio 2022 (Community 2022 (64-bit) Version 17.2.6), I can see the coverage, and the files are also generated.
But I want this also to implement in the buildserver (Jenkins).
The unit tests are executed via the command:
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "Confgurator/bin/Release/net6.0-windows/ConfguratorUnitTests.dll" /Enablecodecoverage /Logger:trx
The output:
Results File: C:\Jenkins\workspace\Configurator\TestResults\testResult.trx
Attachments:
C:\Jenkins\workspace\Configurator\TestResults\df147373-2c89-44e8-905b-d0d679f8a284\<Username><PCName>-10-10.12_48_42.coverage
Test Run Successful.
Total tests: 44
Passed: 44
Total time: 2,0807 Minutes
The test report is generated.
The coverage is however an almost empty file, and not the file which has been generated by FCC.
I also modified the *.csproj file with this:
<PropertyGroup Label="FineCodeCoverage">
<Enabled>
True
</Enabled>
<Exclude>
[ThirdParty.*]*
[FourthParty]*
</Exclude>
<Include>
[*]*
</Include>
<ExcludeByFile>
**/Migrations/*
**/Hacks/*.cs
</ExcludeByFile>
<ExcludeByAttribute>
MyCustomExcludeFromCodeCoverage
</ExcludeByAttribute>
<IncludeTestAssembly>
True
</IncludeTestAssembly>
</PropertyGroup>
<PropertyGroup>
<UseDataCollector/>
</PropertyGroup>
What do I need more, to generate the coverage XML file?
Beta Was this translation helpful? Give feedback.
All reactions