Book Image

Learn Selenium

By : UNMESH GUNDECHA, Carl Cocchiaro
Book Image

Learn Selenium

By: UNMESH GUNDECHA, Carl Cocchiaro

Overview of this book

Selenium WebDriver 3.x is an open source API for testing both browser and mobile applications. With the help of this book, you can build a solid foundation and learn to easily perform end-to-end testing on web and mobile browsers. You'll begin by focusing on the Selenium Page Object Model for software development. You'll architect your own framework with a scalable driver class, Java utility classes, and support for third-party tools and plugins. Next, you'll design and build a Selenium Grid from scratch to enable the framework to scale and support different browsers, mobile devices, and platforms. You'll also strategize and handle a rich web UI using the advanced WebDriver API, and learn techniques to tackle real-time challenges in WebDriver. Later chapters will guide you through performing different types of testing, such as cross-browser testing, load testing, and mobile testing. Finally, you will be introduced to data-driven testing, using TestNG to create your own automation framework. By the end of this Learning Path, you'll be able to design your own automation testing framework and perform data-driven testing with Selenium WebDriver. This Learning Path includes content from the following Packt books: • Selenium WebDriver 3 Practical Guide - Second Edition by Unmesh Gundecha • Selenium Framework Design in Data-Driven Testing by Carl Cocchiaro
Table of Contents (25 chapters)
Title Page

Introduction

As we mentioned earlier in the book, the main reasons for using a data-driven test development approach are to be able to reuse test methods with multiple permutations of data, to encapsulate data in a central location, and to enforce DRY coding practices, which reduce the amount of code being written and maintained.

To correctly design and build tests that use this methodology for testing software applications, test methods must contain a predefined input, a verifiable output, and contain no hardcoded values within the test method. Data is passed into a test method at runtime, where it is then used in page object methods to perform an action and verify a result. Because the data is not hardcoded into the test, methods can be iterated with variations of datasets, extending the coverage of the test to include positive, negative, boundary, and limit testing.

This all...