Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mobile Test Automation with Appium

You're reading from   Mobile Test Automation with Appium Mobile application testing made easy

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787280168
Length 256 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Nishant Verma Nishant Verma
Author Profile Icon Nishant Verma
Nishant Verma
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

What this book covers

Chapter 1, Introduction to Appium, starts with an introduction to the mobile app. It talks about different types of mobile app, that is, native, hybrid, and mobile web. We then take a little closer look at the advantages and limitations of each type of mobile app. We learn about Appium's architecture and about two different automation frameworks Appium uses, XCUITest and UIAutomator2 for iOS and Android, respectively.

Chapter 2, Machine Setup, starts with instructions for setting up your machine in order to start using Appium and write automated tests. In this chapter, we address the setup for both Windows and Mac machines. Some of the prerequisites to install are the most recent Java, Android SDK, Genymotion Emulator, Appium, IntelliJ as the preferred IDE, and the app under test. We will also learn to create the sample Android emulator as well as the Genymotion emulator. We will learn how to install Appium, both via npm and the Appium GUI app. We will take a detailed look at the Appium GUI app and the iOS and Android settings Appium allows.

Chapter 3, Writing Your First Appium Test, helps us write our first Appium test. We will start by creating a Java project in IntelliJ and then get introduced to Cucumber. We create a sample feature file and write our first scenario using the Given-When-Then format. We will learn how to start Appium session and use Appium Inspector. We will then write our first automated test and learn how to run the cucumber test. We will also learn how to write our first test for mobile web app and learn how to use the Chrome developer tools to find the locators. We then run these tests via the IDE.

Chapter 4, Understanding Desired Capabilities, tells us about the concept of desired capabilities in Appium. We learn about the mandatory capabilities and the device-specific desired capabilities, such as Android and iOS. We will look into the server argument and the various flags it exposes along with its sample usage.

Chapter 5, Understanding Appium Inspector to Find Locators, shows us how to use the Appium inspector to find the locator of a UI element. We learn to derive the xPath over the Appium-generated xPath values. We looked into another tool, UIAutomatorViewer, and how to use it. We also learn how to debug the mobile apps using Chrome's inspect feature.

Chapter 6, How to Synchronize Tests, explores the different types of drivers Appium allows you to create, along with the various synchronization strategies. We will learn about the implicit wait, explicit wait, and fluent wait. We also learn about ExpectedConditions and the various predefined conditions it allows.

Chapter 7, How to Automate Gestures, explains implementing various gestures that Appium supports. We will learn how to implement the most frequently used gestures, such as tap, swipe, scroll, and drag and drop. We will also learn about the orientation and how to change the orientation of devices between the landscape and portrait modes.

Chapter 8, Design Patterns in Test Automation, covers the concept of the design pattern in test automation. In this chapter, we will take a detailed look at the page object pattern and then learn how to implement it in the current framework, which we have been building since Chapter 3, Writing Your First Appium Test. We will learn about assertions and where they belong, and we will also learn about the concepts of setup and teardown and how to implement them using pre-specified hooks in cucumber.

Chapter 9, How to Run Appium Test on Devices and Emulators, shows you how to connect physical devices and prepare them for development and testing purposes. It also demonstrates how to configure the Genymotion emulator and run tests. We learn how to retrieve the UDID of iOS devices, the libraries we need to install, and the process for running the test on iOS.

Chapter 10, Continuous Integration with Jenkins, teaches the concept of Gradle and writing Gradle tasks. We start by creating a Gradle task to run the test via command line and moving the project to Git. We navigate through downloading and installing Jenkins. We learn how to set up a Jenkins job and trigger it and view the report. This chapter explains how to implement continuous testing using Jenkins.

Chapter 11, Appium Tips and Tricks, shows you some tips and tricks in the form of code snippets, that can be used to make your test framework more intelligent and innovative. We will learn about switching between webviews and native views, taking screenshots, and recording video using adb commands. We will also explore the approach of running tests in parallel on multiple devices and about the network simulation API.

Chapter 12, Appium Desktop App, explores the new Appium Desktop App. It discusses in details about how to install the new Appium GUI app, how to start an appium server with basic and advanced options. It also explains how to use the Desired Capabilities while setting up a session and how to connect to different end points (the non local server).

By the end of this book, you will have learned about Appium, how to build a test automation framework from scratch in Cucumber and Appium, and how to set up Jenkins to run tests.

Appendix, Appendix takes a deeper insight into different how to's which are needed across chapters. It includes a deep dive into Cucumber and explains various concepts of Cucumber. It also talks about finding details needed for Appium for android installer. Very importantly, it tells us how to install the Google Play services on the Genymotion Emulator.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime