Setting Up a Software Engineer’s Personal Computer: M5 MacBook Air — Part 7: iOS Mobile Test…
Installing Appium and XCUITest for iOS Mobile Test Automation
Setting Up a Software Engineer’s Personal Computer: M5 MacBook Air — Part 7: iOS Mobile Test Automation
Installing Appium and XCUITest for iOS Mobile Test Automation
In this series:
- Part 1: The basics
- Part 2: Web Development*
- Part 3: MySQL database
- Part 4: Make Web App Server Production Ready*
- Part 5: Web Test Automation
- Part 6: Continuous Testing
- Part 7: **Mobile Test Automation**
- Part 8: API Testing
This article is an excerpt from my upcoming book: Practical Mobile Test Automation with Appium for iOS.

Practical Mobile Test Automation with Appium for iOS
1. Install Appium Server
Appium server depends on Node.js, which covered in Part 1.
Run the commmand below in a terminal to install Appium server.
% npm install -g appium
A brief explanation for the above command:
• -g: npm’s global flag. Means that appium is installed into the prefix folder instead of the current working directory.
Verify Appium server installation:
% appium --version
The output shall be like below:
3.2.0
2. Start the Appium Server
Run a simple command on the terminal to start an Appium server:
% appium
The starting output will look like:
Appium] Welcome to Appium v3.2.0 (REV 70badad488056fb48cf687aa777f2880aac58fe9)
[Appium] The autodetected Appium home path: /Users/courtney/.appium
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/courtney/.appium/node_modules/appium-xcuitest\
-driver/build/lib/index.js
[Appium] XCUITestDriver has been successfully loaded in 0.173s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723 [Appium] You can provide the following URLs in your client code to connect to thi\ s server:
http://127.0.0.1:4723/ (only accessible from the same host)
http://192.168.20.41:4723/
http://192.168.20.19:4723/
[Appium] Available drivers:
[Appium] - xcuitest@10.23.3 (automationName 'XCUITest')
[Appium] No plugins have been installed. Use the "appium plugin" command to insta\
ll the one(s) you want to use.
The server has started, but as no drivers are installed, it cannot be used for automation. Press Control + C to stop the server and install the necessary drivers.
3. Install the Drivers
Appium uses drivers to receive the client requests and actually has the capability to automate a platform. Different drivers support different platforms, for instance there are iOS, Android, macOS and Windows drivers, to name a few.
Drivers do not automatically come with Appium, you need to select and install the relevant ones yourself.
To view all the possible Appium drivers, on the command-line run:
% appium driver list
The output will look like:
Listing available drivers (rerun with --verbose for more info) - uiautomator2 [not installed]
- xcuitest [not installed]
- espresso [not installed]
- mac2 [not installed]
- windows [not installed]
- safari [not installed]
- gecko [not installed]
- chromium [not installed]
The three drivers relevant to mobile testing are xcuitest, espresso and uiautomator2.
- **XCUITest **(iOS & tvOS) Apple’s iOS and tvOS testing framework.
- **Espresso, UIAutomator2 **(Android) Android UI testing framework.
To install for iOS (the focus of this article), run the command below.
% appium driver install xcuitest
4. Install test automation libraries
Previously, I have installed Ruby, which is the best test automation scriptiong language.
gem install rspec appium_lib --no-document
5. Install Appium Inspector
Unlike web test automation — where you can inspect elements using Chrome’s built-in developer tools — mobile applications require a separate utility. That tool is Appium Inspector.
For installing and using Appium Inspector, refer to my other articles.
6. Xcode and Simulator
We can run iOS Appium test scripts on either an iOS Simulator or a connected device. A convenient way to get started is to use the Simulator, which is included with Xcode.

7. Prepare an iOS app for testing
Unlike web apps (visisting by an URL), we need to prepare an actual mobile app package.
Appium provides a simple sample app on its Github page: ***TestApp.app.zip***.
8. Run first Appium Automation Script
An Appium script is written in plain text. You can create and edit it in any text, but it’s preferable to use a testing IDE such as TestWise or a programming editor like Visual Studio Code.
Below is a simple Appium automation script to verify that the above setup works correctly.
require "appium_lib"
opts = {
caps: {
automationName: 'xcuitest',
platformName: 'ios',
platformVersion: '26.2', # match Xcode Simulator version
deviceName: 'iPhone 17', # match Xcode Simulator device name
app: "/Users/me/sample-apps/AppiumTestIosApp.app.zip" # path
},
appium_lib: {
server_url: "http://127.0.0.1:4723"
},
}
@driver = Appium::Driver.new(opts).start_driver
app_elem = @driver.find_element :class_name, 'XCUIElementTypeApplication'
application_name = app_elem.attribute :name
puts application_name
Save this script as xcuitest-sample.rb and run it in the terminal.
% ruby xcuitest-sample.rb
If the installation and setup were successful, you should see the following happen on your computer:
- An iOS simulator will launch and seeing iOS logo (starting OS). This may take around 30 seconds.
- The test app will be installed. This step can also be slow for the first time as it will also install the driver.
- The app will open automatically.
- The application name will be printed to the console, “Appium Test App”.
- The app will close (but the simulator will remain open).
메타데이터
- post_id
- d1027caaa312
- slug
- setting-up-a-software-engineers-personal-computer-m5-macbook-air-part-7-ios-mobile-test-d1027caaa312
- url
- https://medium.com/@courtneyzhan/setting-up-a-software-engineers-personal-computer-m5-macbook-air-part-7-ios-mobile-test-d1027caaa312
- canonical_url
- https://medium.com/@courtneyzhan/setting-up-a-software-engineers-personal-computer-m5-macbook-air-part-7-ios-mobile-test-d1027caaa312
- author_url
- https://medium.com/@courtneyzhan
- status
- ok
- fetched_at
- 2026-06-09 15:37:30