# Creation & Configuration

With aqua, you can run automated tests. The procedure for running an automated test is the same as for a manual test. You simply click on the Run button in a given test case. The following dialogue is supplemented by a section for selecting an agent. The Agent is responsible for running the test.&#x20;

:red\_circle: Red indicates that the agent is unavailable.

:green\_circle: Green indicates an execution agent waiting for a task.

<figure><img src="/files/Pa04NInYnHZtQWxGoEJa" alt=""><figcaption><p>Running automated test case with the agent</p></figcaption></figure>

The following chapters describe how to configure the agents using the web client for:

* PowerShell&#x20;
* Unixshell
* Jenkins&#x20;

{% hint style="info" %}
To set up additional automation tools such as Ranorex, JMeter or SoapUI, or even database queries, you will need to use the aqua dekstop client. Please refer to the automation chapter for the Desktop Client: [article](https://app.gitbook.com/o/kSM9ccXYoQwlhfFqpEsn/s/yZbW8vbNs5hz8x57emJJ/~/changes/52/automation/desktop-client) for further information.
{% endhint %}

##

## Creating an Automation Agent

To run an automated test case, an aqua agent must be configured. Each agent has a unique access code. The code is generated in aqua and assigned to the agent. The agents can then be installed on any computer as long as there is a connection to the aqua server. Once installed and configured, the agents simply communicate between aqua and the respective automation tool, starting test executions and returning results to aqua.

## Retrieving an agent code

To retrieve an Access Key, select your project in the Project Browser and click on the hamburger menu on in the top left corner of the aqua header, or simply right-click on the project name. In the Project Configuration area, select Automation Agents.

Then in the agents tab, select 'Configuration' and then 'Add agent'. Next, give a unique name to your agent.&#x20;

<figure><img src="/files/tKMx8i8ZQaKHoccph4Gf" alt=""><figcaption><p>Adding an automation agent</p></figcaption></figure>

An Access Key is automatically generated and is required to successfully configure an Agent. Copy the passcode to the clipboard or write it down for later use. The passcode is used as an identifier to properly differentiate between multiple Agents.&#x20;

{% hint style="danger" %}
Never configure two Agents with the same passcode.
{% endhint %}

<figure><img src="/files/LKLi37B5eq7AIiMrbRyO" alt=""><figcaption><p>Coping Access Key of the automated agent</p></figcaption></figure>

## Configuring an agent

The Access Code is required to configure the Agents. It must be included in the config file of the appropriate agent.

To download the agent package, please navigate to download section, available under the side menu and then select 'aqua Downloads'.

&#x20;

<figure><img src="/files/M188vHiDOlZ0RNxWLTm2" alt=""><figcaption></figcaption></figure>

Or undet the integrations page click on the 'Installation files' option.

<figure><img src="/files/QFb9kKbBpkE11bZgLpYo" alt=""><figcaption></figcaption></figure>

Another required piece of information is the aquaServiceUrl, which can also be found on the download page.

<figure><img src="/files/JwazLuSB3FiANVT6EdiP" alt=""><figcaption></figcaption></figure>

Once you download the agent package, the config file is located in the same folder as the agent exe file, for example aquaAgentPowerShell.exe.config for PowerShell or aquaAgentRanorexGui.exe.config for Ranorex.

The generated access code must be entered in this file. Other configurations can also be made in this file, depending on the agent type. In addition to the agentCode, the aquaServiceUrl needs to be provided as well. The correct aqua server name or server IP address must be entered there.

The relevant sections are shown in the following snippet, using the PowerShell agent as an example:

{% code fullWidth="true" %}

```xml
<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="agentCode" value="84f0voteb5xtym56p4lc" />
    <add key="aquaServiceUrl" value="https://aquaServerName/aquaAPI/aquaagentwebservice.asmx" />
    <...
  </appSettings>
  ...
...
</configuration>
```

{% endcode %}

Once you have correctly configured the Agent, you can start the Agent from the .exe file. The window that opens will show the connection status and other log messages.

<figure><img src="/files/R9t2SokckTzAto8iguIr" alt=""><figcaption><p>Agent's log window</p></figcaption></figure>

In the Automation Agents section in aqua:

:green\_circle: green dot will be displayed for this agent if the connection is successful (the view may need to be refreshed once)&#x20;

![](/files/PizkRtQBFIOds5GoZxGr) If an initial connection cannot be made, the dot will be grey.

:orange\_circle: If a connection has been made at least once, but is now lost, an orange dot will appear.&#x20;

<figure><img src="/files/G370lrs8JYr4HWT1offm" alt=""><figcaption><p>Availability of the agents</p></figcaption></figure>

If there is no connection, check whether the agent was started, whether error messages are displayed in the agent, and whether there is any connection to the aqua server. To run an automated test case with this agent, the agent must be started and configured correctly.


---

# 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://docs.aqua-cloud.io/documentation/automation/web-client/automation-agent/creation-and-configuration.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.
