POM-based UI automation for Saucedemo web with Selenium + TestNG + Maven.
Fast, readable tests, grouped by smoke, regression, positive, and negative, with Allure reporting and CI/CD integration.
- Clean Page Object Model with a minimal
BasePage - Readable locators and explicit waits
- Allure reports: trends, steps, attachments
- GitHub Actions CI/CD pipeline with automated test execution
- Configurable browser mode (visible locally, headless in CI)
| Tool | Purpose |
|---|---|
| Java 21 | Core language |
| Selenium 4.38 | Browser automation |
| TestNG | Grouping & assertions |
| Maven | Build & dependencies |
| Allure | Reporting |
| GitHub Actions | CI/CD automation |
src/
├─ main/java/
│ ├─ common/
│ │ └─ DataProviders.java
│ ├─ core/
│ │ └─ BasePage.java
│ ├─ pages/
│ │ ├─ HomePage.java
│ │ └─ LoginPage.java
│ └─ utils/
│ ├─ CredentialsUtils.java
│ └─ DriverManager.java
└─ test/java/
├─ core/
│ └─ BaseTest.java
├─ negative/
│ └─ LoginNegativeTest.java
├─ positive/
│ └─ LoginPositiveTest.java
├─ regression/
│ ├─ CartFunctionalityTest.java
│ ├─ HomePageAddToCartTest.java
│ ├─ HomePageNameSortTest.java
│ ├─ HomePagePriceSortTest.java
│ └─ RemoveFromCartTest.java
├─ smoke/
│ ├─ HomePageVisibilityTest.java
│ └─ LoginFieldVisibilityTest.java
└─ utils/
└─ DataProviders.java| Group | What it checks |
|---|---|
| Smoke | Login field visibility, home page elements visibility, product listings display, basic functionality |
| Regression | Add to cart, remove from cart, cart badge functionality, name sorting (A-Z, Z-A), price sorting (low-high, high-low), product sorting changes |
| Negative | Empty credentials validation, incorrect username/password, locked out user, special characters, very long strings, spaces-only inputs |
| Positive | Successful login with all valid usernames, multiple logins, login after page refresh, login with leading/trailing spaces |
Total Test Cases: 47 test methods
Prereqs: JDK 21, Maven 3.9+, Google Chrome
# All tests
mvn clean test
# By TestNG group
mvn -Dgroups=smoke test
mvn -Dgroups=regression test
mvn -Dgroups=negative test
mvn -Dgroups=positive test# Generate and open
mvn allure:serve
# Generate only
mvn allure:reportTests automatically run on GitHub Actions for every push and pull request. The workflow:
- Runs tests automatically on push/PR
- Generates Allure reports
- Uploads test results and reports as artifacts
- Runs tests in headless mode for CI environment
See .github/workflows/ci.yml for configuration.