Entrepreneur, Blogger, Author of "Mobile Test Automation with Appium"

On Thursday, April 04, 2013 by Nishant Verma in , ,

From quite some time I have been exploring mobile application testing. Primarily I have been looking into Calabash and Frank. Let's talk about Frank a bit more in this post.

Frank is developed by a fellow thoughtworker Pete Hodgson. It's a light weight UI based automation tool. It's very easy to set up and is apt for testing native iOS app.  It's based on cucumber and UISpec and can be used to write acceptance test for iOS app. Let me brief some steps needed to set it up, it's suggested that you traverse to the iOS application root's directory and then run these commands :

  • You need to install the frank-cucumber gem. Run the command "gem install frank-cucumber"
  • Next command is "frank setup". This command will create the Frank sub-directory which will contain files needed to generate the Frankified version of the application.
  • Next command is "frank build" which will create the Frankified version of the application.
  • If you want to run the Frankified version of the application then run the command "frank launch"
  • Under the Frank folder, there is a folder named "features" which contains the default test under the file "my_first.feature" as well as the necessary and supporting files.
In case you want to run the sample test, run the command "cd Frank" and then "cucumber".

Let's take a moment to understand how Frank works. Frank embeds a HTTP server (Objective-C Server) in the test version of the application which will be run when the app is invoked. Then the cucumber driver within the test framework sends command to the application via this internal HTTP server to control it remotely. Frank comes with bunch of ready to use cucumber steps which will get you running instantly.

Quick note is having "Accessibility" feature enabled before running the tests. Navigate to "System Preferences", select "Accessibility" grouped under "System" and then select the checkbox for "Enable access for assistive devices".

One of the best thing which comes with Frank is Symbiote. To firebug fans, it's like firebug for iPhone application. It lets you play with view selectors. Run the frankified version of the application using "frank launch", then hit the URL http://localhost:37265. It will show up the app in the symbiote (refer the pic below).

Some informative links are:
I would suggest the fellow readers to give this tool a try.

Web Analytics