Running Frank on real device

Is this situation familiar to you?

Your group has a server (which is written in Java or C#) with a DB (mySql/SQL Server etc.) and some web services (JSON, SOAP, XMLRPC), a website and an iPhone application (objective C).

You want to automate your testing cycle, you also want to use a CI tool like Jenkins to run nightly regression tests but your QA team does not have the knowledge base to deal with all of the above technologies and you will also need a testing framework that will handle your system testing regardless the coding language.

There are a lot of testing frameworks around to choose from: Jsystem, TestNG, Junit, Robot etc. that can be integrated with all of the popular technologies including CI tools (with the help of our engineers:)), but you already knew that, this blog is about our latest solution in mobile testing using Frank framework. 

“Frank allows you to write structured text test/acceptance tests/requirements (using Cucumber) and have them executed against your iOS application.” (

“Frank uses a combination of Cucumber and JSON commands that are sent to a server running inside your native application, and leverages UISpec to run the commands. Frank used to require changes to your production code, but that’s got a lot easier with the new static library approach”.

Is it?

As mentioned above Frank is using JSON communication to control your application and Ruby based framework to run tests from your desktop, we have written a Java library for testing your application that can be integrated in your system tests scenarios and in your CI process.

Sure, it will all work fine as long as you are using the iOS simulator, but some of our clients wanted to run their tests on real devices and also Frank’s user group is filled with questions about using frank with real devices.

After some research here are the steps to run “Frankified” application on your device

  1. Setup frank in the application directory by the command “frank setup”

  2. Add the static resource bundle from “Frank” library that had been created in your application folder to the XCode project manually. (a guide is attached later on this document)

  3. Build frank manually using the following command:

    xcodebuild -xcconfig Frank/frankify.xcconfig clean build  -arch armv7 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT=”</deployment/location/>” FRANK_LIBRARY_SEARCH_PATHS=”\”</application/path>/Frank\””

  4. Install the application manually using Fruitstrap by the following command

    ./fruitstrap -i <device ID> -b </deployment/location/>

  5. Run the application on device by the following command

Instruments -w <device ID> -t “/Applications/ Monitor.tracetemplate” -D ~/Desktop/instruments.log </deployment/location/>

How to add a static bundle

  1. right click on the project root and click “Add files to <project name>”
  2. add the “frank_static_resources” boundle from Frank library that was created in your project
  3. go to “build phases” tab in  your project target
  4. drag frank’s bundle into “Copy Bundle Resources” section
  5. that’s it 

Nir Armon