iOhYes Retired


A podcast by iOS developers for iOS developers, delivering news, tips, and rants for professional iOS/Mac developers, with something for enterprise and indie developers alike.

Hosted by Darryl Thomas and John Sextro.

← Previous Episode   |   Next Episode →

89: All About UI Testing

October 21, 2015 at 10:00AM • 1 hour 15 minutes • Wiki Entry

John, Nolan and Darryl discuss Xcode 7’s new support for UI tests.

Tweet Shoutouts

Discussion: App Testing with Xcode 7

  • Are you (hosts) testing your apps?
    • John’s philosophy on testing
  • Why should I test?
    • When should I test?
    • Automated vs. Manual
  • Problems with the old, Instruments-based UI testing solution
    • JavaScript
    • JavaScript
    • JavaScript
  • Alternatives prior to Xcode 7
    • KIF
    • Subliminal
    • Quick
    • Slepnir
  • Apple’s new UI testing in Xcode * Requires iOS 9/Mac OS X 10.11
    • Test Recording
    • Leverages “Accessibility”
    • UI Testing Targets
    • API components
    • Assertions, XCTAssert
  • Elements, XCUIElement
    • Proxy for UI things, exposes object type and accessibility label
      • Queries, XCUIElementQuery
        • Tree navigation, similar to XPath
        • Relationships and Filtering
        • “app.tables” is actually a convenience method for app.descendantsMatchingType(‘table’)
    • Application, XCUIApplication
      • Proxy for the application under test, separate and new process
  • Dealing with Gotchas
    • Simulating events
      • No long press, roll your own with pressForDuration
      • No 3d touch press (AFAIK)
    • Wait for…
      • using waitForExpectationsWithTimeout
      • without an explicit wait, a total of 3 attempts will be made to resolve a query before failing
    • Race conditions
    • Item not visible to accessibility
      • Note: “isAccessibilityElement” does NOT need to be true in order to be “visible to accessibility”
  • Resources





Alternative Show Title Suggestions

  • Javascript, Javascript, Javascript!
  • Get the hell out of non-profits
  • Jump on the band wagon
  • Gotcha
  • I Love Star Wars

This episode of iOhYes is brought to you by Braintree. Thanks to Braintree for supporting iOhYes and 5by5. Check them out at