Skip to content

Comprehensive Selenium WebDriver automation framework with Java, TestNG, Maven, Allure Reports, Jenkins CI/CD integration and data-driven testing

Notifications You must be signed in to change notification settings

ChiragRathava/Learning_Selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Learning Guide with Examples

Author - Chirag Rathava

📌 Introduction

This repository is a comprehensive guide to learning Selenium with Java, covering essential concepts and integrating various tools such as TestNG, Maven, Allure Report, Jenkins, and more. This guide provides practical examples to help you master Selenium automation testing.


🚀 Tech Stack for Selenium

Technology Description
Java Programming language for Selenium automation
TestNG Test framework for organizing and executing test cases
Maven Build automation tool to manage dependencies (pom.xml)
Allure Report Reporting framework for detailed test execution reports
Jenkins CI/CD tool to automate test execution
GIT Version control system to manage codebase
log4j Logging framework for better debugging (log4j.xml)
Selenium Browser automation framework
Github Code hosting platform for collaboration
DDT (Apache POI) Data-Driven Testing with Excel (Apache POI)
Test Data External test data storage (TestData.xlsx)

📚 Topics Covered

🔹 1. Selenium Basics

  • Introduction to Selenium
  • Setting up Selenium WebDriver
  • Locators (ID, Name, XPath, CSS Selector, etc.)
  • Handling Web Elements (Click, SendKeys, GetText)
  • Browser Navigation (Back, Forward, Refresh)

🔹 2. Advanced Selenium

  • Handling Dropdowns and Alerts
  • Handling Frames and Windows
  • Mouse and Keyboard Actions (Actions Class)
  • Taking Screenshots in Selenium
  • Handling AJAX Elements
  • Implicit and Explicit Waits

🔹 3. TestNG (testng.xml)

  • TestNG Installation and Setup
  • Writing Test Cases using TestNG
  • TestNG Annotations (@Test, @BeforeClass, @AfterClass, etc.)
  • Assertions in TestNG
  • Data-Driven Testing with TestNG (DataProvider)
  • Parallel Execution with TestNG.xml

🔹 4. Maven (pom.xml)

  • Setting up Maven Project
  • Adding Selenium and TestNG Dependencies
  • Running Tests with Maven Commands

🔹 5. Allure Report Integration

  • Installing and Configuring Allure
  • Generating Reports with Allure
  • Analyzing Test Results with Allure Reports

🔹 6. Jenkins for CI/CD

  • Installing and Setting up Jenkins
  • Running Selenium Tests from Jenkins
  • Integrating Allure Reports in Jenkins

🔹 7. GIT and GitHub

  • Setting up GIT
  • Pushing Selenium Project to GitHub
  • Version Control Best Practices

🔹 8. Logging with Log4j

  • Setting up Log4j Configuration (log4j.xml)
  • Logging Framework Implementation

🔹 9. Data-Driven Testing (DDT) with Apache POI

  • Reading Data from Excel Files (TestData.xlsx)
  • Using Excel Data in Selenium Test Cases

🔹 10. Test Data Management

  • Creating and Managing Test Data
  • Using External Files for Test Data

🔧 Prerequisites

Before getting started, ensure you have the following installed:

  • Java (JDK 8 or higher)
  • Eclipse/IntelliJ IDE
  • Maven
  • Git
  • Jenkins

🛠 Installation Guide

  1. Clone the repository:
    git clone https://github.com/ChiragRathava29/Learning_Selenium.git
  2. Open the project in Eclipse/IntelliJ
  3. Install dependencies using Maven:
    mvn clean install
  4. Run the test cases:
    mvn test
  5. Generate Allure Report:
    mvn allure:serve
  6. View test results in Jenkins (if configured)

📞 Contact

For queries or discussions, reach out via:

About

Comprehensive Selenium WebDriver automation framework with Java, TestNG, Maven, Allure Reports, Jenkins CI/CD integration and data-driven testing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages