> For the complete documentation index, see [llms.txt](https://docs.walnutai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.walnutai.ai/test-and-quality-management/test-management/cloud-execution.md).

# Cloud Execution

Cloud execution allows you to run test cases and test suites on remote infrastructure instead of your local machine. WalnutAI connects to the configured compute environment, provisions the required resources, and executes the tests remotely.

Before running tests in the cloud, configure a virtual machine from the Admin settings.

#### Steps to configure a virtual machine

1. Navigate to **Admin settings**.

<figure><img src="/files/58rgk4ayLuoWFBeOWAXI" alt=""><figcaption></figcaption></figure>

2. Select **Compute configuration**.

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

3. Click **Add Machine**.

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

4. Choose the compute type. WalnutAI supports the following compute providers:

* VM (SSH + Docker)
* Kubernetes (K8s Jobs)
* LambdaTest (Mobile Cloud)

5. Enter the required connection details.
6. **Compute configuration:** Provide a name for the machine that will be displayed while selecting the execution environment.

| Field | Description                 | Example           |
| ----- | --------------------------- | ----------------- |
| Name  | Name of the compute machine | Production Server |
| Type  | Compute provider            | VM                |

7. **Configure the SSH connection:** Enter the SSH credentials required to connect to the virtual machine.

| Field     | Description                                 |
| --------- | ------------------------------------------- |
| Host / IP | Public or private IP address of the machine |
| Port      | SSH port number                             |
| Username  | SSH username                                |
| Auth type | Authentication method                       |
| Password  | SSH password                                |

**Example:**

```
Host / IP: 192.168.1.100
Port: 22
Username: root
Auth type: Password
```

8. **Configure agent settings:** Agent settings control how WalnutAI provisions and executes tests on the machine.
9. **Workspace directory:** The workspace directory defines the location where repositories are cloned during execution.

```
~/walnut-workspaces
```

10. **Max concurrent agents**: Specifies the maximum number of WalnutAI agents that can run simultaneously on the machine.

```
5
```

11. **Idle timeout:** Defines the duration, in minutes, after which inactive sessions are terminated automatically.

```
60
```

12. **Max concurrent test cases:** This setting enables cloud execution for the machine.

* Set the value above `0` to enable the VM as a cloud runner.
* WalnutAI automatically detects the machine capacity during provisioning.
* The recommended concurrency limit is populated automatically.
* You can modify the value up to the detected limit.
* Setting the value to `0` disables cloud execution.

13. **Configure project access:**&#x20;

* Configure project access settings to control which projects can use a particular machine.
* Enable **All Projects** to make the machine available across all projects, or select specific projects to restrict access. If no projects are selected, WalnutAI automatically grants access to all projects by default.

**Set a default machine**

Enable **Set as default machine** to automatically use the configured VM during cloud execution.

**Execute test cases in the cloud**

After the virtual machine has been configured, you can execute test cases in the cloud.

1. Open the required project.
2. Navigate to the test case or test suite.
3. Click **Execute**.
4. Select **Cloud execution**.

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

5. Choose the configured virtual machine.

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

6. Start the execution.

WalnutAI provisions the selected machine and executes the test remotely.
