Pex automatically generates test suites with high code coverage using automated white box analysis. Pex is a Visual Studio add-in for testing .NET Framework applications. 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.
NEW: IntelliTest in Visual Studio 2015 (opens in new tab)is the evolution of Pex. IntelliTest is a feature integrated in Visual Studio Enterprise 2015. IntelliTest works together with Fakes.
Download Visual Studio Enterprise 2015 RC with IntelliTest Now! (opens in new tab)
A Roadmap in Retrospective
IntelliTest in Visual Studio 2015 is the next generation of Pex. (opens in new tab)
The Fakes Framework in Visual Studio 2012 and 2013 and 2015 is the next generation of Moles & Stubs. (opens in new tab) Fakes is different from Moles, however, so moving from Moles to Fakes will require some modifications to your code. Moles will not be developed further, so we recommend to migrate to Fakes.
Code Digger for Visual Studio 2012 and 2013 (opens in new tab) is a lightweight version of Pex that allows you to explore public .NET methods in Portable Libraries directly from the code editor.
Thanks for your support, The Pex and Moles Team.
-
Code Digger
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.
-
Pex and Moles
Pex and Moles are Visual Studio 2010 Power Tools (opens in new tab) 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. (opens in new tab) 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! (opens in new tab) (MSDN Subscriptions)
-
Try it Out on the Web: www.pexforfun.com (opens in new tab)
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 (opens in new tab), 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 (opens in new tab) to start tutorials.
-
Want to Know More?
- Watch the Channel9 ‘Getting Start with Moles’ video (opens in new tab)
- Watch the Channel9 ‘Getting Started with Pex’ video (opens in new tab)
- Watch the Channel9 Pex and Code Contracts video (opens in new tab) (french (opens in new tab))
- Watch the Channel9 Pex – Automated White box Testing video (opens in new tab)
- Watch the 5 hours workshop on Pex and Moles (part 1 (opens in new tab), 2 (opens in new tab) ,3 (opens in new tab))
- Watch the PDC 2010 talk (opens in new tab)[2009 (opens in new tab), 2008 (opens in new tab)]
- Watch the Channel9 Pex for SharePoint video (opens in new tab)
-
Pex in the News and Blogs
- July 5, 2015: Pratap Lakshman on IntelliTest – One Test to rule them all (opens in new tab)
- May 22, 2015: ALM rocks: IntelliTest-What Happens If I Add Some More Code (opens in new tab)
- May 21, 2015: ALM rocks: IntelliTest-Getting Started (opens in new tab)
- April 18, 2015: Pratap Lakshman on Smart Unit Tests – Test to Code Binding, Test Case Management (opens in new tab)
- April 2, 2015: developertech: Visual Studio 2015 line-up and pricing announced (opens in new tab) (includes IntelliTest!)
- February 2015: MSDN Magazine on Visual Studio 2015 – Build Better Software with Smart Unit Tests (opens in new tab)
- December 11, 2014: Pratap Lakshman on Smart Unit Tests – a mental model (opens in new tab)
- November 25, 2014: .Net Rocks! interviews the Pex team: Testing Software Using Pex (opens in new tab)
- November 19, 2014: Pratap Lakshman on Introducing Smart Unit Tests (opens in new tab)
- June 9, 2013: Fabio Gouw on Pex no Visual Studio 2012: Code Digger e TDD com teorias (opens in new tab)
- April 25, 2013: Rion Williams on Using Pex and Microsoft Code Digger to Better Understand and Test Your Code (opens in new tab)
- Aril 25, 2013: Mike James on Code Digger Finds The Values That Break Your Code (opens in new tab)
- April 1, 2013: Maurizio Pianfetti on TOOLS FOR TEST GENERATION IN BLACK-BOX AND WHITE-BOX TESTING (opens in new tab) (in Italian)
- February 11, 2013: Visual Studio ALM + Team Foundation Server Blog announced Fakes now available in Visual Studio Premium (opens in new tab)
- November 26, 2012: Dino Esposito at Dr. Dobb’s on Pex: Microsoft Research’s Unit Test Generator and Evaluator (opens in new tab)
- October 2, 2012: Jan Fajfr on Introduction to Fakes and migration from Moles (opens in new tab)
- April 26, 2011: Jan Fajfr on Pex & Moles – Testing business layer (opens in new tab)
- February 22, 2011: Pex and Visual Studio in MSDN UK Team blog (opens in new tab)
- February 15, 2011: Bill Wagner on A fun brain exercise: PexForFun (opens in new tab)
- October 25, 2010: Pex and Pex for fun article in print magazine c’t 23/2010, page 48 (opens in new tab) (in German)
- August 15, 2010: LaM on Microsoft Pex – Automated Unit Testing (opens in new tab)
- August 2, 2010: Flexing Pex (opens in new tab)on the SD Times
- July 15, 2010: A BinaryThought on Pex Power Tools (opens in new tab)
- May 18, 2010: Assaf Stone on TDD: It Doesn’t Have to Be So Difficult (opens in new tab) using Pex and Moles (+ slides and demo code (opens in new tab))
- May 10, 2010: Fernando Machado Píriz has a screencast on Unit Tests generation with Pex using Visual Studio 2010 and C# 4.0 (opens in new tab) (spanish (opens in new tab))
- May 7, 2010: Fernando Machado Píriz writes about Pex and Contracts: Better together (opens in new tab) (also in Spanish (opens in new tab))
- May, 2010: Programmez.com (french journal) features a 2 page article on Pex (opens in new tab)(in French)
- May 5, 2010: Søren Trudsø and Kenneth Egholm did a comparison of Pex and black-box testing (opens in new tab) (PDF)
- April 29, 2010: Thomas Weller shows how to use Moles with Gallio (opens in new tab)
- April 23, 2010: Mathias Brandewinder shares the Joy of Pex (opens in new tab) (with slides)
- April 19, 2010: Rickard Nilsson isolates from Asp.NET with Moles (opens in new tab)
- April 14, 2010: Stephen Schaff is “mocking the Un-Mockable” (opens in new tab) (screencast)
- April 12, 2010: Joydip Kanjilal on Working with Microsoft PEX Framework (opens in new tab) in Dr Dobbs
- April 10, 2010: Peter Himschoot on Pex and Code Contracts (opens in new tab)
- April 8, 2010: Nick Walker is looking at moles (opens in new tab) (several posts)
- April 1, 2010: Didier Caron uses Moles and Pex to test a Twitter connector (opens in new tab).
- March 29, 2010: The Moss Show interview (opens in new tab) on Pex and Moles for SharePoint
- March 27, 2010: Bnaya Eshet gives a walktrough of Pex (opens in new tab)
- March 26, 2010: Microsoft DPE Spain releases a DDD N-Layer Architecture project (opens in new tab) that uses Pex and Moles for unit testing
- March 26, 2010: Bnaya Eshet walks uses Moles to test logic depending on time
- March 11, 2010: Martin Rue digs code with Moles (opens in new tab)
- March 10, 2010: Kiran Lakhotia publishes an extension of Pex on CodePlex (opens in new tab) enabling better constraint solving of floating point constraints
- March 8, 2010: Kristofer Liljeblad uses Moles to test a web service (opens in new tab)
- March 1, 2010: Tim Mahy uses Moles to isolate from the System.IO dependencies (opens in new tab)
- February 20, 2010: Brett Daniel, Tihomir Gvero, Darko Marinov On Test Repair using Symbolic Execution (opens in new tab), using Pex for their research experiments
- February 17, 2010: Jason Bock unveils the AutoPex (opens in new tab)project on CodePlex (opens in new tab).
- February 8, 2010: Pex is demoed at the plenary session in TechDays Paris! (opens in new tab)
- February 2, 2010: Dave Bending (opens in new tab) gives an overview of Pex (opens in new tab)
- February 1, 2010: Dominick Baier (opens in new tab)uses Moles to test security code (opens in new tab)
- January 27, 2010: Rafael Flores talks about TDD and Pex (opens in new tab)(in Spanish)
- January 21, 2010: Martin W. Angler (opens in new tab) applies Pex and Moles to untestable code (opens in new tab)
- January 15, 2010: Martin W. Angler (opens in new tab) has detailled post on First steps with Pex (opens in new tab)
- January 5, 2010: Naveen (opens in new tab) explores Code Contracts, Pex and F# (opens in new tab) together
- December 17, 2009: Code Contracts ‘et’ Pex in french on Channel9 (opens in new tab)
- December 15, 2009: Interview with Jeffrey Van Gogh on how the Reactive Extensions use Pex for testing (opens in new tab).
- December 7, 2009: João Angelo on Unit Testing With NUnit and Moles (opens in new tab)
- December, 2009: Nikhil Sachdeva (opens in new tab) published an MSDN article on Automated Unit Tests for Legacy Code with Pex (opens in new tab)
- December 1, 2009: Eric Nelson (opens in new tab) publishes a podcast recorded at TechEd Europe (opens in new tab)
- November 18, 2009: Sasha Goldshtein writes on PDC 2009 Day 1: Code Contracts and Pex: Power Charge Your Assertions and Unit Tests (opens in new tab)
- November 12, 2009: Abdulla AbdelHaq talks to the Jordan .NET User Group: PEX – Let me fix your code for you (opens in new tab) (in Arabic).
- November 11, 2009: Eric Nelson: Did you know Microsoft makes a mocking tool? (opens in new tab) And TechEd Europe 2009 Highlights and Lowlights (opens in new tab).
- October 19, 2009: Yauhen Safrankou shows how to build a custom test naming convention (opens in new tab).
- October 12, 2009: Nikolai Tillmann and Peli de Halleux demoed Pex on DNR! TV (opens in new tab).
- October 11, 2009: Yauhen Safrankou talks about generating Stubs through MSBuild (opens in new tab)
- October 4, 2009: Andrew Kazyrevich compares the mock frameworks for .NET (opens in new tab), including Moles.
- October 1, 2009: Jason Bock publishes his What Will Pex do? materials (opens in new tab).
- September 22, 2009: InfoQ writes Microsoft releases a new version of Pex, providing better support to testing (opens in new tab) (in simplified Chinese)
- August 26, 2009: Steve Andrews has a “Pop Quiz: .NET Integers, Unit Testing, and Boundary Checking (opens in new tab)“
- August 11, 2009: Marvin Steppat announces that “codekicker.BBCode ist open source (opens in new tab)” (in German), a library tested with Pex and in production use at the German developer community site codekicker.de (opens in new tab)
- August 10, 2009: Alkampfer tells a tale of “Using Pex in more complex environment” (opens in new tab)
- July 6, 2009: Andrew Kazyrevich on “Introduction to Pex Stubs” (opens in new tab)
- June 16, 2009: Alkampfer on “Pex to the rescue” (opens in new tab)
- June 4/8, 2009: Unai Zorrilla gives Channel9 movies on “Introduccion a Pex” (opens in new tab) and “Introduccion a Stubs” (opens in new tab) (in Spanish – courtesy of Daniel Garzon (opens in new tab))
- June 1, 2009: Barton Friedland on “Software I am excited about” (opens in new tab)
- June, 2009: Thomas Reinwart writes on “Pex – automatisches white box testen mit .net (opens in new tab)” in the Austrian PCNews (opens in new tab) (in German)
- May 26, 2009: John Smith Flex Your Pex! (opens in new tab) series (Part 1 (opens in new tab), 2 (opens in new tab), 3 (opens in new tab), 4 (opens in new tab))
- May 10, 2009: Damic Dobric presentation on Contracts and Pex (opens in new tab)
- May 2, 2009: Jamie Philips walks through (opens in new tab)using Pex, Stubs and DI
- April 26, 2009: Andrew Kazyrevich compares the performance of Stubs (opens in new tab)with other mock frameworks
- April 16, 2009: Muntedhar Alhakim gives a short introduction on Pex (opens in new tab)
- April 13, 2009: Damir Dobric on “Using of Factory in Pex” (opens in new tab) and tracing condition paths (opens in new tab)
- February 26, 2009: Mathew Podwysocki tests functional folds (opens in new tab) with Pex
- February 14, 2009: Damir Dobric on allowing exceptions (opens in new tab)
- January 16, 2009: Maarten Balliauw on “Verifying and Testing code with Pex” (opens in new tab)
- January 11, 2009: Gary Evans on “Theory Driven Development” (opens in new tab)
- January 11, 2009: Willy-Peter Schaub on “Pex.. a small package of dynamite” (opens in new tab)
- January 6, 2009: “Monster Got my .NET” on “Pex and IoC – A struggle with code” (opens in new tab), “Pex – Software cracker (opens in new tab)?” and “Pex saw it coming” (opens in new tab)
- November 22, 2008: Ben Hall speaks on “Pex the future of unit testing?” (opens in new tab) at DDD7
- November 20, 2008: Adam Breindel on “Pex moves the needle big time on Software testing…” (opens in new tab)
- October 22, 2008: David Lambert on “Pex: Unit Testing++” (opens in new tab)
- July 2008: Alexander Nowak Pex Chronicles series (Part 1 (opens in new tab),2 (opens in new tab),3 (opens in new tab),4 (opens in new tab),5 (opens in new tab),6 (opens in new tab),6 revisited (opens in new tab),6 revisited again (opens in new tab),7 (opens in new tab))
- June 1, 2008: Stanislav Dvoychenko on why use Pex (opens in new tab)
- February 05, 2008: Bil Simser on “Pex: A tool in search of identity” (opens in new tab)
- January 1, 2008: Hanselminutes (opens in new tab)on Pex
Your post is not in the list? Drop us a link. (opens in new tab)
-
- Follow us on Facebook (opens in new tab)
- Download Visual Studio Enterprise 2015 RC with IntelliTest
- Download Code Digger (opens in new tab) (for VS2012, VS2013)
- Download Pex and/or Moles (for VS2010)
- IntelliTest, Pex and Moles in News/Blogs
- Documentation
- Ask a question on stackoverflow (opens in new tab) (Tag with “IntelliTest”, “Pex” or “Moles”)
- Browse archived MSDN forums (opens in new tab)
-
Member blogs
Associated Groups and Projects
People
Peli de Halleux
Principal Research Software Engineer
Nikolaj Bjørner
Partner Researcher