1version: 0.1
2
3# Phases are collection of commands that get executed on Device Farm.
4phases:
5  # The install phase includes commands that install dependencies that your tests use.
6  # Default dependencies for testing frameworks supported on Device Farm are already installed.
7  install:
8    commands:
9
10  # The pre-test phase includes commands that setup your test environment.
11  pre_test:
12    commands:
13      - mkdir $DEVICEFARM_TEST_PACKAGE_PATH/Debug-iphoneos
14      - mkdir $DEVICEFARM_TEST_PACKAGE_PATH/Release-iphoneos
15      - unzip $DEVICEFARM_APP_PATH -d /tmp
16      - cp -r /tmp/Payload/*.app $DEVICEFARM_TEST_PACKAGE_PATH/Debug-iphoneos/
17      - cp -r /tmp/Payload/*.app $DEVICEFARM_TEST_PACKAGE_PATH/Release-iphoneos/
18
19  # The test phase includes commands that run your test suite execution.
20  test:
21    commands:
22      - xcodebuild test-without-building -destination id=$DEVICEFARM_DEVICE_UDID -xctestrun $DEVICEFARM_TEST_PACKAGE_PATH/*.xctestrun -derivedDataPath $DEVICEFARM_LOG_DIR
23
24  # The post test phase includes are commands that are run after your tests are executed.
25  post_test:
26    commands:
27
28# The artifacts phase lets you specify the location where your tests logs, device logs will be stored.
29# And also let you specify the location of your test logs and artifacts which you want to be collected by Device Farm.
30# These logs and artifacts will be available through ListArtifacts API in Device Farm.
31artifacts:
32  # By default, Device Farm will collect your artifacts from following directories
33  - $DEVICEFARM_LOG_DIR
34