Appium integration

Suitest allows users to run the tests written in Appium on Suitest supported platforms.

Beta version

Please note that the current Appium integration is in Beta version. Therefore some of the features may not work as expected.

Prerequisites

Starting with integration

  1. Prepare the following information from Suitest

  2. Adjust your configuration file. Add or modify there the following lines:

    "hostname": "the.suite.st",
    "path": "/api/public/v4/wd/hub",
    "protocol": "https",
    "port": 443,
    
  3. Open your Appium project and insert the following capabilities

    "capabilities": {
        "platformName":"chosen platform",
        "browserName":"my string",
        "appium:automationName":"suitest",
        "suitest:tokenId":"your token ID",
        "suitest:tokenPassword":"your token password",
        "suitest:deviceId":"your device ID",
        "suitest:appConfigId":"your app configuration ID"
    }
    

    Where:

  4. Execute your Appium project

Supported commands

Limited support

The table below displays the support of commands as planned for the final version of the integration. At the moment, commands are fully supported only on platforms listed below. Support on other platforms is currently only partial and will be finished one by one in the following months.

Fully supported platforms:

  • Android
  • Browsers
  • HbbTV / Freeview Play
  • LG webOS / Netcast
  • NextGen TV / ATSC 3.0
  • Playstation 4/5
  • Samsung Tizen / Orsay
  • Sky
  • VIDAA
  • Vizio SmartCast
  • Xbox One - HTML apps
  • Xfinity / Xumo TV / XClass TV
  • Other Smart TVs and STBs - HTML apps

Pressing VRC/keyboard buttons

When running your Appium tests on devices in Suitest, you need to control the device. Suitest has several ways to send key/button presses to your devices depending on a platform.

Platform VRC Presses Sending text to app Sending text to element
Android ✓ (text only) ✓ (as sendText)
HbbTV - ✓ (as setText)
HTML-based - ✓ (as setText)
iOS - ✓ (as setText)
PlayStation - ✓ (as setText)
Roku ✓ (text + Enter button) ✓ (as sendText)
Roku Lite ✓ (text + Enter button) -
Tizen ✓ (text only) ✓ (as setText)
Webos - ✓ (as setText)
Websites - ✓ (complete keyboard) ✓ (as sendText)
Xbox - ✓ (as setText)

Button codes to be used for VRC Presses can be found as Unicode values in the constants section of our user documentation. Besides that, you need to use the value of id equal to VRC. See an example below:

[
    {
        "type": "key",
        "id": "VRC",
        "actions": [
            {"type": "keyDown", "value": "\uE501",}
        ] 
    }
]

Long presses

Suitest integration also allows you to use a long button/key press operation. Please see the example below:

[
    {
        "type": "key",
        "id": "VRC",
        "actions": [
            {"type": "keyDown", "value": "\uE501", "duration":1000}
        ]
    }
]

Opening the application

The way of application opening depends on the platform. Examples in the sections below are written in JavaScript.

Testing on mobile devices

When testing on mobile devices in Suitest, you can open your application using Launch App command.

await driver.launchApp();

Testing on other devices

When testing on non-mobile devices in Suitest, you can open your application using Go To URL command. This command has one string argument, which should always equal to suitest://openapp value.

Exact usage depends on a driver used, here is an example for using WebdriverIO:

await driver.url("suitest://openapp");

The list of other supported commands

Command type Command name Supported on platforms
- Status all
Session Create New Session all
Session End Session all
Session Get Session Capabilities all
Device Take Screenshot see here
Device Set Orientation see here
Device Close an App see here
Element Clear Element see here
Element Find Element HTML-based platforms *
Element Get Tag Name HTML-based platforms *
Element Get Element Attribute HTML-based platforms *
Element Get Element CSS Value HTML-based platforms *
Element Get Element Location HTML-based platforms *
Element Get Element Rect HTML-based platforms *
Element Get Element Size all
Element Get Element Text all
Element Is Element Displayed HTML-based platforms *
Element Is Element Enabled HTML-based platforms *
Element Is Element Selected HTML-based platforms *
Interaction Click see here
Interaction Tap see [here] (../testing/test-operations/tap-operation/#single-tap-on-the-target)
Interaction Long Tap see here
Web navigation Get URL HTML-based platforms *
Web navigation Go Back Browsers only
Web navigation Go Forward Browsers only
Web navigation Go to URL HTML-based platforms *
Web navigation Refresh Browsers only