Timing

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

TBox Start Timer and TBox Stop Timer

Use the Modules TBox Start Timer and TBox Stop Timer to measure execution time.

You can set multiple timers with different names in any order. However, you must start and stop a timer within the same TestCase.

You cannot use this functionality to measure time across multiple TestCases.

TBox Start Timer

This Module starts the timer. It has the following ModuleAttribute:

ModuleAttribute

Description

ID

Name of the timer.

TBox Stop Timer

This Module stops the timer. After execution, you can view the result in the Loginfo column of the ExecutionEntry. Additionally, Tricentis Tosca saves the result to a Buffer with the name of the timer.

The Module TBox Stop Timer has the following ModuleAttributes:

ModuleAttribute

Description

ID

Name of the timer that you want to stop.

Maximal Duration

You can compare the actual timer result with an expected result.

Enter the expected result in milliseconds into the Value column and use ActionMode Verify.

In this example, Tricentis Tosca performs the following actions:

  • Starts the timer with the name Timer1

  • Executes Example TestStep1 and Example TestStep2

  • Stops the timer with the name Timer1

  • Verifies that the execution didn't take longer than 2000 milliseconds

Time execution

TBox Wait

In some cases, you might need delays between TestCases or TestSteps. For instance if you want to open a web application that requires time to load.

With the Module TBox Wait, you can specify wait times at any point.

The Module has the following ModuleAttribute:

ModuleAttribute

Description

Duration

Time in milliseconds that you want Tricentis Tosca to wait between TestSteps or TestCases.

In this example, Tricentis Tosca waits 5000 milliseconds before it continues with the next TestStep.

Define a wait time