XCUITest configuration parameters

Parameter

Possible Values

Meaning

instrumentationEnvVars


Environment Variable values to pass to the Instrumentation Runner.

An environment variable must always consist of a key=value pair, where the value can be a single value or an array (list) separated by any character except a comma.

Format:

  • Configuration file:
    "instrumentationEnvVars" : ["key=value","key=value", "key=value1 value2 value3",...]
  • Command line:
    -PinstrumentationEnvVars="key=value;key=value;key=value1 value2 value3;..."

runUITests

true | false

Indicates if the XCUITest runner application should be installed and executed. If the value is false, the XCUITests will not be run.

Default: true

Note: Related to XCUITest-based tests only.

runUnitTests

true | false

Indicates if the XCTest methods should be executed.

Default: true

resign

true | false

If the parameter is set (true), then the application will be signed with the Perfecto developer signature. If the parameter is false, developer must sign the application with a developer certificate and supply the UDID of the Perfecto lab device. Learn more about signing the iOS applications.

Default: true.

takeScreenshotOnTestStep

true | false

Save screenshot of device at every logical step in your tests automatically.

KIF/EarlGrey tests

When running test methods from External Frameworks, for example, Earl Grey or KIF, based on the XCTest framework, the plugin considers these to be unit tests, even though they may, in fact, perform UI automation and testing. Therefore:

Configure the runUnitTests parameter value to true.
If not including any XCUITest test methods, set runUITests parameter value to false.
Configure the framework to save the screenshots as described below.

  • When using the KIF framework - use "instrumentationArgs" : ["KIF"]
  • When using the EarlGrey tool - use "instrumentationArgs" : ["EARLGREY"]

Screenshots

XCTest test methods may snap screenshots at key points during the test run. These screenshots will be retrieved by the plugin and included in the execution report. The plugin supports screenshots generated by either:

  • KIF system KIFSystemTestActor class
  • EarlGrey screenshots