Skip to Content

Testing

Basic Testing Elements

For basic testing, the Verify Expression and Verify Expression with Operator elements are used. These elements evaluate a specified expression and generate an exception if the verification fails. At the start of project execution, a test icon is set for the testing components testing1.png, and after execution, either testing2.png upon success or testing3.png in case of failure.

A more complex element is Verify Results with Operator. It executes a built-in element (e.g., getting an attribute) and compares its result with a specified expression. The most suitable use case for this element is UI testing.

Test Data

Test data is part of the project and is set in the process properties window:

testing4.png

The path to the test data can be absolute or relative. Excel format files are used as test data:

Variable Name 1Variable Name 2Variable Name n
Value 1Value 2Value 3
Value 1nValue 2nValue 3n

Values from the test data array can be obtained using the Get Next Local Test Data element. The component can either load the data into a variable or automatically set values to all variables by name.

Test data can be created manually or generated based on existing variable values using the Debug ➝ Dump variables menu, after which the path to the save file is specified in the opened window:

testing5.png

Mocks

The Mocks element has two subcontainers: Element and Mocks.

testing6.png

The sequence in the Element subcontainer is executed if the mock is disabled, and the elements in the Mocks container if enabled. The operation of individual mocks can be controlled from their properties, and the response to enabled mocks is configured using the testing7.png button on the Debug menu tab.

More detailed information about the element is described in the Mocks section.

Last updated on