Skip to content

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 parameters

@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"
    }
]

Step arguments populating

Scenario looping

@skip condition

Story parameters

Multiple parameters on 'Given' scenario will loop whole story

Stage parameters

Global params file

Related documnets

Clone this wiki locally