How To Setup Xcode For Test Automation
Xcode is an Integrated Development Environment for macOS. In test automation, Xcode helps Appium to run our automation scripts on iOS.
Download Xcode
To download Xcode, just open you app store on Mac and search for Xcode. It will let you download the latest Xcode version. As of this writing, the latest is 12.3.
I’ve been seeing issues about Xcode 12 and Appium. So if you ever encounter an issue and want to install a lower version, follow the steps below.
- Go to Apple developers download page.
- Sign in using your Apple Developer account. If you don’t have an account yet, just create.
3. After signing in or creating your account. You will be redirected to the download page.
4. Search for Xcode 11. Download and install.
The next thing we need to do is to install command line tools for us to be able run our scripts on iOS. You just have to run the following commands on your Terminal.
Install Xcode command line tools
xcode-select --installsudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Install Carthage using brew
Carthage is a dependency manager for MacOS and iOS applications.
If you don’t have homebrew installed yet, check this first How To Install Homebrew And Node For Test Automation.
brew install carthage
Install ios-deploy
ios-deploy allows us to install and debug iOS apps from the command line.
brew install ios-deploy
Install ideviceinstaller
The ideviceinstaller application allows interacting with the app installation service of an iOS device.
brew install ideviceinstaller
Install libimobiledevice
A cross-platform protocol library to communicate with iOS devices.
brew install libimobiledevice
Install usbmuxd
Allows us to use various applications to interact with our device and to connect to any listening localhost socket on the device
brew install usbmuxd
Install ios-webkit-debug-proxy
Allow us to send commands to MobileSafari and UIWebViews on real and simulated iOS devices.
brew install ios-webkit-debug-proxy
In case you’ll experience an error or issue with WebDriverAgent, you can refer to this article by Katalon.
You are now set to run your first automation script on iOS. 🍻 🍻 🍻
Check my other articles