Step

3.3.6 Step

DESCRIPTION

Step - Define the result of a test step. A step represents one atomic instruction of a test case (script). Steps should be located inside a script block.

SYNOPSIS

step <name> [pass|fail|nt|na]  [instruct=<instructions>]  [expected=<expected_result_desc>]  [actual=<actual_result_desc>]  [notes=<notes>]  
* Red colour indicates obligatory parameters

OPTIONS

name

- A displayable step name, for example, "Logon", "Open Browser" etc. It doesn't have to be unique.

pass|fail|nt|na

- Step result. It must be one of pass (passed, successful), fail (failed, unsuccessful), nt (not yet tested) or na (not available).

instruct=<instructions>

- Step instructions (optional). It is usually a brief description of what was performed to accomplish the step.

expected=<expected_result_desc>

- Description of the expected step result (optional).

actual=<actual_result_desc>

- Description of the actual step result (optional). It is typically used with failed steps to indicate the difference from the expected result.

notes=<notes>

- Additional step information (optional).

RETURNS

The Step command always returns 0 (zero).

EXAMPLES

Compareto template= "application.png"
if ({_EXIT_CODE} == 0) {
  Step "Start application" pass expected="The application GUI opens."
else {
  Step "Start application" fail expected="The application GUI opens." actual="The application failed to start."
  Exit 1 
}

- A typical example of Step usage. The snippet employs image comparison to test whether the desktop matches the application.png template or not and produces a Step pass or fail result accordingly.