Pex - Automated Whitebox Testing for .NET : Generated Tests

Generated Tests

On successful path exploration, Pex will generate the source code of a new test case. The test case will automatically be tagged with the custom attribute that your test framework supports.

Selecting the Test Framework

Similarly to the output language, the test framework is specified in the constructor PexAssemblySettings attribute. If your project already references the test framework main assembly, Pex will automatically resolve the framework from that assembly.

Where do the tests get generated?

By default, tests get generated in the report folder under tests. A much more appealing feature is to provide the test project, Pex can then place the generated files at the 'right' place and update the project file. See Providing The Test Project File.


File extension

The file containing the generated tests have a .g before the language extension:

See Supported Test Frameworks.

See Also

PexAssemblySettingsAttribute, PexClassAttribute, PexMethodAttribute
(c) Microsoft Corporation. All rights reserved. pex Wiki Documentation 0.93.50813.0