Supported Test Frameworks
Pex supports the following test frameworks:
Attribute Usage Table
| Feature || Visual Studio Unit Test || xUnit.net || Description
| fixture || [TestClass, PexClass] || [PexClass] || tests are logically grouped in a type
| parameterized test || [PexMethod] || instance method tagged with PexMethod || same
| fixture setup || [ClassInitialize] || supported || not supported
| fixture teardown || [ClassCleanup] || supported || not supported
| test setup || [TestInitialize]|| supported || not supported
| test teardown || [ClassCleanup] || supported || not 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 up 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 = "Repro")]