This project is a test automation framework built with Selenium WebDriver, Java, TestNG, and Maven. It implements the Page Object Model (POM) design pattern to automate test scenarios on the Automation Practice e-commerce website.
├── src
│ ├── main/java/pages # Page object classes
│ │ ├── AddressPage.java
│ │ ├── DressesPage.java
│ │ ├── HomePage.java
│ │ ├── LoginPage.java
│ │ ├── OrderPage.java
│ │ └── PrintedDressPage.java
│ └── test/java/test # Test classes
│ ├── BaseTest.java
│ └── RegisterTest.java
└── pom.xml # Maven configuration
- Java 8
- Selenium WebDriver 4.2.2
- TestNG 7.5
- Maven
The project uses the Page Object Model (POM) design pattern which:
- Separates page-specific code from test code
- Creates an abstraction layer for UI interactions
- Improves test maintainability
- Reduces code duplication
- E-commerce Purchase Flow Test
- Navigate to the Dresses section
- Select a printed dress
- Set quantity and size
- Add to cart
- Proceed to checkout
- Register a new account
- Complete registration with personal details
- Clone this repository
- Update ChromeDriver path in
BaseTest.javato match your local path - Execute tests using one of these methods:
- Run with Maven:
mvn test - Run with TestNG in your IDE
- Run specific test classes directly
- Run with Maven:
- Java 8+ JDK installed
- Maven installed
- Chrome browser installed
- ChromeDriver matching your Chrome version
Update the path in BaseTest.java:
System.setProperty("webdriver.chrome.driver", "path/to/your/chromedriver");- Add more test scenarios
- Implement reporting (Extent Reports, Allure)
- Add screenshot capture on test failure
- Implement cross-browser testing
- Add CI/CD integration
- Parameterize test data
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
Mohammed Lukmanudin M - GitHub Profile