下载  >  开发技术  >  其它  > Complete Guide to Test Automation - 自动化测试从策略到实战大全

Complete Guide to Test Automation - 自动化测试从策略到实战大全 评分:

Rely on this robust and thorough guide to build and maintain successful test automation. As the software industry shifts from traditional waterfall paradigms into more agile ones, test automation becomes a highly important tool that allows your development teams to deliver software at an ever-increa
Complete Guide to Test Automation: Techniques, Practices, and Patterns for Building and Maintaining Effective Software Projects rnon axelrod Matan, israel ISBN-13(pbk:978-1-4842-3831-8 ISBN-13( electronic):978-1-4842-3832-5 https://doi.org/10.1007/978-1-4842-3832-5 Library of congress Control Number: 2018955901 Copyright o 2018 by Arnon Axelrod This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein Managing Director, Apress Media LLC: Welmoed Spahi Acquisitions Editor: Shiva Ramachandran Development Editor Laura berenson Coordinating Editor: Rita Fernando Cover designed by eStudio Calamar Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505, e-mail orders-ny @springer sbm.com,orvisitwww.springeronline.comApressMedia,LlcisacAliforniaLlcandthesolemember owner) is Springer Science Business Media Finance Inc(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation Forinformationontranslationspleasee-mailrights@apress.comorvisithttp://www.apress.com/ rights-permissions press titles may be purchased in bulk for academic, corporate, or promotional use eBook versions and licenses are also available for most titles. For more information reference our Print and ebook bulk sales ebpageathttp://www.apress.com/bulk-sales Any source code or other supplementary material referenced by the author in this book is available to readersonGithubviathebooksproductpagelocatedatwww.apress.com/9781484238318.Formore detailedinformationpleasevisithttp://www.apress.com/source-code Printed on acid-free paper In memory of my late grandparents Nathan and Lea axelrod, pioneers of the Israeli cinema. Your memory is my inspiration Table of contents About the author mmmmxvii About the technical reviewer mmxix Acknowledgments…,,,,,算,xXxi Introduction mmmmmmmmm xxiiii Part:The“ Why"and the“What”,, ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■ Chapter 1: The value of Test Automation mmamaamm mmmmmmmmmm 3 Why Do We Need Test Automation? From Waterfall to Agile Software Development The Cost of Software complexity Maintaining a constant cost 4679 Refactoring Continuous Improvement 10 Chapter 2: From Manual to Automated Testing ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■国■■■■■■■■■ 13 First Attempt: Record and playback.mmmemmmnmemnmmmnmmnnmmnmmm 13 Getting the Most out of Test Automation..,.,.,.,…,…,…………16 Differences between manual and automated tests Exploratory Testing 19 Considerations for Automated Testing 21 Chapter 3: People and Tools man ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 31 Choosing the Right Tools. Who should Write the Tests? 32 Promoting Manual Testers or Inexperienced Programmers to Automation Developers.nmn. 32 Splitting the Work Between Manual Testers and Automation Programmers.mmm 35 Using a dedicated Automation Team 37 TABLE OF CONTENTS Having Dedicated Automation Developer(s) Give the Developers the0 wnership for the Automation......…………39 The variety of Tools Classification0fT00ls……40 IDEs and Programming Language (Unit) Testing Frameworks 45 BDD- Style Frameworks…,.,,…,46 SUT Interaction Technologies 8 Test Management Suites 60 Build Tools and cl/CD Pipelines 60 Other Considerations for Choosing Tools 61 Chapter 4: Reaching Full Coverage saimaa IIaasInaamEIIRaaInaaa, 63 How Do You Measure coverage?..............m. 64 Percentage of Manual Test Cases Covered by Automation 65 Percentage of Covered Features 65 Percentage of code coverage n66 Gaining value Before Reaching Full Coverage mmanmmaaameamman 71 What Do We do when We have full coverage..mmmmmmmmmmmmmmm. 71 How Do We Get to 100% Coverage? Reversing the wheel 74 My Road Map to Successful Automation Project 77 When to Start Working on Progression amammnnmmaananmmmmnmnmmnmmm, 78 Prioritizing the Work to Fill the Regression Gap Chapter 5: Business Processes mamma mamamamam aaaaaa aaaa aaa m IaIa Iaanmaann, 83 Running the Tests on a Regular Basis. The simplest approach .. Nightly Runs…,, 85 Handling Bugs That Are Found by the automation 86 Keep the Failing Tests 86 EXclude the Failing Tests n…,88 TABLE OF CONTENTS Creating Work-Arounds in the Test mmmmmmmmmmmmmmmmmmmm..mm. 89 Treating All Automation Failures as Critical Bugs. Continuous Integration 92 Acceptance Test Driven Development (ATDD) Continuous delivery and continuous deployment .mmmmmmmmmmmmmmmmm.mmm 94 Canary Releases....mmmem..m.mnnn..e.nnn..m.nn.....nnn.........n. 95 Summary…,,, 97 Chapter 6: Test Automation and Architecture mammmaamaammmmman 99 Test architecture considerations,…… Understanding the SUT Architecture 100 Back to Basics: What's a computer System What's an automated test? 101 Real-World Computer Systems 102 Alternatives and considerations in a layered architecture mmmmmmmmmmm 106 The relationships Between the Scope and the test 107 Overview of the layers …109 The Alternative Test Scopes 111 Real-World architecture mmm 130 Intended architecture Common variations Combining Tests…,, 132 Summary of the Considerations…… 135 Beyond the layered architecture.u.......n.. 139 Summary: Making Your Own Chapter 7: Isolation and Test Environments am aamamamana 145 State.………145 Isolation Problems and solutions 147 Problem 1 -Manual Tests and automated Test Running in Different Times .m.m.mm... 147 Problem 2-Manual Tests and Automated Tests Running Simultaneously 148 Problem 3-order matters Problem4- Automated Tests Running Simultaneously….,.,,.,,………,150 TABLE OF CONTENTS Isolation Techniques 150 Use separate Accounts.emtamnnnanmnnanannmnamnmnmnmn 150 Separate Between Manual Testing and Test Automation Databases 151 Having Separate Environments for Each Team Member.mmm..mmmnnammmmon. 151 Resetting the environment before Each Test cycle.mmmmmmmmm..m. 153 Create Unique Data for Each Test mmmmmnmnmammamanmnmnmm. 157 Each Test Cleans Everything It Creates …162 Read-Only Shared Datas. Summary 165 Chapter 8: The big picture mammmmmmmmmmmmmmmmmmm. 167 The relationships between Software Architecture and Business Structure. mmmmm. 167 Conway's Law. Horizontal teams The relationships between Software Architecture and organizational structure with Test Automation 170 Dedicated automation team 170 Automation Developers Inside Horizontal Teams.mmnmamammmmmmmmnmmmmnmn 170 Automation Developers Inside vertical Teams…… 171 Flexible Organizational Structure 172 Having an Automation Expert….………….173 Summary.…,, 173 Part a the how…175 Chapter 9: Preparing for the Tutorial ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 177 Prerequisites and presumptions 177 Applicability of the Process for Existing Test Automation Systems......n..... 178 Overview of the process mm 179 Bottom Up vs Top Down ,179 The process 180 Getting to know the sut ,181 Overview on TABLE OF CONTENTS Preparing the environment for the tutorial 185 Install visual Studio Community Edition. Download and Install chrome 186 Download and Install SQL Server Express. mmmmmmmmmmmmm.... 186 Download and build the application...………187 nstall Resharpen(0 ption)……192 Using git Through Visual Studio. Switching Between Branches…,,… 194 Summary… 198 Chapter 10: Designing the First Test Case mmma ■■■■■口■ a199 Choosing the First Test to Automate manana.m.annmmememannammnnnnnnmn 199 Choosing the First Test Case for MvCForum..………204 The scientific Method for Designing a Test case 205 Designing the steps of the Test. Thinking in Terms of objects and Entities 208 Summary 217 Chapter 11: Start Coding the First Test. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 219 Creating the project… 219 Renaming the Class, Filename, and Test Method...memmamaanmnnmnnmnnmnnmamn. 222 Write the pseudo-code 224 Remarks about the pseudo-code 225 Getting the Code to Compile...................... 228 Declaring the LoggedInUser Class 230 Declaring the MvCForum Property mmmnmmnmnnmmmmanmamnmnmmmememnmamnammmnm 230 Declaring the RegisterNew UserAndLogin Method. Declaring the Rest of the Classes and Methods. Model code review mmm.. 237 Summary 238 TABLE OF CONTENTS Chapter 12: Completing the First Test aaaasmIIRIaIaIin 239 Running the Test to Find What to Implement First…....,,…,…,239 Adding Selenium to the Project 241 Running lIsExpress....e.. 243 Implementing the MVCForumClient Constructor. Implementing Register New UserAndLogin 246 Asking the Developer to Add a Unique Automation Identifier . Implementing the Property Setters 254 Removing Duplication from the Property Setters 257 Hitting the Isolation Problem 260 Implementing CreateDiscussion and analyzing the Failure 264 Completing the Test mnmnnmenmnonmonnnnnnannn. Summary.............,,,,,,270 Chapter 13: Investigating Failures 271 Integrating with Latest Version of MVCForum 271 Improving the error Reporting ….273 Avoid Debugging…...,………277 Investigating the Root Cause. Resolving the problem. mmmmmmmmmmmmmmmmmm. 279 More Issues. mm 280 Logging and Other Evidence Collection .. Screen Capture Logging…,288 Nested Logging.,,,,,,,,,,,,,,,,,,,,,,,,,,…288 Visual Logging 290 Additional Logging and Diagnostics Options….....,,,……290 Adding nested visual Logger to MVCForum Tests nntannnannnaneanmnnaanenmnnanmmn. 293 Investigating Challenging Failures .mmamamamnnammnnnamnnamemaannaaannan 295 Failures That Happen Only on One Machine .mmnmmemmmnnnmememnnnem Investigating Influencing Tests. Investigating Flickering Tests. Summary ,308

...展开详情
2018-09-23 上传 大小:9.57MB
举报 收藏
分享
Complete Guide To SEO

Complete Guide To SEO PDF

立即下载
Complete Guide to Shodan

Complete Guide to Shodan 这个是Shodan官方的使用手册,需要付费购买的。

立即下载
A complete guide to Linux

A complete guide to Linux A complete guide to Linux A complete guide to Linux

立即下载
Complete Guide to Test Automation

Rely on this robust and thorough guide to build and maintain successful test automation. As the software industry shifts from traditional waterfall paradigms into more agile ones, test automation becomes a highly important tool that allows your development teams to deliver software at an ever-increa

立即下载
The Complete Guide to Option Pricing Formulas

The Complete Guide to Option Pricing Formulas

立即下载
A Complete Guide To Playing Badminton.pdf

A Complete Guide To Playing Badminton

立即下载
Complete Guide to Open Source Big Data Stack

Complete Guide to Open Source Big Data Stack

立即下载
全新交换手册 The Complete Guide to LAN

全新交换手册 The Complete Guide to LAN Switching Technology Second Edition

立即下载
A COMPLETE GUIDE TO GOOGLE CLOUD PLATFORM

Google云端平台(英语:Google Cloud Platform)是一项使用了Google核心基础架构、数据分析和机器学习技术的云计算服务。提供用于Google搜索和YouTube等终端用户产品的相同支持基础设施托管和开发人员产品,用于构建从简单网站到复杂应用程序的一系列程序,并提供一系列模块化的基于云的服务和大量开发工具,例如托管和计算、云存储、数据存储、翻译API、预测API。

立即下载
A Complete Guide to Programming in CPP

CPP guidebook for the beginners (useful)

立即下载
Your Complete Guide to Factor-Based Investing

今天给大家分享一本因子投资的好书:《Your Complete Guide to Factor-Based Investing》,之前公众号阿尔法搬运工也推荐过,被誉为因子界的米其林指南。 无论对刚入门的小白还是奋战多年的老兵,可能都会带来重要性的感受。作者之一Swedroe是个写作狂人,经常在其博客上分享和讨论量化相关的学术研究,数十年如一日,非常让人钦佩。

立即下载
Complete Guide to Open Source Big Data Stack epub

Complete Guide to Open Source Big Data Stack 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

立即下载
Complete Guide to Test Automation--2018

Know the real value to be expected from test automation Discover the key traits that will make your test automation project succeed Be aware of the different considerations to take into account when planning automated tests vs. manual tests Determine who should implement the tests and th

立即下载
complete Guide to 3D plots in_R

This book describes how to create static and interactive three-dimension (3D) graphs. We provide also an R package named graph3d to easily build and customize, step by step, 3D graphs in R software. You will find many examples of R codes and graphics in this document for visualizing a dataset in 3D

立即下载
The Complete Guide to Blender Graphics Computer Modeling and Animation

The Complete Guide to Blender Graphics Computer Modeling and Animation的英文原版

立即下载
Fullstack Vue The Complete Guide to Vue.js 源码

Fullstack Vue The Complete Guide to Vue.js 源码,非常难得。

立即下载