3

iOS Integration Testing, Part 2

 2 years ago
source link: https://developer.squareup.com/blog/ios-integration-testing-part-2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
iOS Integration Testing, Part 2
November 4th, 2011 | 2 minute read

iOS Integration Testing, Part 2

A continuous integration server for running your tests on every commit.

Twitter
Facebook
Reddit
LinkedIn

Written by Jim Puls.

A few months ago, we released KIF, our integration testing framework for iOS. We’ve heard from dozens of teams and companies using KIF to keep their apps functional, and we have over 600 followers and 50 forks on GitHub. The response has been astounding.

Of course, once you’ve written a whole series of tests, you’ll want to run them after every single commit. This is called continuous integration, and without it, you’ve squandered much of the value of automating your testing in the first place. But since comprehensively testing your app can involve running through it in dozens or even hundred of different permutations, it can be a slow process. As such, you want to set up a server that does it for you.

At the end of the post in July, we mentioned that you can use KIF in a continuous integration setup using a nice hack called WaxSim with the CI server of your choice. That works relatively well, but it requires a lot of work:

  1. Write your KIF tests
  2. Set up a server like Jenkins or CruiseControl.rb
  3. Install the appropriate plugins to work with Git
  4. Write a script to run your app in WaxSim with KIF tests turned on

We went through the entire process at Square — in our case, first with CruiseControl.rb and later with Jenkins — and we decided it left a lot to be desired, so we did what we always do: we innovated.

Today we’re happy to announce Zapp, a continuous integration (CI) server that tells KIF what to do. Among our goals in making Zapp were ease of setup and compatibility with your existing systems; to that end, Zapp has no dependencies on your system beyond Xcode 4.2 being installed. Zapp also outputs build RSS feeds in the same format as Jenkins does, so you can use it with aggregators like CiMonitor.

Setting up Zapp couldn’t be simpler: all you do is pick a folder that you’re already cloned on to your machine, pick the scheme you’re running, and pick the simulator version you want to use to run it.

https___cdn-images-1.medium.com_max_2000_0_M1SrQt0MHmVsosWg.png

Zapp will poll your remote repository every minute or so to see if anything new has shown up, and if it has, Zapp will queue a build. If all of your KIF tests pass, your builds will be green; if any of them fail, your builds will be red.

Just like we did with KIF, we’re making Zapp available as open source on GitHub, and more information is available in the embedded README. Check it out, and let us know what you think. Discussion is welcome at the KIF discussion group, or use the tag “zapp” on Stack Overflow. We’ve found Zapp really useful, and we hope you do too. Jim Puls - Profile Eternally curious.medium.com

Picture of Square Engineering

By Square Engineering
@SquareEngMedium


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK