Today we have released two new Power Tools from Microsoft Research, Pex and Moles.  Pex and Moles are Visual Studio 2010 Powertools that help Unit Testing .NET applications. 

Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications. Pex is available to MSDN Subscribers at https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx?PV=18:370:---:en:---, and you can read more about the tool at http://research.microsoft.com/en-us/projects/pex/.

Moles allows you to replace any .NET method with a delegate. Moles supports unit testing by providing isolation by way of detours and stubs.  Because Moles works at the method level, it offers an alternative to mocking when the target API does not support it.  SharePoint is a popular example of an API that benefits from isolation, but does not directly support mocking.  Moles can also be used for fault injection, as it makes it easy to inject arbitrary behavior on your code under test.  Moles is available to the general public at http://visualstudiogallery.msdn.microsoft.com/en-us/905980ee-039a-4192-bd6c-81e6ec2978c7, and you can read more about the tool at http://research.microsoft.com/en-us/projects/moles/.

If you have questions, comments or suggestions, please use the Pex & Moles forums at http://social.msdn.microsoft.com/Forums/en-US/pex/threads/.