O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mastering Mobile Test Automation

Book Description

Master the full range of mobile automation and testing techniques to develop customized mobile automation solutions

In Detail

Mobile testing and the cross-platform validation of applications is both a challenging and lucrative area of expertise where organizations aspire to leverage automation.

The book begins by teaching you the basics of mobile testing and automation to help you develop an in-depth understanding of mobile automation concepts and techniques. Moving on, the scalability is put into focus by taking you through learning mobile automation techniques with web browsers and progressing on to emulators and simulators. Helping you get accustomed to physical as well as cloud automation, the books lays a solid foundation for advanced topics that involve optimization and strategizing to deliver state-of-the-art solutions. Leading test automation tools such as UFT (formerly QTP) and Selenium - the leader in open source tools, along with specialized mobile test automation tools such as Experitest SeeTest and Cloud-based mobile automation solutions like Mobile Labs and Perfecto Mobile have been used to explain the concepts. By the end of the book, you will have an in-depth understanding of mobile automation techniques as well as the solutions to various challenges faced.

What You Will Learn

  • Explore and configure the various types of mobile application packages for mobile test automation
  • Automate mobile web applications through user agent simulation technique
  • Analyze and interpret different types of test automation frameworks with respect to the mobile platform automation
  • Implement techniques and set up labs to deliver a sustainable and comprehensive mobile test automation environment
  • Automate and test using physical devices as well as emulation and simulation of mobile platforms
  • Get in depth understanding of cloud based mobile testing and automation techniques
  • Configure, manage, and maintain a mobile automation test suite for optimum productivity and Return on Investment
  • Troubleshoot and employ industry best practices in a mobile testing environment

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Mastering Mobile Test Automation
    1. Table of Contents
    2. Mastering Mobile Test Automation
    3. Credits
    4. About the Authors
    5. Acknowledgements
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Ensuring Five-star Rating in the MarketPlace
      1. Introduction to mobile test automation
      2. Mobile application packages
        1. Native applications
        2. Mobile web applications
        3. Hybrid applications
      3. Factors to be considered during mobile testing
      4. Mobile automation testing approaches
        1. Automation using real devices
          1. Steps to set up automation
          2. Limitations of this automation
        2. Emulators-based automation
          1. Steps to set up automation
          2. Advantages
          3. Limitations
        3. User agent-simulation-based automation
          1. Steps to set up the automation
          2. Advantages
          3. Limitations
        4. Cloud-based automation
          1. Steps to set up the automation
          2. Advantages
          3. Limitations
      5. Types of mobile application tests
      6. Selection of the best mobile testing approach
      7. Troubleshooting and best practices
      8. Summary
    10. 2. Designing Mobile Automation Frameworks
      1. Selecting an automation tool
      2. Types of mobile automation frameworks
        1. The functional decomposition or test script modularity framework
          1. Implementation required for mobile testing
        2. The data-driven framework
          1. Implementation required for mobile testing
        3. The keyword-driven framework
          1. Implementation required for mobile testing
        4. The hybrid framework
          1. Implementation required for mobile testing
          2. Support libraries
        5. Optimizing the combination of approach and framework
        6. A robust reporting mechanism
        7. The automation feasibility analysis
        8. Test library management
        9. Version control
        10. Change control
      3. Summary
    11. 3. User Agent – automating Mobile Applications with Browsers
      1. Introduction
        1. A user agent string
      2. User agent simulation for mobile
        1. User agent plugin programs
        2. Setting up a mobile test automation lab for user agents
          1. Setting up the user agent add-on for Mozilla Firefox
          2. Setting up a user agent add-on for Google Chrome
        3. Advantages of this approach
        4. Limitations of this approach
      3. The Hybrid framework implementation for the user agent
        1. The UFT code snippet
        2. The Selenium code snippet
      4. Troubleshooting and best practices
      5. Summary
    12. 4. Emulators and Simulators – the Automation of Emulated Devices
      1. Introduction to mobile emulators
      2. Setting up a mobile emulators for automation
        1. The Android emulator setup
          1. Automating the Android emulator with Selenium WebDriver
          2. Code snippet
        2. The iOS simulator setup
          1. Code snippet
      3. Implementing a mobile test automation framework for emulators
        1. The Appium architecture
        2. The Appium setup
          1. Android on the Windows OS
          2. Appium on the Mac OS
        3. Scripting and execution with Appium
          1. Scripting and object property extraction
          2. Execution
          3. Code snippet
          4. Capabilities of the Android emulator for versions lower than 4.2 and hybrid applications
      4. Advantages of mobile emulators
      5. Limitations of mobile emulators
      6. Troubleshooting and best practices
      7. Summary
    13. 5. Automating Physical Devices
      1. Getting started
      2. Automation technologies with real devices
        1. Automation with the optical recognition technology
        2. Automation with AUT code instrumentation
        3. Automating with native device methods
        4. Object Identification with leading tools
      3. Automation on real devices with various tools
        1. Automation with Appium on real devices
          1. Code snippet for Appium with real devices
          2. Capabilities for Android devices with versions below 4.2
        2. Automation with SeeTest on real devices
          1. Configuring a SeeTest license
          2. SeeTest tool configuration
          3. Configuring a real mobile device for automation
            1. Android devices
            2. iOS-based devices
            3. Windows-based devices
            4. Blackberry devices
          4. Instrumentation of a mobile application
            1. Android platform
            2. iOS platform
            3. Windows platform
            4. Blackberry platform
            5. Mobile web applications
          5. Creating scripts
          6. Exporting scripts for integration with other execution environments
            1. WebDriver code snippet
            2. UFT code snippet
      4. Advantages and limitations of this technique
      5. Troubleshooting and best practices
      6. Summary
    14. 6. Automating on Cloud
      1. Getting started with cloud automation
      2. Prominent mobile cloud automation tools
      3. A private cloud lab setup
        1. Integrating automation tools such as UFT and Selenium
      4. Automation scripting with cloud devices
        1. Automating with inbuilt cloud tool automation support
          1. Test data parameterization
          2. Interrupt scenario automation
          3. Execution and reporting
        2. Automating with third-party automation tools
          1. Scripting with UFT
          2. Scripting with Selenium
      5. Troubleshooting and best practices
      6. Summary
    15. 7. Optimizing Test Strategy and Estimation
      1. Lifecycle of a mobile test automation project
      2. Requirement gathering and analysis
      3. Device matrix creation
        1. Optimization of the device coverage matrix
      4. Optimizing the test automation strategy
      5. The automation feasibility analysis
      6. Effort estimation
      7. Return on investment
        1. RoI calculation
        2. The RoI analysis
      8. Best practices to maximize the RoI
        1. Automation framework design and development
        2. Test scripting
        3. Automation suite execution
          1. The execution manager
        4. Extensibility and maintenance
      9. Some more best practices
      10. Summary
    16. 8. Delivering Customer Delight
      1. Customer delight – internal and external
      2. An ideal mobile test automation framework
      3. Mobile automation for agile projects
        1. DevOps and shift left
        2. Behavior-driven development
        3. Continuous integration for mobile automation
      4. Some sample mobile projects
        1. Project 1 – an insurance provider's web application
          1. Testing requirements
          2. Optimization
          3. The solution
        2. Project 2 – automobile manufacturer's car dashboard and health-check application
          1. Testing requirements
          2. Optimization
          3. The solution
        3. Project 3 – using a web and hybrid application to enable BYOD for a secure banking application
          1. Testing requirements
          2. Optimization
          3. The solution
      5. Best practices
      6. Summary
    17. Index