Skip to content

prathibha-vzm/Python_Final_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Testing of E-commerce Web Application

Project Architecture


sauce/
├── data/                          # Test data files (CSV/ODS) and conversion scripts
│   ├── convert_ods_csv.py         # Script to convert ODS to CSV
│   ├── test_contact_information.csv
│   ├── test_contact_information.ods
│   ├── test_data.csv
│   ├── test_data.ods
│   ├── test_invalid_credentials.ods
│   └── test_invalid_credentials_data.csv
│
├── keywords/                      # Reusable keyword files
│   ├── add_products_keywords.robot
│   ├── cart_icon_keywords.robot
│   ├── cart_items_count_keywords.robot
│   ├── invalid_credentials.robot
│   ├── logout_keywords.robot
│   ├── navigation_to_dashboard.robot
│   └── verify_products_in_cart_keywords.robot
│
├── pages/                         # Page Object Model files (UI element locators + actions)
│   ├── base_page.robot
│   ├── check_out_page.robot
│   ├── login_page.robot
│   └── products_page.robot
│
├── resources/                     # Test resource files for specific scenarios
│   ├── test_case_3_resources.robot
│   ├── test_case_4_resources.robot
│   ├── test_case_5_resources.robot
│   ├── test_case_6_resources.robot
│   ├── test_case_7_resources.robot
│   ├── test_case_9_resources.robot
│   └── test_case_10_resources.robot
│
├── screenshots/                   # Captured screenshots during test execution
│
├── tests/                         # Test Suites
│   ├── test_invalid_credentials.robot
│   ├── test_login_suite.robot
│   ├── test_order_summary_suite.robot
│   └── test_sauce_demo_appln_suite.robot
│
├── variables/                     # Centralized variable files
│   ├── appln_launching_variables.robot
│   ├── check_out_variables.robot
│   ├── csv_file_path_variables.robot
│   ├── home_page_variables.robot
│   └── products_page_variables.robot
├── report
├── Jenkinsfile                    # Added Jenkinsfile(Groovy) to run the build in Jenkins Pipeline
├── README.md
├── requirements.txt               # Python dependencies (SeleniumLibrary, DataDriver, etc.)

Features

  • Page Object Model (POM) for maintainability
  • Data-Driven Testing using CSV/ODS (via DataDriver library)
  • Keyword-Driven Testing Reusable Keywords for modular test design
  • Screenshots & Logs
  • End-to-End Coverage including login, add-to-cart, checkout, and logout
  • Error Handling with TRY/EXCEPT and conditional validation
  • Edge Test Cases including:
    1. Invalid login credentials
    2. Missing/empty contact information
    3. Verifying cart reset functionality
    4. Validating product count mismatch
    5. Checking error messages when expected fields are not filled
  • CI/CD Integration (Freestyle- with build status update in Git & Pipelne- Using Jenkinsfile)
  • Traceability Matrix
  • Test Metrics

Usage

To Install Dependencies

pip install -r requirements.txt

To Create and Activate Virtual Environment

python -m venv sauce
./sauce/Scripts/activate

To Run the Test in Cross Browser

chrome

 robot tests/ 

edge

 robot --variable BROWSER:edge tests/ 

To Generate Allure Report

 robot --listener "allure_robotframework:allure-results" tests/ 

To Store the Generated Allure Tests

  allure generate allure-results -o allure-report --clean 

To Open/View the Allure Report Locally

 allure serve allure-results or  allure open allure-report 

CI/CD Integration

Jenkins Build Integration - Freestyle

  1. Configured Jenkins Job to automate test execution.
  2. After each successful build, the build status is updated in GitHub, providing real-time feedback on test results. image

Jenkins Pipeline - JenkinsFile

image

Jenkins Pipeline - PipelineScript (Node)

image

Traceability Matrix

https://docs.google.com/spreadsheets/d/1TrTbwAuleJmsZZVh3xVlKV33TFJc7LrfRE9cWThmVqA/edit?usp=sharing

Test Case Metrics

https://docs.google.com/spreadsheets/d/1pJ9gaCoUWdEgEOVdqNRbacyfHy17LlyeMiDbJX3BqLQ/edit?usp=sharing

Types of Testing Performed

  1. Boundary Value Analysis
  2. Compatibility Testing
  3. Error Guessing
  4. Decision Table testing
  5. Security Testing
  6. Usability Testing
  7. Integration Testing
  8. Unit Testing

About

Automated Testing of E-commerce Web Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published