简体   繁体   中英

Issues integrating NCover with CC.NET, .NET framework 4.0 and MsTest

I'm implementing continuous integration with CruiseControl.NET, .NET 4.0, NCover and MsTest. On the build server I'm unable to run code coverage from the Ncover explorer or NCover console. When I run where vstesthost.exe from the Ncover console it returns the Visual Studio 9.0 path and does not seem to pick up .net framework 4.0. I've followed instructions from this MSTest: Measuring Test Quality With NCover post with slight modifications for .net framework 4.0, without any success.

My CC.NET script looks like this

<exec>
  <executable>C:\Program Files (x86)\NCover\NCover.Console.exe</executable>
  <baseDirectory>$(project_root)\</baseDirectory>
  <buildArgs>"C:\Program Files (x86)\**Microsoft Visual Studio 10.0**\Common7\IDE\MSTest.exe" /testcontainer:...\...\UnitTests.dll /resultsfile:TestResults.trx //xml D:\_Projects\....\Temp_Coverage.xml //pm vstesthost.exe</buildArgs>
  <buildTimeoutSeconds>$(ncover.timeout)</buildTimeoutSeconds>
</exec>

Has anyone come across similar issue. Any help would be much appreciated.

MSTest 4.0 changed the name of its helper process from "vstesthost.exe" to "qtagent.exe" (I think that's the right name, but my memory is a little fuzzy. MSTest will start the helper process as long as the /noisolation parameter isn't used. You can then use process explorer to figure out what the name is).

Additionally NCover 3.3 (the current release) does not support .NET 4. NCover 3.4 is supposed to have .NET 4 support; if you email support@ncover.com they'll probably send you a build if you ask.

实际上,NCover 3.4支持.Net 4.0 + info如果您要在社区版本中寻求支持,恐怕它停留在1.5.8中,我认为它不会支持它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM