-
Notifications
You must be signed in to change notification settings - Fork 1
Parameters
jian edited this page Jul 5, 2021
·
4 revisions
Handow provide built-in general steps for common testing requirements. A story will instantiate steps in a scenario to perform the definite testing operations. The way to instantiate a step is passing parameters to it. Handow can accept parameters in different ways:
- Scenario scope parameters - defined directly in the scenarion with @parameters: [] tag
- Story scope parameters - the scenario parameters of the 'Given' scenario (the 1st scenario) with story scope
- Stage scope parameters - defined in stages of a plan
- Global scope parameters - defined in parameter files availble to whole project
The priority order of the different scoped parameters in upper list is form high to low. The higher priority parameters can override the lower if they have same parameter name.
Except populating steps arguments, parameters can also be refered by running control, e.g., refered by @skip() evaluation on scenarios and steps.
@scenario: Person age validation
@skip: (this.Person_Private)
When I enter {value: "Age_Value"} to {selector: "Age_Input"}
Then I can see {selector: "Validate_Error"} presented @skip: (this.Hide_Message)
@parameters: [
{
Age_Value: 17,
Age_Input: "#form-input-age",
Validate_Error: "#age-validation"
},
{
Age_Value: 69,
Age_Input: "#form-input-age",
Validate_Error: "#age-validation"
}
]
Multiple parameters on 'Given' scenario will loop whole story
©2021 Handow
Supported by Handow team [email protected]