The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing

Insights

External Resources

More Info


Page tree
Skip to end of metadata
Go to start of metadata

Dynamic Allocation involves providing basic parameters for the platform and operating system, or the type of device you want to use in your tests, and a device with those specifications is selected from the device pool. While static allocation allows you more fine-grained control over the device used in your tests, it can also cause delays in your test execution if that device isn't available when you run your tests. If you only need to test on a particular platform and OS version, such as an Android 4.1,  or on a particular type of device, you should use dynamic allocation, and we recommend that you use dynamic allocation for all automated mobile application testing in CI/CD environments.


Required Capabilities for Dynamic Allocation

Capability

Capability Explanation

platformName

The type of mobile platform to use in your tests, for example "Android" or "iOS".

Values are NOT case sensitive

The values for capabilities are case-insensitive, so "android" is the same as "Android", and "ios" is the same as "iOS"

platformVersion

The platform version to use in your tests, for example "4" or "4.1".

Version Matching

This is a substring match. You can specify both major versions and incremental versions of an operating system. 

For example if you set only a major version 4, you also have access to all devices running incremental versions: "4.1"," 4.2", "4.2.1", "4.4.4" etc.

This also extends to minor and point versions. For example if you specify "11.4" it will match "11.4.0", "11.4.1", etc.

deviceName

The display name of the device to use, such as "Samsung S7"

Using Regular Expressions for deviceName

You can also use regular expressions for setting the deviceName .

For example:

"iPhone.*""iPhone .*" will allocate any iPhone. "

.*nexus.*" will allocate any device with the word "nexus" in its display name.

"iPhone [67]" or "iPhone [6-7]" will allocate either "iPhone 7" or "iPhone 6" device.

"iPhone [67]S" or "iPhone [6-7]S" will allocate either "iPhone 7S" or "iPhone 6S" device. "iPhone 7.*" will allocate "iPhone 7" or "iPhone 7S", or any device that starts with the display name "iPhone 7"

Regular expressions are case insensitive, for example, "iphone .*S" and "IPHONe .*s" are the same.


Optional Capabilities for Dynamic Allocation

privateDeviceOnlyIf you have access to both private and public devices, you can request allocation of private devices only with "true"

Capability

Capability Explanation

tabletOnlySelect only tablet devices with "true"
phoneOnlySelect only phone devices with "true"
carrierConnectivityOnlyOnly allocate devices if they are connected to a carrier network with "true"
  • No labels