This project is read-only.

How to run the pex explorations in Visual Studio

For a more in depth look at pex please goto this site.

Running pex is not too dissimilar to running MSTest inside Visual Studio.

To run pex on a an existing test method that is marked as a pex test method you can do the following :-
  1. Navigate to a test method marked with a [PexMethod] attribute (the [PexMethod] attribute is is used to mark test method that be used by pex for exploration).
  2. Right click in the pex test method then in the context menu select 'Pex Explorations' the explorations will begin.
  3. When the pex explorations are running and an exploration that pex deems a unit test you'll see appear in the explorations pane.
  4. Once pex has finished you can click on each row to look at the unit test that pex generated for each exploration.

Generating a test project from a pex exploration

  1. Navigate to a public method and right click inside the method.
  2. In the context menu select pex->Create parametrised tests. You'll then be presented with series of dialogue boxes just accept the defaults. You should now have a test project created that you can use for unit testing.

Last edited Apr 7, 2010 at 1:14 PM by jamesafisk, version 5


No comments yet.