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 with Gestures

For this next test, we want to make sure that no pins show up on the screen when there are no results. There are a couple of ways to do this. We could create a gobbledygook search term that we’re confident won’t return anything. Instead let’s make this test cover a little bit more behavior by moving the map over the ocean and refreshing the results. This helps us check to make sure our search queries use the map bounds and that refreshing removes existing pins.

The gestures described in the following figure make it happen. Pinch to zoom out, and then flick the map over to the right. Once we tap the refresh button in the toolbar, we’ll check for the alert view that pops up and assert that no points of interest show up ...

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