{"id":31782053,"url":"https://github.com/fatimagit-code/swaglabs-e2e-automation-pytest","last_synced_at":"2026-05-14T20:04:20.196Z","repository":{"id":318295809,"uuid":"1070158139","full_name":"fatimagit-code/SwagLabs-E2E-Automation-Pytest","owner":"fatimagit-code","description":"Comprehensive End-to-End (E2E) automation suite for Swag Labs built with Python, Selenium, and Pytest using the Page Object Model (POM) design pattern.","archived":false,"fork":false,"pushed_at":"2025-10-06T09:50:10.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T11:24:34.563Z","etag":null,"topics":["e2e-tests","page-object-model","pytest","python","selenium","selenium-webdriver","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fatimagit-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T11:41:24.000Z","updated_at":"2025-10-06T09:57:48.000Z","dependencies_parsed_at":"2025-10-06T11:36:11.229Z","dependency_job_id":null,"html_url":"https://github.com/fatimagit-code/SwagLabs-E2E-Automation-Pytest","commit_stats":null,"previous_names":["fatimagit-code/quality-control"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/fatimagit-code/SwagLabs-E2E-Automation-Pytest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatimagit-code%2FSwagLabs-E2E-Automation-Pytest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatimagit-code%2FSwagLabs-E2E-Automation-Pytest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatimagit-code%2FSwagLabs-E2E-Automation-Pytest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatimagit-code%2FSwagLabs-E2E-Automation-Pytest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatimagit-code","download_url":"https://codeload.github.com/fatimagit-code/SwagLabs-E2E-Automation-Pytest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatimagit-code%2FSwagLabs-E2E-Automation-Pytest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33041218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e2e-tests","page-object-model","pytest","python","selenium","selenium-webdriver","test-automation"],"created_at":"2025-10-10T09:14:13.920Z","updated_at":"2026-05-14T20:04:20.178Z","avatar_url":"https://github.com/fatimagit-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swag Labs E-commerce Automation Project (Selenium/Pytest)\n\n## Project Overview\n\nThis repository contains a comprehensive suite of automated end-to-end (E2E) tests for the **Swag Labs** e-commerce application. The solution is built using **Python**, the **Selenium WebDriver** framework for browser interaction, and **Pytest** for test execution and reporting.\n\nThe goal of this project was to establish a robust, maintainable, and highly readable test foundation using the **Page Object Model (POM)** design pattern. This approach ensures high code reusability and simplifies maintenance as the application UI evolves.\n\n---\n\n## Key Achievements \u0026 Test Coverage (29 Test Cases)\n\nThis project successfully implemented **29 distinct test scenarios** covering all major functional areas of the Swag Labs application.\n\n### 1. User Authentication \u0026 Access Control (Major Focus)\n* **Successful Login:** Verification of standard, visual, and performance users.\n* **Error Handling:** Validation of locked-out user login failures.\n* **Credential Integrity:** Verification of failed login attempts with invalid username/password combinations.\n\n### 2. Shopping Cart Functionality \u0026 Data Integrity\nThe majority of testing focused on the integrity and state management of the shopping cart.\n\n| Scenario | Coverage Area | Status |\n| :--- | :--- | :--- |\n| **Add/Remove Items** | Adding single and multiple items (up to 3). | Complete |\n| **Cart Persistence** | Testing cart contents after logout/re-login (Verifying expected non-persistence). | Complete |\n| **UI Toggling** | Verifying the \"Add to Cart\" button correctly toggles to \"Remove\" on the Inventory page. | Complete |\n| **Quantity \u0026 Price** | Verification that the product quantity (e.g., `1`) and price displayed in the cart match the inventory data. | Complete |\n\n### 3. Checkout Workflow \u0026 Financial Integrity\nCritical flow testing to ensure accurate transaction processing.\n\n* **Checkout Flow:** Successful navigation through the Information, Cart, and Overview steps.\n* **Mandatory Fields:** Verification of error handling when required checkout fields (Name, ZIP Code) are missing.\n* **Price Calculation (Critical):** Verification that `Item Subtotal + Tax` mathematically equals the `Grand Total` on the final Overview page.\n* **Order Confirmation:** Asserting the presence of the final \"Thank You\" message after a successful order completion.\n\n### 4. Application UI State \u0026 Navigation\n* **Logout Functionality:** Correctly logging out and redirecting to the login page.\n* **Page Accessibility:** Ensuring all key pages (Inventory, Cart, Checkout) are accessible and display the correct header titles.\n\n---\n\n## Project Structure and Technology Stack\n\n### Technology Used\n| Technology | Purpose |\n| :--- | :--- |\n| **Python** | Primary programming language. |\n| **Selenium WebDriver** | Browser automation tool. |\n| **Pytest** | Testing framework for execution, parametrization, and reporting. |\n| **Page Object Model (POM)** | Design pattern for maintainability and code organization. |\n\n### Page Object Model (POM) Implementation\n\nThe solution is highly maintainable due to its POM structure:\n\n* **`BasePage`:** Contains shared WebDriver logic (e.g., `click()`, `get_text()`, `is_element_present()`).\n* **Dedicated Page Classes:** Separate classes for each major application screen (`LoginPage`, `InventoryPage`, `CartPage`, `CheckoutInformationPage`, etc.).\n* **Data Isolation:** All locators are defined as constants within their respective page classes, ensuring UI changes only require modification in one place.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatimagit-code%2Fswaglabs-e2e-automation-pytest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatimagit-code%2Fswaglabs-e2e-automation-pytest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatimagit-code%2Fswaglabs-e2e-automation-pytest/lists"}