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

NEW: Code Digger for Visual Studio 2012 and 2013 is a lightweight version of Pex that allows you to explore public .NET methods in Portable Class Libraries directly from the code editor. Under the hood, Code Digger uses the Pex engine.


Download Code Digger Now!

Pex and Moles are Visual Studio 2010 Power Tools 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.

  • Moles allows to replace any .NET method with a delegate. The Fakes Framework in Visual Studio 2012 is the next generation of Moles & Stubs, and will eventually replace it. 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.

 
Download Pex and Moles Now!

Roadmap

The Fakes Framework in Visual Studio 2012 is the next generation of Moles & Stubs. Fakes is different from Moles, however, so moving from Moles to Fakes will require some modifications to your code. A guide for this migration will be available at a later date. Moles will not be developed further, so we recommend to migrate to Fakes.

Code Digger for Visual Studio 2013 and 2013 is a lightweight version of Pex that allows you to explore public .NET methods in Portable Libraries directly from the code editor.

Code Digger is the first extension from the Pex and Moles Team at Microsoft Research for Visual Studio 2012 and 2013. Stay tuned for future extensions that bring more aspects of the rich experience of the Pex Visual Studio 2010 Power Tools to the latest version of Visual Studio. If you have feedback for us, or bug reports, feel free to write an email to the Pex team at Microsoft Research. If you have used Pex before, let us know if you are missing a particular feature.

Thanks for your support, The Pex and Moles Team.

Try it out on the web: www.pexforfun.com

Pex for fun on the web is a radically simplified version of the fully featured Pex Power Tool for Visual Studio. You do not need to install anything; all the work happens in the cloud. You can write code in C#, Visual Basic, or F#. Go to www.pexforfun.com, which comes with a set of code puzzles. Then click on the “Ask Pex!” button to get the answer yourself. Share your puzzles with your friends. Click Learn to start tutorials.

Pex for fun

Pex in the news and blogs

Your post is not in the list? Drop us a link.

 

Where are the MSDN forums?

We have decided to migrate our forums to stackoverflow.com in order to better build a community around Pex and Moles. Questions about Pex should be tagged with 'Pex' and Moles with 'Moles'...