Making sure the UI updates as expected

You're going to write two tests to make sure that the trivia game works as expected. The first test will test that the question and answer buttons appear and that they have the correct labels. The second test will make sure that the answers can be tapped and that the UI updates accordingly.

Instead of recording the tests, you'll write them manually. Writing tests manually gives you a bit more control and allows you to do much more than just tapping on elements. Before you do this, you should open the Main.storyboard file and give accessibility identifiers to the UI elements. Select the question title and give UILabel an identifier of QuestionTitle. Select each of the answers and give them the AnswerA ...

Get Mastering iOS 12 Programming - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.