Prepares a newly created test instance state before its use.
Namespace:
Gallio.Framework.PatternAssembly: Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public ActionChain<PatternTestInstanceState> BeforeTestInstanceChain { get; } |
| Visual Basic (Declaration) |
|---|
Public ReadOnly Property BeforeTestInstanceChain As ActionChain(Of PatternTestInstanceState) |
Remarks
This method runs in the TestContext of the PrimaryTestStep because the test step for this instance (if different from the primary step) has not yet started.
If IsReusingPrimaryTestStep is false then this method has the opportunity to modify the name or add metadata to the brand new PatternTestStep that was created for just this test instance.
The following actions are typically performed during this phase:
- Adding or changing slot values.
- Configuring the test environment in advance of test initialization.
- Modifying the name or metadata of the PatternTestStep, if IsReusingPrimaryTestStep is false (since the primary test step has already started execution).
- Accessing user data via Data.
The following actions are forbidden during this phase because they would either go unnoticed or have undesirable side-effects upon test execution:
- Modifying the PatternTest object in any way.
- Modifying the PatternTestState object in any way.
- Modifying the PatternTestStep object in any way UNLESS IsReusingPrimaryTestStep is false.
- Skipping the test instance by throwing an appropriate SilentTestException.
