Created On:  15 October 2010


We are unable to get a coverage report from DevPartner Coverage Analysis when the test case that is executed is written in Visual studio unit test project.


1. Create XML file with below content, where MStest.exe is the engine which executes the test cases in Test project1.dll (which is in Argument field also)">
     C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe                                               
     /testcontainer:"C:\Source Code\QCS Display Objects\TestProject1\bin\Debug\TestProject1.dll"
     C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
2. From Command prompt, I used below command for getting coverage report.

     Dpanalysis.exe /config
3. Coverage Analysis executes all the test cases and shows the result in the same console.
4. After completing execution, DevPartner Coverage Analysis viewer is launched.
5. However; the report shows Percentage line executed as 0.0.


MSTest spawns a child process called VSTestHost when it runs the UnitTests.  By providing the /noisolation commandline option to MSTest, it results in the UnitTests being run in the MSTest process instead of VSTestHost.  Have the customer add this option to the arguments section of the DPAnalysis configuration xml file. 

Sidenote:  Our Development team is currently looking into the ability to monitor the VSTestHost process by adding a second process node in the configuration file, so that when the child process(VSTestHost) is started, we will be able to monitor it.
Incident #2453924