Pex - Automated White box Testing for .NET

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. Pex performs a systematic analysis, hunting for boundary conditions, exceptions and assertion failures, which you can debug right away. Pex enables Parameterized Unit Testing, an extension of Unit Testing that reduces test maintenance costs. Pex also comes with a lightweight framework for test stubs and detours, called Stubs and Moles.
Want to know more?
- Watch the Channel9 'Getting Started' video,
- Watch the Channel9 Pex and Code Contracts video,
- Watch the Channel9 Pex - Automated White box Testing video,
- Watch the PDC 2008 talk on Channel9,
- Download Pex,
- Read experiences and ask questions on our MSDN Pex Forums,
- Read more documentation
Upcoming events
- November 2009: "Code Contracts and Pex: Power Charge Your Assertions and Unit Tests" at PDC'09, in Los Angeles, California — also come and visit us at our booth
Pex in the news and blogs
- November 18, 2009: Sasha Goldshtein writes on PDC 2009 Day 1: Code Contracts and Pex: Power Charge Your Assertions and Unit Tests
- November 12, 2009: Abdulla AbdelHaq talks to the Jordan .NET User Group: PEX - Let me fix your code for you (in Arabic).
- November 11, 2009: Eric Nelson: Did you know Microsoft makes a mocking tool? And TechEd Europe 2009 Highlights and Lowlights.
- October 19, 2009: Yauhen Safrankou shows how to build a custom test naming convention.
- October 12, 2009: Nikolai Tillmann and Peli de Halleux demoed Pex on DNR! TV.
- October 11, 2009: Yauhen Safrankou talks about generating Stubs through MSBuild
- October 4, 2009: Andrew Kazyrevich compares the mock frameworks for .NET, including Moles.
- October 1, 2009: Jason Bock publishes his What Will Pex do? materials.
- September 22, 2009: InfoQ writes Microsoft releases a new version of Pex, providing better support to testing (in simplified Chinese)
- August 26, 2009: Steve Andrews has a "Pop Quiz: .NET Integers, Unit Testing, and Boundary Checking"
- August 11, 2009: Marvin Steppat announces that "codekicker.BBCode ist open source" (in German), a library tested with Pex and in production use at the German developer community site codekicker.de
- August 10, 2009: Alkampfer tells a tale of "Using Pex in more complex environment"
- July 6, 2009: Andrew Kazyrevich on "Introduction to Pex Stubs"
- June 16, 2009: Alkampfer on "Pex to the rescue"
- June 4/8, 2009: Unai Zorrilla gives Channel9 movies on "Introduccion a Pex" and "Introduccion a Stubs" (in Spanish - courtesy of Daniel Garzon)
- June 1, 2009: Barton Friedland on "Software I am excited about"
- June, 2009: Thomas Reinwart writes on "Pex - automatisches white box testen mit .net" in the Austrian PCNews (in German)
- May 26, 2009: John Smith Flex Your Pex! series (Part 1, 2, 3, 4)
- May 10, 2009: Damic Dobric presentation on Contracts and Pex
- May 2, 2009: Jamie Philips walks through using Pex, Stubs and DI
- April 26, 2009: Andrew Kazyrevich compares the performance of Stubs with other mock frameworks
- April 16, 2009: Muntedhar Alhakim gives a short introduction on Pex
- April 13, 2009: Damir Dobric on "Using of Factory in Pex" and tracing condition paths
- February 26, 2009: Mathew Podwysocki tests functional folds with Pex
- February 14, 2009: Damir Dobric on allowing exceptions
- January 16, 2009: Maarten Balliauw on "Verifying and Testing code with Pex"
- January 11, 2009: Gary Evans on "Theory Driven Development"
- January 11, 2009: Willy-Peter Schaub on "Pex.. a small package of dynamite"
- January 6, 2009: "Monster Got my .NET" on "Pex and IoC - A struggle with code", "Pex - Software cracker?" and "Pex saw it coming"
- November 22, 2008: Ben Hall speaks on "Pex the future of unit testing?" at DDD7
- November 20, 2008: Adam Breindel on "Pex moves the needle big time on Software testing..."
- October 22, 2008: David Lambert on "Pex: Unit Testing++"
- July 2008: Alexander Nowak Pex Chronicles series (Part 1,2,3,4,5,6,6 revisited,6 revisited again,7)
- June 1, 2008: Stanislav Dvoychenko on why use Pex
- February 05, 2008: Bil Simser on "Pex: A tool in search of identity"
- January 1, 2008: Hanselminutes on Pex
Your post is not in the list? Drop us a link.






