O'Reilly logo

Test iOS Apps with UI Automation by Jonathan Penn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required