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
├── .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
- 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
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
All configurable data is stored inside:
src/main/resources/config.properties
Example:
baseUrl=http://tutorialsninja.com/demo/
browser=chrome
Test data is stored in CSV files:
Example:
CSV/validRegister.csv
Run Using Maven:
mvn clean test
Run Specific TestNG Suite:
mvn test -DsuiteXmlFile=testng.xml
Generate Allure Report:
allure serve allure-results
Generate Static Report:
allure generate allure-results --clean -o allure-report
The framework automatically captures screenshots whenever a test case fails.
Screenshots are attached to the Allure report for easier debugging.