Configuration Syntax: XCUITest

Please refer to the Common Configuration Syntax Referencefor information regarding fields such as apiVersion, kind, suites, sauce, etc.

Example Configuration#

.sauce/config.yml
loading...
See full example on GitHub

xcuitest#

Description: Details specific to the xcuitest configuration.

Type: object

Example:

xcuitest:
app: ./apps/xcuitest/SauceLabs.Mobile.Sample.XCUITest.App.ipa
testApp: ./apps/xcuitest/SwagLabsMobileAppUITests-Runner.app

app#

Description: Path to the application. It supports expanded enviornment variable.

Type: string

Examples:

app: ./apps/xcuitest/calc.apk
app: $APP

testApp#

Description: Path to the testing application. It supports expanded enviornment variable.

Type: string

Examples:

testApp: ./apps/xcuitest/calc-success.apk
testApp: $TEST_APP

devices#

Description: Field for requesting real devices for the test.

You can request a specific device using its ID, or you can specify a set of criteria to choose the first available device that matches the specifications.

When an ID is specified, it supersedes the other settings.

Type: []object

Example:

devices:
- name: "iPhone 11"
platformVersion: "14.3"
- id: iPhone_11_14_5_real_us

id#

Description: Request a specific device by its id. You can look up device IDs in the Sauce Labs app or using our Get Devices API request.

Type: string

Example:

id: iPhone_11_14_5_real_us

name#

Description: Request a device by its name.

Type: string

Example:

Using complete name:

- name: iPhone 11

Using pattern matching:

name: iPhone*

platformVersion#

Description: Request that the device matches a specific platform version. You can use the * wildcard to denote flexibility.

Type: string

Example:

platformVersion: 14.*

options#

Description: Further specify certain device attributes within the pool of devices that match the name and version criteria.

Type: object

carrierConnectivity#

Description: Request that the matching device is also connected to a cellular network.

Type: bool

Example:

carrierConnectivity: true

deviceType#

Description: Request that the matching device is a specific type of device. Values: ANY, TABLET, or PHONE.

Type: string

Example:

deviceType: PHONE

private#

Description: Request that the matching device is from your organization's private pool.

Type: bool

Example:

private: true

testOptions#

Description: A set of parameters allowing you to select tests for the suite based on matching attributes.

Type: object

Example:

testOptions:
class:
- SwagLabsMobileAppUITests.LoginTests/testSuccessfulLogin
- SwagLabsMobileAppUITests.LoginTests/testNoUsernameLogin
- SwagLabsMobileAppUITests.LoginTests

class#

Description: Instructs saucectl to only run the specified classes for this test suite. Each class contains class_name/method_name. If no method_name provided, it will run the whole test.

Type: array

Example:

class:
- SwagLabsMobileAppUITests.LoginTests/testSuccessfulLogin
- SwagLabsMobileAppUITests.LoginTests/testNoUsernameLogin
- SwagLabsMobileAppUITests.LoginTests
Last updated on by Tian Feng