Categories

Calls for conditional sub-scripts with Agilitest

Agilitest allows you to call conditional sub-scripts, that is, the evaluation of a condition leads to the call or not of the sub-script.

To perform this operation, you must create a sub-script call action beforehand.

Then, click on "call script" then "create a condition".

Click on create condition

Agilitest then displays a selection popup of a variable on which the condition is based, which must be a tie.

Selecting a condition

Only one condition can be selected, and it is possible to remove a defined condition by re-clicking on "call script".

Ability to remove a condition

The other call parameters of the sub-script remain the same: you can pass input variables or a CSV file.

During execution, Agilitest will evaluate the condition and, depending on the result, it will call or not the sub-script using the defined parameters.

For now, only equality has been proposed as a condition, and Agilitest will show you in the editor the result of the current status of the call of sub-scripts :

  • green arrow: the sub-script would be called
  • sense-forbidden: the sub-script would not be called
Explicit signaling

We advise you to use this function with a lot of precautions, because it will allow you to integrate non-genericity in your tests, and therefore potentially malfunction related to uncontrolled data.

The cases for which we recommend it are the following :

  • make a call based on a global variable value, this allows you to perform set-up operations based on whether or not a variable is present in the call parameters of continuous integration for example.
  • in a sub-script with a CSV file: call a script according to a parameter of the CSV file passed in sub-script call, this requires you to have a second level of sub-script, but allows you to manage dedicated controls.
Still require support?
Contact support