Pex and Moles - Documentation

Tutorials: Start here!

You find step-by-step tutorial that guide you through Pex and Moles. Work your way up the levels to become a Pex and Moles expert.

    Level 
  Getting Started with Microsoft Pex and Moles (PDF) (XPS)
Start here to get the big picture about Pex and Moles.
200 

 

Exploring Code with Microsoft Pex (PDF) (XPS)
Learn how Pex can explore your code and generated a unit test suite from a single click in Visual Studio.
200 
  Getting Started With Microsoft Code Contracts and Pex (PDF) (XPS)
 Learn how to combine Code Contracts and Pex in your daily development.
200 
  Unit Testing with Microsoft Moles (PDF) (XPS)
A tutorial that explains how Moles can be used to improve your unit testing.
300
  Unit Testing Asp.NET Applications with Microsoft Moles (PDF) (XPS) 
A tutorial that explains how Moles can be used for Asp.NET Web Applications unit testing.
300 
  Unit Testing SharePoint Foundation with Microsoft Pex and Moles (PDF) (XPS)
A tutorial that explains how Moles can be used for SharePoint Foundation unit testing.
300
  Unit Testing SharePoint Foundation with Behaviors (PDF) (XPS)
A tutorial that explains how Moles can be used to help SharePoint Foundation unit testing. 
300 
 

Parameterized Unit Testing with Microsoft Pex (PDF) (XPS)

A detailled tutorial about the usage of Pex and parameterized unit testing.

400

 

Technical References

In these reference manuals, you can find explanations of many technical details.

Microsoft Moles Reference Manual (PDF) (XPS)

A detailed description of stub and mole types.

300   
 

Microsoft Pex Reference Manual (PDF) (XPS)

A detailed description of parameterized unit testing with Pex 

300 
 

Microsoft Pex Online Wiki

A collection of information around Pex.

400 
 

Parameterized Test Patterns for Microsoft Pex (PDF) (XPS)

A collection of examples on how to write effective Parameterized Unit Tests.

400 
 

Advanced Concepts: Parameterized Unit Testing with Microsoft Pex (PDF) (XPS)

The second part of the Parameterized Unit Testing with Microsoft Pex tutorial.

500 
 

Extension Writer Handbook (PDF) (XPS)

For developers who wants to write Pex extensions.

500 

 

 

Slide Decks

Do you want to present Pex to your team? Use our slidedecks to get started!

Level

 

Example

100

Overview 

An introduction to goals for Microsoft Pex and Moles, plus steps for installation.

200

Basic Guide 

Step-by-step details for running the software, with implementation information for general problems.

300

Specific Solutions 

Deeper code samples to solve specific problem situations. Assumes developer understands basic concepts and is familiar with the software.

400

Expert Content 

A deep collection of technical knowledge, intended for developers with extensive experience, focusing on expert-to-expert information and coverage of specialized topics.

500  Internal Details Internal details describing how a tool is implemented. A description of extension points for tool developers.

 

It's in the box!

Most of the documentation listed on this page is also bundled in the Pex installer.

What about Moles?

Pex comes with Moles, a lightweight Test Stub and Detours framework.