ebook img

Mastering Selenium WebDriver PDF

280 Pages·2015·3.392 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 Mastering Selenium WebDriver

Mastering Selenium WebDriver Increase the performance, capability, and reliability of your automated checks by mastering Selenium WebDriver Mark Collin BIRMINGHAM - MUMBAI Mastering Selenium WebDriver Copyright © 2015 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: August 2015 Production reference: 1240815 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78439-435-6 www.packtpub.com Credits Author Project Coordinator Mark Collin Shipra Chawhan Reviewers Proofreader Anuj Chaudhary Safis Editing David Fotel Ripon Al Wasim Indexer Hemangini Bari Acquisition Editor Usha Iyer Graphics Sheetal Aute Jason Monteiro Content Development Editor Shweta Pant Abhinash Sahu Technical Editor Production Coordinator Edwin Moses Komal Ramchandani Copy Editors Cover Work Stephen Copestake Komal Ramchandani Vedangi Narvekar About the Author Mark Collin is a professional software tester who has been working in the software testing industry since 2001. He started his career in the financial sector before moving in consultancy. As a consultant, he has had the privilege of working on numerous projects in many different sectors for various large and well-known companies. This has allowed him to gain an eclectic range of skills and proficiencies, which include test automation, security and penetration testing, and performance testing. He loves technology and is always exploring new and exciting technology stacks to see how they can enhance the capability and reliability of automated checks. He is fully aware that though automation is good, at the moment, nothing can replace the human mind when it comes to having a well-rounded test solution. He is a great believer in open source technology and spends a lot of time contributing towards open source projects. He is the creator and maintainer of the driver-binary-downloader-maven-plugin, which allows Maven to download ChromeDriver, OperaDriver, the IE driver, and PhantomJS to your machine as a part of a standard Maven build. He is also a core contributor to the jmeter-maven-plugin, a tool that allows you to run JMeter tests through Maven. Mark has also contributed code to the core Selenium code base. A big thank you to all the core Selenium committers, especially David Burns, Jim Evans, and Luke Inman Semerau. Without these determined individuals, the Selenium project would not be where it is today. Thank you Raúl Ireneo García Suárez for being a sounding board and pointing me in the right direction many times. Finally, I'd like to thank my wife and family for giving me the time to put all of this together. About the Reviewers Anuj Chaudhary is a software engineer who enjoys working on projects pertaining to software testing and automation. He has vast experience of working on different testing methodologies such as manual testing, automated testing, performance testing, and security testing. He has worked as an individual contributor and a technical lead on various software projects that dealt with all the stages of the application development lifecycle. He was a recipient of the Microsoft MVP award twice in a row. He blogs at www.anujchaudhary.com. He has also reviewed books on Selenium by Packt Publishing, such as Selenium WebDriver Practical Guide (http://www.packtpub.com/selenium-webdriver- practical-guide/book) and Selenium Design Patterns and Best Practices (https:// www.packtpub.com/web-development/selenium-design-patterns-and-best- practices). I would like to thank my wife, Renu, and my son, Arjun, for always supporting me and letting me spend extra time on reviewing this book. David Fotel has worked in various IT-related fields as a developer, system administrator, and an instructor. The technologies he has worked on include .NET and Linux. He has worked as a test manager, managing tests for an e-learning company. The broad knowledge that he has acquired gives him the ability to choose the right solution for a problem. Prior to this, David has worked on Selenium WebDriver Practical Guide, Packt Publishing, as a technical reviewer. Ripon Al Wasim has over 13 years of experience in the software industry. His professional experience includes software development and testing (both functional and nonfunctional). He is currently working as a senior software engineer at Cefalo (http://www.cefalo.com/). He is mainly a Javaist. At present, he is trying to become Rubyist, as he is a fan of Watir (Web Application Testing in Ruby) and Cucumber. Ripon is an active participant in the professional community of Stack Overflow (http://stackoverflow.com/users/617450/ripon-al-wasim). He is one of the reviewers of Selenium WebDriver Practical Guide, which was his first official effort for Packt Publishing. He also reviewed another book titled Performance Testing with JMeter, Second Edition, which was also published by Packt Publishing. I would like to thank my mother and wife for supporting me. In my spare time, I love to spend time with my wife, Koly, as well as my twin babies, Nawar and Nazif. Finally, I'd like to thank all my colleagues, friends, and others. www.PacktPub.com Support files, eBooks, discount offers, and more For support files and downloads related to your book, please visit www.PacktPub.com. 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 www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, 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. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. 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 Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access. Table of Contents Preface v Chapter 1: Creating a Fast Feedback Loop 1 Making it easy for developers to run tests 1 Building our test project with Apache Maven 2 Running your tests in parallel 7 Parallel tests with TestNG 9 There are no silver bullets 18 Multiple browser support 19 Firefox 24 Chrome 24 Internet Explorer 24 Safari 24 Opera 24 Downloading the WebDriver binaries automatically 27 Going headless 34 Summary 40 Chapter 2: Producing the Right Feedback When Failing 41 Location, location, location 41 Tests are living documentation 43 Reliability 44 The test automation team that works in isolation 45 Oh, that test always flickers, don't worry about it 46 Baking in reliability 47 Git 48 SVN 49 Continuous integration is the key 50 TeamCity 52 Jenkins 57 [ i ]

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.