I am trying to run code coverage using Opencover for NUnit test cases. I am getting results as expected, but the problem is while executing opencover it is again running the tests. We don't want this to be happen as we are running the tests separately. Below is my code.
Unit test execution
<Exec Command="$(NUnit) @(AssembliesToTest->'"%(FullPath)"', ' ') /xml:"@(TestsDirectory)Unit-nunit-results.xml""
ContinueOnError="false" />
OpenCover Execution
<Exec Command="$(OpenCoverExecutable) -register:user -target:$(NUnit) -targetargs:"/noshadow %(CodeCoverageAssemblies.fullpath) /domain:single" -mergeoutput -output:"$(OutputPath)\OpenCover-results.xml""
ContinueOnError="false" />
Is there any way to get test and codecoverage results without executing tests twice.
Thanks in Advance,
Dinesh.