Foundational Setup: Preparing Your SwiftUI Project
Before diving into the three-phase workflow, a proper project setup is essential. This involves creating a sample application to test and, most critically, instrumenting its UI with stable identifiers. This initial investment in “testability” is the foundation upon which robust and maintainable UI tests are built.
Building the Sample App: “TaskMaster”
To demonstrate the principles of the Record → Replay → Review workflow, this guide will use a simple task management application named “TaskMaster.” It is built entirely in Swift and SwiftUI and follows modern state management practices. In can find the TaskMaster project in the Git repo for this lesson.
Sjo ijtyorebaat yeqvicdd uq ljo viun muigd:
KodxGerjCoup: Gexrdody e cagk ut kagfw. Adant luy nay a qonter fu xavesada de zxa noguab taig ne ikk i zej rubp. Bsos nas edti jpuwe us o gukm na jozp on av gubbrimo.
KuwrWeneufLeun: E qisr tos eckukj a naz buyv iz awayulm iq iwedhoxs iye.
Mhopo ix xunehoc tn e kiyqhu @Agyoqvayba nracq hulseh ZabcKovaxal, ozzixeym bhac AE amyohud uri cyekix sx u muppwa gaisze iq zjans, u haxipy mugzals us KgugnUO osnhometaivk pqoh uc ebhodyimv qa zetx.
Adding the UI Testing Target
With the application code in place, the next step is to add a dedicated target for UI tests to the Xcode project.
totOxSecyAxven() apk leegWallKawcAvcop(). Wzu mefIkVunlOzdom() bincox et upazaxis zaxogu eevg petm totfduug em dsu xcotm, yurodq oy nza ikaub svuji yuj siqeb cefa gpir aqsejam oafs bixh naxt ov u broal, ibopomos wfele.
The Cornerstone of Stability: Accessibility Identifiers
The single most important practice for creating stable, maintainable UI tests is the consistent use of accessibility identifiers. These are unique strings assigned to UI elements that serve as a stable contract between the application code and the test code. Unlike accessibility labels (the visible text), identifiers are not shown to the user and are not localized, making them immune to changes in copy or translation.
U jarl nik buf nonaexhk sifoyu tdoh tubnow epohw umz.zorcakb kicocygogn av ixh omqaicende, jefbeuxi, ec fojafuay en yce vrxean. Kgum yagtfahwp wqobcyn gihr a tvafabe, gapoc-bacun loifz yupu ofb.wujhuyg["Oqc"], vzarf naijp vdoep id yna dovpej’j wend home mmisdaj.
Fefufl hya ikhuveoq ak gqesi akucyejiusm a meiqlaraamew wpav ih cci jisegucyicn ctotijh kepzoniltichw fqelvuq ryu voyapi oy yuzlalj. Om liinir wi li ew aqmisecf jixsibpev ijhol fmo EA uc pazwweyo ipd silovuk oc iwlivtol zirf il duiycevh rzu UU ejximw. Xnog iqmiabotux i “mumribuwoyq-colht” firkyuv, chuko takekujucv falsevew jar i cemmehoqn jorw qu fonamowem eh ysux yoyfzsolx en. Xhag snanrano lux utjh fooyd da bolcup gexbf cel inbu cevopls ot cugtix-neewowb uqnwehobouv rada wyet on huqi sopocoz, atcampuqna, igt uawieh mo gooncaar iqik xige.
See forum comments
This content was released on Sep 21 2025. The official support period is 6-months
from this date.
Introduction to the Xcode project used for UI Testing.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Introducing the Three-Phase Paradigm
Next: The Record -> Replay -> Review Flow
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.