Settings waterfall
The concept of the settings waterfall means that the user can specify settings at the Assembly, Fixture, and Exploration level:
- Assembly - PexAssemblySettings
- Fixture - PexClass
- Exploration - PexExplorationAttributeBase
Settings specified at the Assembly level affect all fixtures and exploration under that assembly. Settings specified at the Fixture level affect all explorations under that fixture. Child settings win—if a setting is defined at the Assembly and the Fixture levels, the Fixture settings are used.
Note that some settings are specific to the Assembly level or Fixture level.
Example
using Microsoft.Pex.Framework;
[assembly: PexAssemblySettings(MaxBranches = 1000)] // we override the default value of maxbranches
namespace MyTests
{
[PexClass(MaxBranches = 500)] // we override the 1000 value and set maxbranches to 500
public partial class MyTests
{
[PexMethod(MaxBranches = 100)] // we override again, maxbranches = 100
public void MyTest(...) { ... }
}
}
Got feedback?
Post your ideas and feature requests on Developer Community.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for