0% found this document useful (0 votes)
40 views17 pages

How To Write Test Cases

Uploaded by

logindummy007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views17 pages

How To Write Test Cases

Uploaded by

logindummy007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

How to

write Test By:


Cases? Dr. Akshay Jadhav
Steps to • Title:
• Description:
Definition:
• A test case refers to the
write Test • Pre-requisite:
actions required to verify a
specific feature or
Cases • Test Data: functionality in software
testing. The test case
• Test Steps: details the steps, data,
• Expected Results: prerequisites, and
postconditions necessary
to verify a feature.
• Field Description
• Test Case ID: Unique identifier for the test case
• Test Case Title: Brief description of the test case
• Objective: The purpose of the test case
• Preconditions: Any conditions that must be met
before the test can be executed
• Test Steps: Detailed steps to execute the test
• Test Data: Input data used in the test steps
• Expected Result: The expected outcome of the
test
• Actual Result: The actual outcome of the test
• Status: Pass/Fail/Not Executed
Steps to • Title: Verify successful Login with Valid
write Test username and password.
Cases • Description:
• Pre-requisite: User should be registered
• Test Data: Username, Password
• Test Steps:
• Expected Results:
How to write Test Cases
TC ID
Created By:
Reviewed By:
Priority
Pre-requisites

Title
Description

Step Test Step Test Data Expected Actual Results Execution Comments
Results details (Pass/
Fail/ Blocked/
OnHold)
How to write Test Cases
TC ID TC_001
Created By: Akshay
Reviewed By:
Priority High
Pre-requisites Edge browser should be installed

Title Verify the electronics category filter only electronic items


Description

Step Test Step Test Data Expected Actual Results Execution Comments
Results details (Pass/
Fail/ Blocked/
OnHold)
How to write Test Cases
Title Verify the electronics category filter only electronic items
Description

Step Test Step Test Data Expected Actual Results Execution details Comme
Results (Pass/ Fail/ Blocked/ nts
OnHold)
1 Launch the Website should
website URL in launch
the edge successfully
browser
2 Click on Electronics
Electronics category page
Category should be
displayed
successfully
3 Scroll to the Only
bottom of the electronics
page and verify items should
the products on be filtered and
the page displayed
How to write Test Cases
TC ID TC_001
Created By: Akshay
Reviewed By: Review Date:
Priority High
Pre-requisites Edge browser should be installed

Title Verify the electronics category filter only electronic items


Description

Step Test Step Test Data Expected Actual Results Execution Comments
Results details (Pass/
Fail/ Blocked/
OnHold)
How to write Test Cases
TC ID TC_001
Created By: Akshay
Reviewed By: Review Date:
Priority High
Pre-requisites Edge browser should be installed

Title Verify the electronics category filter only electronic items


Description
Executed By
Executed Date

Step Test Step Test Data Expected Actual Results Execution Comments
Results details (Pass/
Fail/ Blocked/
OnHold)
How to write Test Cases
Title Verify the electronics category filter only electronic items
Description

Step Test Step Test Data Expected Actual Results Execution details Comme
Results (Pass/ Fail/ Blocked/ nts
OnHold)
1 Launch the Website should As expected, Pass
website URL in launch
the edge successfully
browser
2 Click on Electronics As expected, Pass
Electronics category page
Category should be
displayed
successfully
3 Scroll to the Only As expected, Pass
bottom of the electronics
page and verify items should
the products on be filtered and
the page displayed
Example: • Test Case ID: #BST001
• Test Scenario: To authenticate a successful user login on
Gmail.com
• Test Steps:
• The user navigates to Gmail.com.
• The user enters a registered email address in the ’email’
field.
• The user clicks the ‘Next’ button.
• The user enters the registered password.
• The user clicks ‘Sign In.’
• Prerequisites: A registered Gmail ID with a unique username
and password.
• Browser: Chrome v 86. Device: Samsung Galaxy Tab S7.
• Test Data: Legitimate username and password.
• Expected/Intended Results: Once username and password are
entered, the web page redirects to the user’s inbox, displaying
and highlighting new emails at the top.
• Actual Results: As Expected
• Test Status – Pass/Fail: Pass
Test Case • JIRA
Management • TestRail
Tools
• qTest
• Zephyr
• PractiTest
• TestLink
• Xray
E-Commerce Websites
Test Case 1:
• Title: Valid checkout with new user registration
• Preconditions: User has added items to cart, User is not logged in
• Steps:
1.Proceed to checkout
2.Select “Register and Checkout” option
3.Fill in required fields with valid data
4.Select payment method and enter valid details
5.Review and place order
• Expected Result: Order is successfully placed, User receives confirmation
email
E-Commerce Websites
Test Case 2:
• Title: Invalid coupon code during checkout
• Preconditions: User has added items to cart, User has an invalid coupon
code
• Steps:
1.Proceed to checkout
2.Enter invalid coupon code
3.Verify error message
4.Proceed with checkout without coupon
• Expected Result: Appropriate error message is displayed, Order can
proceed without coupon discount These test cases cover critical paths in
the checkout flow and help ensure a smooth user experience.
Mobile App
Test Case 1:
• Title: Valid login with correct credentials
• Preconditions: User has valid login credentials, User is on login screen
• Steps:
1.Enter valid username
2.Enter valid password
3.Tap “Login” button
• Expected Result: User is logged in and taken to app home screen
Mobile App
Test Case 2:
• Title: Invalid login with incorrect password
• Preconditions: User has valid username, User is on login screen
• Steps:
1.Enter valid username
2.Enter incorrect password
3.Tap “Login” button
4.Verify error message
• Expected Result: Appropriate error message is displayed, User remains on
login screen These test cases validate the login functionality and help catch
potential issues that could frustrate users.
Thank You

You might also like