diff --git a/README.md b/README.md index 8d713eb..3be9b50 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,8 @@ You need an Apple Developer account to sign in and build **WebDriverAgent**. 6. Copy the WebDriverAgentRunner-Runner.app to the Payload directory: **cp -r WebDriverAgentRunner-Runner.app Payload** 7. Finally, zip up the project as an *.ipa file: - **zip -r WebDriverAgent.ipa Payload** + **zip -r WebDriverAgent.ipa ./Payload** + > Make sure to specify relative `./Payload` to archive only Payload folder content 8. Get the WebDriverAgent.ipa file, put it onto the corrent host and share via WDA_IPA_PATH variable in the roles/devices/vars/main.yml file. diff --git a/defaults/main.yml b/defaults/main.yml index f867293..d12d8b4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,8 @@ --- DEVICE_IMAGE: zebrunner/mcloud-device -DEVICE_VERSION: 2.3 +DEVICE_VERSION: 2.4 APPIUM_IMAGE: public.ecr.aws/zebrunner/appium -APPIUM_VERSION: 1.4.6 +APPIUM_VERSION: 1.4.9 -DEVELOPER_IMAGES: {12.0, 12.1, 12.2, 12.3, 12.4, 13.0, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 15.0, 15.1, 15.2, 15.3, 15.4, 15.5} +DEVELOPER_IMAGES: {12.0, 12.1, 12.2, 12.3, 12.4, 13.0, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 15.0, 15.1, 15.2, 15.3, 15.4, 15.5, 16.0} diff --git a/roles/devices/templates/zebrunner-farm b/roles/devices/templates/zebrunner-farm index 8ebbcdf..3e57939 100755 --- a/roles/devices/templates/zebrunner-farm +++ b/roles/devices/templates/zebrunner-farm @@ -91,8 +91,8 @@ function create_containers () { -e PROXY_PORT=$proxy_port \ -e STF_PROVIDER_HOST={{ STF_PROVIDER_HOST }} \ -e STF_PROVIDER_MAX_PORT=$stf_max_port \ - -e STF_PROVIDER_APPIUM_PORT=$appium_port \ - -p $appium_port:4723 \ + -e APPIUM_PORT=$appium_port \ + -p $appium_port:$appium_port \ -e RELAXED_SECURITY=true \ -e S3_ENDPOINT={{ S3_ENDPOINT }} -e BUCKET={{ S3_BUCKET }} -e TENANT={{ S3_TENANT }} -e AWS_ACCESS_KEY_ID={{ S3_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY={{ S3_SECRET }} -e AWS_DEFAULT_REGION={{ S3_REGION }} \ -e MCLOUD=true \ @@ -108,7 +108,6 @@ function create_containers () { -e STF_PROVIDER_DEVICE_NAME="${device_name}" -e DEVICE_UDID="${udid}" \ -e STF_PROVIDER_HOST={{ STF_PROVIDER_HOST }} \ -e STF_PROVIDER_NAME="{{ STF_PROVIDER_NAME }}" \ - -e STF_PROVIDER_APPIUM_PORT=$appium_port \ -e STF_PROVIDER_MIN_PORT=$stf_min_port -e STF_PROVIDER_MAX_PORT=$stf_max_port \ -p $stf_min_port-$stf_max_port:$stf_min_port-$stf_max_port \ -e STF_PROVIDER_PUBLIC_IP={{ PUBLIC_IP }} \ @@ -127,9 +126,8 @@ function create_containers () { -v mcloud-storage-volume:/opt/zebrunner \ --device=/dev/device-${device_name}-${udid}:${usb_bus} \ -v "{{ WDA_IPA_PATH }}:/opt/WebDriverAgent.ipa" \ + -e WDA_BUNDLEID={{ WDA_BUNDLEID }} \ -e APPIUM_CLI="--session-override" \ - -e WDA_ENV=/opt/zebrunner/wda-${udid}.env \ - -e WDA_LOG_FILE=/opt/zebrunner/wda-${udid}.log \ -e P12PASSWORD="{{ P12PASSWORD }}" \ -e PLATFORM_NAME=$platform_name \ -e DEVICE_UDID=$udid \ @@ -144,8 +142,8 @@ function create_containers () { -e PROXY_PORT=$proxy_port \ -e STF_PROVIDER_HOST={{ STF_PROVIDER_HOST }} \ -e STF_PROVIDER_MAX_PORT=$stf_max_port \ - -e STF_PROVIDER_APPIUM_PORT=$appium_port \ - -p $appium_port:4723 \ + -e APPIUM_PORT=$appium_port \ + -p $appium_port:$appium_port \ -e RELAXED_SECURITY=true \ -e S3_ENDPOINT={{ S3_ENDPOINT }} -e BUCKET={{ S3_BUCKET }} -e TENANT={{ S3_TENANT }} -e AWS_ACCESS_KEY_ID={{ S3_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY={{ S3_SECRET }} -e AWS_DEFAULT_REGION={{ S3_REGION }} \ -e MCLOUD=true \ @@ -156,13 +154,12 @@ function create_containers () { --restart on-failure \ --link device-${device_name}-${udid}-appium:appium \ -v mcloud-storage-volume:/opt/zebrunner \ - -e WDA_ENV=/opt/zebrunner/wda-${udid}.env \ + -e WDA_HOST=appium \ -e WDA_WAIT_TIMEOUT=180 \ -e PLATFORM_NAME=$platform_name \ -e STF_PROVIDER_DEVICE_NAME="${device_name}" -e DEVICE_UDID="${udid}" \ -e STF_PROVIDER_HOST={{ STF_PROVIDER_HOST }} \ -e STF_PROVIDER_NAME="{{ STF_PROVIDER_NAME }}" \ - -e STF_PROVIDER_APPIUM_PORT=$appium_port \ -e STF_PROVIDER_MIN_PORT=$stf_min_port -e STF_PROVIDER_MAX_PORT=$stf_max_port \ -p $stf_min_port-$stf_max_port:$stf_min_port-$stf_max_port \ -e STF_PROVIDER_PUBLIC_IP={{ PUBLIC_IP }} \ diff --git a/roles/devices/vars/main.yml.original b/roles/devices/vars/main.yml.original index d3e5613..e91bab7 100644 --- a/roles/devices/vars/main.yml.original +++ b/roles/devices/vars/main.yml.original @@ -37,6 +37,9 @@ P12PASSWORD: # Path to prebuild WebDriverAgent.ipa WDA_IPA_PATH: /opt/WebDriverAgent.ipa +# Override to use custom WDA bundle id: https://github.com/zebrunner/mcloud-agent#prepare-webdriveragentipa-file +WDA_BUNDLEID: com.facebook.WebDriverAgentRunner.xctrunner + # [OBLIGATORY] Declare valid devices metadata # - id: device udid which is shown by `adb devices`