https://github.com/ahany42/swaglabsselenuim
A structured Selenium framework using Java, TestNG, Maven, and supporting DDT via Excel and properties files with detailed Log4j2 logging and Allure reporting. The framework follows the Page Object Model for maintainable and scalable test design.
https://github.com/ahany42/swaglabsselenuim
allure-report bdd-tests cucumber ddt-tests selenuim swaglabs testng
Last synced: about 2 months ago
JSON representation
A structured Selenium framework using Java, TestNG, Maven, and supporting DDT via Excel and properties files with detailed Log4j2 logging and Allure reporting. The framework follows the Page Object Model for maintainable and scalable test design.
- Host: GitHub
- URL: https://github.com/ahany42/swaglabsselenuim
- Owner: ahany42
- Created: 2025-07-24T08:20:32.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-07-27T20:29:21.000Z (3 months ago)
- Last Synced: 2025-07-27T20:50:33.182Z (3 months ago)
- Topics: allure-report, bdd-tests, cucumber, ddt-tests, selenuim, swaglabs, testng
- Language: Java
- Homepage:
- Size: 22.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwagLabs Selenium Test
This project is a structured Selenium automation framework using Java, TestNG, and Maven. It integrates Excel data handling, Log4j2 for logging, and Allure for detailed test reporting.
## Project Structure
```bash
├── allure-report/ # Allure generated HTML report
├── allure-results/ # Allure raw result files
├── logs/
│ └── test-log.log # Log output from test runs
├── src/
│ ├── main/
│ │ ├── LoginPage.java # Page Object for Login
│ │ └── PurchasePage.java # Page Object for Purchase
│ │
│
│ └── test/
│ ├── java/
│ │ ├── BaseTest.java # Base setup/teardown for tests
│ │ ├── ExcelReader.java # Utility for reading Excel files
│ │ ├── LoginTestCase.java # Login test scenarios
│ │ ├── ProductsTestCase.java # Product-related test scenarios
│ │ ├── PropertiesUtil.java # Config/property utility
│ │ └── PurchaseTestCase.java # Purchase flow test cases
│ └── resources/
│ ├── log4j2.xml # Logging configuration
│ ├── ProfileData.xlsx # Profile Data To Fill Purchase Form
│ ├── ProductData.xlsx # Product To Purchase
│ └── test-config.properties # Custom configuration
├── pom.xml # Maven project config
└── testng.xml # TestNG suite definition
```
## Technologies Used
Java 24
Selenium WebDriver 4.34.0
TestNG 7.11.0
Apache POI (poi-ooxml) 5.2.3
Log4j2 (log4j-core) 2.20.0
Allure TestNG 2.24.0
Maven Compiler Plugin 3.11.0
Maven Surefire Plugin 3.2.5
## Test Cases
### Login
- Validate that User cannot Login With Invalid User Name
- Validate that User cannot Login With Invalid Password
- Validate that User cannot Login With Invalid User Name and Password
- Validate that User cannot Login With Locked Account
- Validate that User cannot Login with empty User Name or Password
- Validate that User can Login With Valid Email and Password
### Products
- Validate that User can View price Label for Each product
- Validate that User can View Add to cart button for each product
### Purchase
- Validate that User can Add Item to Cart
- Validate that items in cart is increased by one
- Validate that User Can Fill Checkout Form
- Validate that User Can Finish purchase and Checkout
## How to Run
```bash
git clone https://github.com/your-username/SwagLabs.git
cd SwagLabs
```
```bash
mvn clean install
Run the tests
```
```bash
mvn test
```
## Allure Reports
Generate Report
```bash
allure generate allure-results --clean -o allure-report
```
View Report
```bash
allure open allure-report
```