ebook img

Test Automation Engineering Handbook. Learn and implement techniques for building robust test automation frameworks PDF

276 Pages·2023·6.179 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 Test Automation Engineering Handbook. Learn and implement techniques for building robust test automation frameworks

Test Automation Engineering Handbook Learn and implement techniques for building robust test automation frameworks Manikandan Sambamurthy BIRMINGHAM—MUMBAI Test Automation Engineering Handbook Copyright © 2023 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(s), nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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. Group Product Manager: Gebin George Publishing Product Manager: Kunal Sawant Senior Editor: Rounak Kulkarni Technical Editor: Jubit Pincy Copy Editor: Safis Editing Project Coordinator: Manisha Singh Proofreader: Safis Editing Indexer: Subalakshmi Govindhan Production Designer: Vijay Kamble Developer Relations Marketing Executive: Sonakshi Bubbar Business Development Executive: Debadrita Chatterjee First published: January 2023 Production reference: 1221222 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-80461-549-2 www.packt.com To my late mother, Gomathy, whose unconditional love inspires me to always do my best. To my dad, wife, children, and sisters, whose support gives me the confidence to complete this work. – Manikandan Sambamurthy Contributors About the author Manikandan Sambamurthy has been a software engineer, particularly focused on quality engineering, for over 15 years. He has helped several enterprise organizations formulate and implement their test strategies successfully. He has built and mentored diverse and smooth-functioning quality engineering teams throughout his career. Manikandan is a prolific tester and specializes in full stack test automation. He is a lifelong learner and possesses tremendous knowledge of both frontend and backend test technologies. He has led various continuous improvement efforts to improve the quality and productivity of entire software engineering teams. With his deep understanding and expertise in the quality domain, he has saved considerable costs across organizations through meticulous customizations of test automation frameworks. I would like to thank my wife and two children, who have supported me throughout the process of writing this book. Sincere thanks to the tremendously helpful team at Packt for getting this book to completion. I would also like to thank the technical reviewers for all their valuable feedback. About the reviewers Ayesha Janvekar is an IT professional based in San Diego, California. She is currently working as a software development manager with more than 9 years of hands-on QA experience. Ayesha is an experienced IT leader and is passionate about software testing. She has a bachelor’s degree in electronics and communication engineering, an MBA in marketing and international business, and a master’s in information technology and management from Chicago. She believes in translating her work into actionable insights. Having strong project management skills and business acumen, Ayesha helps deliver pragmatic technical solutions. Meir Blachman, an Israeli Jew, completed a bachelor’s degree in computer science after high school. In 2014, he joined the Israeli army and served in the 8200 unit for 5.5 years. Meir started his service as an automation engineer and introducing teams to web automation, and transitioned to backend engineering focusing on CI/CD tooling and automation around the development team components. In 2019, he started working for Microsoft on the Cloud App Security group, specifically on the Conditional Access App Control product. During this time, Meir learned how the web works, and specifically browsers, involving the HTML, CSS, and JavaScript standards and how browsers process this content. He has also invented multiple patents through Microsoft. Chris Wallander is the principal SDET and test automation architect at TaxAct and has over 10 years of experience in test automation and quality assurance, as well as a solid foundation in DevOps and Agile methodologies. Trained and certified through the International Software Testing Qualification Board, his focus is on analyzing enterprise systems, and then building test automation frameworks to support them. Outside of work, he enjoys developing and testing video games, AI/ML development, building robots, and smithing medieval armor. Table of Contents Preface xiii Part 1: The Basics 1 Introduction to Test Automation 3 Getting familiar with software testing 3 Test automation challenges 12 Knowing the importance of testing 4 Finding and handling regression bugs 13 Tasks involved in testing 4 Test automation metrics 13 Testing in an world 5 Exploring the roles in quality Defect management in testing 6 engineering 15 Shift-Right and Shift-Left propositions 7 Test automation engineer 15 Quality and DevOps 7 SDET 16 Challenges in testing 8 Familiarizing yourself with common Test early, test often 8 terminologies and definitions 17 Understanding test automation 9 Summary 19 Agile test automation 11 Questions 20 2 Test Automation Strategy 21 Technical requirements 21 Test automation environment 24 Knowing your test Implementing an Agile test automation strategy 26 automation strategy 22 Reporting the test results 28 Test automation objectives 22 Gathering management support 23 Devising a good test Defining the scope of test automation 24 automation strategy 29 viii Table of Contents Selecting the right tools and training 29 Structuring the test cycles 37 Standards of the test automation framework 30 Familiarizing ourselves with Testing in the cloud 34 common design patterns 37 Understanding the test pyramid 35 Using design patterns in test automation 37 Unit/component tests 35 Summary 42 Integration/API tests 36 Questions 42 E2E/System/UI tests 36 3 Common Tools and Frameworks 43 Technical requirements 43 JMeter 63 The basic tools for every AXE 65 automation engineer 43 Choosing the right tool/framework 66 The CLI 44 Selecting a performance testing tool 66 Git 49 Selecting an API testing tool 67 Common test automation Selecting a web testing tool 67 frameworks 56 Mobile 68 Common considerations 68 Selenium 57 Appium 60 Summary 69 Cypress 62 Questions 69 Part 2: Practical Affairs 4 Getting Started with the Basics 73 Technical requirements 73 Downloading and setting up VS Code 82 Getting more familiar with Git 74 Introduction to JavaScript 84 Committing a change 74 Why learn JavaScript? 84 Resolving merge conflicts 77 Running a JavaScript program 84 Additional Git commands 80 JavaScript basics 85 Using an IDE 81 Summary 101 Choosing an IDE 81 Questions 101 Table of Contents ix 5 Test Automation for Web 103 Technical requirements 103 Working with selectors 116 Why Cypress? 104 Asserting on selectors 117 Installing and setting up Cypress 104 Intercepting API calls 119 Creating your first test in Cypress 109 Additional configurations 120 Creating arrow functions in JavaScript 109 Considerations for web automation 121 Creating callback functions in JavaScript 110 Limitations of Cypress 121 Writing our first spec 112 Web automation considerations 122 Becoming familiar with the spec structure 112 Summary 122 Executing our first spec 113 Questions 123 Employing selectors and assertions 116 6 Test Automation for Mobile 125 Technical requirements 125 Writing our first mobile test 138 Getting to know Appium 126 JavaScript functions with async/await 138 What is Appium? 126 First Appium/WebdriverIO test 140 Advantages of using Appium 126 Key considerations for mobile Knowing WebdriverIO and automation 141 its advantages 127 Areas of complexity 141 Setting up Appium and iOS-specific considerations 142 WebdriverIO 127 Optimizing our mobile Appium installation 127 automation framework 144 Configuring an Android emulator 129 Summary 146 Configuring WebdriverIO with Appium 132 Questions 146 WebdriverIO Android configuration 134 Appium Inspector installation and configuration 136

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.