Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper problem with unit tests

I'm having a little annoying problem with resharper trying to run my unit tests, using mstest. I can select an individual unit test and run/debug it fine but when I select the parent node to run a bunch of tests, the tests don't run; it just displays pending for a few seconds and then the test goes grey. If I set breakpoints in the tests and try again with the debugger, I get the same result and no breakpoints are hit. Has anyone else experienced this before?

like image 614
Charlie Avatar asked Sep 06 '09 13:09

Charlie


3 Answers

For anyone using VS2012 update 2 (Charlie obviously wasn't when he asked the question, but for anyone else...), then make sure you have R# version 7.1.3 or later. At the time of this writing, the official release is 7.1.2 so you'll have to follow this link to go download it: http://download.jetbrains.com/resharper/ReSharperSetup.7.1.3000.1964.msi (as referenced from http://youtrack.jetbrains.com/issue/RSRP-339987)

like image 188
David Avatar answered Sep 19 '22 18:09

David


Try to rebuild your test project/entire solution. I sometimes have similar problems where the resharper shows tests that I have removed, or doesn't execute tests for new methods in the SUT project. After a rebuild it gets back in sync.

like image 22
Noam Gal Avatar answered Sep 20 '22 18:09

Noam Gal


Ran into this problem aswell with ReSharper 5.0.1659 and VS2010. Turns out that the problem lies somewhere in the testrun config files that VS creates when running test the regular VS way. Removed them from both disc as well as references in solution file which solved the problem and I was able to run the tests with ReSharper again.

like image 37
JMag Avatar answered Sep 19 '22 18:09

JMag