Skip to content

Appium

We also provide appium web server implementation for your tests.

All what you need is access to our API and a few additional settings in your tests.

Common settings#

APPIUM_PORT = 80

APPIUM_HOST = 'http://emcee.cloud/api/v1/wd/hub'

Authorization#

As far as we use cookie with API token for authorization, you need to put this cookie in every request from your Appium client.

Here is an example of how this can be done with appium-python-client:

Just customise default AppiumConnection as shown below:

class CustomAppiumConnection(AppiumConnection):
    @classmethod
    def get_remote_connection_headers(cls, parsed_url: 'ParseResult', keep_alive: bool = True) -> Dict[str, Any]:
        headers = {'cookie': 'emcee_token={YOUR_EMCEE_API_TOKEN}}
        headers.update(super().get_remote_connection_headers(parsed_url, keep_alive))
        return headers

Timeouts and Retries#

Session start timeout#

We have global 5 minute timeout on session creation (including waiting for available resources).

For the best experience, we recommend using Appium clients built-in retries mechanism.

To continue with the Python example, simply pass additional poll manager parameters:

command_executor = CustomAppiumConnection(
        f'https://emcee.cloud/api/v1/wd/hub',
        keep_alive=True,
        init_args_for_pool_manager={
            'retries': urllib3.Retry(total=5, status_forcelist=[408, 503, 504], allowed_methods=['POST'])
        }
    )
driver = webdriver.Remote(command_executor, options=options, direct_connection=False)

IDLE aka newCommandTimeout#

By default, this timeout is set to 2 minutes.

You can increase it by setting appium:newCommandTimeout capability, but the maximum value cannot exceed 10 minutes.

Application binary#

The path to the application is configured via appium:app capability.

ex: 'appium:app': 'https://emcee.cloud/api/v1/file/download/123'

The application file must be available for download via a link from a remote service.

For simplicity, we recommend that you upload files to our service and use the links you receive.

But you can also use any other service that meets the requirements: the file is available by direct link and GET method without authorization.

Android#

We use devices with 1080х1920 resolution and 420dpi. Keep this in mind when writing tests.

We currently support:

os
API 31 (12.0) ✅
API 33 (13.0) ✅
API 34 (14.0) ✅

If you need other versions please contact us.

Capabilities:

{
  "appium:app": "{URL_TO_YOUR_APP_BINARY}",
  "browserName": "android",
  "browserVersion": "12.0"
}

iOS#

We currently support:

device/os 16.4 17.2
iPhone 12 ✅
iPhone 14 ✅ ✅

If you need other versions or devices please contact us.

Capabilities:

{
  "appium:app": "{URL_TO_YOUR_APP_BINARY}",
  "browserName": "iPhone 14",
  "browserVersion": "16.2"
}

Appium tariffication#

For billing purposes, we use the time elapsed from the moment Appium session is created to the moment session is deleted.

By default, we use a 2 minutes timeout after which the session will be terminated.

But since this timeout can be controlled client-side, we strongly recommend setting it carefully and correctly terminating the session by calling driver.quit() or a similar command.