ActionMode Buffer

Tosca allows values or control properties to be saved to a global buffer for variables and to be extracted at any position during test execution.

Any existing buffer values can be accessed via the Settings dialog (see chapter "Settings - Engine").

Examples of buffers in tables

Using Buffers: a How-To Guide

Buffering values

Buffers are temporarily saved to the section Buffer of the Settings dialog under Settings->Engine.

To buffer a value in the Settings dialog, a Buffer name and a Buffer value are required.

View of buffered values in the Settings dialog - Settings->Engine->Buffer

  1. Specify the buffer name in the Value field of the TestCase. You may also use dynamic expressions, e.g. {Date} for the current date (see chapter "Dynamic expressions").

  2. Set the ActionMode to Buffer.

  3. The value of the control is read from the test object as the buffer value.

In this example, the value automobile is set as the buffer name. The value from the application for the buffer name automobile is copied to the Settings dialog as a buffer value.

Setting the buffer value

If you need to delete multiple buffers, delete them in the Settings dialog.

Buffering the value of a control property

The syntax <Buffername>=.<Property> is specified in the Value column in order to buffer the value of a control property. The value of a control is read and saved as a buffer value (True or False).

The example below verifies whether the Restart button is enabled. The result of the verify operation is saved to the Settings dialog with the buffer name Test01.

Buffering the control property

Using the buffer value

Previously buffered values can be extracted and used at any position during test execution.

Buffer values are read from the Value column with the following syntax:

Syntax:

{B[<Buffername>]}

The auto-completion function allows buffer variables to be entered. Any values that have been previously saved can be selected from a drop-down list.

In this example, the value stored under the name automobile is extracted from the buffer during test execution.

Extracting the buffer value

Dynamic comparisons - XBuffer

The XBuffer allows you to read dynamic values of a string and to buffer them using the ActionMode Verify. The following syntax is used within strings:

Syntax:

{XB[<Buffername>]}

The area between Transfer order and has been created is excluded from verification.

This area is buffered under the buffer name OrderID.

Dynamic comparisons