[Appium][maestro] compare running speed in one scenario for iOS

I previously posted an execution time comparison of Maestro and Appium for Android . Let’s compare in iOS as well.

I picked up the same scenario from the ruby_lib_core. https://github.com/appium/ruby_lib_core/blob/61b2277ff2e391571b87e6d3931aac9e0ce9e206/test/functional/ios/patch_test.rb#L39-L51 The maestro scenario was:

appId: com.example.apple-samplecode.UICatalog
---
- launchApp
- tapOn: "Text Fields"
- tapOn: "Placeholder text"
- inputText: "hello"
- assertVisible:
    text: "hello"

Maestro cannot use the element type directly, so I have replaced it with placeholders. It could potentially detect an unexpected element type, but it doesn’t matter in this test.

As a precondition, the iOS 18.5 simulator was already running to reduce simulator setup speed. Maestro uses a rebuild driver, so the Appium XCUITest driver also utilizes a cached xcodebuild WDA to compare running speeds fairly. (== the same xcodebuild command to build WDA ran once already)

Maestro 1.40.3:

$ time maestro test maestro.yaml
Running on iPhone 16 Plus - iOS 18.5 - A2B2DDFE-B4FD-4A5F-A8C8-58E3CE70B3A7

 ║
 ║  > Flow: maestro
 ║
 ║    ✅   Launch app "com.example.apple-samplecode.UICatalog"
 ║    ✅   Tap on "Text Fields"
 ║    ✅   Tap on "Placeholder text"
 ║    ✅   Input text hello
 ║    ✅   Assert that "hello" is visible
 ║
maestro test maestro.yaml  4.67s user 2.05s system 28% cpu 23.927 total

Appium XCUITest driver 9.3.2:

kazu $ rake test:func:ios TEST=test/functional/ios/patch_test.rb
Started with run options --seed 41468

  1/1: [=========================================================================================] 100% Time: 00:00:13, Time: 00:00:13

Finished in 13.78928s
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Functional Tests to /Users/kazu/github/ruby_lib_core/coverage.
Line Coverage: 64.63% (835 / 1292)

As same as before, unrelated tests were commented out already.

Each can turn up more, I assume, so this could be wrong for another case, of course. Just for one running example.

[update]

Here is Appium XCUITest’s prebuilt module available from Building WebDriverAgent workflow. After downloading the expected architecture’s WDA prebuilt package to your local, and setting it with usePreinstalledWDA and prebuiltWDAPath capabilities like prebuiltWDAPath: '~/Download/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app', your appium run will use the prebuilt one. Here is the running example:

$ bundle exec rake test:func:ios TEST=test/functional/ios/patch_test.rb
Started with run options --seed 47479

  1/1: [==================================================================================================================] 100% Time: 00:00:14, Time: 00:00:14

Finished in 14.11312s
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Functional Tests to /Users/kazu/github/ruby_lib_core/coverage.
Line Coverage: 64.52% (831 / 1288)

This method is addressed in https://appium.github.io/appium-xcuitest-driver/latest/guides/run-preinstalled-wda/ and https://appium.github.io/appium-xcuitest-driver/latest/guides/run-prebuilt-wda/.

Using appium driver run xcuitest download-wda-sim --outdir ~/wda command (https://appium.github.io/appium-xcuitest-driver/latest/reference/scripts/), which is available since xcuitest driver 9.9 helps to get a proper prebuilt WDA.

1 Comment

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.