You are on page 1of 6

LAB-7

Aim:-to generate test cases for bakery management system.

For a Test Scenario: Check Login Functionality there many possible test cases are:

 Test Case 1: Check results on entering valid User Id & Password


 Test Case 2: Check results on entering Invalid User ID & Password
 Test Case 3: Check response when a User ID is Empty & Login Button is
pressed, and many more.

Test
Test Case Expected Actual
Case Test Steps Test Data Pass/Fail
Description Results Results
ID
1. Go to
Check site http://demo.guru99.com Userid =
User should
Customer 2. Enter UserId guru99 As
TU01 Login into an Pass
Login with 3. Enter Password Password = Expected
application
valid Data 4. Click Submit pass99

1. Go to
Check site http://demo.guru99.com Userid = User should
Customer 2. Enter UserId guru99 not Login into As
TU02 Pass
Login with 3. Enter Password Password = an Expected
invalid Data 4. Click Submit glass99 application

Step 1) A simple test case to explain the scenario would be

Test Case # Test Case Description


1 Check response when valid email and password is entered

Step 2) Test the Data.


In order to execute the test case, you would need Test Data. Adding it below
Test Case
Test Case Description Test Data
#
Check response when valid email and password Email: guru99@email.com Password:
1
is entered lNf9^Oti7^2h

Identifying test data can be time-consuming and may sometimes require creating
test data afresh. The reason it needs to be documented.

Step 3) Perform actions.


In order to execute a test case, a tester needs to perform a specific set of actions on
the AUT. This is documented as below:

Test Case
Test Case Description Test Steps Test Data
#
1) Enter Email
Address Email:
Check response when valid email and password guru99@email.com
1
is entered 2) Enter Password
Password: lNf9^Oti7^2h
3) Click Sign in

Many times the Test Steps are not simple as above, hence they need
documentation. Also, the author of the test case may leave the organization or go
on a vacation or is sick and off duty or is very busy with other critical tasks. A
recently hire may be asked to execute the test case. Documented steps will help
him and also facilitate reviews by other stakeholders.

Step 4) Check behavior of the AUT.


The goal of test cases in software testing is to check behavior of the AUT for an
expected result. This needs to be documented as below

Test
Test Case Description Test Data Expected Result
Case #
Email:
Check response when valid email and Login should be
1 guru99@email.com
password is entered successful
Password: lNf9^Oti7^2h

During test execution time, the tester will check expected results against actual
results and assign a pass or fail status
Test Expected Actual
Test Case Description Test Data P
Case # Result Result
Check response when
Email: guru99@email.com Login should Login was
1 valid email and password P
Password: lNf9^Oti7^2h be successful successful
is entered

Step 5) That apart your test case -may have a field like,
Pre – Condition which specifies things that must be in place before the test can run.
For our test case, a pre-condition would be to have a browser installed to have
access to the site under test. A test case may also include Post – Conditions which
specifies anything that applies after the test case completes. For our test case, a
postcondition would be time & date of login is stored in the database

LAB-7
Aim:-to generate test cases for bakery management system.
TEST CASE- CUSTOMER MODEL

Test Test Steps Input Data Expecte


Case Case
Objecti
ID
ve

TC_1 Adding a 1. Log in to the system as an admin. Product details: A succes


new
2. Navigate to the "Add Product" section by clicking on Name: "Sample confirm
product
the "Products" tab in the admin dashboard. addition
Product", Price:
product
3. Enter the following product details: - Product Name:
$10.99, displaye
"Sample Product"
Quantity: 100
- Category: "Electronics" - Price: $10.99
- Quantity: 100
- Description: "A sample product for testing purposes."
4. Click the "Add" button to submit the product
information.

TC_2 Editing 1. Log in to the system as an admin. 2. Updated A succes


product Navigate to the "Manage Products" section by clicking on
product details:
confirm
details the "Products" tab in the admin dashboard. 3. Select the
update
product "Sample Product" from the list of products. Price updated to
product
$12.99 for
4. Modify the product details, such as updating the price should b
to $12.99. "Sample displaye
5. Click the "Save" button to update the product Product"
information.

TC_3 Removi 1. Log in to the system as an admin. 2. Product ID or A confirm


ng a Navigate to the "Manage Products" section by clicking on prompt
Name: "Sample
product the "Products" tab in the admin dashboard. appear a

3. Select the product "Sample Product" from the list of Product" to be confirm
products. removed delete th
4. Click the "Remove" button to delete the product.

TC_4 Searchi 1. Log in to the system as an admin or customer. 2. Product Name or A list of
ng for a Navigate to the "Search Products" section by clicking on the Category: matchin
product search icon in the navigation bar. 3. Enter the "Sample search c
product name "Sample Product" in the search bar. should b
Product" to
displaye
4. Click the "Search" button. search for
TC_5 Placing 1. Log in to the system as a customer. Product details: A confirm
an order message
2. Browse products and add "Sample Product" to the "Sample
displaye
3. Proceed to checkout. Product" x2, confirm
Shipping success
4. Enter shipping details, such as the shipping address:
Address: "123 placeme
"123 Main St., Anytown, USA". order.
Main St.",
5. Select payment method and enter payment details.
Payment Info:
6. Click the "Place Order" button to complete the order.
Credit Card

TC_6 Viewing 1. Log in to the system as a customer. 2. User ID or Email: A list of


order Navigate to the "Order History" section by clicking on the should b
"customer@exa
history user profile icon and selecting "Order History" from the displaye
mple.com"
dropdown menu.
3. View past orders.

TC_7 Genera 1. Log in to the system as an admin. 2. Date range for the A sales r
Navigate to the "Sales Report" section by clicking on the report: the spec
ting sales
"Reports" tab in the admin dashboard. 3. Select should b
report From: 2024-0101
the desired date range, such as From: 202401-01 To: 2024- generat
To: 2024-0331
03-31. displaye
4. Click the "Generate Report" button.

TC_8 Managi 1. Log in to the system as an admin. 2. User details to User det
Navigate to the "Manage Users" section by clicking on the edit or permiss
ng user
"Users" tab in the admin dashboard. permissions to be upda
accoun success
3. Select the user "John Doe" to manage. change: User ID:
ts "123",
4. Edit user details or permissions, such as updating the
Permissions:
user's role to "Admin". "Admin"
5. Click the "Save" button to update the user
information.

You might also like