Description
Hi,
I'm working on a project that has a mix of c++ and c# projects, hosted on azure devops.
Both types with their own unit test, the C++ with gmock.
Since azure doesn't support vstest.console coverage result's, I'm looking for any workaround.
I have been trying coverlet to get the cobertura.xml that can be published into my pipelines.
But when I do it, it runs everything right, generates the .coverage as expected (I can open it in vs and navigate my hierarchy), but the cobertura.xml is empty:
<?xml version="1.0" encoding="utf-8"?> <coverage line-rate="1" branch-rate="1" version="1.9" timestamp="1583454090" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0"> <sources /> <packages /> </coverage>
...and, after a sucessfull execution with the regular printing from vstest, I'm getting "NaN%" printed in the console:
`
Calculating coverage result...
Generating report 'C:\tpapps\src\prime\main\lib\TOS36\Debug\coverage.cobertura.xml'
+--------+------+--------+--------+
| Module | Line | Branch | Method |
+--------+------+--------+--------+
+---------+------+--------+--------+
| | Line | Branch | Method |
+---------+------+--------+--------+
| Total | 100% | 100% | 100% |
+---------+------+--------+--------+
| Average | NaN% | NaN% | NaN% |
+---------+------+--------+--------+
`
I've searched on the web, but the "closer" thing is a one that it's printing "∞%", not NaN. Either way, my binaries are already in Debug, not on Release.
This is the command line:
./coverlet.exe .\MyUnitTest.exe --target "$vstest" --targetargs "MyUnitTest.exe /InIsolation /Platform:x64 /TestAdapterPath:c:\local\packages\GoogleTestAdapter.0.17.1\build\_common /Enablecodecoverage /Settings:C:\local\cpp.runsettings" --verbosity detailed --include "[*DllFilter*]*" --format "cobertura"