Swift xcode feature for UI Testing, handy way to write your UI Testing Code:: RECORD

KD Knowledge Diet
2 min readJul 17, 2022

--

This recording feature for UITest is not known and not well used for most of cases. This feature provided by xCode doesn’t work quite well but it’s good to know this feature exists. Especially, it helps find you the accessibility identifier.

How to use UITest Record Feature

Record Button

When you create UI Test for your project, you will see this button in the bottom-left corner. Red Circle there is for recording your UI Test. If you press the button, it will launch your application in the simulator and record it and write code for you. Note that it won’t appear in your Unit Test. This only exists on UITest.

Most Common Usecases

Sometimes, there would be an UI element that you don’t have any idea of how to access it. As for an example, how do I select the second row of ListView? This recording feature gives you an idea when you click the second row of ListView.

Conclusion

  1. XCode provides you with handy feature called recording. This writes code automatically as you interact in the app.
  2. XCode UITest Recording doesn’t work well but it can give you an idea of how to write code for your UITestings!

--

--

KD Knowledge Diet
KD Knowledge Diet

Written by KD Knowledge Diet

Software Engineer, Mobile Developer living in Seoul. I hate people using difficult words. Why not using simple words? Keep It Simple Stupid!

No responses yet