Prerequisite tasks for recording iOS tests
You can test the native and hybrid iOS applications in HCL DevOps Test UI (Test UI) by recording and playing back mobile tests on computers that run on Mac operating systems.
Prerequisite tasks for recording iOS mobile applications on a simulator
- Set up a computer that runs on the Mac operating system.
- Install Test UI, and then restart the system.
- Installed Xcode and Command Line Tools for Xcode on your computer.Note:You might have to follow certain steps in setting up the project with Xcode if you experience any issue while you record or play back iOS tests. See Troubleshooting issues when testing iOS applications.
- Installed the iOS applications that you want to test on the simulator.
- Configured the iOS applications that you want to test in Test UI. See Configuring the iOS applications.
Prerequisite tasks for recording iOS mobile applications on an iOS device
- Set up a computer that runs on the Mac operating system.
- Install Test UI, and then restart the system.
- Installed Xcode and Command Line Tools for Xcode on your computer.Note:You might have to follow certain steps in setting up the project with Xcode if you experience any issue while you record or play back iOS tests. See Troubleshooting issues when testing iOS applications.
- Codesigned the WebDriverAgent Xcode project WebDriverAgent.xcodeproj for WebDriverAgentLib and WebDriverAgentRunner by using a valid Apple developer account. For more information, refer to the Setting up iOS Real Devices Tests with XCUITest portal.
- Run the following command to create the
WebDriverAgent:
<path_of_Xcode> build-for-testing -project <path_of_WDA_Xcode_project> -scheme WebDriverAgentRunner -derivedDataPath /tmp/<device_udid> -destination id=<device_udid> IPHONEOS_DEPLOYMENT_TARGET=18.5 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO
For example, /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing -project /Applications/IBM/DevOpsTest/node-js/appium-server/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /tmp/00008030-000468AC2161802E -destination id=00008030-000468AC2161802E IPHONEOS_DEPLOYMENT_TARGET=18.5 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO
If multiple devices are connected, you must run this command multiple times with the corresponding UDID, and then verify whether the WebDriverAgent is created in the /tmp/<device_UDID> directory.
- Installed the iOS applications that you want to test on the iOS device.
- Configured the iOS applications that you want to test in Test UI. See Configuring the iOS applications.
- Enabled the Developer Mode on the iOS device.
- Connected and started the iOS device that you want to use for testing iOS mobile applications. You can connect the iOS device to the computer through a USB cable.
- Provided the following details in tab:
- iOS Device - The UDID for the real device
- Platform Version - The iOS version of the device
- Apple Team ID - The Apple Team ID of the user
- Role - The role in the Apple Developer License for the specific registered user
- Added the iOS real devices to the same developer profile.