This framework is built to create and execute an assortment of test suites on the open-source e-commerce web application OpenCart.
It follows the Page Object Model (POM) design pattern and integrates a combination of powerful Java-based tools and libraries to enable scalable, maintainable, and efficient end-to-end test automation.
OpenCart Demo: https://tutorialsninja.com/demo/ is a fork of the OpenCart project that remains available to execute test automation via Selenium WebDriver.
*Note: Most OpenCart forks do not allow for test automation and require captchas be completed before proceeding. This fork does not include any captchas.
- Hybrid Framework: Combines data-driven and modular testing using POM.
- TestNG Integration: For structured test case management, grouping, prioritization, and parallel execution.
- Excel Data Integration: Uses Apache POI for reading test data and writing results into Excel sheets.
- Cross-Browser Dockerized Execution: Supports Chrome, Firefox, and Edge across both Windows 11 and Linux environments via Docker.
- CI/CD Integration: Integrated with Jenkins for seamless build and test cycles.
- Reporting & Logging:
- ExtentReports for detailed HTML test reports.
- log4j for centralized logging of test execution and events.
- Language: Java 17
- Build Tool: Maven
- Testing Framework: TestNG
- Automation Tool: Selenium WebDriver
- Logging: log4j
- Reporting: ExtentReports
- CI/CD: Jenkins
- Containerization: Docker
- Data Handling: Apache POI (for Excel)
OpencartVer001/
├── src/
│ └── test/java/ # Test classes, Page Objects, and Utilities
├── testData/ # Test Cases and Test Data Excel Sheets
├── testng_master.xml # Master Suite XML
├── testng_cross-browser-testing.xml # Local Cross-Browser Suite XML - Windows 11 (Chrome/Edge/Firefox)
├── testng_grid-docker.xml # Remote Docker Container Suite XML - Linux (Chrome/Edge/Firefox)
├── run.bat # Batch file to trigger test execution
├── pom.xml # Maven config
├── reports/ # ExtentReports output (generated)
└── logs/ # generated by log4j
- Java 17
- Maven 3.6+
- Docker (
src/test/resources/docker-compose.yaml
will build the container network on the fly upon execution) - Jenkins (for CI/CD integration)
- Chrome, Firefox, or Edge browser installed (if not using Docker)
-
Clone the repository:
git clone https://github.com/evanreca/OpencartVer001.git
cd OpencartVer001
-
Install dependencies:
mvn clean install
-
Execute Tests:
-
Run all tests:
mvn test
-
Run with Docker (Grid setup):
docker-compose up -d
-
-
View Reports:
- Navigate to
/reports/
for ExtentReports. - Logs are available under
/logs/
.
- Navigate to
This project is CI/CD-ready. Trigger builds on code commits or scheduled intervals.
To Execute using a local Jenkins pipeline:
- download the jar file jenkins.war via official Jenkins documentation: https://www.jenkins.io/download/
- execute the jar file:
java -jar jenkins.war
- Jenkins UI accessible via:
localhost:8080
Feel free to fork the repo, raise issues, or submit PRs for any enhancements or bug fixes.