Use standard objects

Standard objects help you structure your test cases and design them to react to specific conditions or criteria.

You can find all logic elements in the left pane of the test case editor, under Standard objects.

This topic is about logic elements. For more information on recovery and cleanup scenarios, check out Use recovery and cleanup scenarios.

Use structural objects

You can group related test steps, so that even complex test flows are easy to read and work with:

  • Go to Standard objects > Structural objects > Test step folder and add the folder to your test case.

  • Drag and drop test steps into the folder.

Use conditions and loops

Conditions and loops give you more flexibility in changing test environments. With a condition, your test case goes through different steps, depending on an evaluation. You don't have to design different test cases to cover the same testing scope.

To use a condition or loop, simply add it onto your test case and add your steps to it.

Conditions and loops consist of these elements:

  • IF: Test steps that you want to evaluate. To evaluate steps, use verifications and the standard module Evaluate expression.

  • ELSE: Test steps that Tosca Cloud performs when at least one test step in your IF fails.

  • WHILE: Tosca Cloud creates a loop that runs test steps repeatedly until the condition is no longer fulfilled.

  • DO: Tosca Cloud creates a loop that runs test steps repeatedly until the condition is no longer fulfilled.

Change the maximum number of repetitions

By default, WHILE and DO loops have a maximum of 30 repetitions. You can change this value. To do so, go to the Properties tab and enter the number of repetitions you want for the maximum.

What's next

Check out other test design elements that help you build better test cases, faster:

You're done building? Do a trial run of your test case, so you can find and fix instabilities before you run your tests in earnest.