# 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="/files/n7cOZ3zkxCTi5UaUPaMP" alt="" data-size="line"> icon, but after verification they change it to <img src="/files/kfQdh8jn4CNxPPYc9UbD" alt="" data-size="line"> on success or <img src="/files/ry1xHMs6drEj6AUDgmpv" 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

![](/files/thUsD2NyY6F0KJuwDOeL)

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

![](/files/926NeAXjz9IRjFUKAV0R)

**Mocks**

Mock element has two containers: Element and Mock

![](/files/SUlNZ9sQDmAnMhuEXMHy)

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="/files/P9TcgVrWxA2N7lCZex6X" alt="" data-size="line"> button in Studio menu.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astro-rpa.gitbook.io/astro-rpa-user-guide/astro-studio/testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
