A comprehensive Selenium WebDriver automation framework for testing SauceDemo e-commerce application.
├── src/main/java
│ ├── factory/ # WebDriver Factory
│ ├── pages/ # Page Object Classes
│ ├── reports/ # Reporting Utilities
│ └── utils/ # Helper Utilities
├── src/test/java
│ ├── tests/ # Test Classes
│ ├── dataproviders/ # Test Data Providers
│ └── listeners/ # TestNG Listeners
└── src/test/resources
├── config.properties # Configuration
└── log4j2.xml # Logging Config
- Page Object Model (POM)
- Data-Driven Testing
- Cross-Browser Support
- Parallel Execution
- Allure Reporting Integration
- Screenshot on Failure
- Logging with Log4j2
- CI/CD with Jenkins Pipeline
git clone https://github.com/yourusername/saucedemo-automation.git
cd saucedemo-automation
mvn clean install# Run all tests
mvn test
# Run smoke tests
mvn test -Dgroups=smoke
# Run with specific browser
mvn test -Dbrowser=firefox-
Install required Jenkins plugins:
- Maven Integration
- HTML Publisher
- TestNG Results Plugin
- Email Extension
-
Configure Jenkins:
- Add Maven installation (Maven-3.9)
- Add JDK installation (JDK-11)
-
Create Pipeline job pointing to this repository
After test execution, generate and view Allure reports:
mvn allure:serve- Reports data:
target/allure-results/ - Logs:
logs/automation.log