Continuous Integration and Code Coverage

Joshua Moody edited this page Mar 9, 2017 · 3 revisions

This page is maintained by the community.

Given the variety of CI systems and the complexity of administering them, it is not feasible for us to provide support or recommendations. We use Jenkins and Travis CI to test the Calabash iOS Toolchain. If you are interested to see how we do it, have a look at the scripts in these repositories:

Alex Denisov's build and execute


Setup Jenkins to run the iOS Simulator (possibly also Unit tests)

by Manuel Binna

Password Prompt Elimination

Issues with 'Developer Tools needs access ...' prompt


Code Coverage

Credit! This notes are due to Trevor Harmon (@vocaro) - thanks alot!

Make sure you are running Xcode 4.6 or above. Previous versions had a Gcov bug in Clang.

• In the project’s Build Settings, change the following options:

Generate Test Coverage Files = Yes
Instrument Program Flow = Yes

This will generate Gcov notes files (*.gcno) when the program is built.

• Gcov will not write all of the output data for coverage analysis unless the app exits cleanly. (Quitting the iOS Simulator kills the app and does not allow it to exit cleanly.) To exit the app cleanly at the end of each scenario, add the following to your app’s Calabash launch file (launch.rb):

After do |scenario|

• After the tests run, Gcov data files (*.gcda) will appear alongside the notes files in the app’s build directory. They can be analyzed with a tool such as CoverStory ( or gcovr ( Here is a script I use to generate a simple report using gcovr:

set -ex
DERIVED_DATA_DIRECTORY=`cut -d "=" -f 2 cucumber.yml | sed 's:/Build/Products/Test-iphonesimulator/'`
gcovr/gcovr -r $PWD/../.. -e Libs/* $OBJECT_DIRECTORY

Replace YOURAPP with your app and modify as necessary.

Another nice thing about gcovr is that it can generate XML data consumable by Cobertura, which generates very nice HTML coverage reports and has a Jenkins plugin.

Feel free to add any of this to the wiki.


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.