# Prerequisites

{% hint style="info" %}
**Who is this for?** SDETs and QA managers preparing to run their first mobile tests on ContextQA — covering APK/IPA requirements, iOS provisioning profiles, and device farm access.
{% endhint %}

Before you can create and execute mobile test cases in ContextQA, you need the correct app binary, any platform-specific signing artifacts, and an understanding of device farm availability. This page covers all three.

## Android Prerequisites

### APK File

You need a valid `.apk` file for the app under test. This is typically a debug build or an internal distribution build — not the release artifact published to the Play Store, which is often split or bundle-optimized.

Requirements for the APK:

* File extension must be `.apk`
* Must target Android API level 21 (Android 5.0 Lollipop) or higher
* Must be a universal APK (not an Android App Bundle `.aab`); if your pipeline produces `.aab`, use `bundletool` to convert it to a universal APK before uploading
* Debuggable builds are recommended for full automation access; release builds may restrict certain automation hooks

There is no required minimum device API level beyond what the APK itself declares in its `minSdkVersion` manifest attribute. ContextQA will reject execution if the selected device's OS version is below the app's declared minimum.

### No Additional Signing Required

Android APKs do not require special certificates for installation on ContextQA's device farm. Debug-signed APKs install without issue.

## iOS Prerequisites

### IPA File

You need a valid `.ipa` file. This must be built for **ad-hoc** or **enterprise** distribution — App Store builds are encrypted and cannot be installed outside the App Store pipeline.

Requirements for the IPA:

* File extension must be `.ipa`
* Must be built with an ad-hoc or enterprise distribution certificate
* Must be signed with a provisioning profile that includes ContextQA's device UDIDs (contact ContextQA support to obtain the current UDID list for the device farm)
* Bitcode-stripped builds are preferred; fat binaries are supported

### Apple Developer Account

An active Apple Developer Program membership is required to generate ad-hoc distribution certificates and provisioning profiles. Enterprise Distribution Program accounts can use enterprise-signed IPAs without UDID registration.

### Provisioning Profile Upload

Every iOS test run requires a matching `.mobileprovision` file registered in your ContextQA workspace. Without it, the platform cannot install the IPA on its managed devices.

**To add a provisioning profile:**

1. Navigate to **Settings → Provisioning Profiles** in the ContextQA workspace.
2. Click **Upload Provisioning Profile**.
3. Select the `.mobileprovision` file from your local machine.
4. Confirm the upload. ContextQA displays the profile name, team ID, expiry date, and included device UDIDs after parsing.

Provisioning profiles expire on the date set by your Apple Developer account (typically one year for ad-hoc profiles). ContextQA does not automatically renew them — replace the profile before it expires to avoid execution failures.

**Profile scope:** A provisioning profile is workspace-scoped. All team members in the workspace can run iOS tests against any uploaded IPA once a valid profile is in place.

## Device Farm

### Available Devices

ContextQA's device farm includes a curated set of Android and iOS devices across multiple OS versions. To see the full current list of available devices, use the `get_test_devices` MCP tool:

```python
# MCP tool call — list all available browsers and mobile devices
get_test_devices(query="mobile")
```

The response includes device name, OS platform, OS version, and availability status. Refer to this list when configuring test plans to ensure the device/OS combination you need is available.

### Mobile Concurrency Slots

Each workspace is allocated a fixed number of concurrent mobile device slots. Attempting to run more parallel streams than available slots causes queuing. Check current availability before scheduling large parallel runs:

```python
# MCP tool call — check mobile slot availability
get_mobile_concurrency()
```

The response indicates total slots and currently occupied slots. If all slots are in use, schedule the run during off-peak hours or contact ContextQA support to discuss capacity upgrades.

### Regional Availability

ContextQA's device farm is hosted in cloud infrastructure. Device availability is global — you do not need to select a region. Test execution latency is managed by the platform; test steps that interact with a network-dependent app should account for the fact that the device's network egress is from the cloud region where the farm is hosted.

## Summary Checklist

| Requirement              | Android                     | iOS                                     |
| ------------------------ | --------------------------- | --------------------------------------- |
| App binary               | `.apk` (universal, API 21+) | `.ipa` (ad-hoc or enterprise signed)    |
| Signing artifact         | Not required                | `.mobileprovision` uploaded to Settings |
| Apple Developer account  | Not required                | Required                                |
| Device UDID registration | Not required                | Required for ad-hoc profiles            |
| ContextQA workspace      | Required                    | Required                                |
| Mobile concurrency slots | Shared pool                 | Shared pool                             |

Once these prerequisites are in place, proceed to [Uploading Apps](https://learning.contextqa.com/mobile-testing/uploading-apps) to add your app binary to the workspace.

{% hint style="info" %}
**Test iOS and Android in parallel — same workflow as web.** [**Book a Demo →**](https://contextqa.com/book-a-demo/) — See ContextQA automate mobile testing for your iOS and Android apps.
{% endhint %}
