Member-only story

Learning UITesting using Xcode

Let me demystify this essential tool to testing your Apps

Steven Curtis
5 min readAug 14, 2019

IO tests allow direct interaction with the App, with the simulator providing simulated touches and swipes with the App. This is opposed to the use of Unit testing. While Unit testing is great — you split up different sections of the App and then test them — it does not provide a wholistic view of how the App is behaving.

Luckily, Xcode is shipped with a UITesting framework built right in.

Prerequisites:

  • Some understanding of testing using Xcode

Terminology

UITesting: The process of testing the User Interface (UI) for Xcode apps

XCUIElement: A UI element in an application, that provides interactions with the UI like tapping, pressing, swiping, pinching and rotation

XCUIApplication: A proxy for an application that can be launched and terminated

XCUITest: An automation framework that ships with Xcode

XCTest: A framework that allows iOS developers to create and run unit, performance and UITests for Xcode projects

The project

I’ve got a project that I’ve used in a post about animations on UIPageView (https://medium.com/@stevenpcurtis.sc/an-animated-uipagecontrol-from-scra-75bc919d3174).

--

--

No responses yet