Skip to main content

Conditionals

Overview

Conditionals allow users to define different execution paths in a test based on specified conditions. A test can use a combination of IF, ELSE IF, ELSE, and END IF statements to create branching logic in your test flows.

If an IF statement doesn't have a corresponding END IF, the user cannot save the test. Such errors are highlighted in red to help identify missing closing statements.

Conditional Statements

IF / ELSE IF

Used to create conditional branches in test execution.

FeatureDescription
DescriptionTakes custom JavaScript as input that must evaluate to TRUE or FALSE. If the condition returns true, subsequent steps in the test block are executed.
Parameter optionsCustom Script
Advanced optionsNone
Return valueTRUE or FALSE
IF conditional

ELSE

Creates an alternative execution path.

FeatureDescription
DescriptionUsed to create an alternative path for test execution when the preceding IF or ELSE IF conditions evaluate to FALSE
Parameter optionsNone
Advanced optionsNone
Return valueNone

END IF

Closes a conditional block.

FeatureDescription
DescriptionUsed to end a conditional block, marking the conclusion of IF/ELSE IF/ELSE statements
Parameter optionsNone
Advanced optionsNone
Return valueNone