Last Updated: February 25, 2016
·
1.62K
· stepanhruda

Travis CI + Xcode 5 + Kiwi + xctool

TL;DR Use xctool 0.1.7 to run Kiwi tests on Travis CI

Problem

The shiny CI solution provider, Travis CI, just started supporting iOS 7 SDK and Xcode 5. If your unit test suite is written in Kiwi, you might have noticed none of your tests actually get executed.

Discussion

This is caused by a Homebrew update on the Travis CI boxes, which subsequently causes to use a new version of xctool. As much as we all love xctool, as of 0.1.13 it doesn't support running tests with Kiwi and Specta.

Solution

  1. Download this gist by Matti Schneider and check it into your repository.

(Note: you might need to make it executable: chmod +x brewv.)

  1. In .travis.yml, include:
script:
  - ./brewv xctool 0.1.7
  - brew switch xctool 0.1.7
  - xctool test -workspace YourWorkspace.xcworkspace -scheme YourTestScheme -sdk iphonesimulator7.0

This will switch to an older version of xctool that is capable of running your test suite.

Keep on testing!