XCUITest 101 – Basics & Best Practices

  September 25, 2018

Apple announced the Xcode UI Testing framework in WWDC 2015 that allows us to write user interface tests for iOS apps using Swift or Objective-C. Starting from this week, we’ll go through a new series of blogs to cover XCUITest 101.

Since iOS 10, there is a growing trend of iOS teams adopting XCUITest and deprecating the old toolbox. Let’s start with what Xcode UI testing is.

Xcode UI Testing

Xcode UI Testing is also known as XCUITest that is a huge expansion of the testing technology in the Apple platform apps like iOS.

With UI testing we can simulate user actions in the simulators or devices to find out if our application is working with the latest changes in the code. With XCUITest, we can interact with the UI element and validate its position or state in our apps.

XCUITest framework allows us to write UI tests straight inside the Xcode with the separate UI testing target in the app. We can use Apple’s own programming languages e.g. Swift or Objective-C for writing UI Tests in the Xcode.

XCUITest runs in the separate process from our main iOS app and it doesn’t have to access the application’s internal methods, API or data. It uses the Accessibility technology to interact with the main iOS app, which means application developers need to provide accessibility information for UI elements to make apps accessible as well as testable.

Agenda for XCUITest 101

From this week, we will explore steps to get started with XCUITest to automate iOS app testing with the latest Xcode 10. Below you can find a brief agenda for each topic and make sure you follow us every week.

We hope you will take away some insights from our XCUITest 101. Stay tuned for the first blog!