Settings waterfall

Last Update: 11/8/2016

Visual Studio 2017 | Visual Studio 2015

The concept of the settings waterfall means that the user can specify settings at the Assembly, Fixture and Exploration level:

Settings specified at the Assembly level will affect all fixtures and exploration under that assembly. Settings specified at the Fixture level will affect all explorations under that fixture. Child settings win: if a setting is defined at the Assembly and the Fixture levels, the Fixture settings will be 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 UserVoice.

Tell us what you think with Send-a-Smile Send-a-Smile on the title bar.

Go back Back to the index