iOS Open Source: Visual Testing Framework

Zucchini is an interesting open source project that can assist with visual testing of your application user interface elements. Screens are scripted using CoffeeScript to describe the interface and actions, the output is UIAutomation-compliant Javascript.

Zucchini executes tests via Apple’s command line interface to Instruments.

The code below shows a sample of CoffeeScript describing a screen:

class PostScreen extends Screen
  anchor: -> view.navigationBars()["Post"]
 
  constructor: ->
    super 'post'
 
    extend @elements,
    'Post': -> view.navigationBars()["Post"].buttons()["Post"]
 
    extend @actions,
    'Type "([^"]*)"$': (text) ->
      messageArea = view.elements()['Message Text Area']
      messageArea.setValue text
...

You can visit the Zucchini Google group to connect with others using the project.

Download Zucchini

You can download Zucchini from github.

Visit the Zucchini site for installation instructions and other helpful links.

Open Source Recommendations ?

If you have a recommendation for an open source project, send me an email.