Right-Click, Create Unit Tests

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



Old Post…

For those who are disappointed with the removal of the “Create Unit Tests…” context menu in Visual Studio 2012, here are few methods for you to re-enable the feature:

Method 1 – Command Window
If you find hard enough, you will discover that the command to invoke the Create Unit Tests… is actually:
You can actually type that in the Command Window to invoke the Create Unit Test Wizard. If you find it too verbose, you can actually create an alias for it.
alias ut EditorContextMenus.CodeWindow.CreateUnitTests
Then just type ut to launch the wizard.

Method 2 – Keyboard Shortcut
The next method is to go to Tools->Options->Environment->Keyboard and set a shortcut key of your preference.

Method 3 – Re-enable the Create Unit Tests… Context Menu.
This is by far the best method ever. To re-enable the Create Unit Tests… menu, go to Tools->Customize… to launch the Customize dialog. At the Customize dialog, go to the Commands tab, select the Context menu radio button and choose Editor Context Menus | Code Window.

Thanks to our MVP Serena Yeoh for sharing such a great information with us, you can click here to see the full details.


Reference:  http://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s