How naveenanimation20/nov2025pomframework works
Purpose and execution model
This is a Java UI test automation framework for OpenCart workflows, organized around Selenium-style page objects and TestNG suites. Maven is the build/dependency entry point (pom.xml); CI is configured through Jenkinsfile. TestNG runner XML files select browser and regression/sanity execution scopes under src/test/resources/testrunners/.
Test lifecycle and orchestration
BaseTest is the test-layer entry point, responsible for shared setup/teardown and exposing initialized page objects to scenario classes. Feature tests drive user journeys such as home navigation, authentication, registration, and product details.
• src/test/java/com/opencart/qa/base/BaseTest.java
• src/test/java/com/opencart/qa/tests/LoginPageTest.java
• src/test/java/com/opencart/qa/tests/ProductInfoPageTest.java
Browser driver boundary
Browser creation is centralized rather than embedded in tests or page objects. DriverFactory owns WebDriver lifecycle; OptionsManager supplies browser-specific options. This isolates runtime browser selection and driver configuration from test flow.
• src/main/java/com/opencart/qa/factory/DriverFactory.java
• src/main/java/com/opencart/qa/factory/OptionsManager.java
• src/test/resources/testrunners/chrome.xml
Page-object interaction layer
Page classes represent OpenCart screens and encapsulate locators and UI actions. Tests should compose these page APIs rather than directly operating browser elements. Navigation/control flow generally proceeds from HomePage or LoginPage to search results and product information, with separate registration coverage.
• src/main/java/com/opencart/qa/pages/HomePage.java
• src/main/java/com/opencart/qa/pages/ResultsPage.java
• src/main/java/com/opencart/qa/pages/ProductInfoPage.java
UI abstraction and failure handling
ElementUtil and JavaScriptUtil form the lower-level interaction boundary for waits, element actions, and JavaScript-backed operations. Framework-specific browser, element, and general exceptions standardize failure signaling across pages and lifecycle code.
• src/main/java/com/opencart/qa/utils/ElementUtil.java
• src/main/java/com/opencart/qa/utils/JavaScriptUtil.java
• src/main/java/com/opencart/qa/exceptions/BrowserException.java
Environment and test data flow
Runtime configuration supports a base properties file plus dev, QA, stage, and UAT environment variants. Structured test inputs are supplied from Excel and CSV resources through dedicated readers, allowing data-driven registration and other test cases without hardcoding values in test classes.
• src/test/resources/config/config.properties
• src/test/resources/config/config.qa.properties
• src/main/java/com/opencart/qa/utils/ExcelUtil.java
Reporting, retries, and delivery integration
TestNG listeners provide retry behavior, annotation transformation, and Allure reporting hooks. Suite XML files determine the test selection passed to Maven/TestNG, while Jenkins provides the CI execution boundary. The principal external runtime services are the target OpenCart deployment, a local/remote browser driver, and Allure-compatible reporting output.
• src/main/java/com/opencart/qa/listeners/TestAllureListener.java
• src/main/java/com/opencart/qa/listeners/Retry.java
• Jenkinsfile
Main entry points: BaseTest.java Base test · DriverFactory.java Driver factory · chrome.xml Chrome suite · ElementUtil.java Element util
Components 20
Build & CI
- Maven build · Builds dependencies and executes selected TestNG suites.
pom.xml - Jenkins CI
Jenkinsfile
Test Orchestration
- Chrome suite · Selects Chrome test execution scope.
src/test/resources/testrunners/chrome.xml - Base test · Shared setup and teardown expose initialized page objects.
src/test/java/com/opencart/qa/base/BaseTest.java - Login tests
src/test/java/com/opencart/qa/tests/LoginPageTest.java - Product tests
src/test/java/com/opencart/qa/tests/ProductInfoPageTest.java
Browser Runtime
- Driver factory
src/main/java/com/opencart/qa/factory/DriverFactory.java - Options manager
src/main/java/com/opencart/qa/factory/OptionsManager.java - Browser driver · Local or remote browser WebDriver.
Page Objects
- Home page
src/main/java/com/opencart/qa/pages/HomePage.java - Results page
src/main/java/com/opencart/qa/pages/ResultsPage.java - Product info page
src/main/java/com/opencart/qa/pages/ProductInfoPage.java
Framework Support
- Element util · Provides waits and element actions.
src/main/java/com/opencart/qa/utils/ElementUtil.java - JavaScript util
src/main/java/com/opencart/qa/utils/JavaScriptUtil.java - Browser exception
src/main/java/com/opencart/qa/exceptions/BrowserException.java - QA configuration · Environment-specific runtime settings.
src/test/resources/config/config.qa.properties - Excel data reader · Supplies structured data-driven inputs.
src/main/java/com/opencart/qa/utils/ExcelUtil.java - Allure listener · Publishes Allure-compatible reporting hooks.
src/main/java/com/opencart/qa/listeners/TestAllureListener.java - Retry policy
src/main/java/com/opencart/qa/listeners/Retry.java
Other components
- OpenCart deployment
Connections 22
- Jenkins CI → Maven build: runs
- Maven build → Chrome suite: selects
- Chrome suite → Base test: executes
- Base test → Driver factory: initializes
- Driver factory → Options manager: uses
- Driver factory → Browser driver: creates
- QA configuration → Base test: configures
- Base test → Login tests: shared lifecycle
- Base test → Product tests: shared lifecycle
- Login tests → Home page: uses
- Product tests → Product info page: uses
- Home page → Results page: searches to
- Results page → Product info page: opens
- Home page → Element util: interacts through
- Results page → Element util: interacts through
- Product info page → Element util: interacts through
- Element util → JavaScript util: JavaScript actions
- Driver factory → Browser exception: signals failures
- Excel data reader → Login tests: test inputs
- Retry policy → Chrome suite: retries failures
- Allure listener → Chrome suite: reports execution
- Browser driver → OpenCart deployment: drives UI against