7
votes

A couple of weeks ago I was working on unit tests, they were building and running as expected.

I went on holiday for a week, booted up my machine this morning, and without making any code changes to the unit test project, the tests no longer run.

And when I say "the tests no longer run" I don't mean that they fail; they literally will not run.

I've tried to run or debug a specific test, I've tried to run or debug all tests, I've tried it from the Resharper icon adjacent to each test method name, I've tried it from the TEST menu item, I've tried it from the "Unit Test Sessions" window... and all that happens is that the "Unit Test Sessions" window slides in from the right, all the tests say "Pending"... and then nothing.

There are no messages in the Output window either.

The project builds without any problems. I've tried cleaning the solution and rebuilding, but this changes nothing. Also, it's not just the tests I was working on a couple of weeks ago, it's all tests in my UnitTests project.

A colleague can run the tests. He encounters various Resharper messages that I don't, but he can still run the test.

The only difference is that I installed the VS2012.2 update before I tried running the tests.

Does anyone have any ideas why these tests apparently won't run?

2
Are you using "TypeMock"? Any other mocking frameworks or anything else other than the standard Visual Studio unit testing?John Saunders
Got the same problem, already updated to Resharper 8 and vs2012 update 4. It builds but then does nothing, looks like no tests are discovered. Fixed by running from Resharper menu option, it opened the Unit Test Sessions window, could not find that one before.MrFox

2 Answers

11
votes

I was experiencing the same issue, an update to Resharper 7.1.3 worked for me.

Update: Found info about the problem with Resharper unit testing in VS 2012 Update 2 and that it was addressed specifically in Resharper 7.1.3: http://blogs.jetbrains.com/dotnet/2013/04/resharper-713-is-available-for-visual-studio-2012-update-2/

2
votes

We've just experienced a similar issue. The affected machine had a vanilla VS2012 (professional) and Resharper 8. The fix was to update VS2012 to update 4.