We have VS 2008 project (asp.net). It is under TFS. We have written our unit tests using mock framework(nunit?). Developers can execute the tests on their machine and view the code coverage.
Now, we have upgraded our solution to VS 2012 professional. Being professional edition, it does not have support to execute code coverage and so I have ventured into trying out OpenCover.
Problem is that on build via TFS, code analysis shows say 24% as code coverage, but when I execute OpenCover locally on developer machine, it shows completely different figure. We need to aim for what TFS is reporting as that is monitored by or organization automated ALM compliance engines and developers need to be aware that TFS code coverage % does not fall below X.
My OpenCover synatx is:
OpenCover.Console.exe -register:user -target:"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" -targetargs:"/noisolation /testcontainer:"C:\code\APRRel\UnitTest\bin\Debug\unittest.dll" /resultsfile:C:\Reports\MSTest\APRRel.trx" -filter:"+[*]*" -mergebyhash -output:C:\Reports\MSTest\projectCoverageReport.xml
Here are my outputs from TFS and OpenCover:
How can i go around making opencover report similar statistics than that of TFS?