This project is read-only.

Supported Test Frameworks

Pex supports the following test frameworks:

Support for other test framework can be downloaded from the Pex Extensions Project:
Attribute Usage Table
Feature with VSTS with MbUnit with NUnit with xUnit Description
fixture [TestClass, PexClass] [TestFixture, PexClass] [TestFixture, PexClass] [PexClass] tests are logically grouped in a type
parameterized test [PexMethod] [RowTest, PexMethod] [PexMethod] [Theory, PexMethod] instance method tagged with PexMethod
fixture setup [ClassInitialize] [TestFixtureSetup] [TestFixtureSetup] BeforeAllTests supported
fixture teardown [ClassCleanup] [TestFixtureTeardown] [TestFixtureTeardown] AfterAllTests supported
test setup [TestInitialize] [Setup] [Setup] constructor supported
test teardown [ClassCleanup] [TestFixtureTeardown] [TestFixtureTeardown] Dispose supported

All other attributes are copied to the generated unit tests but their function is not understood.
  • For VSTS, the ITestContext instance is always null.
Specifying the test framework
Pex automatically guesses the test framework by walking the list of assembly references of the test project and looking for the unit test framework assembly. If Pex cannot guess the test framework you are using, you can set it with the TestFramework option of the PexAssemblySettingsAttribute.

[assembly: PexAssemblySettings(TestFramework = "MSTest")]

Custom test framework can be used in Pex by implementing the ITestFramework interface. Custom test frameworks can be registered through the PexTestFrameworkAttributeBase attribute.

Last edited Feb 8, 2008 at 7:07 PM by BKStrelioff, version 3


No comments yet.