Selenium Framework Design in Data-Driven Testing
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

Compartir libro
  1. 323 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Selenium Framework Design in Data-Driven Testing un PDF/ePUB en línea?
Sí, puedes acceder a Selenium Framework Design in Data-Driven Testing de Carl Cocchiaro, Pinakin Ashok Chaubal en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in Java. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781788471732
Edición
1

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...

Índice