---
description: Use the FinalRun CLI to run your tests in the cloud from any CI platform.
---

# Integrations with any CI platform

### Prerequisites

#### Required Components

* **FinalRun API Key** - Obtain from your FinalRun dashboard
* **App tag -** Obtain from your FinalRun dashboard in Apps Section for the specific app
* **CI Environment** - Any platform supporting shell commands

#### Platform Requirements

**Android**

* Your APK must be x86-compatible
* Built with Gradle: `./gradlew assembleDebug`

**iOS** (Future Support)

* Provide a path that points to an x86-compatible `*.app` simulator build directory

### 2. Run Flows in the cloud <a href="#id-2.-run-flows-in-the-cloud" id="id-2.-run-flows-in-the-cloud"></a>

**1. Install the Finalrun CLI**

First, ensure that the Finalrun CLI is installed on your CI machine:

```
curl -Ls "https://get-cli.finalrun.app/install.sh" | bash
```

**2. Run the Finalrun execute command**

```
finalrun-cli execute --api-key=APIKEY --app APP_TAG=APK_FILE_OR_APP_FILE
```

### FinalRun CLI Exit Codes

The finalrun-cli returns standard POSIX exit codes to indicate execution status, making it suitable for CI/CD integration and automated workflows.

#### Exit Code Reference

<table data-header-hidden><thead><tr><th width="95.9375"></th><th width="150.85546875"></th><th></th><th></th></tr></thead><tbody><tr><td>Code</td><td>Status</td><td>Description</td><td>Common Scenarios</td></tr><tr><td>0</td><td>Success</td><td>All operations completed successfully</td><td><p>• All tests passed</p><p>• No test suites configured (nothing to fail)</p></td></tr><tr><td>1</td><td>Test Failure</td><td>One or more tests failed</td><td><p>• Test cases failed during execution</p><p>• Test execution was aborted by user/system</p></td></tr><tr><td>2</td><td>System Error</td><td>Configuration or execution error</td><td><p>• API communication failure</p><p>• Test execution timeout</p><p>• Unknown test status</p><p>• Failed to create test run</p></td></tr></tbody></table>



\
