Book Image

Mastering Mobile Test Automation

Book Image

Mastering Mobile Test Automation

Overview of this book

Table of Contents (16 chapters)
Mastering Mobile Test Automation
About the Authors
About the Reviewers


This book will guide you to develop an in-depth understanding of mobile automation concepts and techniques to design, implement, and deliver customized mobile automation solutions with real, emulated devices and cloud-based mobile testing tools, such as Perfecto Mobile, and Mobile Labs, integrated with traditional tools, such as UFT and Selenium, and other leading tools in the market, such as ExperiTest SeeTest.

This book is a comprehensive reference guide to every aspect of mobile test automation and can be used in any organization that is engaged in test automation and /or takes up mobile test automation.

What this book covers

Chapter 1, Ensuring Five-star Rating in the MarketPlace, explains how mobile test automation is different from traditional functional automation and what the typical challenges are that you have to overcome. This chapter provides you with a brief overview of the different techniques used for mobile automation. These techniques are elaborated in later sections of the chapter. This section explains why and how there are different techniques.

Chapter 2, Designing Mobile Automation Frameworks, explains the various types of automation frameworks with respect to mobile automation, such as functional decomposition, keyword-driven, data-driven, and hybrid, with a focus on mobile-specific differences. This has real examples of working code for various tools.

Chapter 3, User Agent – automating Mobile Applications with Browsers, provides you with the opportunity to learn the use of the user-agent technique, along with the code snippets and lab setup for this technique. We will also delve into the advantages and disadvantages of this technique.

Chapter 4, Emulators and Simulators – the Automation of Emulated Devices, explains the use of emulators and simulators for mobile test automation, along with the code snippets and lab setup for this technique. We will also delve into the advantages and disadvantages of this technique.

Chapter 5, Automating Physical Devices, showcases the techniques required to automate a mobile application with physically present real mobile devices.

Chapter 6, Automating on Cloud, provides you with the opportunity to learn the techniques required to automate a mobile application with cloud tools such as Perfecto Mobile and Mobile Labs.

Chapter 7, Optimizing Test Strategy and Estimation, deals with the selection of the most suitable strategy to focus on maximizing the return on investment for automation and the ways to avoid any potential pitfalls. We will also look at the various technical aspects that are usually overlooked and only become apparent at the end of a delivery cycle. This chapter deals with how to estimate your mobile automation effort.

Chapter 8, Delivering Customer Delight, sums up all the lessons learnt in the previous chapters and covers the test strategy planning, project effort optimization, ways to maintain the automation suite, resource identification, and the management of hardware and software.

What you need for this book

A familiarity with functional automation testing would help, but it is not a prerequisite as all concepts are explained in a detailed manner in this book. To work with the examples practically, you need to use any given tool for mobile test automation such as:

  • Selenium (WebDriver 2.0 with Android and iOS Driver)

  • Appium

  • HP UFT 12.00 or a later version

  • Perfecto Mobile

  • ExperiTest SeeTest

Who this book is for

The core audiences are mobile application developers, QAs, project managers, and automation and manual testers who are beginning to learn or are working on any mobile testing assignment.


In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The keywords array contains the list of all keywords for a particular test case denoted by a row in the BusinessFlow excel file."

A block of code is set as follows:

'Test Script 1: To validate that application Login is allowed with valid credentials
'Open EMail
'Enter the details

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "After installation of Firefox User Agent add-on from the add-on market, it is accessible from Tools menu."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.


If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.