John, Nolan and Darryl discuss Xcode 7’s new support for UI tests.
Tweet Shoutouts
@iOhYesPodcast keyboard cursor on 6S, 6S+ requires a force touch, rather than two fingers— Dov Frankel (@DovFrankel) October 14, 2015
@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
@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
@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
@AshtonDev @iOhYesPodcast setting default values through schemes is useful when running acceptance tests suites too— You can call me Joe (@mokagio) October 15, 2015
@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
@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
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
WWDC Session UI Testing in Xcode
Joe Masilotti’s UI Testing in Xcode
Big Nerd Ranch’s UI Testing in Xcode 7, Part 1
Giovani Lodi’s Xcode 7 UI Testing, a first look
Picks
John
Quick BDD Framework for iOS (Swift and Obj-C)
Use code snippets Apple Doc on Snippets
Nolan
Star Wars: Episode VII Got nothing for iOS, but here’s the latest Star Wars trailer
Darryl
iOS Security Guide (iOS 9 and later)
Alternative Show Title Suggestions
Javascript, Javascript, Javascript!
Get the hell out of non-profits
Jump on the band wagon
Gotcha
I Love Star Wars