As part of the TFS Build we execute tests that generate trx files. I would like to execute on these set of files code coverage analysis using OpenCover, without re-executing the Unit Tests. Is there a way to do so?
Thanks
As part of the TFS Build we execute tests that generate trx files. I would like to execute on these set of files code coverage analysis using OpenCover, without re-executing the Unit Tests. Is there a way to do so?
Thanks
This is a little command-line & duck-tape but it gets the OpenCover and Test results in 1 pass, and publishes test results and coverage to TFS or Visual Studio Team Services (previously VSO).
Run-Tests.bat
that calls vstest.console.exe
to test your code with the /logger:Trx option
OpenCover.Console.exe -target:"Run-Tests.bat" -output:"OpenCover.xml"
OpenCoverToCoberturaConverter.exe -input:OpenCover.xml -output:Cobertura.xml
Unfortunately not - OpenCover needs to instrument your code as it runs in order to determine which bits of code were executed.