I was trying this morning to run NCover (for the first time). I downloaded a eval copy (sweet!) and then opened NCover Explorer only to find myself a little lost. So I thought I'd RTFM a bit first. That helped (a little), and the documentation online also helped some, but what I really needed to do was check my MSTest test coverage of my base framework. The documentation really only covered generic scenarios and a little bit of googling only left me wanting. All these little bits and pieces, however, led me to make some educated guesses about what to put in the configuration for NCover and... success! So I thought I'd share, in case it helps someone else.
Open NCover Explorer.
Click on the "Run NCover" button on the toolbar or hit Ctrl+N [NOTE: Not the "Run NCover Now" button]
You should be presented with a configuration options screen (see Fig 1)
Set the "Path to application to profile" box to MSTest.exe file (Usually, C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe)
Set the "Working Folder" to the bin directory of your framework project: (Mine is: C:\svn\CodeBase\trunk\src\CodeBase\bin)
Set the "Application Arguments" to /noisolation /testcontainer:[test_project] where test_project is the path to the DLL of your test project (Mine looks like: /noisolation /testcontainer:C:\svn\CodeBase\trunk\src\CodeBase.Test\bin\Debug\CodeBase.Test.dll )
That's it!
You should now be able to click on the "Run [F5]" button at the bottom there and it will start the sample application, run the tests and give you a code coverage result that shows how much of your framework was exercised by your unit tests.
Hope this helps someone!
~L
[Fig 1]
