# Testing

**Base test elements**

To perform base testing you may use Verify expression and Verify expression with operator elements. These elements execute given expression and throw exception in case of failure. When project starts all test elements show <img src="https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-e2755a2726f7444d6f985f6a340f1a36c11abf3e%2FTestNone.png?alt=media" alt="" data-size="line"> icon, but after verification they change it to <img src="https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-940dbce8d1e24741afdbba59599854f68e913c8e%2FTestSuccess.png?alt=media" alt="" data-size="line"> on success or <img src="https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-587921026899da7dc8d4ca6517609fb7e9f783aa%2FTestFail.png?alt=media" alt="" data-size="line"> in case of failure.

Verify output with operator is more complex element. This element executes supplied element (Get attribute for example) and verifies it's output with given expression. The most useful case for this element is UI-testing.

**Test data**

Test data source is a part of the project and specifies in process properties

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-af8db326c911c715d76e369aa99363f60e8bb075%2Fimage%20\(70\).png?alt=media)

Test data path may be absolute or relative. Test data file is an Excel document in a special format:

| Variable 1 name | Variable 2 name | Variable n name |
| --------------- | --------------- | --------------- |
| Value 1         | Value 2         | Value 3         |
| Value 1n        | Value 2n        | Value 3n        |

In order to get a value from the file you need to use Get next local test data element. This element can either set test data into a variable or map data to variables by their names.

You may create test data file manually or using current variables values by clicking Process -> Dump variables menu and setting path to test data file in a window

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-3b8aceda0c6fa28eb81a35cba1af0367f424099d%2Fimage%20\(24\).png?alt=media)

**Mocks**

Mock element has two containers: Element and Mock

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-a77f6953684c2126df29406c18b9bf150b16ee81%2Fimage%20\(43\).png?alt=media)

Element container executes if the mock is turned off and Mock container executes if on. Turning the mock on and off is available through it's properties or by clicking <img src="https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-38c152251a1f1983c2b6ba0b3233ecd6d9c8d004%2FWFMock.png?alt=media" alt="" data-size="line"> button in Studio menu.
