augurken_inmaken

Since a couple months I have been using test scripts written in Gherkin, also knowns as feature files, as input for mobile test automation. The benefits that stand out to me so far:

  1. Anyone can write the test scripts, and anyone can understand and execute them.
  2. The same test scripts can be used to drive iOS and Android native tests.

To drive Android tests with Gherkin you can use Cucumber to parse them and a Gherkin plugin in Android studio makes the automation process very smooth.

sliced-cucumber

However, I have not found a way to use the Cucumber framework with the XCTest framework to drive iOS tests. The Calabash framework uses it, but the Ruby language and the web server approach have kept me away from Calabash to use it for automating iOS.

Instead I have been using the XCTest-Gherkin framework. This is a fairly small extension to the native iOS XCTest framework which enables you to use Gherkin as a test specification language. Any additional code you need besides XCTest and the XCTest-Gherkin framework, you will write in Swift (or Objective C), so no need to switch to a different language. I would recommend to check it out, and give it try.

calabash-collection-1

At the Testnet Fall Event (October 11, 2016) my colleague Carlo Matulessy and I will give a workshop about Test automation for Android and iOS apps using Gherkin. So if you need some extra Automation veggies, we’ll steam them up for you.