Skip to main content

Smart TV Test Options

Please see the examples below on how to customize your test run on the available Smart TV devices.

Specifying Appium Version

TestingBot will use the most recent, compatible, Appium version according to the device, OS and version you specify.

If you'd like to specify your own Appium version, you can do this with the appiumVersion capability.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "appiumVersion" => "latest"
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("appiumVersion", "latest");
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "appiumVersion": "latest"
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'appiumVersion': 'latest'
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["appiumVersion"] = "latest"
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));

Appium 2 Versions

We currently support these Appium 2 versions:

  • 2.11.3
  • 2.10.3
  • 2.9.0
  • 2.5.1
  • 2.4.1
  • 2.3.0
  • 2.2.1

If you specify "appiumVersion": "latest", TestingBot will automatically use the latest Appium version. You can also use latest-1, latest-2, ... to test on the next most recent versions of Appium.

Geolocation Testing

TestingBot provides an option where you can specify from which country you'd like to run the test from.

We will configure the Smart TV device to use a proxy that will route all traffic through the specified country.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "testingbot.geoCountryCode" => "DE"
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("testingbot.geoCountryCode", "DE");
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "testingbot.geoCountryCode": "DE"
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'testingbot.geoCountryCode': 'DE'
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["testingbot.geoCountryCode"] = "DE"
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));

Specify testingbot.geoCountryCode with one of the following country codes:

  • '*': this will take a random country from the list below
  • 'AU': Australia
  • 'BE': Belgium
  • 'BR': Brazil
  • 'CA': Canada
  • 'CL': Chile
  • 'FR': France
  • 'DE': Germany
  • 'IN': India
  • 'IT': Italy
  • 'JP': Japan
  • 'NO': Norway
  • 'SG': Singapore
  • 'ZA': South Africa
  • 'SE': Sweden
  • 'CH': Switzerland
  • 'AE': United Arab Emirates
  • 'GB': United Kingdom
  • 'US': United States

Important: this does not work on tvOS 4.4

Change Test Name

Add a name to this test, which will show up in the TestingBot member area and API.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "name" => "My Test Name"
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("name", "My Test Name");
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'name' => 'My Test Name',
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "name": "My Test Name"
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'name': 'My Test Name'
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["name"] = "My Test Name"
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
string unnamed test

Group Tests

A key you can use to group certain tests in the same build (for example in Jenkins).
The builds will appear in our member area.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "build" => "My First Build"
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("build", "My First Build");
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'build' => 'My First Build',
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "build": "My First Build"
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'build': 'My First Build'
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["build"] = "My First Build"
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type
string

Idle Timeout

The maximum amount of time a device will wait before proceeding to the next step in your test.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "idletimeout" => 130
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("idletimeout", 130);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'idletimeout' => 130,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "idletimeout": 130
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'idletimeout': 130
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["idletimeout"] = 130
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
int (specify number of seconds) 130 seconds

Maximum Test Duration

The maximum duration for a single test. This is a safeguard to prevent bad tests from using up your credits.

We generally recommend to keep tests short (less than 10 minutes). It's better to split up large tests in smaller individual tests.
This keeps your tests fast and allows for more parallelization of your tests.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "maxduration" => 1800
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("maxduration", 1800);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'maxduration' => 1800,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "maxduration": 1800
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'maxduration': 1800
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["maxduration"] = 1800
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
int (specify number of seconds) 1800 seconds (30 minutes)

Custom Metadata

Send along custom data, for example your release, server, commit hash, ...
This will show up on the test detail page in the TestingBot member area.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "extra" => "Extra Information"
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("extra", "Extra Information");
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'extra' => 'Extra Information',
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "extra": "Extra Information"
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'extra': 'Extra Information'
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["extra"] = "Extra Information"
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type
string

Taking screenshots during your tests

By default, TestingBot does not capture screenshots at every step of your mobile test. If you wish to take a screenshot for every step, please add this capability (set to true) to your request.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "screenshot" => true
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("screenshot", true);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'screenshot' => true,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "screenshot": True
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'screenshot': true
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["screenshot"] = true
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
boolean false

Make a video of your tests

By default we record a video of your test, which is accessible in the member area. If you do not wish to have this, you can disable it with this option.
Video should not slow down your test considerably.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "screenrecorder" => true
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("screenrecorder", true);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'screenrecorder' => true,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "screenrecorder": True
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'screenrecorder': true
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["screenrecorder"] = true
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
boolean true

Test Privacy

Make the test results for this test public so that everyone can access the results.

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "public" => false
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("public", false);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'public' => false,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "public": False
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'public': false
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["public"] = false
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value
boolean false

Customize Logging

By default, TestingBot records logs of all test actions and its drivers.

Set this option to false if you don't want TestingBot to record anything (for example, if you have sensitive data).
You will not see any test logs in our member dashboard.
Set to strip-parameters to prevent the POST/GET parameters from being logged on the TestingBot test detail page (does not affect other logs like Appium logs, Chromedriver logs, ...).

require 'appium_lib_core'

caps = {
  "platformName" => "tvOS",
  "appium:automationName" => "XCUITest",
  "appium:deviceName" => "Apple TV 4K",
  "appium:platformVersion" => "17.4",
  "appium:app" => "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
  "tb:options" => {
    "key" => "api_key",
    "secret" => "api_secret",
    "recordLogs" => true
  }
}

driver = Appium::Core.for(caps: caps, appium_lib: { server_url: "https://hub.testingbot.com/wd/hub" }).start_driver
XCUITestOptions options = new XCUITestOptions()
    .setPlatformName("tvOS")
    .setDeviceName("Apple TV 4K")
    .setPlatformVersion("17.4")
    .setApp("https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa");

Map<String, Object> tbOptions = new HashMap<>();
tbOptions.put("key", "api_key");
tbOptions.put("secret", "api_secret");
tbOptions.put("recordLogs", true);
options.setCapability("tb:options", tbOptions);

AppiumDriver driver = new AppiumDriver(new URL("https://hub.testingbot.com/wd/hub"), options);
$capabilities = new DesiredCapabilities([
    'platformName' => 'tvOS',
    'appium:automationName' => 'XCUITest',
    'appium:deviceName' => 'Apple TV 4K',
    'appium:platformVersion' => '17.4',
    'appium:app' => 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
    'tb:options' => [
        'key' => 'api_key',
        'secret' => 'api_secret',
        'recordLogs' => true,
    ],
]);

$driver = RemoteWebDriver::create('https://hub.testingbot.com/wd/hub', $capabilities);
from appium import webdriver
from appium.options.common import AppiumOptions

options = AppiumOptions().load_capabilities({
    "platformName": "tvOS",
    "appium:automationName": "XCUITest",
    "appium:deviceName": "Apple TV 4K",
    "appium:platformVersion": "17.4",
    "appium:app": "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa",
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "recordLogs": True
    }
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
import { remote } from 'webdriverio';

const driver = await remote({
    protocol: 'https',
    hostname: 'hub.testingbot.com',
    port: 443,
    path: '/wd/hub',
    connectionRetryTimeout: 420000, // devices can queue for up to ~390s
    connectionRetryCount: 0,        // a retry would queue a second device request
    capabilities: {
        platformName: 'tvOS',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'Apple TV 4K',
        'appium:platformVersion': '17.4',
        'appium:app': 'https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa',
        'tb:options': {
            key: 'api_key',
            secret: 'api_secret',
            'recordLogs': true
        }
    }
});
var options = new AppiumOptions
{
    PlatformName = "tvOS",
    AutomationName = "XCUITest",
    DeviceName = "Apple TV 4K",
    PlatformVersion = "17.4",
    App = "https://github.com/testingbot/tvos-example/releases/download/1.0.0/tvos-example.ipa"
};
options.AddAdditionalAppiumOption("tb:options", new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["recordLogs"] = true
});

// RemoteWebDriver keeps platformName "tvOS"; IOSDriver would overwrite it with "iOS".
// The 420s command timeout covers the time a busy device can stay queued (~390s).
var driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(420));
Value Type Default Value Possible Values:
string "true" true, false, or strip-parameters
Was this page helpful?
Last updated