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
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing w...
Jun. 20, 2018 03:45 AM EDT Reads: 5,264
Disruption, Innovation, Artificial Intelligence and Machine Learning, Leadership and Management hear...
Jun. 20, 2018 03:00 AM EDT Reads: 1,527
"We host and fully manage cloud data services, whether we store, the data, move the data, or run ana...
Jun. 20, 2018 02:45 AM EDT Reads: 15,558
Enterprises are striving to become digital businesses for differentiated innovation and customer-cen...
Jun. 20, 2018 02:30 AM EDT Reads: 1,576
DXWorldEXPO LLC announced today that Telecom Reseller has been named "Media Sponsor" of CloudEXPO | ...
Jun. 20, 2018 02:30 AM EDT Reads: 4,963
Enterprise architects are increasingly adopting multi-cloud strategies as they seek to utilize exist...
Jun. 20, 2018 02:00 AM EDT Reads: 5,448
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As au...
Jun. 20, 2018 01:30 AM EDT Reads: 2,941
"Calligo is a cloud service provider with data privacy at the heart of what we do. We are a typical ...
Jun. 20, 2018 12:00 AM EDT Reads: 5,148
We are seeing a major migration of enterprises applications to the cloud. As cloud and business use ...
Jun. 19, 2018 11:45 PM EDT Reads: 2,223
Discussions of cloud computing have evolved in recent years from a focus on specific types of cloud,...
Jun. 19, 2018 11:30 PM EDT Reads: 7,276
Containers and Kubernetes allow for code portability across on-premise VMs, bare metal, or multiple ...
Jun. 19, 2018 11:15 PM EDT Reads: 2,486
DXWorldEXPO LLC announced today that "IoT Now" was named media sponsor of CloudEXPO | DXWorldEXPO 20...
Jun. 19, 2018 10:30 PM EDT Reads: 2,665
Modern software design has fundamentally changed how we manage applications, causing many to turn to...
Jun. 19, 2018 06:45 PM EDT Reads: 4,335
In this presentation, you will learn first hand what works and what doesn't while architecting and d...
Jun. 19, 2018 06:15 PM EDT Reads: 2,138
In an era of historic innovation fueled by unprecedented access to data and technology, the low cost...
Jun. 19, 2018 06:00 PM EDT Reads: 11,646
In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, discu...
Jun. 19, 2018 03:00 PM EDT Reads: 6,288
Everyone wants the rainbow - reduced IT costs, scalability, continuity, flexibility, manageability, ...
Jun. 19, 2018 02:45 PM EDT
Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT...
Jun. 19, 2018 02:30 PM EDT Reads: 3,177
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novemb...
Jun. 19, 2018 02:00 PM EDT Reads: 2,639
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point wh...
Jun. 19, 2018 12:15 PM EDT Reads: 5,209