I created a project to cover MSTest in Visual Studio 2010, but I'm not getting any coverage?
Let's assume you have your NCover 4 project set up to monitor qtagent, qtagent32, qtagent_35, or qtagent32_35 (if you're targeting .NET 3.5, specifically).
Happily, one regex pattern - "qtagent" - will capture all of these processes.
The difficulty in profiling MSTest is that QTAgent is often running in the background, and NCover can't attach to the QTAgent process once it's already running.
Solution: Go to the Visual Studio menu, and under Tools > Options... > Test Tools > Test Execution > Performance, uncheck "Keep test execution engine running between test runs." This will prevent QTAgent from running in the background.
Restart Visual Studio, then check Task Manager, or Process Explorer, before you start MSTest and make sure that QTAgent is not running. If it is, terminate the process so that QTAgent will start when you run MSTest in your Visual Studio project.
Run your MSTest project in Visual Studio and you should see the NCover "Modules Collecting" pop-up window display the module count as your tests are profiled.
Covering MSTest runs from Visual Studio 2010 with NCover 4 is certainly possible, but requires a little understanding of the testing environment to make coverage successful.