Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 doesn't run unit tests

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?

like image 629
awj Avatar asked Apr 15 '13 09:04

awj


Video Answer


2 Answers

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/

like image 80
Neil Cross Avatar answered Nov 01 '22 20:11

Neil Cross


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.

like image 27
RikRak Avatar answered Nov 01 '22 18:11

RikRak