VS11 Gets Better Unit Testing Tools, Fakes Framework

| by Roopesh Shenoy Follow 0 Followers on Mar 12, 2012. Estimated reading time: 1 minute |

A New Unit Test Explorer, ability to run tests on each build, better Code Coverage tool,  support for third party frameworks, a new VS Fakes Framework, better performance and more are all coming together in Visual Studio 11 to provide much better Unit Testing experience for Developers.

We recently reported that VS 11 Beta supports multiple Test Frameworks. While that itself is a significant improvement, there are several other enhancements made to MSUnit as well as Unit testing workflow in Visual Studio in general -

  • Better Unit Test Explorer – indicators like the Red Green Bar, Search with Tokens (eg. search only “Failed” Tests), reordering to show failed tests first, links to more failure details like error message and stack trace
  • MS-Test Improvements – performance improvements and better handling of more tests, proper support for 64-bit .NET, multi-targeting, Async Unit Testing Support, Native unit testing support
  • VS Fakes Framework – Stubs and Shims (run-time method-interceptors). Shims are especially interesting because they allow you to replace any existing method with your own implementation, including base types and methods. You can read more about Shims on MSDN. Mocks are missing, but you can do assertions within the stub method implementations to overcome this in some scenarios.
  • Other tooling improvements – simpler Code Coverage (without any setups needed), automatically running tests after each build

There are some more features which aren’t released in VS11 beta, but are still being worked, like better startup performance, grouping and sorting in UT Explorer and more. Peter Provost has written a detailed article covering all these new features.

Incidently, some VS 10 unit testing features have been deprecated-

  • Test Lists
  • Private Accessors
  • Test Impact
  • Generate Unit Test Wizard

Legacy tests using these features will still work in VS 11 but you will not be able to create new tests using these. These have been cut mainly due to either poor experience or performance reasons. Some of these may be replaced with better alternatives in the final release of VS 11.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Educational Content

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you