Test iOS Apps with UI Automation
A must read for the iOS architect, developer, and tester.
Sep. 23, 2013 11:41 AM
The book starts off by jumping right into capturing a script from the simulator and provides a nice overview of the Instrument's trace-document window.
One thing I must admit is that because of the book's size I really underestimated how valuable the information would be and how many topics would be covered. I normally only list the chapter to give you an idea of what the book covers, but for this review I have also include the sections in each chapter.
Chapter 1: UI Automation Overview
1.1 Capturing Our First Script from the Simulator
1.2 Finding Our Way around UI Automation
Chapter 2: Testing Behavior with UI Automation
2.2 Reporting Errors
2.3 Verifying that the Test Does What It Says
Chapter 3: Building a Test Suite
3.1 Testing with a Modal Alert View
3.2 Importing Script Files at Runtime
3.3 Testing Results from a Live API
3.4 Grouping Test Steps and Their Output
Chapter 4: Organizing Test Code
4.2 Describing the App with Screen Objects
4.3 Reusing a Generic Screen Prototype
4.4 Converting Our Test Suite to Screen Objects
Chapter 5: Maps, Gestures, and Alerts
5.1 Exploring the Map
5.2 Identifying Elements with Accessibility APIs
5.3 Testing with Gestures
5.4 Advanced Alert-Handling
Chapter 6: Strategies for Testing Universal Apps
6.1 Universalizing an Application
6.2 Finding Elements in the New Idiom
6.3 Building an iPad Test Suite with Reusable Pieces
6.4 Searching the Element Tree with Predicates
6.5 Advanced Predicate Usage and Beyond
Chapter 7: Automating Performance Tests
7.1 Setting Up Custom Instruments Templates
7.2 Capturing Steps to Reproduce a Memory Leak
7.3 Triggering Simulator Memory Warnings with AppleScript
7.4 Stress Testing
Chapter 8: Setting Up Application Data
8.1 Seeding Data in Xcode with Application Data Packages
8.2 Seeding Data Dynamically with a Factory
8.3 Choose Your Own Adventure with Environment Variables
8.4 Hiding Test-Setup Code from Release
Chapter 9: Stubbing External Services
9.1 Choosing a Geographical Location
9.2 Faking a Network-Service API
9.3 Wrapping Service APIs in a Facade
9.4 Stubbing a Facade with Data in the App Bundle
Chapter 10: Command-Line Workflow
10.1 Practicing with the Raw Commands
10.2 Automating the Build-and-Run Process with Rake
10.3 Reading Environment Variables from Script Files
10.4 Resetting the Simulator to Test Permissions
10.5 Running Tests on an Attached Device
Chapter 11: Third-Party Tools and Beyond
11.1 Enhancing UI Automation
11.2 Testing outside the Box
As you can see above the author covers a ton of topics. He also covers them in-depth. There is no filler text in this book. The author also has an excellent writing style which makes reading the text a pleasure.
Although the coverage of Instruments and writing scripts is what this book is all about, I must say the real value is the author's understanding of what it takes to do automated testing. If you have no experience with how difficult it can be, I would recommend reading Experiences of Test Automation.
When building universal applications you must build test scripts that account for the iPad and the iPhone interface. The chapter Strategies for Testing Universal Apps shows you how to do that.
With iOS performance is always one of the top quality attributes we need to give a lot of attention to. The chapter Automating Performance Tests shows us just how to do that. I also like that the author introduced custom templates in this chapter.
A few months ago one of our development teams asked us to write some Load Runner scripts for their application. It is a big COTS application that took 1.5 years to customize and configure, and that was only about 30% of what they had originally planned to do in 1 year. We gave them the list of what they would need to supply, which included a lot of things, but setting up application data and handling external services were included in the list. After they saw the list of what we would require from them for us to implement a test suite they decided not to move forward.
The source code examples the author supplies is organized and very usable. The code is broken down by chapters, and then within each chapter each it is broken down into steps.
Right now one of the projects I am on has outsourced the development of the project's iOS and Android development. Our team is just creating the services the devices will communicate with. As we get new builds of the iOS app to be tested, it is really nice having the scripts setup to run through the scenarios that should work, and also those that shouldn't work. Running the scripts makes sure nothing unexpected happened, and if it did, we can stop that build from going to the testers and save them a lot of time.
All in all this book is a must read for the iOS architect, developer, and tester.
Test iOS Apps with UI Automation: Bug Hunting Made Easy
Subscribe to the World's Most Powerful Newsletters
There is a huge demand for responsive, real-time mobile and web experiences, but current architectur...
Mar. 21, 2018 02:15 AM EDT Reads: 3,433
The standardization of container runtimes and images has sparked the creation of an almost overwhelm...
Mar. 20, 2018 10:45 PM EDT Reads: 1,599
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting ch...
Mar. 20, 2018 10:00 PM EDT Reads: 1,071
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As au...
Mar. 20, 2018 06:30 PM EDT Reads: 1,336
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news an...
Mar. 20, 2018 02:15 PM EDT Reads: 1,859
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novemb...
Mar. 20, 2018 01:15 PM EDT Reads: 4,170
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO an...
Mar. 20, 2018 01:00 PM EDT Reads: 1,811
DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its ...
Mar. 20, 2018 12:30 PM EDT Reads: 2,634
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will ...
Mar. 20, 2018 12:15 PM EDT Reads: 7,052
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, ...
Mar. 20, 2018 11:45 AM EDT Reads: 5,825
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing w...
Mar. 20, 2018 11:00 AM EDT Reads: 2,094
@DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novem...
Mar. 20, 2018 10:30 AM EDT Reads: 1,352
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to ...
Mar. 20, 2018 07:45 AM EDT Reads: 4,402
"We started a Master of Science in business analytics - that's the hot topic. We serve the business ...
Mar. 20, 2018 07:15 AM EDT Reads: 3,660
DXWorldEXPO LLC announced today that Dez Blanchfield joined the faculty of CloudEXPO's "10-Year Anni...
Mar. 20, 2018 06:15 AM EDT Reads: 1,144
"NetApp is known as a data management leader but we do a lot more than just data management on-prem ...
Mar. 19, 2018 04:00 PM EDT Reads: 3,457
As you move to the cloud, your network should be efficient, secure, and easy to manage. An enterpris...
Mar. 19, 2018 11:00 AM EDT Reads: 3,145
We call it DevOps but much of the time there’s a lot more discussion about the needs and concerns of...
Mar. 18, 2018 09:30 PM EDT Reads: 7,944
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based ...
Mar. 18, 2018 09:15 AM EDT Reads: 3,362
"Since we launched LinuxONE we learned a lot from our customers. More than anything what they respon...
Mar. 17, 2018 04:00 PM EDT Reads: 3,786