News for hackers. Stuff that matters.
Re:IOS Integration Testing by Square by puls on Friday July 15, 2011 @03:26PM (#2768712)
Any questions? We'll be around to answer them.
Re:IOS Integration Testing by Square by micampe on Friday July 15, 2011 @06:19PM (#2769365)
Why didn't you use UIAutomation? Was it lacking?

(http://developer.apple.com/library/ios/#documentation/Develo...)

Re:IOS Integration Testing by Square by spindel on Friday July 15, 2011 @07:16PM (#2769518)
1. You can't automate running of the UIAutomation tests. Square really wanted this for continuous integration.

2. Writing the UIAutomation scripts is really tedious (though it's much better in iOS [redacted]).

3. The UIAutomation tests ran very slowly.

4. Having to write all the tests in JavaScript isn't very flexible.

That said, just like UIAutomation, KIF stands on the shoulders of the great accessibility features in iOS. In many ways KIF is like an Objective-C version of UIAutomation.

Re:IOS Integration Testing by Square by micampe on Saturday July 16, 2011 @01:46PM (#2771206)
I’m kinda surprised by #2: I would think a scripting language to be ideal for this kind of thing.
Re:IOS Integration Testing by Square by spindel on Monday July 18, 2011 @01:23AM (#2775216)
Our iOS team at Square is more comfortable and efficient writing tests (and test libraries) in Objective-C than JavaScript. We actually wouldn't gain much from the 'scripting language'-ness of JavaScript, and the additional language and tool (Instruments) would make writing tests more complicated and painful.
Re:IOS Integration Testing by Square by hinathan on Friday July 15, 2011 @06:09PM (#2769338)
Nice! I've been looking for some proper iOS functional testing for a weekend project. Along with WaxSim this feels like enough plumbing to roll into a Jenkins plugin.
Re:IOS Integration Testing by Square by ecito on Friday July 15, 2011 @05:28PM (#2769194)
How hard would it be to add gesture support? double tap here, swipe left there, etc.

Are accessibility labels the only way to reference views?

Re:IOS Integration Testing by Square by puls on Friday July 15, 2011 @05:46PM (#2769260)
Indeed, accessibility labels are the only way to reference views. Granted, your tests are running within your process, so they sky is pretty much the limit.

We're still considering the best way to implement gestures. There's some rudimentary support, but it's incomplete right now. Your input is welcome!

Re:IOS Integration Testing by Square by firestone on Sunday July 17, 2011 @07:44PM (#2774530)
Also, keep in mind that many views just "do the right thing" as far as accessibility goes. Buttons for example will use their title as the default accessibility label if you don't set one explicitly.
Re:IOS Integration Testing by Square by adolph on Saturday July 16, 2011 @10:05AM (#2770776)
Does someone have to watch the integration test occur, or does it report errors to something?
Re:IOS Integration Testing by Square by firestone on Sunday July 17, 2011 @07:43PM (#2774526)
It should report errors automatically. For the most part, it will detect problems automatically because a step will fail to execute. The reason is reported in the log that KIF creates. For example, if you had steps to (1) enter the user name (2) enter the password (3) click "sign in" (4) hit the refresh button

If the login failed for some reason, then step (4) would fail because it wouldn't be able to find the refresh button.

You can also add explicit verification steps, such as "wait for the view with the accessibility label 'Refresh'" if you want further validation.

Re:IOS Integration Testing by Square by adolph on Wednesday July 20, 2011 @04:40PM (#2787340)
Thanks!