NCover and MSTest

NCover and MSTest

Hi All,

Could anyone please point me to documentation that details the steps to integrate MSBuild with NCover using MSTest. I have found a large number of documents on MSBuild with NCover using NUnit.

Is it just replacing NUnit.exe with MSTest.exe ?

Thanks Lakshman


RE: NCover and MSTest

generally, yes. integrating it into a build script takes a little more work.


RE: NCover and MSTest

Hi sporewell,

Thanks for your response.

Could you please direct me to suitable documentation to assist me with integrating NCover and MSTest with MSBuild.

Thanks Lakshman


RE: NCover and MSTest

for ncover and msbuild integration http://www.ncover.com/documentation/buildtasks#msbuild

also check out the "C:\Program Files\NCover\Build Task Plugins" folder on your machine for the msbuild task documentation.

Stpehen Ward


RE: NCover and MSTest

Hi Stpehen,

Thanks for your pointers.

I have successfully integrated MSTest with NCover, but I have a minor issue.

MSTest appears to fail (terminate) if any of the tests have an "Inconclusive" state. Using MSBuild "Exec Task" we have a ContinueOnError property, but the NCover Task does not have any such properties.

Are there any work around to this problem. ie use Exec Task for NCover, or have I got it wrong :)

Any assistance is greatly appreciated.

Thanks Lakshman


RE: NCover and MSTest

Lakshman,

The workaround would be to use the Exec task for executing NCover from your msbuild script

Stephen Ward


RE: NCover and MSTest

Hi Stephen,

I had the same problem described in the post below. http://forums.microsoft.com/msdn/ShowPost.aspx?postid=3744594&isthread=false&siteid=1

I was able to use the work around described in the above Topic.

The issue I have now is, I have more than one project using MSTest and many more to come.

It will be a maintenance issue to include "all" the configuration information for the projects into a single MSTest.exe.config file under %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE.

Is there a feature/switch to instruct MSTest to load the configuration from an alternate "location". I can still maintain the configuration file as "MSTest.exe.config" but load it from a different location. eg project directory

I am aware of the element in MSTest.exe.config. This approach has two issues.

a) This element expects an absolute path. b) Still requires maintenance of the MSTest.exe.config under %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE. I agree that this is better than placing the whole configuration information in a single file.

I am hoping for a feature like MSTest.exe abcProj\MSTest.exe.config.

Thanks in advance for your assistance.

Thanks Lakshman


RE: NCover and MSTest

Lakshman,

Anthough an interesting problem, your question would be better directed at the MSTest team, or on Microsoft's help forum for MSTest

Stephen