SwagLabs Documentation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

ALISHBA MUMTAZ

Project Documentation: Swag Labs E-commerce Website

Project Overview
The Swag Labs website is a sophisticated e-commerce platform designed to offer a seamless shopping
experience. Through a robust user interface and structured navigation, it enables users to explore, select,
and purchase products efficiently. The project includes various modules, from user authentication to
product browsing, cart management, and checkout processing, making it essential to ensure that each
functionality operates flawlessly.

Purpose of Documentation
This document provides a detailed overview of the Swag Labs platform's features, functionality, and user
flows, and it includes test cases for verifying each critical aspect. The documentation is intended to aid
developers, QA testers, and stakeholders in understanding the application architecture and to serve as a
reference for future updates or enhancements.

Scope of Documentation
The Swag Labs documentation includes testing of the following key modules and functionality:
1. User Authentication
o Login and logout functionality for both valid and invalid credentials.
o Error message handling for unsuccessful login attempts.
2. Product Catalog
o Display of product listings with images, descriptions, and pricing.
o Filtering and sorting options to enhance user navigation.
3. Shopping Cart
o Adding, updating, and removing products in the cart.
o Real-time price calculation and cart updates.
4. Checkout Process
o Step-by-step checkout flow with options for entering shipping details and completing the
purchase.
o Verification of payment and order summary.
5. Order Confirmation and History
o Display of order confirmation and summary page post-purchase.

1|Page
ALISHBA MUMTAZ

o Potential integration for viewing order history for registered users.

Testing Environment
• Framework: Selenium WebDriver with Python
• Operating System: Windows
• Browsers Tested: Chrome

TEST CASE DOCUMENTATION:

Module 1
Module name: Login Process
Date: November 2, 2024

Test case Description Preconditions Test Steps Test Data Expected Actual Status
ID Result Result
TC01 Login with User is on the 1. Enter Username: User is Same as Pass
valid login page of valid standard_user successfully expected
username Swag Labs username Password: logged in
and and secret_sauce and
password password redirected
2. Click on to the
the Login product
button page
TC02 Login with User is on the 1. Enter Username: Error Same as Pass
invalid login page of invalid invalid_user message is expected
username Swag Labs username Password: displayed,
and valid and valid secret_sauce indicating
password password incorrect
2. Click on username
the Login
button
TC03 Login with User is on the 1. Enter Username: Error Same as Pass
valid login page of valid standard_user message is expected
username Swag Labs username Password: displayed,
and invalid and invalid invalid_password indicating
password password incorrect
2. Click on password

2|Page
ALISHBA MUMTAZ

the Login
button
TC04 Login with User is on the 1. Enter Username: Error Same as Pass
invalid login page of invalid invalid_user message is expected
username Swag Labs username Password: displayed,
and invalid and invalid invalid_password indicating
password password incorrect
2. Click on credentials
the Login
button
TC05 Login User is on the 1. Click on None Error Same as Pass
without login page of the Login message is expected
entering Swag Labs button displayed,
any without prompting
credentials entering the user to
any enter both
credentials fields

Module 2
Module name: Product Filtering
Date: November 2, 2024

Test case Description Preconditions Test Steps Test Data Expected Actual Status
ID Result Result
TC06 To test that User is logged 1. Navigate Login: Products Same as Pass
the products in with valid to the standard_user are sorted expected
are sorted credentials inventory Password: A to Z.
alphabetically page. secret_sauce
from A to Z 2. Select
"Name (A
to Z)" from
the filter
dropdown.
3. Capture
product
names.
4. Verify
that the
product
names are
sorted in
ascending
order.

3|Page
ALISHBA MUMTAZ

TC07 To test that User is logged 1. Navigate Login: Products Same as Pass
the products in with valid to the standard_user are sorted expected
are sorted credentials inventory Password: Z to A.
alphabetically page. secret_sauce
from Z to A 2. Select
"Name (Z
to A)" from
the filter
dropdown.
3. Capture
product
names.
4. Verify
that the
product
names are
sorted in
descending
order.
TC08 To test filter User is logged 1. Navigate Login: Products Same as Pass
products by in with valid to the standard_user are sorted expected
price low to credentials inventory Password: by price
high page. secret_sauce low to
functionality 2. Select high.
"Price (low
to high)"
from the
filter
dropdown.
3. Capture
product
prices.
4. Verify
that the
product
prices are
sorted in
ascending
order.
TC09 To test filter User is logged 1. Navigate Login: Products Same as Pass
products by in with valid to the standard_user are sorted expected
price high to credentials inventory Password: by price
low page. secret_sauce high to
functionality 2. Select low.
"Price
(high to
low)" from
the filter
dropdown.
3. Capture
product

4|Page
ALISHBA MUMTAZ

prices.
4. Verify
that the
product
prices are
sorted in
descending
order.

Module 3
Module name: Cart Functionality
Date: November 2, 2024

Test case Description Preconditions Test Steps Test Data Expected Actual Status
ID Result Result
TC10 Verify that User is logged 1. Navigate Item: Sauce Cart icon Same as Pass
the selected in. to the Labs count expected
item is product Backpack should be
successfully page. "1".
added to the 2. Click
cart. "Add to
Cart" for an
item.
3. Check
cart icon
count.
TC11 Verify that User is logged 1. Navigate Item: Sauce "Add to Same as Pass
the user in. to the Labs Cart" expected
cannot add product Backpack button
more than page. should be
one 2. Click disabled or
quantity of "Add to not
the same Cart" for an available.
item. item.
3. Attempt
to add the
same item
again.
TC12 Verify that User is logged 1. Navigate Item: Sauce Item Same as Pass
clicking on in. to the Labs description expected
an item product Backpack page should
displays the page. display the
correct 2. Click on correct item
description. the item to name and
description.

5|Page
ALISHBA MUMTAZ

view its
description
TC13 Verify that User has 1. Click on Item: Sauce Cart should Same as Pass
an item can items in the the cart Labs be empty expected
be removed cart. icon. Backpack after
from the 2. Click removing
cart. "Remove" the item.
for an item
in the cart.
3. Check
cart icon
count.
TC14 Verify that User is logged 1. Click Item: Sauce Cart icon Same as Pass
the user can in. "Add to Labs count expected
return to the Cart" for an Backpack, should
product item. Sauce Labs reflect total
page and 2. Click on Bike Light added items
add more the cart (should be
items. icon. "2").
3. Click
"Continue
Shopping".
4. Add
another
item.
TC15 Ensure that User is logged 1. Click Item: Sauce Cart icon Same as Pass
the cart icon in. "Add to Labs count expected
shows the Cart" for Backpack, should be
correct two items. Sauce Labs "2"
number of 2. Check Bike Light
items. cart icon
count.

Module 4
Module name: Sidebar Funtionality
Date: November 2, 2024

Test Description Preconditions Test Steps Test Expected Result Actual Status
case Data Result
ID
TC16 Test the User is logged 1. Click None URL should contain Same as Pass
About in. on the "saucelabs.com" after clicking expected
button sidebar About.
functionality button.
2. Click

6|Page
ALISHBA MUMTAZ

of the on
sidebar. "About".
3. Verify
the current
URL.
TC17 Test the User is logged 1. Click None Should redirect to Same as Pass
Logout in. on the "https://www.saucedemo.com/" expected
button sidebar after logout.
functionality button.
of the 2. Click
sidebar. on
"Logout".
3. Verify
redirection
to the
login
page.
TC18 Test the User is logged 1. Click Item: Cart icon should be empty after Same as Pass
Reset App in, item in on the Sauce clicking Reset App State. expected
State button cart. sidebar Labs
functionality button. Backpack
of the 2. Click
sidebar. on "Reset
App
State".
3. Verify
that the
cart is
empty.

Module 5
Module name: Checkout Process
Date: November 2, 2024

Test case Description Preconditions Test Steps Test Data Expected Actual Status
ID Result Result
TC19 Test that User is logged 1. Click on N/A User Same as Pass
clicking the in and has the navigates to expected
Checkout items in the Checkout the checkout
button takes cart. button. information
the user to 2. Wait for page.
the checkout navigation
information to
page. complete.

7|Page
ALISHBA MUMTAZ

TC20 Test that User is logged 1. Click on N/A User is Same as Pass
clicking the in and has the Cancel returned to expected
Cancel items in the button. the cart
button cart. 2. Wait for page.
during navigation
checkout to complete.
returns the
user to the
cart page.
TC21 Test that an User is on the 1. Click on N/A An error Same as Pass
error checkout the Continue message is expected
message is information button displayed
displayed page. without indicating
when the entering any required
user tries to user fields.
continue information.
without 2. Wait for
filling error
required message to
fields. be
displayed.
TC22 Test that User is on the 1. Enter First Name: User Same as Pass
entering checkout valid user "Alishba" navigates to expected
valid information information. Last Name: the order
information page. 2. Click on "Mumtaz" overview
and the Continue Postal page.
continuing button. Code:
takes the 3. Wait for "12345"
user to the navigation
order to complete.
overview
page.
TC23 Test that User is on the 1. Click on N/A Order Same as Pass
clicking the order the Finish confirmation expected
Finish overview button. message is
button page. 2. Wait for displayed.
completes the
the order confirmation
and shows page to load.
the
confirmation
page.
TC24 Test that User is on the 1. Click on N/A User Same as Pass
clicking the order the Back navigates expected
Back Home confirmation Home back to the
button on page. button. product
the 2. Wait for page.
confirmation navigation
page to complete.
redirects the

8|Page
ALISHBA MUMTAZ

user to the
product
page.

Module 6
Module name: Additional Testcases
Date: November 2, 2024

Test case Description Preconditions Test Steps Test Data Expected Actual Status
ID Result Result
TC25 To test that User is logged 1. Navigate N/A All product Same as Pass
product in to the to the images are expected
images load application. product displayed
correctly page. correctly.
for all items 2. Wait for
on the product
product images to
page. load.
3. Check
visibility of
each
product
image.
TC26 To test that User is logged 1. Add First Name: Total price Same as Pass
the total in and has items to the "Alishba" displayed expected
price items in the cart. Last Name: in the cart
displayed in cart. 2. Navigate "Tester" matches the
the cart is to the cart Postal calculated
accurate page. Code: total price.
based on 3. Click on "12345
the items Checkout.
added. 4. Fill in
user
information.
5. Check
the
displayed
total price
against the
calculated
total price.

9|Page

You might also like