test-suite
2023.4
false
- Getting Started with Test Suite
- Studio
- Overview
- Testing Activities
- Orchestrator
- Testing robots
- Test Manager
- CI/CD integrations
Configuring local iOS simulator
Test Suite User Guide
Last updated Aug 13, 2024
Configuring local iOS simulator
- Install Xcode. Visit Installing Xcode and Simulators for more information about Xcode.
- Open a Terminal and run the following
command to install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
. - Run the following command to install NodeJS:
brew install node
- Install Appium:
- For Appium 1.0, run
the following command:
npm install -g appium
. This automatically installs all drivers needed. - For Appium 2.0, run the following command:
npm install -g appium@next
.Appium 2.0 comes without the drivers installed. Therefore, to install the needed drivers, also run the following command:appium driver install xcuitest
.Important:- We recommend using Appium 2.0 with Mobile Automation version 22.10 or higher.
- Install Appium
2.0 if you want to test your mobile automations on an
iOS Physical Device.
- Open Xcode and allow it to install any additional components it may require. Close it once you see the splash screen.
-
Start the Appium server, using the following command:
appium --port 8001 --default-capabilities "{\"appium:systemPort\":9001}" --relaxed-security
.
- For Appium 1.0, run
the following command:
Perform the following steps to configure a local iOS simulator.
- Install and add Simulator runtimes.
- Open Xcode and navigate to the menu bar. Click Xcode and then Settings.
- Go to the Platforms tab.
- Click the Add button, and then select a platform to view a list of its available versions.
- Select a version and click Download & Install.
- Add a Simulator.
- In Xcode, from the menu bar, select Xcode and then Devices and Simulators.
- At the top of the sidebar, select Simulators, and click Add button.
- Select a Device Type and OS Version for your simulator. Optionally, give it a name.
- Select Create to create the new simulator.
- Get the Appium URL and save it for later:
- Go to System Settings, then the Network tab, and select the Wi-Fi network that the iOS device is connected to.
- Copy the IP Address for the Wi-Fi network. The format of the Appium
URL is
https://<ipaddress>:8001>
(8001 is the port number where you start Appium).
- Get the UDID of the simulator that you added to Xcode.
- Go to Windows, then to Devices and Simulators, and lastly, Simulators.
- Click the iOS simulator you added.
- Copy the Identifier. This is the UDID, that you'll later add as an additional desired capability, when adding this iOS simulator to MDM.
- Build WebDriverAgent with Xcode on your Mac:
- Navigate to the
appium-webdriveragent
folder, using the following path:/Users/<username>/appium2/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent
, and open thexcodeproj
file. - Select WebDriverAgent, and open WebDriverAgentRunner, under the Targets section.
- Switch to the Signing & Capabilities tab, select Automatically manage signing, and choose a user account from the Team dropdown.
- Change the Bundle Identifier to a unique value.
- Copy and save this Bundle Identifier. You'll use it to add your Application inside MDM (Bundle Id).
- Navigate to the
- Install the WebDriverAgent on your iOS simulator.
- Select WebDriverAgentRunner in the WebDriverAgent navigation bar.
- In Xcode, go to Product, and click Test. On your iOS simulator, you'll see the WebDriverAgent installing.
- Add the configurated iOS local simulator in Mobile Device Manager using the Adding local iOS device in Mobile Device Manager task.