Automating the Build-and-Run Process with Rake

There are many ways to script things in Unix land. Here I will use Rake, the build tool written in Ruby and inspired by the make command. I think Ruby’s heritage as a shell-scripting language makes it a fine choice to build tasks out of smaller methods with annotation about what they do. Everything we’re going to use in Rake works out of the box on OS X, with no dependencies to install. Of course, if you feel strongly about a different scripting platform, feel free to translate these tactics to your tool of choice.

We’ll build two Rake tasks. The first is a simple one that cleans out old trace results. The second is the main task that does the full execution of our test suite on both device types. ...

Get Test iOS Apps with UI Automation 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.