A Selenium + Java hybrid automation framework built for testing the OpenCart application.
The framework combines Selenium WebDriver, TestNG, Page Object Model, Excel-based data-driven testing, reporting, logging, and cross-browser execution.
- Java
- Selenium WebDriver
- TestNG
- Maven
- Page Object Model (POM)
- Apache POI
- Extent Reports
- Log4j2
- Docker / Selenium Grid
- Page Object Model for maintainable test code
- Data-driven testing with Excel and TestNG DataProvider
- TestNG groups, suites, and dependencies
- Cross-browser testing
- Extent HTML reports
- Log4j2 logging
- Failure screenshots
- Selenium Grid / Docker support
- External configuration using
config.properties
src/test/java/
├── pageObjects/ # Page classes and locators
├── testBase/ # Driver setup and common test utilities
├── testCases/ # TestNG test cases
└── utilities/ # Excel, DataProvider, and reporting utilities
src/test/resources/
├── config.properties # Test configuration
└── log4j2.xml # Logging configuration
testData/ # Excel test data
reports/ # Generated Extent reports
screenshots/ # Failure screenshots
logs/ # Automation logs
testng.xml files:
├── master.xml
├── grouping.xml
├── crossbrowsertesting.xml
└── grid-docker.xml
docker-compose.yaml # Selenium Grid / Docker setup
pom.xml # Maven dependencies and build configuration
run.bat # Windows run script
TC001 - Account Registration
TC002 - Login Test
TC003 - Data-Driven Login Test
TC004 - Search Test
TC005 - Add to Cart Test
- Clone the repository.
- Open the project as a Maven project.
- Check
src/test/resources/config.properties. - Set the required browser and execution configuration.
- Run
master.xmlor another required TestNG suite. - Check the generated reports, logs, screenshots, and TestNG results.
- Make sure the required Selenium Grid / Docker setup is running.
- Use the appropriate TestNG suite, such as
crossbrowsertesting.xmlorgrid-docker.xml. - Run the suite.
- Check the generated reports and execution results.
TestNG
↓
BaseClass
↓
Test Cases
↓
Page Objects
↓
Selenium WebDriver
↓
OpenCart
↓
Reports + Logs + Screenshots
After execution, generated files can be found in:
reports/
screenshots/
logs/
test-output/
This project was built to practice and demonstrate how Selenium, TestNG, POM, data-driven testing, reporting, logging, and browser execution can be combined into a maintainable automation framework.
Completed
Vinay Chaudhari
Java | Selenium | TestNG | QA Automation