Test-Automation--Swag-Labs

Automated Functional testing for Swag Labs website (Sauce Demo - https://www.saucedemo.com) with test cases and bug reports.

Stars
0
Committers
2

Test-Automation-for-Swag-Labs

Automated Functional testing for Swag Labs web.

This repository contains an automated testing project for Swag Labs using Java, TestNG, Selenium, ChromeDriver, Maven, and Intellij IDEA. The tests are designed to cover various scenarios on the Sauce Demo website (https://www.saucedemo.com).

Table of Contents

  • Introduction
  • Scope
  • Features
  • Tools and Technologies Used
  • Test Cases
  • Installation Guide
  • Procedure

Introduction

Test automation involves utilizing software tools and frameworks to automate the execution of tests, compare actual results with expected outcomes, and generate detailed test reports. This approach enhances the efficiency, accuracy, and consistency of testing processes while significantly reducing the time and costs associated with manual testing.

In here we are going to test SWAG Labs (Sauce Demo - https://www.saucedemo.com). We are going to use tools and frameworks like ) with Selenium for the automation. This project focuses on automating tests for the Swag Labs website using TestNG and Selenium.

Scope

  • The project covers the following areas of the Swag Labs website:
  • Login page for all accepted users and error scenarios.
  • Product page, including sorting features and View product Items.
  • Add/Remove Cart Items
  • Enter Details for Order Checkout and Calculate Total Prices
  • Placing Order

Features

  • TestNG is a widely-used testing framework for Java applications, used to run and manage test cases.
  • Uses Selenium for interacting with web elements and performing automated actions.
  • Organizes test scenarios using Gherkin syntax.
  • Includes a wide range of test cases covering login, product features, cart functionality, and more.

Tools and Technologies Used

This test automation project for Swag Labs utilizes a variety of tools and technologies to streamline the testing process and ensure efficient and accurate results.

  • Java: The primary programming language used for writing the test automation code.
  • Selenium: A popular open-source framework for automating web browser interactions and testing.
  • TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing (testing a class in isolation of the others) to integration testing (testing entire systems made of several
    classes, several packages and even several external frameworks, such as application servers).
  • Gherkin: A plain-text language that uses keywords to define test scenarios in a structured way, making them easy to read and understand.
  • ChromeDriver: The WebDriver implementation for Google Chrome, enabling Selenium to automate Chrome browser actions.
  • Maven: A build and dependency management tool that simplifies project setup and maintenance.
  • IntelliJ IDEA: An integrated development environment for Java that provides a workspace for coding, testing, and debugging.
  • These technologies are combined to create an effective testing framework that automates test cases, performs comparisons between expected and actual outcomes, and generates detailed test reports.

Test Cases

The test cases are written in Gherkin syntax, providing a clear and concise representation of over 100 test scenarios. Each test case thoroughly addresses different aspects of the Swag Labs website, ensuring comprehensive test coverage.

Installation Guide

Ensure that you have the following tools and technologies installed on your machine:

  • Java
  • Maven
  • Intellij IDEA
  • Selenium
  • Chrome driver

Procedures

  • Open the project in Intellij IDEA or your preferred IDE.
  • Navigate to the src/test/java directory.
  • Locate the test files.
  • Run the test files to execute the automated test scenarios.

Contribution ! Contributions to this project are welcome! If you identify any issues or wish to enhance the existing test suite, please feel free to create pull requests.