This project is an automation test suite built using Java, Selenium WebDriver and TestNG for OpenCart e-commerce website. The purpose of this project is to validate key functionalities of the application, ensure robustness through data-driven testing and execute tests across multiple browsers using parallel execution.
The following functionalities of the OpenCart website have been automated:
/src/test/java/ - * pageObjects —> classes corresponding to various pages of the website * testCases —> classes corresponding to each functionality testing all positive and negative test cases * utilities —> Data providers Excel utility file Extent report utility file /src/test/resources - properties file log4j2.xml file
logs reports - extent reports screenshots grouping.xml - XML file for grouping tests paralleltesting.xml - XML file for parallel execution across browsers run.bat testng.xml - run all test cases together
Before running the tests, ensure you have the following installed:
Open in Eclipse:
Import the project as a Maven project or as a standard Java project.
Add Test Data Files:
Place your properties files inside /resources/.
Configure Browser Drivers:
Ensure drivers like chromedriver.exe or geckodriver.exe are in your system’s PATH or set their path in the properties file.
Run Test Suites:
Right-click on paralleltesting.xml, grouping.xml, or testng.xml and choose “Run as TestNG Suite.”
Parallel Execution Run tests on multiple browsers simultaneously using:- paralleltesting.xml
Grouping Tests Run a specific set of tests grouped as sanity/smoke/functionality/regression/end to end/security using:-grouping.xml
Run All Tests Execute the complete test suite:- testng.xml
Data Driven Testing ddt_register.xlsx - Test cases are data-driven using Excel files Multiple test scenarios are handled with different datasets.
Configuration values like URLs, browser types are managed through the properties file.
click on reports » click any report from dropdown » click “download raw file” » open the downloaded file