Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Automation Testing Framework

A complete UI automation testing framework built with Java, Selenium WebDriver, TestNG, and Allure Reporting using the Page Object Model (POM) design pattern.

This project automates end-to-end test scenarios for the TutorialsNinja demo website:

🔗 http://tutorialsninja.com/demo/index.php?route=common/home

Project Structure

├── .gitignore
├── .mvn
│   └── wrapper
│       └── maven-wrapper.properties
├── mvnw
├── mvnw.cmd
├── pom.xml
├── README.md
└── src
    ├── main
    │   ├── java
    │   │   └── com
    │   │       └── global
    │   │           ├── base
    │   │           │   └── BasePage.java
    │   │           ├── ConfigReader.java
    │   │           ├── pages
    │   │           │   ├── AccountPage.java
    │   │           │   ├── CheckoutPage.java
    │   │           │   ├── HomePage.java
    │   │           │   ├── LoginPage.java
    │   │           │   ├── LogoutSuccessPage.java
    │   │           │   ├── ProductPage.java
    │   │           │   ├── RegisterPage.java
    │   │           │   ├── RegisterSuccessPage.java
    │   │           │   └── ShoppingCartPage.java
    │   │           ├── SubscribeOption.java
    │   │           └── TestingFramework.java
    │   └── resources
    │       └── config.properties
    └── test
        └── java
            └── com
                └── global
                    ├── base
                    │   └── BaseTest.java
                    ├── TestingFrameworkTest.java
                    ├── tests
                    │   ├── ChangeCurrencyTest.java
                    │   ├── CheckOnBreadCrumbAndLeftSideMenuTest.java
                    │   ├── InvalidCheckoutProcessAndConfirmOrderTest.java
                    │   ├── LoginWithErrorsTest.java
                    │   ├── LoginWithoutErrorsTest.java
                    │   ├── RegisterationWithoutErrorsTest.java
                    │   ├── RegisterWithErrorsTest.java
                    │   ├── SearchByNameTest.java
                    │   ├── SearchInSubcategoriesTest.java
                    │   ├── ShoppingCartTest.java
                    │   ├── SortByNameTest.java
                    │   └── validCheckoutProcessAndConfirmOrderTest.java
                    └── utilities
                        ├── CSVUtils.java
                        ├── DriverFactory.java
                        ├── ScreenshotUtil.java
                        └── TestListener.java

Features

  • Scalable automation framework using POM
  • Data-Driven Testing using Excel sheets
  • Externalized configuration using .properties
  • Reusable utility methods
  • Cross-browser support
  • Strong locators (ID, Name, CSS Selectors)
  • Screenshot capture on failure
  • Allure interactive reports
  • TestNG assertions & annotations
  • Clean and maintainable code structure

Automated Test Scenarios

The framework automates the following scenarios:

  • Registration without errors
  • Registration with validation errors
  • Valid Login
  • Invalid Login
  • Change Currency
  • Breadcrumb & Left Menu Validation
  • Sort Products A-Z / Z-A
  • Search by Product Name
  • Search in Subcategories
  • Add Items to Cart
  • Checkout & Confirm Order

Configuration

All configurable data is stored inside:

src/main/resources/config.properties

Example:

baseUrl=http://tutorialsninja.com/demo/
browser=chrome

Data-Driven Testing

Test data is stored in CSV files:

Example:

CSV/validRegister.csv

Running The Tests

Run Using Maven:

mvn clean test

Run Specific TestNG Suite:

mvn test -DsuiteXmlFile=testng.xml

Allure Reporting

Generate Allure Report:

allure serve allure-results

Generate Static Report:

allure generate allure-results --clean -o allure-report

Screenshots on Failure

The framework automatically captures screenshots whenever a test case fails.

Screenshots are attached to the Allure report for easier debugging.

About

Java Selenium automation testing framework using TestNG, Page Object Model (POM), Data-Driven Testing with .csv, and Allure Reporting for the TutorialsNinja demo website.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages