Selenium Framework Design in Data-Driven Testing
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

Partager le livre
  1. 323 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Selenium Framework Design in Data-Driven Testing

Carl Cocchiaro, Pinakin Ashok Chaubal

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Selenium Framework Design in Data-Driven Testing est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Selenium Framework Design in Data-Driven Testing par Carl Cocchiaro, Pinakin Ashok Chaubal en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming in Java. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2018
ISBN
9781788471732
Édition
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...

Table des matiĂšres