Document toolboxDocument toolbox

Adding Conditional Blocks

Inserting Task Level IF-ELSE Blocks

Adding ELSE IF block after IF

Adding Multiple ELSE IF Blocks

Adding ELSE Block after IF Step


Adding Expression for IF Step

Adding IF-ELSE Blocks to Test Case

On Test Case screen, users can add conditional blocks to Task as well as Test Case. Test Case level IF-ELSE blocks can contain tasks, the tasks contained in turn can have task level IF-ELSE blocks.
With this version of Qualitia, new button "If-Else" is added at top right, click "If-Else" to add Task level or TC level IF ELSE blocks.

Use the following steps to add a Test Case level If-ElseIf-Else block:

  1. Focus/Select TC Step/Task after which you wish to add TC level IF-ELSE block.
  2. Click on Condition->TC Condition->IF.
  3. Select IF step of block, click on "TC Step" to add TC step.
  4. Select TC step, just added and click on Condition->TC Condition->ELSE IF to add TC level ELSE IF block. Or Condition->TC Condition-> ELSE to add ELSE block.

Adding tasks in Test Case level IF-ELSE blocks

Use the following steps to add one or more tasks in a TC level IF-Else Block.

  1. Select TC Step/Task after which you wish to add TC level IF-ELSE block (within which you wish to add a task).
  2. Click on Condition->TC Condition->IF.
  3. Select newly added IF step of block, click on "New Task" to add new task or Import Task to add existing task to IF-ELSE block.
  4. To add tasks to ELSE-IF or ELSE blocks, select the ELSE-IF or ELSE step of conditional block and click on "New Task" or "Import Task".

Adding IF-ELSE blocks to Task in Test Case

Use the following steps to add If-Else block to a task in a TC.

  1. Create a new test case and add a new/existing task to this test case.
  2. Select the step of the task after which the conditional block needs to be added, or the task row to which the block needs to be added.
  3. Click on Condition->Task Condition->IF.
  4. Once If block is added to task, ELSE IF or ELSE blocks can be added by selecting proper task step and clicking on Condition->Task Condition->ELSE IF or Condition->Task Condition->ELSE.
  5. For adding expression, double click IF or ELSE IF.
  6. Syntax of expression is as described in following sections.

Forming Expression for IF /ELSE IF

Expressions can be entered in IF and ELSE IF conditional step. User can refer stored variables, environment variables in expression.

  1. Numeric, Boolean comparisons, string values and arithmetic operators are allowed.
  2. If you use Environment variables and stored variables, you must include them in curly braces in an expression.
  3. You can save the execution status of last executed step as $$_STATUS using StoreVariable keyword, Or directly use $$_STATUS in expression ($$_Status is not case sensitive).
    1. Using $$_STATUS directly in expression.

    1. Saving status of step ($$_STATUS) for use in expression.

You can save the execution status of a step in variable. This status can later be used in expression of IF step.

    1. Saving execution status for future reference.


More about $$_Status

  • $$_Status is not case sensitive
  • It gets overridden after each step is executed, hence can store the status of last executed step only.
  • Values of $$_STATUS variable

    Value

    Description

    0

    Success

    1

    Fail

    2

    Defect

    -1

    Not executed

  • $$_Status does not store any status for conditional steps like "IF", "ELSE IF", "ELSE" and "END IF".
  • If a user declares environment variable named "$$_STATUS", its value is ignored.

Not finding what you need?