Pex - Automated Whitebox Testing for .NET : Command Line

Command Line

Parameterized unit tests can be run using the pex.exe executable:

pex.exe mypexassembly.dll

The tool will discover all the pex classes and execute them. At the end, a report is generated. The command line supports a number of flags for filtering fixture or explorations, controlling the test generation or reports. The filters use a simple syntax.

Selecting What to Run

The command line supports wildcard filter to select tests by namespace, type or methods.
  • /nf: namespace filter
pex.exe ... /nf:MyTests.Current

  • /tf: type name filter
pex.exe ... /tf:MyTests

  • /mf: method name filter
pex.exe ... /mf:SquareTest

  • /cf: category filter
pex.exe ... /cf:data;web

  • /sf: suite filter
pex.exe ... /sf:checkin

  • /if ignore the 'ignore test' annotations,
pex.exe ... /if 


  • selecting a particular test,
pex.exe ... /nf:<namespace> /tf:<type name> /mf:<method name>

See Also
Parameterized Unit Testing, PexMethodAttribute, PexClassAttribute
(c) Microsoft Corporation. All rights reserved. pex Wiki Documentation 0.93.50813.0