Selenium Java Test Framework Best Practices Masterclass

Develop a POM Framework with Selenium 4 & TestNG using Industry Best Practices, Design Patterns & API Integration
Selenium Java Test Framework Best Practices Masterclass
File Size :
9.86 GB
Total length :
20h 27m



Omprakash Chavan


Last update




Selenium Java Test Framework Best Practices Masterclass

What you’ll learn

Develop Page Object Model frameworks from scratch for any Live website
50+ Industry best practices to follow for framework development
Learn to develop Readable, Maintainable and Scalable frameworks from scratch
Bad practices to avoid during framework development
Easily integrate APIs using REST Assured to skip login through UI [Selenium recommendation]
Use APIs to setup test data [Selenium Recommendation]
Learn how to easily write Atomic and Independent tests [Selenium Recommendation]
Learn how to setup application state for tests [Selenium Recommendation]
Learn to implement Parallel execution using TestNG, Maven and JUnit
How to easily configure and drive automation frameworks using TestNG, JUnit and Maven
Factory Design Pattern – Using Interface and Abstract class
Singleton Design Pattern
Learn how to follow the Single Responsibility Principle (SRP)
Learn how to follow the Do Not Repeat Yourself (DRY) principle
When and how to use OOP concepts in frameworks [Inheritance, Interface, Encapsulation, Polymorphism]
Learn how to reuse Page Objects using Composition
Learn about Fluent Interface and Builder design in Page Objects
Manage test data as Java Objects using POJOs
Synchronization [Wait] best practices
How to easily handle Stale Element and Element Click Intercepted exceptions
How to effectively use TestNG Data providers to drive test variations
How to go about efficiently supporting multiple browsers and Environments
Automated WebDriver management
Learn Allure Reporting and generate feature rich reports
Learn how to integrate the framework with GitHub
Learn how to auto-trigger automation from Jenkins using GitHub Web Hooks, SCM Polling and Build Frequency

Selenium Java Test Framework Best Practices Masterclass


Just know how to automate basic tests using Selenium and you are good to go
No prior framework development experience needed
JAVA programming knowledge is not really required. I have got you covered with the necessary stuff.


***This course use Selenium 4 for framework development***Why this course?====================Do you want to learn how real automation frameworks are built using Selenium by following 50+ industry best practices? Did you learn Selenium in the past, but still figuring out how to go about developing a framework that is Readable,  Maintainable and Scalable?Is your team struggling with implementing automation frameworks that really works?Did you learn many bad automation practices in the past that simply doesn’t work and want to unlearn all those practices? Then you are at the right place. This course is exactly what you were looking for!I’ll take you through an exciting journey of developing Selenium automation framework from scratch using a dedicated live e-commerce practice website!I’ll teach you 50+ industry best practices to follow while developing Selenium automation frameworks.I’ll teach you about design patterns and how to efficiently use OOP concepts in the framework.I’ll show you how to integrate APIs with the automation framework and use those to skip login through UI, to set the test data and to set the application state. All of these are Selenium recommended best practices.I’ll show you how to follow Single Responsibility Principle (SRP) and Do Not Repeat Yourself principle (DRY) which are a must while developing the frameworkWe will start with the bad practices first. This is what most of us do when we first start with developing automation frameworks.Then I’ll make you unlearn all these bad practices step-by-step by implementing many of the industry best practices using LIVE coding. I’ll not only explain you the “what”, but also the “why” and “how” while explaining each and every concept.By the end of this course, you are surely going to be confident enough to build Selenium automation frameworks from scratch for any live website. You are going to think like an automation lead, plan and design the automation framework, write optimized and clean code and follow good programming and automation practices.What topics are covered in this course?================================ MANY. Here’s the list:Setup the Maven projectHow to automate tests using bad practicesLet’s talk bad practicesImplement Page Object Model designCreate Data objects as Java Objects using POJOsSynchronization [Wait] techniques and best practicesOptimizing testsImplement Page Factory and discuss the Pros and ConsAutomatic driver management using WebDriverManagerConfigure and drive framework using MavenSupport multiple browsersConfigure and drive framework using TestNGConfigure and drive framework using Maven and TestNG bothImplement Parallel execution using TestNG and MavenConfigure and drive framework using JUnit [specially for JUnit folks]Parallel execution using JUnit [without ThreadLocal]Implement Singleton Design Pattern for Config propertiesHow to support multiple test environmentsDiscuss issues with writing end to end testsConvert to Atomic testsIntegrate APIsUse APIs to inject cookies to browser and skip login through UIUse APIs to set test dataUse APIs to set application stateRefactor tests to use APIsTestNG Data ProviderReuse Page Objects using CompositionComposition Vs InheritanceDifferent ways to handle Parallel execution issuesFactory design pattern using InterfaceFactory design pattern using Abstract classHow to take screenshotHow to take full page screenshot using AShotWhen to use OOP concepts in automation frameworksAllure Reporting and generate feature rich reportsIntegrate the framework with GitHubAuto-trigger automation from Jenkins using GitHub Web Hooks, SCM Polling and Build FrequencyTechnology stack:==============SeleniumJavaTestNGJUnitMavenRest AssuredJackson Data bind APIAllureGitHubJenkinsWhat else is included in the course?=============================All the code/notes used in the lectures are available for downloadYou will get my full support in the Q&A


Section 1: Introduction

Lecture 1 Welcome to the Course

Lecture 2 Framework Walkthrough and Quick Demo

Lecture 3 Important: How to get a better learning experience

Lecture 4 Important: When you need my help

Section 2: Practice Websites

Lecture 5 Why do we Need a Practice Website?

Lecture 6 Practice Website Introduction

Lecture 7 IMPORTANT: Practice Website Maintenance schedule

Lecture 8 Practice Website Additional Information

Lecture 9 Alternate Practice Websites

Section 3: Setup

Lecture 10 Pre-Requisites

Lecture 11 Setup JAVA JDK

Lecture 12 AVOID JAVA 8, 9 OR 10

Lecture 13 Setup Project using IntelliJ

Lecture 14 Setup Project using Eclipse

Lecture 15 Maven Test Scope

Lecture 16 Setup Driver Executable using System Property

Lecture 17 Setup Driver Executable using Environment Variable

Lecture 18 Selectors Hub

Lecture 19 Chrome Dev Tools

Section 4: JAVA Essentials [Optional]

Lecture 20 Section Intro

Lecture 21 Java Basics – Part 1

Lecture 22 Java Basics – Part 2

Lecture 23 Java Basics – Part 3

Lecture 24 Java Basics – Part 4

Lecture 25 Control Structures

Lecture 26 OOP – Inheritance and super Keyword

Lecture 27 Access Modifiers

Lecture 28 OOP – Encapsulation

Lecture 29 OOP – Polymorphism

Lecture 30 OOP – Abstraction using Abstract Class

Lecture 31 OOP – Abstraction using Interface

Lecture 32 Exception Handling

Lecture 33 File Operations

Section 5: Automate

Lecture 34 Identify Test Cases

Lecture 35 Automate First Test

Lecture 36 Fix and Execute First Test

Lecture 37 Automate Second Test

Lecture 38 Fix and Execute Second Test

Section 6: Core Principles

Lecture 39 Core Principles

Section 7: Bad Practices

Lecture 40 Non Atomic Tests

Lecture 41 Code Duplication

Lecture 42 Duplicate Element Definations

Lecture 43 User & Application State Dependencies

Lecture 44 Non Readable Tests

Lecture 45 Duplicate Driver Initialization Code

Lecture 46 Static Sleeps

Lecture 47 Hardcoded Test Data

Lecture 48 Hardcoded Static Text

Lecture 49 Lacking Multiple Browser Support

Lecture 50 Lacking Multiple Environment Support

Lecture 51 Hardcoded Driver Executable Path and Manual Driver Management

Lecture 52 Stale Browser Instances

Section 8: Goal

Lecture 53 Our Goal

Section 9: Page Object Model Design

Lecture 54 Concept, Advantages and Thumb rules

Lecture 55 Create Base Test and Driver Manager

Lecture 56 Create Base Page

Lecture 57 Create Home Page

Lecture 58 Fluent Interface

Lecture 59 Create Store Page

Lecture 60 Builder Pattern

Lecture 61 Functional Vs Structural Page Object

Lecture 62 How to Handle Dynamic UI Element

Lecture 63 Create Cart Page

Lecture 64 Create Checkout Page [With Assignment]

Lecture 65 Give Good Method Names

Lecture 66 Refactor Second Test [With Assignment]

Lecture 67 Common Method to Load URL

Section 10: Data Objects

Lecture 68 Why Data Objects?

Lecture 69 Billing Address – Create POJO

Lecture 70 Billing Address – Set and Use in Test

Lecture 71 Billing Address – Builder Pattern

Lecture 72 Billing Address – Parameterized Constructor

Lecture 73 Billing Address – Create JSON Object

Lecture 74 Add Jackson Dependency

Lecture 75 Billing Address: De-serialize JSON

Lecture 76 Reusable Method to De-serialize JSON

Lecture 77 Products – Create JSON Array

Lecture 78 Products – Create POJO

Lecture 79 Products – Fetch and Execute Test

Lecture 80 User – Create Data Object [With Assignment]

Section 11: Synchronization

Lecture 81 What is Synchronization?

Lecture 82 What is Implicit Wait?

Lecture 83 Implicit Wait Implementation

Lecture 84 Element Click Intercepted Exception

Lecture 85 Element Click Intercepted Exception – Continued

Lecture 86 Reusable Method to Handle Overlays

Lecture 87 What is Explicit Wait?

Lecture 88 Explicit Wait Strategies

Lecture 89 Explicit Wait Implementation

Lecture 90 Explicit Wait – Execute Tests

Lecture 91 Explicit Wait – Implement more Strategies

Lecture 92 What is Fluent Wait?

Section 12: Test Optimizations

Lecture 93 Remove User State Dependency

Lecture 94 Remove Application State Dependency

Section 13: Page Factory

Lecture 95 What is Page Factory?

Lecture 96 Implement

Lecture 97 Cache Look Up

Lecture 98 Page Factory or no Page Factory?

Section 14: Automated Driver Management

Lecture 99 What is WebDriverManager?

Lecture 100 What is Driver Incompatibility?

Lecture 101 Setup and Integration

Lecture 102 Custom Path to Download Drivers

Section 15: Different Ways to Drive Automation

Lecture 103 Different Ways to Drive Automation

Section 16: Maven Command Line

Lecture 104 Setup Maven on Windows

Lecture 105 Execute Automation using Maven Command Line

Lecture 106 How Maven Recognize Test Classes?

Section 17: Multiple Browser Support

Lecture 107 Support Firefox Browser

Lecture 108 Use Maven Command Line to Pass Browser Name

Lecture 109 Using ENUM for Browser Name

Lecture 110 Use JVM Argument and Default Browser

Section 18: Drive Automation using TestNG XML

Lecture 111 How to Run Test Packages

Lecture 112 How to Run Test Classes

Lecture 113 Drive Browser Name from TestNG XML

Lecture 114 Support Multiple Browsers using TestNG XML

Section 19: Drive TestNG XML using Maven Command Line

Lecture 115 Drive TestNG XML

Lecture 116 Drive Multiple TestNG Suite XMLs

Lecture 117 Set TestNG XML Paths using Maven Command Line

Lecture 118 Use Default TestNG XML and make Automation Flexible

Section 20: Parallel Execution

Lecture 119 Important Principles

Lecture 120 Why ThreadLocal?

Lecture 121 Update Code to Support Parallel Execution

Lecture 122 Drive Parallel using Maven Surefire Plugin

Lecture 123 Drive Parallel using TestNG

Lecture 124 Drive Parallel using TestNG Through Maven Command Line

Section 21: JUnit

Lecture 125 Why JUnit?

Lecture 126 JUnit 4 Vs JUnit 5

Lecture 127 JUnit4 Integration

Lecture 128 Execute JUnit4 Test from IDE

Lecture 129 Execute JUnit 4 Test from Maven Command Line

Lecture 130 Execute JUnit4 Tests in Parallel

Lecture 131 JUnit5 Integration

Section 22: Singleton Design Pattern

Lecture 132 What are Config Properties?

Lecture 133 Create Config Properties

Lecture 134 Reusable Property Loader Utility

Lecture 135 Singleton Config Loader Class

Lecture 136 Remove Hardcoded Global Properties

Section 23: Support Multiple Environments

Lecture 137 Why Multiple Environment Support is needed?

Lecture 138 Support Multiple Environments Efficiently

Section 24: The Problem with End to End Tests

Lecture 139 The Problems

Lecture 140 The Solution

Lecture 141 Selenium Recommendations

Section 25: Convert to Atomic Tests

Lecture 142 Web Technologies

Lecture 143 Navigation Test

Lecture 144 Search Test

Lecture 145 Add to Cart Test

Section 26: API Integration

Lecture 146 Identify APIs

Lecture 147 Add Dependencies

Lecture 148 Understanding Registration flow and APIs

Lecture 149 Automate GET Account API

Lecture 150 Different Options to Parse HTML and Fetch Element

Lecture 151 Parse and Fetch using Groovy

Lecture 152 Parse and Fetch using JSoup

Lecture 153 Automate POST Account API

Lecture 154 Faker API

Lecture 155 Validate POST Account API

Lecture 156 Automate Add To Cart API

Lecture 157 Validate Add To Cart API

Section 27: Atomic Tests after API Integration

Lecture 158 Login Test

Lecture 159 Convert Rest Assured Cookies to Selenium Cookies

Lecture 160 Inject Cookies to Browser

Lecture 161 Login Test – Continued

Lecture 162 Guest Checkout using Direct Bank Transfer Test

Lecture 163 Login and Checkout using Direct Bank Transfer

Lecture 164 Run Tests in Parallel

Lecture 165 Assignment 1 – Add More Test Cases

Lecture 166 Assignment 2 – Refactor API Classes

Section 28: TestNG Data Provider

Lecture 167 Create Test Case

Lecture 168 Create JSON Array for Products

Lecture 169 Create Data Provider

Lecture 170 Execute Test Case

Lecture 171 Run Data Provider in Parallel

Lecture 172 Share Data Provider across Test Classes

Lecture 173 Assignments

Section 29: Composition

Lecture 174 What is Composition? Composition Vs Inheritance

Lecture 175 Implement Composition

Lecture 176 Refactor and Execute Tests

Section 30: Handling Parallel Execution Issues

Lecture 177 Timeout + Number of Threads + Chrome Instances

Lecture 178 Synchronized Keyword

Lecture 179 How to Handle Stale Element Reference Exception

Section 31: Factory Design Pattern

Lecture 180 What is Factory Design Pattern?

Lecture 181 Implement using Interface

Lecture 182 Implement using Abstract Class – Part 1

Lecture 183 Implement using Abstract Class – Part 2

Section 32: Screenshot

Lecture 184 Take Screenshot on Test Failure

Lecture 185 Take Full Page Screenshot using AShot

Section 33: OOP Concepts in Frameworks

Lecture 186 Inheritance & Composition

Lecture 187 Encapsulation

Lecture 188 Abstraction

Lecture 189 Polymorphism

Section 34: Download Code

Lecture 190 Download Complete Framework Code

Section 35: Assignments

Section 36: Allure Reports

Lecture 191 Important Note

Lecture 192 Introduction

Lecture 193 Install

Lecture 194 Add Dependency

Lecture 195 Generate Reports

Lecture 196 Add Display Name

Lecture 197 Add Description

Lecture 198 Add Links

Lecture 199 Add Behaviors

Lecture 200 Add Steps

Lecture 201 Add Filter

Lecture 202 Custom Folder Path

Section 37: Integration with GitHub

Lecture 203 Important Note

Lecture 204 Create GitHub Repository

Lecture 205 Git Clients – Various Options

Lecture 206 Commit Code to GitHub Repository

Lecture 207 How to Push Subsequent Changes?

Section 38: Framework – CI

Lecture 208 Important Note

Lecture 209 Install Jenkins on Windows

Lecture 210 Install Jenkins on Mac

Lecture 211 Create Automation Jenkins Job

Lecture 212 Jenkins Auto Trigger: SCM Polling

Lecture 213 Jenkins Auto Trigger: Build Frequency

Lecture 214 Jenkins Auto Trigger: GitHub Web Hooks

Software engineers looking to learn how real automation frameworks are built from scratch,Software engineers struggling with developing automation frameworks,Teams struggling with developing automation frameworks that really works,Software engineers looking to learn industry best practices for framework development,Software engineers looking to transition to SDET role

Course Information:

Udemy | English | 20h 27m | 9.86 GB
Created by: Omprakash Chavan

You Can See More Courses in the Developer >> Greetings from

New Courses

Scroll to Top