ebook img

Mobile Test Automation with Appium: Mobile application testing made easy PDF

250 Pages·2017·2.875 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Mobile Test Automation with Appium: Mobile application testing made easy

Mobile Test Automation with Appium (cid:36)(cid:80)(cid:78)(cid:81)(cid:83)(cid:70)(cid:73)(cid:70)(cid:79)(cid:84)(cid:74)(cid:87)(cid:70)(cid:2)(cid:72)(cid:86)(cid:74)(cid:69)(cid:70)(cid:2)(cid:85)(cid:80)(cid:2)(cid:67)(cid:86)(cid:74)(cid:77)(cid:69)(cid:2)(cid:78)(cid:80)(cid:67)(cid:74)(cid:77)(cid:70)(cid:2)(cid:85)(cid:70)(cid:84)(cid:85)(cid:2)(cid:66)(cid:86)(cid:85)(cid:80)(cid:78)(cid:66)(cid:85)(cid:74)(cid:80)(cid:79)(cid:2)(cid:84)(cid:80)(cid:77)(cid:86)(cid:85)(cid:74)(cid:80)(cid:79) (cid:86)(cid:84)(cid:74)(cid:79)(cid:72)(cid:2)(cid:34)(cid:81)(cid:81)(cid:74)(cid:86)(cid:78) Nishant Verma BIRMINGHAM - MUMBAI Mobile Test Automation with Appium Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2017 Production reference: 1290617 (cid:49)(cid:86)(cid:67)(cid:77)(cid:74)(cid:84)(cid:73)(cid:70)(cid:69)(cid:2)(cid:67)(cid:90)(cid:2)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:2)(cid:49)(cid:86)(cid:67)(cid:77)(cid:74)(cid:84)(cid:73)(cid:74)(cid:79)(cid:72)(cid:2)(cid:45)(cid:85)(cid:69)(cid:16) (cid:45)(cid:74)(cid:87)(cid:70)(cid:83)(cid:90)(cid:2)(cid:49)(cid:77)(cid:66)(cid:68)(cid:70) (cid:21)(cid:23)(cid:2)(cid:45)(cid:74)(cid:87)(cid:70)(cid:83)(cid:90)(cid:2)(cid:52)(cid:85)(cid:83)(cid:70)(cid:70)(cid:85) (cid:35)(cid:74)(cid:83)(cid:78)(cid:74)(cid:79)(cid:72)(cid:73)(cid:66)(cid:78) (cid:35)(cid:21)(cid:2)(cid:20)(cid:49)(cid:35)(cid:14)(cid:2)(cid:54)(cid:44)(cid:16) ISBN 978-1-78728-016-8 (cid:88)(cid:88)(cid:88)(cid:16)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78) Credits Author Copy Editor Nishant Verma Shaila Kusanale Reviewers Project Coordinator Jagannath Balachandran Ritika Manoj Kapil Sethi Manoj Hans Commissioning Editor Proofreader Amarabha Banerjee Safis Editing Acquisition Editor Indexer Siddharth Mandal Tejal Daruwale Soni Content Development Editor Graphics Aditi Gour Jason Monteiro Technical Editor Production Coordinator Rashil Shah Arvindkumar Gupta About the Author Nishant Verma is a co-founder of TestVagrant Technologies. It’s a service start-up addressing testing solutions for B2C companies with a focus on mobile and web, and helps companies deliver faster and reliably. Nishant has 11 years of experience in software development and testing. He has worked with IT companies such as ThoughtWorks Inc., Aditi Technologies, and Altisource. He has extensive experience in setting up agile testing practices, functional and non-functional test automation, mentoring, and coaching. In the past, he has worked on web UIs and specializes in building test solutions in the mobile domain. He has hands-on experience with test automation tools such as WebDriver (Selenium2), Calabash, Frank, Appium, Watin, Sikuli, QTP, and DeviceAnywhere. He actively maintains his own website on testing techniques, agile testing, automation techniques, and general learning. He has contributed to leading testing journals such as Testing Circus and Software Developer's Journal, and has been an active speaker at vodQA (testing event of Thoughtworks). Nishant has authored a reference book on how to use Appium for automating Android apps using Java, which is available on Gitbook. It has received close to 200,000 views, 40,000 readers online, and has been downloaded around 3,000 times. About the Reviewers Jagannath Balachandran works as a lead consultant for ThoughtWorks India Pvt. Ltd. He has around 14 years of experience working with teams delivering software using agile and continuous delivery practices. He has extensively consulted clients on their journey toward continuous delivery. Kapil Sethi is an agile practitioner with more than 12 years of experience in the software industry. He is a passionate advocate of shifting testing to the left most column in the agile development process and is a strong believer of the Testing Pyramid. He is a connoisseur of automation testing and has hands-on experience in designing automation testing frameworks using a variety of automation tools, such as WebDriver, Appium, Protractor, Applitools, Calabash, SoapUI, and QTP. He has worked on numerous domains, including banking, mortgage, retail, e-commerce, and online gaming. His expertise involves helping development teams deliver quality products, coaching teams on agile adoption, transforming teams and thereby organizations, to make the working environment fun and passionate. He is currently working with Nintex as an automation specialist. In the past, he has worked with companies such as MYOB, ThoughtWorks, Sapient, and Cognizant Technology Solutions, and performed the development lead, iteration manager, QA lead roles during his tenure. www.PacktPub.com For support files and downloads related to your book, please visit (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78). Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78) and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at (cid:84)(cid:70)(cid:83)(cid:87)(cid:74)(cid:68)(cid:70)(cid:33)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78) for more details. At (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78), you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. (cid:73)(cid:85)(cid:85)(cid:81)(cid:84)(cid:28)(cid:17)(cid:17)(cid:88)(cid:88)(cid:88)(cid:16)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78)(cid:17)(cid:78)(cid:66)(cid:81)(cid:85) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at (cid:73)(cid:85)(cid:85)(cid:81)(cid:84)(cid:28)(cid:17)(cid:17)(cid:88)(cid:88)(cid:88)(cid:16)(cid:66)(cid:78)(cid:66)(cid:91)(cid:80)(cid:79)(cid:16)(cid:68)(cid:80)(cid:78)(cid:17)(cid:69)(cid:81)(cid:17)(cid:19)(cid:25)(cid:26)(cid:25)(cid:20)(cid:26)(cid:18)(cid:19)(cid:24)(cid:18). (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) If you'd like to join our team of regular reviewers, you can e-mail us at (cid:68)(cid:86)(cid:84)(cid:85)(cid:80)(cid:78)(cid:70)(cid:83)(cid:83)(cid:70)(cid:87)(cid:74)(cid:70)(cid:88)(cid:84)(cid:33)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78). We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products! Table of Contents Preface 1 Chapter 1: Introduction to Appium 8 Native app 9 Mobile Web app 11 Hybrid app 13 Appium architecture 15 XCUITest 17 UiAutomator 2 18 Pros of using Appium 19 Summary 19 Chapter 2: Setting Up the Machine 20 Machine setup for macOS 21 Installing Java 21 Installing Android SDK (using the Android command-line tool) 22 Installing Android SDK (using Homebrew) (Optional) 23 Creating Android Virtual Device (Optional) 23 Genymotion emulator 25 Debug help 29 Installing Appium 30 Installing Appium server (From Source) (Optional) 32 Selecting IDE 32 App under test 32 Machine setup for Windows 32 Installing Java 33 Installing Android SDK (using Android command-line tool) 33 Installing Node JS 36 Installing Appium 36 Installing Appium server (via npm) 37 Installing Genymotion 37 Selecting IDE 38 Appium GUI app 38 Summary 44 Chapter 3: Writing Your First Appium Test 45 Creating an Appium Java project (using gradle) 46 Introduction to Cucumber 50 Writing our first Appium test 51 Running the feature file 64 Refactoring 66 Implementing the remaining steps 66 Running the scenario 72 Automating a mobile web app using Appium 73 Implementing the remaining steps 74 Automating the iOS app using Appium 77 Build the app 78 Deploying the app on the iOS Simulator 79 Via xcrun command 79 Using Appium 79 Generating Boilerplate code for iOS 82 Summary 88 Chapter 4: Understanding Desired Capabilities 89 Refactoring -1 90 Server argument 92 Refactoring -2 93 Server capabilities 97 Refactoring -3 99 Android-only capabilities 100 Refactoring -4 103 iOS-only capabilities 105 Summary 110 Chapter 5: Understanding Appium Inspector to Find Locators 111 Appium inspector 111 Implementing the other steps 115 UI Automator Viewer 118 Debugging mobile web apps using Chrome Inspect 121 Summary 123 Chapter 6: How to Synchronize Tests 124 AppiumDriver 124 Implicit wait 126 Explicit wait 126 Fluent wait 129 Summary 131 Chapter 7: How to Automate Gestures 132 [ ii ]

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.