Mobile Testing
TestingBot provides iOS and Android testing on both simulators/emulators and real/physical devices.
Configuring capabilities
TestingBot's mobile simulators and emulators can be accessed using Appium. You can use the device picker below to select the capabilities you want to use for your tests.
MutableCapabilities capabilities = new MutableCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "safari");
capabilities.setCapability(CapabilityType.BROWSER_VERSION, "18.6");
capabilities.setCapability("appium:deviceName", "iPhone 16");
capabilities.setCapability(CapabilityType.PLATFORM_NAME, "iOS");`
You can configure more options by using the Appium capabilities generator.
Portrait/Landscape
It's possible to rotate the device before and during your test. Please see these examples:
Rotate before test (iOS only):desired_capabilities = { "orientation" : "LANDSCAPE " } # or PORTRAIT
((AppiumDriver) driver).rotate(ScreenOrientation.LANDSCAPE);
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.
To learn more about the available Appium versions, please see our Appium versions documentation.
caps = {
platformName: "iOS",
deviceName: "iPhone 15",
browserVersion: "17.4",
browserName: 'safari',
"tb:options" => {
"appiumVersion" : "2.4.1"
}
}
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("appiumVersion", "2.4.1");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "iOS");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("deviceName", "iPhone 16");
caps.setCapability("browserVersion", "18.6");
caps.setCapability("browserName", "safari");
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::safari();
$capabilities->setPlatform('iOS');
$capabilities->setCapability('tb:options', array(
'appiumVersion' => "2.4.1"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
tbOptions = {
'name': 'W3C Sample',
'appiumVersion': "2.4.1"
}
chromeOpts = {
'browserName': "safari",
'platformName': "iOS",
'browserVersion': "18.6",
'deviceName': "iPhone 16",
'goog:chromeOptions': {'w3c': True},
'tb:options': tbOptions
}
self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'safari',
"platformName": 'iOS',
"deviceName": 'iPhone 16',
"browserVersion": '18.6',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"appiumVersion": "2.4.1"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "18.6",
PlatformName = "iOS",
DeviceName = "iPhone 16",
BrowserName = "safari",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["appiumVersion"] = "2.4.1"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Testing Internal/Staged Websites
We've built TestingBot Tunnel, to provide you with a secure way to run tests against your staged/internal webapps.
Please see our TestingBot Tunnel documentation for more information about this easy to use tunneling solution.