Selenium Framework Design in Data-Driven Testing
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

Buch teilen
  1. 323 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Take a deep dive into building data-driven test frameworks using Selenium WebDriverAbout This Book• A comprehensive guide to designing data-driven test frameworks using the Selenium 3 WebDriver API, AppiumDriver API, Java-Bindings, and TestNG • Learn how to use Selenium Page Object Design Patterns and D.R.Y. (Don't Repeat Yourself) Approaches to software development in automated testing• Discover the Selenium Grid Architecture and build your own grid for browser and mobile devices• Use third party tools and services like ExtentReports for results processing, reporting, and SauceLabs for cloud-based test servicesWho This Book Is ForThis book is intended for software quality assurance/testing professionals, software project managers, or software developers with prior experience in using Selenium and Java to test web-based applications.This book is geared towards the quality assurance and development professionals responsible for designing and building enterprise-based testing frameworks.The user should have a working knowledge of the Java, TestNG, and Selenium technologiesWhat You Will Learn• Design the Selenium Driver Class for local, remote, and third party grid support• Build Page Object Classes using the Selenium Page Object Model• Develop Data-Driven Test Classes using the TestNG framework• Encapsulate Data using the JSON Protocol• Build a Selenium Grid for RemoteWebDriver Testing• Construct Utility Classes for use in Synchronization, File I/O, Reporting and Test Listener Classes• Run the sample framework and see the benefits of a live data-driven framework in real-timeIn DetailThe Selenium WebDriver 3.x Technology is an open source API available to test both Browser and Mobile applications. It is completely platform independent in that tests built for one browser or mobile device, will also work on all other browsers and mobile devices. Selenium supports all major development languages which allow it to be tied directly into the technology used to develop the applications. This guide will provide a step-by-step approach to designing and building a data-driven test framework using Selenium WebDriver, Java, and TestNG.The book starts off by introducing users to the Selenium Page Object Design Patterns and D.R.Y Approaches to Software Development. In doing so, it covers designing and building a Selenium WebDriver framework that supports both Browser and Mobile Devices. It will lead the user through a journey of architecting their own framework with a scalable driver class, Java utility classes, JSON Data Provider, Data-Driven Test Classes, and support for third party tools and plugins.Users will learn how to design and build a Selenium Grid from scratch to allow the framework to scale and support different browsers, mobile devices, versions, and platforms, and how they can leverage third party grids in the Cloud like SauceLabs.Other topics covered include designing abstract base and sub-classes, inheritance, dual-driver support, parallel testing, testing multi-branded applications, best practices for using locators, and data encapsulation.Finally, you will be presented with a sample fully-functional framework to get them up and running with the Selenium WebDriver for browser testing.By the end of the book, you will be able to design your own automation testing framework and perform data-driven testing with Selenium WebDriver.Style and approachA comprehensive approach to designing data-driven test frameworks using the Selenium 3 WebDriver API, Java-Bindings, and TestNG Technologies

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Selenium Framework Design in Data-Driven Testing als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Selenium Framework Design in Data-Driven Testing von Carl Cocchiaro, Pinakin Ashok Chaubal im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in Java. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2018
ISBN
9781788471732

Working Selenium WebDriver Framework Samples

This final chapter of the book is a working sample framework containing a driver class, required utility classes, browser page object classes, a browser test class, and JSON data files. The sample files will demonstrate the standards and best practices outlined in this book using the Selenium Page Object Model and DRY approaches to data-driven testing. The sample tests can be run in the IntelliJ or Eclipse IDE and contain the following components:
  • Selenium driver and DataProvider classes
  • Selenium utility classes
  • ExtentReports classes
  • Browser page object base and subclasses
  • Browser test class and data files
  • Browser suite XML and Maven POM XML files

Introduction

This final chapter is a working set of sample classes to demonstrate some of the best practices and standards that were discussed in this book. Users should be able to take the sample classes and run them in their own IDE after setting up their Selenium development environment.
The samples were built using Chrome, Firefox, and IE11 browsers. Users should download the latest Selenium 3.x JAR files, TestNG JAR files, and the required browser driver releases to support them. The following JARs and files are required to get the sample tests running:
  • Java 1.8 SDK and JRE
  • IntelliJ IDEA 2017.3
  • Selenium 3.7.1 WebDriver JARs
  • TestNG 6.11 JARs
  • ExtentReports 3.1.0 JARs
  • ChromeDriver.exe 2.33 (Windows 32-bit; there is no current 64-bit driver)
  • Firefox GeckoDriver.exe 0.19.1 (Windows 64-bit)
  • IEDriverServer.exe 3.7.1 (Windows 32-bit; runs faster than the 64-bit driver)
  • Chrome browser 62.0
  • Firefox browser 57.0
  • Internet Explorer browser 11.0
Users must place the files in a project folder in their IDE and change the paths in the selenium.properties and Global_VARS.java files to point to the correct package and driver locations. The sample framework and tests were built and tested using IntelliJ IDE on a Windows platform, but can be run on Linux or macOS as well; they are completely platform independent.
If you create the following package structure in IntelliJ, in a project called SeleniumFrameworkDesign, and add this chapter's files to it, then none of the imports or global variables need to be changed: src/main/java/com/framework/ux/utils/chapter10. Also, create the following folders for the drivers and test output: SeleniumFrameworkDesign/drivers and SeleniumFrameworkDesign/test-output.
The sample framework files were built using this open source practice website: http://www.practiceselenium.com/. It is developed by Selenium Framework 2010–2017 Copyrights reserved.
The user will gain a wor...

Inhaltsverzeichnis