All TestSteps that are instances of the TestStep abstract class should override the TestStep.Run method. Additionally, the TestStep.PrePlanRun and TestStep.PostPlanRun methods can be overridden.
More...
|
| void | UpgradeVerdict (Verdict verdict) |
| | Sets the Verdict if it is not already set to a more serious verdict (for example, a Pass verdict would be upgraded to Fail, which is more serious).
|
| |
| T | GetParent< T > () |
| | Searches up through the Parent steps and returns the first step of the requested type that it finds.
|
| |
| IEnumerable< TestStepRun > | RunChildSteps (IEnumerable< ResultParameter > attachedParameters=null) |
| | Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
|
| |
| IEnumerable< TestStepRun > | RunChildSteps (bool throwOnBreak) |
| | Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
|
| |
| IEnumerable< TestStepRun > | RunChildSteps (IEnumerable< ResultParameter > attachedParameters, CancellationToken cancellationToken) |
| | Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
|
| |
| IEnumerable< TestStepRun > | RunChildSteps (IEnumerable< ResultParameter > attachedParameters, CancellationToken cancellationToken, bool throwOnBreak) |
| | Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
|
| |
| TestStepRun | RunChildStep (ITestStep childStep, IEnumerable< ResultParameter > attachedParameters=null) |
| | Runs the specified child step if enabled. Upgrades parent verdict to the resulting verdict of the child run. Throws an exception if childStep does not belong or isn't enabled.
|
| |
| TestStepRun | RunChildStep (ITestStep childStep, bool throwOnBreak, IEnumerable< ResultParameter > attachedParameters=null) |
| | Runs the specified child step if enabled. Upgrades parent verdict to the resulting verdict of the child run. Throws an exception if childStep does not belong or isn't enabled.
|
| |
|
virtual string | GetError (string propertyName=null) |
| | Return the error for a given property.
|
| |
| void | ThrowOnValidationError (bool ignoreDisabledProperties) |
| | Checks all validation rules on this object (Rules) and throws an AggregateException on errors.
|
| |
|
|
Verdict | Verdict [get, set] |
| | Gets or sets the verdict. Only available during test step run. The value of this property will be propagated to the TestStepRun when the step run completes.
|
| |
|
bool | Enabled [get, set] |
| | Gets or sets boolean indicating whether this step is enabled in the TestPlan.
|
| |
|
bool | IsReadOnly [get, set] |
| | Gets or sets boolean indicating whether this step is read-only in the TestPlan. This is mostly a declaration of intent, GUIs should respect it, but few things enforces it.
|
| |
|
string | Name [get, set] |
| | Gets or sets the name of the TestStep instance. Not allowed to be null. In many cases the name is unique within a test plan, but this should not be assumed, use Idfor an unique identifier. May not be null.
|
| |
|
string | TypeName [get] |
| | This TestStep type as a string.
|
| |
|
TestStepList | ChildTestSteps [get, set] |
| | Gets or sets a List of child TestSteps. The teststeps in this list will be executed in the RunChildSteps(System.Collections.Generic.IEnumerable<OpenTap.ResultParameter>) method.
|
| |
|
virtual ITestStepParent | Parent [get, set] |
| | The parent of this TestStep. Can be another TestStep or the TestPlan.
|
| |
|
ResultSource | Results [get] |
| | Result proxy that stores TestStep run results until they are propagated to the ResultListener.
|
| |
|
IEnumerable< ITestStep > | EnabledChildSteps [get] |
| | The enumeration of all enabled Child Steps.
|
| |
|
string | Version [get, set] |
| | Version of this test step.
|
| |
|
TestPlanRun | PlanRun [get, set] |
| | Gets or sets the TestPlanRun.
|
| |
|
TestStepRun | StepRun [get, set] |
| | Gets or sets the TestStepRun.
|
| |
|
Guid | Id = Guid.NewGuid() [get, set] |
| | Gets or sets the ID used to uniquely identify a test step within a test plan.
|
| |
|
ValidationRuleCollection | Rules [get] |
| | All the validation rules. Add new rules to this in order to get runtime value validation.
|
| |
|
string | Error [get] |
| | Gets the error messages for each invalid rule and joins them with a newline.
|
| |
|
|
PropertyChangedEventHandler | PropertyChanged |
| | Standard PropertyChanged event object.
|
| |
All TestSteps that are instances of the TestStep abstract class should override the TestStep.Run method. Additionally, the TestStep.PrePlanRun and TestStep.PostPlanRun methods can be overridden.
ITestStep can also be inherited from instead.
◆ GenerateDefaultNames() [1/2]
| static string[] OpenTap.TestStep.GenerateDefaultNames |
( |
ITypeData | stepType | ) |
|
|
inlinestatic |
Returns a default name for a step type.
- Parameters
-
- Returns
◆ GenerateDefaultNames() [2/2]
| static string[] OpenTap.TestStep.GenerateDefaultNames |
( |
Type | stepType | ) |
|
|
static |
Returns a default name for a step type.
- Parameters
-
- Returns
◆ GetChildSteps()
Gets children following a specific search patterns. Not recursive.
- Parameters
-
| searchKind | Search pattern to use. |
- Returns
- Unevaluated IEnumerable.
◆ GetParent< T >()
| T OpenTap.TestStep.GetParent< T > |
( |
| ) |
|
|
inlineprotected |
Searches up through the Parent steps and returns the first step of the requested type that it finds.
- Template Parameters
-
- Returns
- The closest TestStep of the requested type in the hierarchy.
◆ OfferBreak()
| void OpenTap.TestStep.OfferBreak |
( |
bool | isTestStepStarting = false | ) |
|
|
inline |
Raises the TestPlan.BreakOffered event on the TestPlan object to which this TestStep belongs.
This method allows a user interface implementation to break/pause the execution of the TestPlan at the point at which it is called.
◆ PostPlanRun()
| virtual void OpenTap.TestStep.PostPlanRun |
( |
| ) |
|
|
inlinevirtual |
Called by TestPlan.Run() after completing all TestStep.Run methods in the TestPlan. ///.
Note that TestStep.PostPlanRunrun is run in reverse order. For example, suppose you had three tests: T1, T2, and T3. PrePlanRun would run for T1, T2 and T3 (in that order), and PostPlanRun would run for T3, T2 and T1 (in that order).
Implements OpenTap.ITestStep.
◆ RecursivelyGetChildSteps()
Recursively collects a completely list of child steps using the specified pattern. Order is depth-first.
- Parameters
-
- Returns
- Unevaluated IEnumerable of test steps.
◆ RunChildStep() [1/2]
Runs the specified child step if enabled. Upgrades parent verdict to the resulting verdict of the child run. Throws an exception if childStep does not belong or isn't enabled.
- Parameters
-
| childStep | The child step to run. |
| throwOnBreak | |
| attachedParameters | Parameters that will be stored together with the actual parameters of the step. |
◆ RunChildStep() [2/2]
Runs the specified child step if enabled. Upgrades parent verdict to the resulting verdict of the child run. Throws an exception if childStep does not belong or isn't enabled.
- Parameters
-
| childStep | The child step to run. |
| attachedParameters | Parameters that will be stored together with the actual parameters of the step. |
◆ RunChildSteps() [1/4]
| IEnumerable< TestStepRun > OpenTap.TestStep.RunChildSteps |
( |
bool | throwOnBreak | ) |
|
|
inlineprotected |
Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
- Parameters
-
| throwOnBreak | Whether an exception will be thrown due to break conditions or if they will be caught. Exceptions are still available on child test steps TestStepRun.Exception. |
◆ RunChildSteps() [2/4]
| IEnumerable< TestStepRun > OpenTap.TestStep.RunChildSteps |
( |
IEnumerable< ResultParameter > | attachedParameters, |
|
|
CancellationToken | cancellationToken ) |
|
inlineprotected |
Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
- Parameters
-
| attachedParameters | Parameters that will be stored together with the actual parameters of the steps. |
| cancellationToken | Provides a way to cancel the execution of child steps before all steps are executed. |
◆ RunChildSteps() [3/4]
| IEnumerable< TestStepRun > OpenTap.TestStep.RunChildSteps |
( |
IEnumerable< ResultParameter > | attachedParameters, |
|
|
CancellationToken | cancellationToken, |
|
|
bool | throwOnBreak ) |
|
inlineprotected |
Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
- Parameters
-
| attachedParameters | Parameters that will be stored together with the actual parameters of the steps. |
| cancellationToken | Provides a way to cancel the execution of child steps before all steps are executed. |
| throwOnBreak | Whether an exception will be thrown due to break conditions or if they will be caught. Exceptions are still available on child test steps TestStepRun.Exception. |
◆ RunChildSteps() [4/4]
Runs all enabled TestStep.ChildTestSteps of this TestStep. Upgrades parent verdict to the resulting verdict of the childrens run. Throws an exception if the child step does not belong or isn't enabled.
- Parameters
-
| attachedParameters | Parameters that will be stored together with the actual parameters of the steps. |
◆ UpgradeVerdict()
| void OpenTap.TestStep.UpgradeVerdict |
( |
Verdict | verdict | ) |
|
|
inlineprotected |
Sets the Verdict if it is not already set to a more serious verdict (for example, a Pass verdict would be upgraded to Fail, which is more serious).
- Parameters
-
| verdict | New verdict to set. |