views:

1210

answers:

3

http://stackoverflow.com/questions/747263/resharper-unit-test-runner-support-for-deployment-items

I have a follow up question for the question above. I'm using resharper version 4.5 with native mstest support to run mstest unit tests. When I configure resharper's unit test options to use my testrunconfig (in order to utilize my set of deployment items), my test runs end without displaying any results or errors. Has anyone using resharper's mstest runner had the same issue or anything similar?

+4  A: 

Turns out that resharper's mstest runner does not work on testrunconfig files that have code coverage enabled. I've worked around the problem by disabling code coverage in my test run config file.

Otter
How do I disable it?
Florin Sabau
Nevermind, I found it in Test->Edit Test Run Configuration->All->Code Coverage.
Florin Sabau
Still doesn't work. :(
Florin Sabau
Managed to make it work by also selecting that test configuration in Resharper -> Options -> Tools -> Unit Testing -> MSTest -> Use this Test Run Configuration.
Florin Sabau
@Florin, Thanks! Reconfiguring the Resharper options worked for me. Editing the Test Run Configuration through the Test menu option did not.
Adam Kahtava
A: 

You do not need resharper to support standalone mstest installation. I explain how to make a standalone mstest installation without the VS in my post here - http://www.shunra.com/shunrablog/index.php/2009/04/running-mstest-without-visual-studio

mark
A: 

Having similar problem. My MSTest tests run with Visual Studio test runner but not R#'s runner. The exception thrown is directly attributable to R# test run not finding the files that have to be deployed (and are specified in the testrunconfig).

Tried letting it pick the configured file and specified the file. No dice.

Don't know how to "disable code coverage" in the testrunconfig file other than to not specify any (and I don't).

Have asked R#. Now asking the StackOverflow audience.

Ward
Discovered that setting "Copy Local" = "Copy if newer" (or "Copy always") for the critical missing file (app.config in my particular use case) worked for R# ... although that alone does NOT work for VS TestRunner which requires that that file be mentioned in the Deployment section of the testrunconfig. What a nightmare.
Ward
We use the MSTest runner as our "authoritative" system, and only use the R# test runner for convenience. We have similar problems with deployment items. I'm on R# 5.1 with all the extra fancy menus and whatnot...doesn't matter. Doesn't work the same as the MSTest runner.
Peter Seale