This workshop will be retired on May 31, 2020.
Recap2:17 with Amit Bijlani
Review UI testing technologies, how it is implemented and when it can be used.
This was a brief overview on UI testing. 0:00 Of course, there's a lot more you can do with it. 0:03 So check out the teacher's notes for further reading. 0:05 To recap, UI testing is baked into the XC test framework. 0:08 XC test, Apple's testing framework. 0:14 There are three main classes that help you run UI test. 0:17 XCUIApplication, a proxy class for 0:21 your target application that can launch or terminate the application. 0:24 It's also a starting point for finding UI elements. 0:30 XCUIElement, a proxy object for UI elements within your application. 0:34 Elements that can be identified by type, button, table, slider, etc, and 0:41 contain accessibility identifiers like, label and identifier. 0:46 Event synthesis to simulate user interactions on UI elements like taps, 0:52 swipes, typing etc. 0:58 And finally, XCUIElementQuery. 1:00 Query for a collection of elements that are visible to accessibility. 1:04 Filter elements by a type or look for a specific element using an identifier. 1:08 Matching several elements by using a predicate. 1:14 When should you use UI testing? 1:18 UI and unit testing provide a comprehensive testing strategy. 1:21 UI testing complements unit testing and is not a replacement. 1:25 It covers a broad range of functionality. 1:30 You can test common workflows or 1:33 you can test custom views that have distinct behavior and edge cases. 1:36 Enclosing by using queries elements and actions. 1:41 We can simulate a user interacting with our application 1:45 through the excess ability API. 1:49 This lets us simultaneously create UI level tests and 1:52 encounter accessibility gaps before our users do. 1:55 By creating a balance of UI testing and 1:59 unit testing, you can ship an app with minimal bugs. 2:02 I encourage you to take the projects you've created and add UI testing to them. 2:06 See how you can automate some of those common workflows. 2:11 Thanks for watching and see you next time. 2:15
You need to sign up for Treehouse in order to download course files.Sign up