I have installed the new Visual Studio 2012 Ultimate.

I have created a Test Project with my solution and it contains some default unit tests. However right clicking on new Methods doesn't show the "Create Unit Tests" context menu any longer.

See Visual Studio 2010 Ultimate: enter image description here

And Visual Studio 2012 Ultimate: enter image description here

Any idea why that could be?

UPDATE:

Solution for Visual Studio 2012 and 2013:

Microsoft has acknowledged it here and offers an official work around patch to fix it. Download, install and Enjoy!


Solution 1:

This feature was cut from VS.

http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx

Generate Unit Test Wizard – In VS2010 you could right click on a method in your code and we would generate a unit test into your test project. This wizard was very tightly coupled to MS-Test and depended on features like Private Accessors to do its work, so it was cut. We are exploring alternatives here, but don’t have any good solutions yet.

EDIT There is a work around: http://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx

Solution 2:

The "Unit Test Generator" extension is available

Unit Test Generator Extension

To add directly from Visual Studio 2012/2013 IDE:

  1. Menu: Tools -> Extensions and Updates
  2. Click: Online -> Visual Studio Gallery
  3. Search for: "Unit Test Generator"

MSDN Video Demonstration

Note: MSTest in VS 2012/2013 still sucks