XCUITest for iOS apps and how to test with Xcode

UI testing for iOS app is a way to validate & interact with the real UI of the app. This testing process will check if UI elements are designed and implemented the way it should be by interacting the UI elements by tapping, swiping, scrolling and verifying the behavior. For iOS version 9.3.5 and above, Apple has introduced XCUITest by deprecating instruments with UIAutomator making it mandatory to use XCUITest for iOS automation.

Xcode has XCUITest framework integrated allows to easily develop UI tests for user’s interaction with the application. Implementation of UI tests for iOS apps with XCUITest is same as unit tests in XCTest.

pCloudy supports both XCUITest for iOS version 9.3.5 & above and instruments for lower version. DesiredCapabilities like automationName, usePrebuiltWDA, acceptAlerts are required to run the automation scripts in pCloudy platform.

1) Creating IPA file using XCode for testing

 a. In General tab, Select Provisioning profile in Signing(Debug) and Signing(Release)

test-munk-demo

b. Select Provisioning Profile

 XCUITest
 c. Archive the build
 archieve-build
 d. Export the build
 export-the-build
 e. Choose Development Team ID
 development-team-id
 f. Choose to export for all compatible devices
 Choose-to-export-for-all-compatible-devices

testmunkdemo

 g. Select the appropriate location to save
 select-appropriate-location-to-save
 Now you have properly signed to run automation in pCloudy platform.
2) Running Automation Script @ pCloudy
a. Login and upload IPA file
 login
 b. Upload the App to cloud drive post login
 upload-the-app-to-cloud-drive
 c. Create XCUITest project in Eclipse or Android Studio.

The following capabilities need to be set after creating AppiumDriver object to run XCUITest above v9.3

XCUITest-Project

d. Select any number of iOS devices for test run

 ios-devices
e. Click Live view for Online Streaming of Test automation
appium-native

live-view

 f. View the Reports
 Consolidated Report:
 consolidated-report
 Single Device Report:
 single-device-report
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s