Looking for something in particular?

If Test Step

This test step evaluates a boolean condition to determine which sub-steps will be executed. A different set of sub-steps can be defined for either result.

This test step is most useful when you need to execute certain steps based on the value of a variable, which is set dynamically during the test run. The variable is checked against the expected value, which returns either TRUE or FALSE as output.

Drag the If test step from the Test Palette into your test case.

Update the following parameters:

  • Condition: The IF condition to be evaluated, resulting in an output of TRUE or FALSE
    Note: In the screenshot above, the condition checks to see if the “flag” variable is equal to “1.” When calling a variable using Content Assist, the variable is in curly brackets. The condition must also be put inside the curly brackets to be evaluated correctly. String values must be put in quotes or else the expression will not produce the desired outcome.
  • Then: This is a grouping of sub-steps that should be executed only when the IF Condition evaluates to TRUE. This grouping is required and is added automatically under the IF step
  • Else: This is an optional grouping of sub-steps, which should be executed only when the IF Condition evaluates to FALSE. See below for how to add this clause

To add an Else clause to the If statement, right-click on the If test step and select the Add an Else Clause option:

Then, save the test case.

For more information, check out this course on University of Provar.

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top