Upload and install the App

This document provides details on how to upload your native mobile app, select an appropriate device, and install the app onto it.

Step 1: Upload your app

Upload your Android app (.apk file) or iOS app (.ipa file) to the Mobitru using our REST API. Here is an example cURL request to upload the app :

curl --location --request POST 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/v1/spaces/artifacts' \
--header 'x-File-Name: AppDemo.apk' \
--header 'X-Content-Type: application/zip' \
--header 'Authorization: Bearer <ACCESS_KEY>' \
--form 'file=@"/path/to/app/file/app-debug.apk"' \
--form 'checksum="None"'

Below you can find a sample of the response with an id of the uploaded app:

{
    "id": "b7b0aae5-a839-4c15-b6ba-98edb75d07a1",
    "name": "22d69718-59a9-40c6-809c-0e3d4a7313b7.apk",
    "realName": "AppDemo.apk",
    "bid": "916f0549-4ddc-491a-9fe7-3f27597fd3b7",
    "wid": "0",
    "private": true,
    "uploadedBy": "test_user@epam.com",
    "uploadedAt": 1670264922,
    "verified": false,
    "target": "android",
    "contentType": "application/zip",
    "contentLength": 0,
    "href": "quarantine/22d69718-59a9-40c6-809c-0e3d4a7313b7.apk",
    "checksum": "None",
    "alias": "automation",
    "apk": null,
    "ipa": null
}

Step 2: Find and take a device

Find and take an appropriate device using our APIs.

Here is an example of cURL request to find a device via API:

Android:

curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/android?model=Pixel 6' \
--header 'Authorization: Bearer <ACCESS_KEY>'

iOS:

curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/ios?version=16.2' \
--header 'Authorization: Bearer <ACCESS_KEY>'

Below you can find a sample of the response with capabilities for found devices:

Android:

[
    {
        "desiredCapabilities": {
            "platformName": "Android",
            "platformVersion": "12",
            "deviceName": "GOOGLE Pixel 6a",
            "udid": "26281JEGR04493"
        }
    },
    {
        "desiredCapabilities": {
            "platformName": "Android",
            "platformVersion": "12",
            "deviceName": "GOOGLE Pixel 6",
            "udid": "19161FDF600DJP"
        }
    },
    {
        "desiredCapabilities": {
            "platformName": "Android",
            "platformVersion": "13",
            "deviceName": "GOOGLE Pixel 6 Pro",
            "udid": "1A281FDEE007T3"
        }
    }
]


iOS:

[
    {
        "desiredCapabilities": {
            "platformName": "iOS",
            "platformVersion": "16.2",
            "deviceName": "IPHONE iPhone13,3",
            "udid": "00008101-00042D8A1190001E",
            "automationName": "XCUITest"
        }
    },
    {
        "desiredCapabilities": {
            "platformName": "iOS",
            "platformVersion": "16.2",
            "deviceName": "IPAD iPad12,1",
            "udid": "00008030-001E79460A10C02E",
            "automationName": "XCUITest"
        }
    },
    {
        "desiredCapabilities": {
            "platformName": "iOS",
            "platformVersion": "16.2",
            "deviceName": "IPHONE iPhone13,2",
            "udid": "00008101-001219601A51003A",
            "automationName": "XCUITest"
        }
    }
]

Here is an example of cURL request to take a device via API :

Android:

curl --location --request POST 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/26281JEGR04493' \
--header 'Authorization: Bearer <ACCESS_KEY>'

iOS:

curl --location --request POST 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/00008101-00042D8A1190001E' \
--header 'Authorization: Bearer <ACCESS_KEY>'

Below you can find a sample of the response with capabilities for the device:

Android:

{ 
    "desiredCapabilities": {
        "platformName": "Android",
        "platformVersion": "12",
        "deviceName": "GOOGLE Pixel 6a",
        "udid": "26281JEGR04493"
    }
}

iOS:

{
    "desiredCapabilities": {
        "platformName": "iOS",
        "platformVersion": "16.2",
        "deviceName": "IPHONE iPhone13,3",
        "udid": "00008101-00042D8A1190001E"
    }
}

Step 3: Install the app on the device

Install the App on the Device before starting the first test.

Here is an example of cURL request to install the app via API (udid from step 3 and app id from step 2):

curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/storage/install/26281JEGR04493/b7b0aae5-a839-4c15-b6ba-98edb75d07a1' \
--header 'Authorization: Bearer <ACCESS_KEY>'

As a result, you will receive 201 Created response.

Scroll to Top