Pex and Moles – Isolation and White box Unit Testing for .NET


Visual Studio 2010 Powertools to help with Unit Testing your .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.

  • Moles allows to replace any .NET method with a delegate.
    Moles supports unit testing by providing isolation by way of detours and stubs. The Moles framework is provided with Pex, or can be installed by itself as a Microsoft Visual Studio add-in.

It is available in two flavours, an Academic/non-commercial version and a version for MSDN subscribers (commercial use).

Note:  Pex is available for commercial use for MSDN subscribers. The Pex installer includes Moles. Moles is also available separately for commercial use without requiring an MSDN subscription. In addition, a version of Pex is available for academic and non-commercial use.

About Wes MacDonald

Wes MacDonald is a DevOps Consultant for LIKE 10 INC., a DevOps consulting firm providing premium support, guidance and services for Azure, Microsoft 365 and Azure DevOps.

No comments yet... Be the first to leave a reply!

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: