Lab2 SWT301 G4
Lab2 SWT301 G4
Lab2 SWT301 G4
Record of change
Effective Date Version Change Item
<Date when these changes are effective>
SYSTEM TEST CASE
Creator
Reviewer/Approver
Issue Date
Version
27/01/2024
Reference
<List of documents which are referred in this version.>
Test case
TEST CASE LIST
Project Name Shpping Cart
Project Code G4_SWT301
Test Environment Setup Description 1. Server
2. Database
Verify Required
Ensure Fields User
Successful on Registration Form
Registration
Confirm that the subtotal and total price are recalculated
correctly.
Verify that users can navigate from the cart to the cart
detail page.
Test entering valid payment information.
User
Verify any error can view
handling fortheir total
invalid price details.
payment
Test successfully placing an order.
Confirm the user receives an order confirmation.
The application is installed and running. The user is logged in or on the homepage.
The product data is available in the database. The user is logged in or on the homepage.
The product data and associated images are available. The user is logged in or on the homepage.
The application is installed and running. The user is on the homepage or a login page.
The user is on the user registration page. The registration form is visible.
The user is on theuser
The userhas
registration page.
added items to The registration
the shopping form is visible.
cart.
The user has added items to the shopping cart.
The user has added items
User is to the
logged in. shopping cart.
The user has added items
User is to the
logged in. shopping cart.
The user has added items to the shopping cart.
User Authentication:
User Authentication:
Feature
Test requirement
Reference Document
Pass Fail
1. Go to the login page The user should be successfully logged in, and the home
2. Enter valid username and password page corresponding to the user type should be displayed.
3. Select the user type as "CUSTOMER" or "ADMIN".
4.
1. Click
Go tothe
the"Login" button.
login page The system will display a message:
2. Enter invalid username and password "Login Denied! Invalid Username or password."
3. Select the user type as "CUSTOMER" or "ADMIN".
4.
1. Click
Go tothe
the"Login" button.
login page The system will display a message: "Login Denied! Invalid
2. Enter valid username and password Username or password."
3. Select the wrong user type as "CUSTOMER" or
"ADMIN".
1. Go to the login page The system will display a message: "Please fill out this
2. Leave both username and password fields blank.field."
3. Select the user type as "CUSTOMER" or "ADMIN".
4. User
1. Click logs
the "Login"
in with button.
valid account The User Profile page should display the user's full name,
2. Access the User Profile page. email, phone, address, and pin code correctly.
1. Log in with valid account . The system should log out the user and redirect to the
2. Access the User Profile page. login page
3. Logout from the profile page.
1.Change the quantity of one or more items in 1.The cart updates the item quantities accordingly.
the cart. 2.The subtotal for each item and the total price are
recalculated correctly
1: Log in to the e-commerce website. The user is redirected to the shopping cart page.
2: Add one or more items to the shopping cart.
3: Click on the shopping cart icon or navigate to
the cart page.
1: Verify the total price displayed in the cart. The total price is the sum of the subtotals of all items in the
cart, taking into account any discounts or promotions.
1: Enter valid payment information . The payment information is accepted, and any validation
errors are displayed if applicable.
1: Click on the " Pay" or equivalent button. The order is processed successfully.
The user receives an order confirmation message.
The order is recorded in the system.
1: Log in to the e-commerce website. The user is directed to the checkout page.
2: Add one or more items to the shopping cart.
3: Click on the "Checkout" button in the shopping
cart.
Ensure that the total cost of the order matches The order total is accurate and matches the original
the purchase amount.
sum of individual items, taxes, shipping costs
1: Verify that the order status is correctly The order status reflects the current status of the order.
displayed.
1: Log in to the e-commerce website. The user is directed to the order history page.
1: Find and click on the "Order History" .
Log in as a regular user. The user should be redirected to the login page with the
Attempt to access the product stocks page. message "Access Denied, Login as admin!!"
Log in as an admin user. The respective product should be removed from the system,
Click on the "Remove" button for a product. and the page should be refreshed to reflect the updated
product list.
Log in as an admin user. The page should display the update form for the specified
Access the "Update Product" page with a valid product ID.
product ID.
Log in as an admin user. The product details should be successfully updated, and the
Access the "Update Product" page with a valid product
userID.
should be redirected to "adminViewProduct.jsp" with a
Modify the product details. success message.
Submit the update form.
Log in as an admin user. The form should not be submitted, and appropriate error
Access the "Update Product" page with a valid product
messages
ID. should be displayed.
Submit the update form with missing information.
Log in as an admin user. The page should display the add product form with
Access the "Add Product" page. input fields for product name, type, description, unit price,
stock quantity, and product image.
Log in as an admin user. The new product should be successfully added, and the user
Access the "Add Product" page. should be redirected to the product list page
Fill in valid information in all fields. ("adminViewProduct.jsp") with a success message.
Submit the form.
Log in as an admin user. The form should not be submitted, and an error message
Access the "Add Product" page. indicating an invalid image file format should be displayed.
Upload an image file with an invalid format (e.g.,
a non-image file).
Submit the form.
Log in as an admin user. All form fields should be cleared, and the form should be reset
Access the "Add Product" page. to its initial state.
Fill in some information in the form.
Click the "Reset" button.
Number of Test cases
The product data and associated images are Tester 28/1/2024 Phí Văn Đại None
available. The user is logged in or on the
homepage.
The application is installed and running. The Tester 28/1/2024 Phí Văn Đại None
user is on the homepage or a login page.
The user is on the user registration page. The Tester 28/1/2024 Phí Văn Đại None
registration form is visible.
The user is on the user registration page. The Tester 28/1/2024 Phí Văn Đại None
registration form is visible.
User account with valid credentials exists. Tested 28/01/2024 Trần Đỗ Quang None
Huy
User account with incorrect username or Tested 28/01/2024 Trần Đỗ Quang None
password exists. Huy
User account with incorrect role selected Tested 28/01/2024 Trần Đỗ Quang None
exists. Huy
User is logged in with valid account Tested 31/01/2024 Trần Đỗ Quang None
Huy
User is logged in with valid account. Tested 31/01/2024 Trần Đỗ Quang None
Huy
The user has made one or more purchases Tested 28/01/2024 Nguyễn Trung None
on the e-commerce website. Hiếu
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
There is at least one product in the system.
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
There is at least one product in the system.
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
There is at least one product in the system.
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
Valid product ID is provided.
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
Valid product ID is provided.
Test Condition: Verify handling when
required
information is logged
Admin user is missing.in. Tested 28/01/2024 Phạm Tấn Đạt None
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
Admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
The admin user is logged in. Tested 28/01/2024 Phạm Tấn Đạt None
G5-Stock Product List Authentication Check
G5-New Product
Log in as an admin user. The respective product should be removed from the system,
Click on the "Remove" button for a product. and the page should be refreshed to reflect the updated
product list.
Access the "Update Product" page without logging in.The user should be redirected to the login page with the
message "Access Denied, Login as admin!!"
Log in as an admin user. The page should display the update form for the specified
Access the "Update Product" page with a valid product ID.
product
Log in asID.
an admin user. The product details should be successfully updated, and the
Access the "Update Product" page with a valid product
user
ID.should be redirected to "adminViewProduct.jsp" with a
Modify the product details. success message.
Submit the update form.
Log in as an admin user. The form should not be submitted, and appropriate error
Access the "Update Product" page with a valid product
messages
ID. should be displayed.
Submit the update form with missing information.
Log in as an admin user. The page should display the add product form with
Access the "Add Product" page. input fields for product name, type, description, unit price,
Log in as an admin user. stock
The quantity,
new productand product
should image.
be successfully added, and the user
Access the "Add Product" page. should be redirected to the product list page
Fill
Logininvalid
as aninformation
admin user.in all fields. ("adminViewProduct.jsp") with a success
The form should not be submitted, and anmessage.
error message
Access the "Add Product" page. indicating an invalid image file format should be displayed.
Upload
Log anan
in as image fileuser.
admin with an invalid format (e.g., All form fields should be cleared, and the form should be reset
Access the "Add Product" page. to its initial state.
Fill in some information in the form.
Click the "Reset" button.
Reference Document Pass
None 3
None 4
None 5
No user is logged in.
Fail Untested
0 0
0 0
0 0
ID Test Case Description 1.Open theTest Case Procedure
application 2.Navigate to
G1-Product List Product List Page Loads Successfully the product list page
3.Verify that all products aredisplayed
G1-Product List Confirm Display of All Products on the page.
3.Inspect and confirm that all product
G1-Product List Check Product Images images are to
2.Navigate displayed.
the user registration
G1-User Register Confirm Accessibility of Registration page.
required fields (e.g., username, email,
G1-User Register Form
Verify Required Fields on password).
3.Fill in valid user details.
G1-User Register Registration Form User Registration
Ensure Successful 4.Click the "Register" button.
Expected Results Pre-Conditions Result
The product list page loads without errors. The application is installed and running. Tester
All products should be visible in the list. The
The user is logged
product data isinavailable
or on the
in the Tester
All product images are displayed without any database. The user is logged
The product data and associated in or on Tester
issues.
The registration form is accessible without images
The are available.
application The user
is installed and is
running. Tester
errors
All The user
required fields are present on the registration The user is
is on
on the
the user
homepage or a login Tester
registration
form.
The user is registered successfully, and a page. The registration form is visible. Tester
The user is on the user registration
confirmation message is displayed. page. The registration form is visible.
Test date Tester Note ID
28/1/2023 Phí Văn Đại None G1-Product List
28/1/2024 Phí Văn Đại None G1-Product List
28/1/2024 Phí Văn Đại None G1-Product List
28/1/2024 Phí Văn Đại None G1-User Register
28/1/2024 Phí Văn Đại None G1-User Register
28/1/2024 Phí Văn Đại None G1-User Register
Test Case Description Test Case
2.Navigate Procedure
to the product list
Product List Page Loads Successfully page
3.Verify that all products
Confirm Display of All Products aredisplayed
3.Inspect andon the page.
confirm that all
Check Product Images product images are
2.Navigate to the user displayed.
Confirm Accessibility of Registration registration
required fieldspage.
(e.g., username,
Form
Verify Required Fields on Registration email, password).
3.Fill in valid user details.
Form
Ensure Successful User Registration 4.Click the "Register" button.
Expected Results Pre-Conditions Result
The product list page loads without The application is installed and running. Tester
errors.
All products should be visible in the The user is logged in or on the homepage.
The product data is available in the Tester
list.
All product images are displayed database. The user is logged in or
The product data and associated imageson the Tester
without
The any issues.
registration form is accessible are available.
The applicationThe user is logged
is installed in or on
and running. Tester
without
All errors
required fields are present on the The user
The user is
is on
on the
the user
homepage or a login
registration page. Tester
registration
The user is registered successfully, and The
form. The registration form
user is on the is registration
user visible. page. Tester
a confirmation message is displayed. The registration form is visible.
Test date Tester Note
28/1/2023 Phí Văn Đại None
28/1/2024 Phí Văn Đại None
28/1/2024 Phí Văn Đại None
28/1/2024 Phí Văn Đại None
28/1/2024 Phí Văn Đại None
28/1/2024 Phí Văn Đại None
Test case
Feature
Test requirement
Reference Document
Pass Fail Untested
Feature Test
Validate Requirement
successful login with Reference Document
Login correct credentials. None
View Profile User View profile details None
Password Reset Reset User Password None
G2-User Profile Display User Details 1. User logs in with valid account
2. Access the User Profile page.
G2-User Profile Logout from Profile Page 1. Log in with valid account .
2. Access the User Profile page.
3. Logout from the profile page.
G2-Password Reset Invalid Email for Password Reset 1. Go to the login page.
2. Click on the "Forgot Password" link.
3. Enter an invalid or non-registered email address.
4. Submit the form.
N/A Number of Test cases
Pass Fail
4 0
2 0
2 0
The system will display a message: User account with incorrect username or
"Login Denied! Invalid Username or password." password exists.
The system will display a message: "Login Denied! Invalid User account with incorrect role selected exists.
Username or password."
The system will display a message: "Please fill out this None
field."
The User Profile page should display the user's full name, User is logged in with valid account
email, phone, address, and pin code correctly.
The system should log out the user and redirect to the User is logged in with valid account.
login page
1. The password should be successfully reset. 1. The user has an existing account.
2. The system should display a success message. 2. The user is currently not logged in.
3. The user should be able to log in with the new 3. The email server is configured properly.
password.
1. The system should display an error message indicating 1. The user has an existing account.
that 2. The user is currently not logged in.
the email is not found.
2. No password reset email should be sent.
Untested N/A Number of Test Cases
0 0 4
0 0 2
0 0 2
Function Order
G4-Order History Access to the application
None 2
None 2
None 2
None 2
0 0 0 2
0 0 0 2
0 0 0 2
0 0 0 2
Test coverage 0
Test successful coverage 0
PORT
ator G4
viewer/Approver
ue Date 27/01/2024
%
%