Setting up a test suite with XCTest

In this section, you'll work on a test suite for a new app: MovieTrivia. You'll find the basic setup for this project in this book's code bundle. If you open the project, there are some view controllers, an Info.plist file, and all the other files you would normally expect to find in a project. There's also a JSON file in the project named TriviaQuestions.json. This file contains a couple of dummy questions that you can load by uncommenting a bit of code in LoadTriviaViewController.swift.

By default, LoadTriviaViewController.swift attempts to load questions from a non-existing web server. This is intentional, to demonstrate how one would normally set up a project like this. Since you don't have a web server ...

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.