89: All About UI Testing

Published: Oct. 21, 2015, 3 p.m.

John, Nolan and Darryl discuss Xcode 7’s new support for UI tests.\n\n\n\nTweet Shoutouts\n\n\n\n\n@iOhYesPodcast keyboard cursor on 6S, 6S+ requires a force touch, rather than two fingers— Dov Frankel (@DovFrankel) October 14, 2015\n\n\n\n\n@iOhYesPodcast 3D Touch on the6S keyboard will move the cursor like iPad. 9 beta 2 had it. Removed in 3.— Shared Instance (@sharedinst) October 16, 2015\n\n\n\n\n@AshtonDev @iOhYesPodcast Enjoyed Ashton's appearance on the latest epidode of iOhYes talking about hidden power features of XCode— Adam Campbell (@AnAdamInAus) October 15, 2015\n\n\n\n\n@AshtonDev finally guest on @iOhYesPodcast sharing great tips to level up your Xcode skills https://t.co/CUAFA0HcPx— You can call me Joe (@mokagio) October 15, 2015\n\n\n\n\n@AshtonDev @iOhYesPodcast setting default values through schemes is useful when running acceptance tests suites too— You can call me Joe (@mokagio) October 15, 2015\n\n\n\n\n@iOhYesPodcast Just finished an iOS bootcamp, no CS degree, minimal developer experience. Job hunt as Jr. Dev has been rough. Any advice?— Sean Allen (@SeanA0400) October 16, 2015\n\n\n\n\n@iOhYesPodcast Just finished an iOS bootcamp, no CS degree, minimal developer experience. Job hunt as Jr. Dev has been rough. Any advice?— Sean Allen (@SeanA0400) October 16, 2015\n\n\n\n\n\n\n\n\n\nDiscussion: App Testing with Xcode 7\n\n\n\n\n\nAre you (hosts) testing your apps?\n\n\nJohn\u2019s philosophy on testing\n\nWhy should I test?\n\n\nWhen should I test?\nAutomated vs. Manual\n\nProblems with the old, Instruments-based UI testing solution\n\n\nJavaScript\nJavaScript\nJavaScript\n\nAlternatives prior to Xcode 7\n\n\nKIF\nSubliminal\nQuick\nSlepnir\n\nApple\u2019s new UI testing in Xcode\n * Requires iOS 9/Mac OS X 10.11\n\n\nTest Recording\nLeverages \u201cAccessibility\u201d\nUI Testing Targets\nAPI components\nAssertions, XCTAssert\n\nElements, XCUIElement\n\n\nProxy for UI things, exposes object type and accessibility label\n\n\nQueries, XCUIElementQuery\n\n\nTree navigation, similar to XPath\nRelationships and Filtering\n\u201capp.tables\u201d is actually a convenience method for app.descendantsMatchingType(\u2018table\u2019)\n\n\nApplication, XCUIApplication\n\n\nProxy for the application under test, separate and new process\n\n\nDealing with Gotchas\n\n\nSimulating events\n\n\nNo long press, roll your own with pressForDuration\nNo 3d touch press (AFAIK)\n\nWait for\u2026\n\n\nusing waitForExpectationsWithTimeout\nwithout an explicit wait, a total of 3 attempts will be made to resolve a query before failing\n\nRace conditions\nItem not visible to accessibility\n\n\nNote: \u201cisAccessibilityElement\u201d does NOT need to be true in order to be \u201cvisible to accessibility\u201d\n\n\nResources\n\n\nWWDC Session UI Testing in Xcode\nJoe Masilotti\u2019s UI Testing in Xcode\nBig Nerd Ranch\u2019s UI Testing in Xcode 7, Part 1\nGiovani Lodi\u2019s Xcode 7 UI Testing, a first look\n\n\n\n\n\n\nPicks\n\n\n\n\nJohn\n\n\n\n\n\nQuick BDD Framework for iOS (Swift and Obj-C)\nUse code snippets Apple Doc on Snippets\n\n\n\n\n\nNolan\n\n\n\n\n\nStar Wars: Episode VII Got nothing for iOS, but here\u2019s the latest Star Wars trailer\n\n\n\n\n\nDarryl\n\n\n\n\n\niOS Security Guide (iOS 9 and later)\n\n\n\n\n\nAlternative Show Title Suggestions\n\n\n\n\n\nJavascript, Javascript, Javascript!\nGet the hell out of non-profits\nJump on the band wagon\nGotcha\nI Love Star Wars