Skip to content

redJavaMan/flipkart-ui-e2e-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flipkart UI E2E Test Automation

A Selenium-based automated testing framework for Flipkart's e-commerce web application. This project implements the Page Object Model design pattern to create maintainable and scalable UI tests.

📋 Table of Contents

🔍 Overview

This project provides end-to-end test automation for Flipkart's critical user journeys, specifically focusing on the product search and shopping cart functionality. The automated tests help ensure that users can search for products, add items to their cart, and manage product quantities without encountering issues.

✨ Features

  • Page Object Model implementation for improved test maintenance
  • Automated test scenarios for shopping cart functionality
  • Cross-window interactions handling
  • ExtentReports integration for detailed HTML reports
  • Screenshot capture on test failure
  • Robust waits and synchronization

📁 Project Structure

flipkart-ui-e2e-test/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com/
│   │   │       └── flipkart/
│   │   │           ├── pages/
│   │   │           │   ├── HomePage.java
│   │   │           │   ├── ProductListPage.java
│   │   │           │   ├── ProductPage.java
│   │   │           │   └── Add2CartPage.java
│   │   │           └── utils/
│   │   │               └── ExtentReporterNG.java
│   ├── test/
│   │   ├── java/
│   │   │   └── com/
│   │   │       └── flipkart/
│   │   │           ├── base/
│   │   │           │   └── BaseTest.java
│   │   │           ├── testComponents/
│   │   │           │   └── Listeners.java
│   │   │           └── tests/
│   │   │               └── Add2CartTest.java
│   │   └── resources/
│   │       └── testng.xml
├── reports/
│   └── index.html
├── pom.xml
└── README.md

🧪 Test Scenarios

The framework currently tests the following scenarios:

  1. Add to Cart Test

    • Search for a Samsung A54 product
    • Select a specific model
    • Add product to cart
    • Verify the correct product is added
    • Increase quantity to 3
    • Verify cart price calculation
  2. Add Multiple Items to Cart Test

    • Search for a Samsung A54 product
    • Add a specific model to cart
    • Add another different model to cart
    • Verify cart price calculation for multiple items
  3. Maximum Quantity Test

    • Search for a Samsung A54 product
    • Select a specific model
    • Add product to cart
    • Attempt to increase quantity beyond the allowed limit (5)
    • Verify the quantity error message

🛠️ Tech Stack

  • Java 11
  • Selenium WebDriver 4.17.0
  • TestNG 7.9.0
  • ExtentReports 5.0.9
  • Maven
  • Chrome WebDriver

🚀 Setup Instructions

  1. Prerequisites

    • Java 11 or higher
    • Maven
    • Chrome browser
  2. Clone the repository

    git clone https://github.com/yourusername/flipkart-ui-e2e-test.git
    cd flipkart-ui-e2e-test
  3. Install dependencies

    mvn clean install

▶️ Running Tests

Running all tests

mvn test

Running a specific test

mvn test -Dtest=Add2CartTest

Running with TestNG XML

mvn test -DsuiteXmlFile=testng.xml

📊 Test Reports

After running the tests, detailed HTML reports are generated in the reports directory. Open reports/index.html in a browser to view:

  • Test execution summary
  • Individual test results
  • Execution timeline
  • System information
  • Screenshots of failures (if any)

👤 Contributors

  • M. Mohammed Lukmanudhin

Author

Mohammed Lukmanudin M - GitHub Profile

About

Extent Report

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published