Pex and Moles – Test Power Tools from Microsoft Research

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—:en:—, and you can read more about the tool at

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, and you can read more about the tool at

If you have questions, comments or suggestions, please use the Pex & Moles forums at

Comments (1)

  1. Your company profile looks very interesting and whilst browsing your website it appeared there could be some areas of enhancement to your website. Based in Australia, our company offers a free no obligation appraisal of your website and on Search Engine Optimization (SEO). To know more about our free offers please visit