Sequence Flow
Following commands allow you to control sequence flow
Last updated
Following commands allow you to control sequence flow
Last updated
To be able to control test sequence flow you need to create labels within the test sequence. To do that enter a desired name in the label column. When using #call <label> and other commands the sequence will jump to the test step with the label
This command will jump to a test with specified label and continue the execution from there
<label-name>
label-name
[string]
Target label name to jump to. There is a special predefined label @this
which represents the current row. This can be used to make the infinite main loop without defining any other label.
This command will call a function (label) and expects a return value back. After the function is executed the sequence continues.
<label-name>{:<param0>:....:<paramn>}
Call a function. Function is a block of code begins by the label and ends by the #return
(or #throw
) command. Typically the block should be placed outside the main program loop. The #call blocks the executing until subroutine is finished. The return value (#return of sub-routine) is written to Return Value.
In this example you can see a test step that calls "ICT" label. When executed the section labeled ICT is executed until the #return command is reached. Aftert that the value of the #return parameter is written to return value of #call step and the test step is finished
label-name
[string]
Target label name to jump to
param
[string]
Optional parameter(s) to pass to target function. This parameter (s) will be stored to the "Return Value" of the called function. If there is more than one parameter, they will be stored to following lines, one parameter to one line, overwriting previous values. Line(s) with parameters name should be set to nonexecute, otherwise the parameter(s) in the "Return Value" will be overwritten by a command after step is executed. Default: (empty)
This command represents the end of the function block.
{<return-value>}
return-value
[string]
Optional parameter, function can return a blank value. Otherwise this is any value to be returned by a function block. Default: (empty)
Return from function with an error. This will cause ReturnStatus = 1 at the place of function calling (using #call). If the async-called function is exited by #throw, the error is passed to #sync function. It is possible to return a custom error message or pass last caught error by #onerror functionality.
{<message>}
message
[string]
Optional error message to return from the function. If no message is passed, the #throw command will return the last error, caught by #onerror functionality.
These commands enables to check for an error (means Return Status <> 0) or fail (means Judge is not empty and <> 0).
Note: On-fail action is not executed when the step ends with an error. If you want to treat both situations, you have to define behaviors for both on-fail and on-error (can be the same).
It is possible to: just set a number of retries of following step(s) perform a function call go to to a specified label
see below in examples
#onerror / #onfail
none
Disable the error or fail checking functionality.