Testing Results from a Live API
Let’s keep the momentum going and write our third acceptance test to add to this suite. We’ll build it separately from the others and iterate on it until we get it right, and then we’ll use the #import statement to pull it in when we run our master script.
The app is supposed to fetch results from OpenStreetMap for the selected search term within the visible map area. We’ll test the map itself later, in Chapter 5, Maps, Gestures, and Alerts. For the moment, we just want to test that we get something back that represents success, and we can do that by inspecting the results table view.
First, make sure the application starts in the right state. Launch the app in the simulator through Xcode and check that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access