How to get NCover from TestDriven.NET to generate code coverage via the command line

241 Views Asked by At

I have VS 2010 Premium SP1 and using MSTest The project has a web reference to a Web Service The tests are integration tests TestDriven.NET-3.8.2877 RTM which includes NCover 1.5.8

My problem is that it runs the MSTests and creates the pass/fail *.trx file but will not create a coverage report. I get the coverage report if I right click and select test with\NCover. The problem is I want to run in in the command line so I can just make it a task in my continuous integration pipeline.

The error returned is:

Profiled process terminated. Profiler connection not established.

I searched for solutions and tried the following:

  • Using the //reg in the command line
  • Updating the config.exe file to use .NET 4.0
  • Forcing the NCover DLL to register

Here is my command line:

ncover.console.exe //x mstest_coverage.nccov "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:D:\Perforce3666\serviceengine\SessionStorage\dev\SQATesting\SessionStorage.SQA.Testing\bin\Release\SessionStorage.SQA.Testing.dll
0

There are 0 best solutions below