# Integrations with any CI platform

### Prerequisites

#### Required Components

* **FinalRun API Key** - Obtain from your FinalRun dashboard
* **App Name** - The exact app name as it appears in your FinalRun dashboard (Apps section)
* **CI Environment** - Any platform supporting shell commands

{% hint style="info" %}
**Note**: App names are **case-sensitive** and must match exactly as shown in the FinalRun dashboard.
{% endhint %}

{% embed url="<https://youtu.be/IqywnR-UcAo>" %}

#### 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="YOUR_API_KEY" \
  --app="App Name=/path/to/app.apk"
```

### 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>

<br>
