Skip to content

Unit testing Java methods using JUnit and Selenium WebDriver for web automation and validation — Gradle-based project demonstrating effective test design and automation best practices.

Notifications You must be signed in to change notification settings

Prantika71/Units_Test_With_JUnit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Testing Projects with JUnit and Selenium

This repository contains three automated test cases implemented using Java, Selenium, and JUnit:

1. Webform Automation for Digital Unite
2. Guest Registration Automation for WP Everest
3. Web Scraping Data for DSEBD Stock Prices

Content

Project Description

1. Webform Automation for Digital Unite

Automates the form submission process:

  • Fills in the required fields.
  • Uploads a file (≤ 2 MB).
  • Validates the success message upon submission.

2. Guest Registration Automation for WP Everest

Automates the guest registration process:

  • Completes all mandatory fields.
  • Submit the form.
  • Verifies successful registration.

3. Web Scraping for DSEBD Stock Prices

Automates stock market data extraction:

  • Scrapes stock table data from the DSEBD website.
  • Prints all cell values.
  • Stores the data in a text file for further reference

🛠️ Technologies Used

Tool Purpose
Java Programming language
JUnit Unit testing framework
Selenium WebDriver Browser Automation
IntelliJ IDEA Integrated development environment
Gradle Project & dependency build management

🔧 Prerequisites

Before running this project, make sure the following are properly set up on your system:

  • Java Development Kit (JDK) 8 or higher
    Required to compile and run Java test classes.

  • Supported Web Browser (e.g., Chrome, Firefox)
    Used for executing browser-based tests.

  • WebDriver Binary (ChromeDriver or GeckoDriver)
    Must match the version of your installed browser.

🚀 How To Run This?

  1. Clone the repository:
    git clone https://github.com/Prantika71/Units_Test_With_JUnit.git
  2. Open the Project in any IDE
  3. Add Dependency in the build.gradle file and reload gradle from the top right
  4. Verification
    • For the web forms:
      • Check the assertion logs for success or failure messages.
    • For the table scraping:
      • Verify the console output and the generated text file (e.g., store.txt).
  5. Output Files
    • Logs: Test results and execution details are logged in the console.
    • Text File: Scraped table data is stored in store.txt.

Project Reports

1. Webform Automation for Digital Unite

  • Automated field inputs.
  • Implemented file upload functionality.
  • Asserted the expected success message: "Thank you for your submission!".

Report

image

2. Guest Registration Automation for WP Everest

  • Automated field inputs for First Name, Last Name, Email, Password, Gender, DOB, Nationality, Phone, Country, and acceptance of Terms & Conditions.
  • Asserted the expected success message: "User successfully registered.!".

Report

image

3. Web Scraping for DSEBD Stock Prices

  • Scraped table data from the provided webpage using Selenium.
  • Printed all table cell values in the console.
  • Stored the scraped data into a text file for reference.

Report

image

Text File

image

About

Unit testing Java methods using JUnit and Selenium WebDriver for web automation and validation — Gradle-based project demonstrating effective test design and automation best practices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages