29 Nov
2007

Rhino Mocks With Code Coverage

Category:UncategorizedTag: , , , :

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:

image

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:

image

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?

image

Technorati Tags: ,,

One thought on “Rhino Mocks With Code Coverage”

Comments are closed.