Buffer Operations

The folder TBox Automation Tools->Buffer Operations in the Standard subset contains the following Modules:

For information on how to use buffered values in your TestCases, see chapter "Text expressions".

TBox Set Buffer

Use the Module TBox Set Buffer to perform one of the following actions:

  • Create a Buffer with a particular value.

  • Verify the value of an existing Buffer.

The Module has the following ModuleAttribute:

ModuleAttribute

Description

<Buffername>

Replace <Buffername> with the name of the Buffer.

  • To save a value to the Buffer, enter the desired value into the Value column. Use ActionMode Input.

  • To verify the value of the Buffer, enter the value in question into the Value column. Use ActionMode Verify.

This example shows how to work with TBox Set Buffer.

  • The first TestStep saves the value 12345 to a Buffer named ExampleBuffer.

  • The second TestStep checks whether the value of the Buffer named ExampleBuffer is 12345.

TBox Set Buffer example

TBox Name To Buffer

This Module allows you to buffer the name of the TestCase that uses the Module.

You can buffer the name of a TestCase if you run the TestCase via ExecutionList in the Execution section. ScratchBook does not support this functionality.

The Module TBox Name To Buffer has the following ModuleAttribute:

ModuleAttribute

Description

Buffer

Name of the buffer to which you want to save the TestCase.

Use ActionMode Input.

In this example, you write the name of the TestCase TestCase 12345 to a Buffer named TC_Name.

TBox Name To Buffer example

TBox Partial Buffer

Use this Module to perform the following actions:

  • Buffer parts of a value.

  • Verify parts of a buffered value.

The Module TBox Partial Buffer has the following ModuleAttributes:

ModuleAttribute

Description

Buffer

Name of the Buffer.

Value

Value you want to buffer or verify.

Start

Character index from which you want the system to start buffering or verifying the value.

End

Character index that ends the value you want to buffer or verify.

Last

Number of characters you want to buffer or verify, starting from the last character.

If you set this value, Tosca Commander ignores the ModuleAttributes Start and End.

This example shows how to create and verify a partial Buffer.

  • The first TestStep creates the Buffer ExampleBuffer with the value Value 12345.

  • The second TestStep writes the last 5 characters of ExampleBuffer to the partial Buffer named PartialBuffer.

    Consequently, the value of PartialBuffer is 12345.

  • The third TestStep checks whether the value of PartialBuffer is 12345.

Set and verify a partial Buffer

TBox Delete Buffer

This Module allows you to remove individual or all existing buffers from the following places:

  • Settings dialog

  • Settings.xml file

It has the following ModuleAttribute:

ModuleAttribute

Description

Buffer

Name of the Buffer that you want to delete. Use ActionMode Select.

If you don't enter a specific name, Tricentis Tosca deletes all existing buffers.

The TestStep in this example deletes the Buffers Buffer1 and Buffer2.

Delete two Buffers