This project is a UI test automation framework built using Selenium WebDriver and TestNG to test the SauceDemo e-commerce application.
It follows the Page Object Model (POM) design pattern to ensure scalability, readability, and maintainability of test automation code.
This project demonstrates a maintainable Selenium test framework with reusable page objects, TestNG data providers, explicit waits, screenshot capture, and ExtentReports output.
It currently covers:
- Login validation
- Inventory page checks
- Add to cart and remove from cart flows
- Product sorting checks
- Data-driven runs with multiple SauceDemo users
- Java 21
- Maven
- Selenium WebDriver 4
- TestNG
- ExtentReports
- GitHub Actions (CI/CD)
- Apache Commons IO
- Page Object Model (POM) architecture
- Data-driven testing using TestNG DataProvider
- Automated CI/CD pipeline (GitHub Actions)
- ExtentReports integration for test reporting
- Screenshot capture for test evidence
- Headless browser execution support
src/main/java/Pages/ Page objects
src/test/java/base/ WebDriver setup and teardown
src/test/java/tests/ TestNG test classes
src/test/java/utils/ Test data, reports, screenshots
screenshots/ Captured test evidence
testng.xml Suite definition
pom.xml Maven build configuration
- Valid login
- Invalid login
- Empty login submission
- Inventory page visibility
- Add item to cart
- Open cart and verify contents
- Remove item from cart
- Sort products A to Z
- Sort products Z to A
- Sort products by price low to high
- Sort products by price high to low
- Product count validation with multiple users
- Java 21
- Maven 3.9+
- Google Chrome installed
- Internet access for SauceDemo
Run the full suite:
mvn clean testRun a single test class:
mvn -Dtest=LoginTests testRun a single test method:
mvn -Dtest=LoginTests#invalidLoginTest testAfter execution, the framework generates:
- TestNG/Surefire output in
target/surefire-reports - ExtentReports HTML output in
test-output/ExtentReport.html - Screenshots in
screenshots/
- Tests use explicit waits in the page objects.
- WebDriver setup opens SauceDemo automatically before each test.
- Chrome runs in headless mode in the current test configuration.
Readme.mdis kept in the repo, butREADME.mdis the file GitHub will render.
Deshanth Vishvalingam





