Hello, I am currently setting up the Appium IOS tests run on the CircleCI MacOS environment
All tests are successfully running - when I started looking into test parallelization
Used the appium-device-farm plugin for this and set up the tests run with 3 threads - currently everything running pretty well except for one thing - the WDA startup time is pretty long
Currently, at the beginning of tests, it is built via Xcode for 3 simulators I have booted separately
for this, I use “appium:useNewWda, true” capability, after that when the 4-th test started execution changed “appium:useNewWda” to false and set “appium:usePrebuildWDA” to true dynamically, and generally everything is working pretty fast after first three tests
However, the initial tests take quite a long time since the WDA is building for each of the simulators, which you can see at the timeline
here is what appium logs saying
I am having
debug] e[38;5;48m[XCUITestDriver@a047 (57fa5d53)]e[0m Proxying [GET /status] to [GET http://127.0.0.1:50152/status] with no body
[38;5;48m[XCUITestDriver@a047 (57fa5d53)]e[0m connect ECONNREFUSED 127.0.0.1:50152
for a very long time until the WDA is installed and running
Here is the part of circleCI.yml:
- run: name: Appium Install command: | npm install -g appium@next && appium driver install xcuitest && appium plugin install --source=npm appium-device-farm - macos/preboot-simulator: version: "16.2" platform: "iOS" device: "iPhone 14 Pro Max" - macos/preboot-simulator: version: "16.2" platform: "iOS" device: "iPhone 14 Pro" - macos/preboot-simulator: version: "16.2" platform: "iOS" device: "iPhone 14 Plus" - run: name: Start Appium Server command: | appium server -ka 800 --use-plugins=device-farm -pa /wd/hub background: true - run: name: "Run Cucumber IOS Tests" command: | sudo mvn clean test (--env-vars...)
And my Caps:
DesiredCapabilities capabilities = CAP.get(); if (isTestNumberLessThanThreadCount()) { capabilities.setCapability("appium:useNewWda", false); capabilities.setCapability("appium:usePrebuildWDA", true); } else { capabilities.setCapability("appium:usePrebuildWDA", true); capabilities.setCapability("appium:useNewWda", false); } capabilities.setCapability("appium:app", "app.zip"); capabilities.setCapability("appium:deviceOrientation", "portrait"); capabilities.setCapability("appium:connectHardwareKeyboard", true); capabilities.setCapability("appium:forceSimulatorSoftwareKeyboardPresence", false); capabilities.setCapability("appium:interKeyDelay", "100"); capabilities.setCapability("appium:sendKeyStrategy", "setValue"); capabilities.setCapability("appium:settings[waitForQuiescence]", false); capabilities.setCapability("appium:isHeadless", true); capabilities.setCapability("appium:bundleId", "bundle"); capabilities.setCapability("appium:settings[reduceMotion]", true); capabilities.setCapability("appium:autoFillPasswords", false); capabilities.setCapability("appium:maxTypingFrequency", "20"); capabilities.setCapability("appium:settings[animationCoolOffTimeout]", 0); capabilities.setCapability("appium:noReset", true); capabilities.setCapability("appium:shouldTerminateApp", true); capabilities.setCapability("appium:settings[customSnapshotTimeout]", 2); capabilities.setCapability("appium:settings[pageSourceExcludedAttributes]", "visible,enabled,accessible,x,y,width,height,index"); log.info("Capabilities: " + new JSONObject(capabilities.toJson()).toString(identFactor)); Allure.addAttachment("Capabilities", capabilities.toString()); return capabilities;
Thank you in advance for any suggestions