-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
Test/IntegrationTests/MqttClient/DeviceFarmScript/test_spec.yaml
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
Test/IntegrationTests/MqttClient/DeviceFarmScript/test_spec.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
version: 0.1 | ||
|
||
# Phases are collection of commands that get executed on Device Farm. | ||
phases: | ||
# The install phase includes commands that install dependencies that your tests use. | ||
# Default dependencies for testing frameworks supported on Device Farm are already installed. | ||
install: | ||
commands: | ||
# To install a newer version of Appium such as version 2.1.2. Appium used to run iOS running script | ||
- export APPIUM_VERSION=2.1.2 | ||
- avm $APPIUM_VERSION | ||
|
||
# The pre-test phase includes commands that setup your test environment. | ||
pre_test: | ||
commands: | ||
# Appium downloads Chromedriver using a feature that is considered insecure for multitenant | ||
# environments. This is not a problem for Device Farm because each test host is allocated | ||
# exclusively for one customer, then terminated entirely. For more information, please see | ||
# https://github.com/appium/appium/blob/master/packages/appium/docs/en/guides/security.md | ||
|
||
# We recommend starting the Appium server process in the background using the command below. | ||
# The Appium server log will be written to the $DEVICEFARM_LOG_DIR directory. | ||
# The environment variables passed as capabilities to the server will be automatically assigned | ||
# during your test run based on your test's specific device. | ||
# For more information about which environment variables are set and how they're set, please see | ||
# https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environment-variables.html | ||
- |- | ||
appium --base-path=$APPIUM_BASE_PATH --log-timestamp \ | ||
--log-no-colors --relaxed-security --default-capabilities \ | ||
"{\"appium:deviceName\": \"$DEVICEFARM_DEVICE_NAME\", \ | ||
\"platformName\": \"$DEVICEFARM_DEVICE_PLATFORM_NAME\", \ | ||
\"appium:app\": \"$DEVICEFARM_APP_PATH\", \ | ||
\"appium:udid\":\"$DEVICEFARM_DEVICE_UDID\", \ | ||
\"appium:platformVersion\": \"$DEVICEFARM_DEVICE_OS_VERSION\", \ | ||
\"appium:chromedriverExecutableDir\": \"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE_DIR\", \ | ||
\"appium:automationName\": \"UiAutomator2\"}" \ | ||
>> $DEVICEFARM_LOG_DIR/appium.log 2>&1 & | ||
# This code will wait until the Appium server starts. | ||
- |- | ||
appium_initialization_time=0; | ||
until curl --silent --fail "http://0.0.0.0:4723${APPIUM_BASE_PATH}/status"; do | ||
if [[ $appium_initialization_time -gt 30 ]]; then | ||
echo "Appium did not start within 30 seconds. Exiting..."; | ||
exit 1; | ||
fi; | ||
appium_initialization_time=$((appium_initialization_time + 1)); | ||
echo "Waiting for Appium to start on port 4723..."; | ||
sleep 1; | ||
done; | ||
# The test phase includes commands that run your test suite execution. | ||
test: | ||
commands: | ||
|
||
# The post test phase includes are commands that are run after your tests are executed. | ||
post_test: | ||
commands: | ||
|
||
# The artifacts phase lets you specify the location where your tests logs, device logs will be stored. | ||
# And also let you specify the location of your test logs and artifacts which you want to be collected by Device Farm. | ||
# These logs and artifacts will be available through ListArtifacts API in Device Farm. | ||
artifacts: | ||
# By default, Device Farm will collect your artifacts from following directories | ||
- $DEVICEFARM_LOG_DIR |