I have a c# windows application developed in .net framework 4.6.
I have run the below command using vstest.console.exe to generate .trx file which has information about code coverage and testcases.
Bamboo's MSTest Parser is able to read the trx file and read the no of test cases passed and failed.
How to read the same file to understand the code coverage report?
I have gone through the trx file by opening it in a notepad.At the end there is a section which has some information about code coverage.
<ResultSummary outcome="Completed">
<Counters total="91" executed="91" passed="91" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
<CollectorDataEntries>
<Collector agentName="mysystem" uri="datacollector://microsoft/CodeCoverage/2.0" collectorDisplayName="Code Coverage">
<UriAttachments>
<UriAttachment>
<A href="mysystem\cpsvizuser_mysystem 2019-10-31 05_36_09.coverage" />
</UriAttachment>
</UriAttachments>
</Collector>
</CollectorDataEntries>
</ResultSummary>
There is no where mentioned the percentage of code coverage. Can anyone help in extracting the code coverage value from .trx file. I need to actually generate a XML file and post the results to sonarqube.Any help in this matter is helpful.