News for hackers. Stuff that matters.
Re:IOS Integration Testing by Square by maximilianburke on Friday July 15, 2011 @07:51PM (#2769612)
Semi-related, does anyone perform automated unit test deployment, execution, and reporting on iOS devices? If so, how do you do it?

At my current company we have a rather large automated test infrastructure that builds and runs ~50 or so individual libraries and their associated unit test programs on around 20 different configurations for 10 different platforms. Most of these platforms have a way of doing an unattended deployment of our test programs (and associated data) to the device, execute the programs, and retrieve the output.

This isn't working on iOS though because of its dependency to Xcode. We've tried scripting Xcode with AppleScript but this is fragile and routinely breaks.

Has anyone tackled this problem and succeeded?

Re:IOS Integration Testing by Square by pkaler on Friday July 15, 2011 @10:54PM (#2769976)
Yup. I've setup a Jenkins server that uses a combination of xcodebuild and xcrun. The process:

  - clones the repo from git
  - builds with xcodebuild
  - signs/provisions with xcrun
  - creates a manifest file for over-the-air installs
  - copies the build to a server where users can install
  - saves off the symbol file for our crash server so it can symbolicate crashes
  - sends emails
It would run unit tests and integration tests if we had them. :)
Re:IOS Integration Testing by Square by maximilianburke on Saturday July 16, 2011 @12:05AM (#2770092)
Thanks for the xcrun hint! Does that still handle the application/data deployment and execution, or does it just automate the packaging? All the information I can gather about doing OTA deployment points to still requiring the user to initiate the download, and then run it. I'd like to avoid that if possible because of the sheer number of libraries we need to test.
Re:IOS Integration Testing by Square by aaronbrethorst on Friday July 15, 2011 @08:57PM (#2769756)
Have you tried xcodebuild? You should be able to execute unit tests from the command line with it.
Re:IOS Integration Testing by Square by ecito on Friday July 15, 2011 @09:57PM (#2769883)
scripting xcode UI to build a project? ouch, you're doing it wrong. Check out xcodebuild.

http://blog.jayway.com/2010/01/31/continuos-integration-for-...