Learn how to use UIAutomation to incrementally test your apps for problems while at the same time making them accessible. Find out about other ways in which you can use UIAutomation to eliminate repetitive tasks.
11. WHAT ARE AUTOMATED TESTS?
• Drive UI without any human interference
• A little like unit tests for GUI
12. WHAT ARE AUTOMATED TESTS?
• Drive UI without any human interference
• A little like unit tests for GUI
• Log progress (passes & fails)
13. WHAT ARE AUTOMATED TESTS?
• Drive UI without any human interference
• A little like unit tests for GUI
• Log progress (passes & fails)
• Find out quickly when something breaks
69. (SLIGHTLY) BETTER CODE
• Check your view hierarchy (use logElementTree())
• Find weaknesses and accessibility flaws in your code
70. (SLIGHTLY) BETTER CODE
• Check your view hierarchy (use logElementTree())
• Find weaknesses and accessibility flaws in your code
• Write tests that last
76. IMPROVE ACCESSIBILITY
• Excellent article by Matt Gemmell
http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/
77. IMPROVE ACCESSIBILITY
• Excellent article by Matt Gemmell
http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/
• Even Apple links to it
78. IMPROVE ACCESSIBILITY
• Excellent article by Matt Gemmell
http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/
• Even Apple links to it
• Essential for proper automation; two birds with one stone
81. TESTING YOUR UI
• UIALogger (logMessage, logStart, logPass, logFail)
82. TESTING YOUR UI
• UIALogger (logMessage, logStart, logPass, logFail)
• No built-in support for assertions (TuneUp JS)
83. TESTING YOUR UI
• UIALogger (logMessage, logStart, logPass, logFail)
• No built-in support for assertions (TuneUp JS)
• Works with continuous integration systems (using Instruments CLI
command)
92. RUNNING MULTIPLE TESTS
• Run three separate tests
• Add & delete Spaghetti
• Go to yesterday, add and delete a Steak
93. RUNNING MULTIPLE TESTS
• Run three separate tests
• Add & delete Spaghetti
• Go to yesterday, add and delete a Steak
• Add an item, tweet it and delete it
97. MORE THINGS YOU CAN DO
• Handle unexpected & expected alerts
98. MORE THINGS YOU CAN DO
• Handle unexpected & expected alerts
• Multitasking (deactivate app for any given duration)
99. MORE THINGS YOU CAN DO
• Handle unexpected & expected alerts
• Multitasking (deactivate app for any given duration)
• Orientation changes
100. MORE THINGS YOU CAN DO
• Handle unexpected & expected alerts
• Multitasking (deactivate app for any given duration)
• Orientation changes
• Set location
101. MORE THINGS YOU CAN DO
• Handle unexpected & expected alerts
• Multitasking (deactivate app for any given duration)
• Orientation changes
• Set location
• Gestures
104. MORE THINGS YOU CAN DO
• Take screen shots
• Automate screen shots for the App Store
105. MORE THINGS YOU CAN DO
• Take screen shots
• Automate screen shots for the App Store
• Even in multiple languages!
106. MORE THINGS YOU CAN DO
• Take screen shots
• Automate screen shots for the App Store
• Even in multiple languages!
• Easily reproducible screen casts (with perfect timing)
107. MORE THINGS YOU CAN DO
• Take screen shots
• Automate screen shots for the App Store
• Even in multiple languages!
• Easily reproducible screen casts (with perfect timing)
• Document your test runs
114. WHAT’S NOT SO GOOD ABOUT
UIAUTOMATION?
• No way to set up or reset state (may have to exit on fail)
115. WHAT’S NOT SO GOOD ABOUT
UIAUTOMATION?
• No way to set up or reset state (may have to exit on fail)
• Only runs via Instruments
116. WHAT’S NOT SO GOOD ABOUT
UIAUTOMATION?
• No way to set up or reset state (may have to exit on fail)
• Only runs via Instruments
• Might need arcane shell scrips to integrate into CI tools
117. WHAT’S NOT SO GOOD ABOUT
UIAUTOMATION?
• No way to set up or reset state (may have to exit on fail)
• Only runs via Instruments
• Might need arcane shell scrips to integrate into CI tools
• No built-in method for mock objects
118. WHAT’S NOT SO GOOD ABOUT
UIAUTOMATION?
• No way to set up or reset state (may have to exit on fail)
• Only runs via Instruments
• Might need arcane shell scrips to integrate into CI tools
• No built-in method for mock objects
• Very young, still maturing
120. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
121. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
122. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
123. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
124. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
125. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
126. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
127. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
128. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
129. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
130. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
131. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
132. WHAT ELSE IS THERE?
Product Good Bad Ugly
Languages
Squish Commercial Eclipse
Platforms
KIF Objective-C Private API Setup
Natural
Calabash Setup Client/Server
Language
136. SUMMARY
• Automated testing is awesome
• Better with accessibility support
137. SUMMARY
• Automated testing is awesome
• Better with accessibility support
• Build cases to test your application’s features
138. SUMMARY
• Automated testing is awesome
• Better with accessibility support
• Build cases to test your application’s features
• Automate repetitive tasks
143. FURTHER READING
• Jonathan Penn
• http://cocoamanifest.net/
• “jonathanpenn” on Twitter and Github
• Alex Vollmer
• http://alexvollmer.com
• “alexvollmer” on Twitter and Github
150. PHOTO CREDITS
• “Lazy Dog” by Hector Garcia (http://www.flickr.com/photos/torek/2467519466/)
• “There Isn’t An App For That” by Martha Soukup (http://www.flickr.com/photos/
soukup/5157648804/)
• “Titanic” by Javier Carcamo (http://www.flickr.com/photos/javic/7081573725/)
• “Tesla Motors Assembly Line” by Steve Jurvetson (http://www.flickr.com/photos/
jurvetson/6858583426/)
151. # obj cgn 12”
cial tag: “Obj CGN
Offi ac/iPad”:
ne/M
i-Fi “iPho
W
This must be
the last page.