So there I am coding along with Unit Testing awesomeness and I decide I want to to try the VS2008 code coverage tool. A quick visit to
Test > Edit Test Run Configurations > Local Test Run
to turn on code coverage on my product assembly and I am in the money, or so I think. When I try to run my tests I get this little number:
Clicking on the Test run error link reveals the following error.
Failed to queue test run ‘starr@TEXAS 2007-11-29 21:13:48’: Test Run deployment issue: The location of the file or directory ‘c:\projects\bowlingkata\bowlingscorelib_test\bin\debug\Rhino.Mocks.dll’ is not trusted.
The code coverage tool wants to be able to run in full trust mode. Makes sense, actually. So what’s the quickest way to patch this up an keep moving? Since Rhino.Mocks.dll is strongly named and signed and all, this turns out to be the easiest thing to do for me:
I am running my Unit Tests with Code Coverage turned on in my test configuration and Rhino Mocks is helping me increase code coverage. What is it, you ask?
Technorati Tags: Rhino Mocks,TDD,Visual Studio
Don’t forget to set the “Specific Version” of the Rhino.Mocks reference to True!