How sanjay-gk/saucedemo-automation works
This repository is a Selenium/TestNG end-to-end automation framework for SauceDemo, not the e-commerce application itself. Its user-to-result workflow covers authentication, product selection, cart operations, and checkout confirmation; reusable page objects sit above a shared page base, while test classes define scenarios and assertions. The README documents the test-suite and page-object architecture. Sampled sources show page implementations and inheritance, but test classes and BaseTest were not sampled, so their finer-grained calls are represented only where the README supports them.
Main entry points: BaseTest.java Test lifecycle · CartPage.java Cart operations · CheckoutPage.java Checkout · BasePage.java Page interactions
Components 15
Test execution
- TestNG suite
testng.xml - Test lifecycle
src/test/java/base/BaseTest.java - Login scenarios
src/test/java/tests/LoginTest.java - Product scenarios
src/test/java/tests/ProductsTest.java - Cart scenarios
src/test/java/tests/CartTest.java - Checkout scenarios
src/test/java/tests/CheckoutTest.java
Page objects
- Authentication
src/main/java/pages/LoginPage.java - Product selection
src/main/java/pages/ProductsPage.java - Cart operations
src/main/java/pages/CartPage.java - Checkout
src/main/java/pages/CheckoutPage.java
Shared utilities
- Page interactions
src/main/java/base/BasePage.java - Configuration reader
src/main/java/utils/ConfigReader.java - Configuration
src/main/resources/config.properties - Driver factory
src/main/java/utils/DriverFactory.java
Other components
- SauceDemo app
Connections 19
- TestNG suite → Test lifecycle: starts lifecycle
README.md - Test lifecycle → Login scenarios: sets up tests
README.md - Test lifecycle → Product scenarios: sets up tests
README.md - Test lifecycle → Cart scenarios: sets up tests
README.md - Test lifecycle → Checkout scenarios: sets up tests
README.md - Login scenarios → Authentication: uses page object
README.md - Product scenarios → Product selection: uses page object
README.md - Cart scenarios → Cart operations: uses page object
README.md - Checkout scenarios → Checkout: uses page object
README.md - Authentication → Page interactions: extends
src/main/java/pages/LoginPage.java - Product selection → Page interactions: extends
src/main/java/pages/ProductsPage.java - Cart operations → Page interactions: extends
src/main/java/pages/CartPage.java - Checkout → Page interactions: extends
src/main/java/pages/CheckoutPage.java - Cart operations → Checkout: leads to
README.md - Authentication → SauceDemo app: drives UI
README.md - Product selection → SauceDemo app: drives UI
README.md - Cart operations → SauceDemo app: drives UI
README.md - Checkout → SauceDemo app: drives UI
README.md - Configuration reader → Configuration: loads properties
src/main/java/utils/ConfigReader.java