After upgrade to 5.0 RC, Unit Tests no longer run

I've been using 5.0 beta with VS2010 rc for several weeks now with great success.  In my project I use mstest-style unit tests, and I've been using resharper to do all my test running, but this evening when I upgraded to the RC build of resharper 5.0 (build 5.0.1648.10) suddenly my unit tests aren't running properly.  If I choose to run all tests in solution, test in the current context or whatever (either by menu or by clicking on the test icon in the left gutter of the code editor) the compile happens if needed, the unit test session window comes up and the correct test or tests are marked pending for a little while, then the green status bar travels from left to right, the pending status goes away and then its done.  No resulting pass/fail status is displayed.  If I set a breakpoint on the first line of my test and choose to debug the test, then the debugger comes up briefly (I can see VS put the debugger toolbar up), but the breakpoint is never hit before the test run is complete.

Please help!  I'm addicted to resharper running my unit tests because it's so much faster than vs running them...

- Danny

6 comments
Comment actions Permalink

Could you please provide sample solution?

And by the way are you running tests with customized Test Run Configuration?

0
Comment actions Permalink

I'm seeing the same thing in VS 2008, I updated to 5.0.1648.10 this morning and can't run my tests. Tests are gray, VS test runner works fine. I run a vanilla versin, no customizations.

Reverting to an older version. 5.0.1645.3 works for me.

0
Comment actions Permalink

OK.  I figured out more about this situation this morning...

I was running with a custom test run configuration.  I had modified my test settings so that I could occassionally run tests through MSTest and have it automatically instrument things for code-coverage.  Once I deleted my testsettings and metadata files resharper's test runner started functioning again.

Then I created a new test settings file from scratch and reconfigured code coverage.  Once I did that both mstest and resharper are now working.  Sadly in the process of this investigation I deleted the original test settings file, so I don't know what was causing things to get weird.  I'm now working, though.  So that's great!

- Danny

0
Comment actions Permalink

Hmmm...  A little more info.  I took my project over to a second machine and discovered that the tests weren't running again (with the new test settings file I had created and was working on the other machine).  This time instead of deleting the test settings file I tried just unchecking the code coverage flag, and things started working again.  A couple more iterations, and I'm coming to the conclusion that if code coverage is turned on in the test settings, then the resharper unit test runner stops working, but if it is off, then it works fine.

Given that I do my code coverage runs only seldomly, I guess this isn't a big deal, but it would be nice if I didn't have to switch code coverage on and off like this in order to keep resharper's test runner working.

- Danny

0
Comment actions Permalink

This seems to be a known issue related to MS Code Coverage. We are working hard to run tests correctly with Code Coverage enabled, but it's not always possible.

So, what would I recommend:
1. Create separate Test Run Configuration for R# Test Runner and set it explicitly in R# Options - Unit Testing - MSTest
2. Wait several days for dotCover—our Code Coverage tool for .NET: http://blogs.jetbrains.com/dotnet/2010/03/jetbrains-to-launch-dotcover-eap-next-week/

0
Comment actions Permalink

FWIW The test runner is working great for me and it ran the fastest it ever has since I upgraded to the RC this morning!

0

Please sign in to leave a comment.