I used to be able to run unit tests in VS 2012. Now, all of a sudden, whether I try to "Run" or "Debug" any unit tests, the Unit Test Sessions window puts the test into "Pending" status, but never actually executes it.
I've tried restarting my dev environment, even rebooting the computer. No change.
So where is the secret setting that says "Make unit tests freeze at 'Pending'"?
Ctrl+U D on the toolbar. Ctrl+U D commands, which are also available in the main menu (ReSharper | Unit Tests) and in the context menu. To run or debug all tests in solution, choose ReSharper | Unit Tests | Run All Tests from Solution in the main menu or press Ctrl+U L .
Run tests in Test Explorer If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.
Ctrl+U D commands. You can use this command to run coverage analysis of unit tests from the editor, from the Solution Explorer, or from unit tests sessions.
Starting in Visual Studio 2022 Update 2, you can enable faster code coverage test results by selecting Tools > Options > Environment > Preview Features, then selecting Code coverage experience improvements, and then restarting Visual Studio.
My answer in the comments was correct
Its a resharper issue - see here. Check if your Resharper and/or VS2012 versions are the ones affected
I thought I'd add this in case it helps others, I did these steps...
It might have been that I needed to only run as admin, but I thought I'd add all the steps I did.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With