Test Scenario

Test Scenarios

What is a Test Scenario

In the last session, We had discussed about Software Testing Terms and there were a lots of Terms that we listed out, We are going to talk about one of the Testing Terms and that is Test Scenarios.

Test Scenario is made up of 2 words.
Test and Scenario.
First of all we should know what is a Scenario.
Scenario is an English word which simply means “a description of possible events”.

When we do Software Testing, then We generally test the functionality of a Software or you say, we test features of a Software, So before doing testing for the features, we need to identify the features to be tested and we have to describe them like a scenario and because we are writing these scenarios for testing purpose, We call them Test Scenarios.

So, We can say Test Scenario is “a description of possible functionality” in a Product.
We can call it “Test Condition” or “Test Possibility” or “Test Functionality”
But the most popular word is “Test Scenario”.

Definition – Test Scenarios are a one liner statement and a very high level documentation of a functionality or a requirement which describes that what to test in a particular functionality or requirement.

Test Scenarios are derived from Requirement Document or from User Story. Requirement Document could be a Functional Requirement Document or Business Requirement Document.

How to write a Test Scenario

We have to follow some steps to write Test Scenarios

  1. Read the Requirement Document. Requirement Document could be (Functional Requirement Document, Business Requirement or User Stories).
  2. Analyze the Requirements from the Requirement Documents. Requirements means Functionality or Feature.
  3. Think of the possible outcomes for each requirement.
  4. Write a 1 liner Scenario for each possible outcome.
  5. Map each test scenario with at least 1 requirement and create Requirement Traceability Matrix.
  6. Send the Scenarios to Business Team for review.

Example of a Test Scenario

Example 1 – Calculator

Let’s take an example of a Project, where developers are building or developing a calculator. A Calculator will have some functionalities like Addition, Subtraction, Multiplication and Division.
So, We can say that we can have 4 or more than 4 test Scenarios, because Calculator is having 4 functionalities or features.

Let’s see the example of test scenarios for Calculator.

  • Add 2 numbers – Test Scenario 1
  • Subtract 2 numbers – Test Scenario 2
  • Multiply 2 numbers – Test Scenario 3
  • Divide 2 numbers – Test Scenario 4
RequirementS. NoTest Scenario
Addition1Add 2 Numbers
2Add 3 Numbers
3Add a positive and a negative number
Subtraction4Subtract a small number from a big number
5Subtract a big number from a small number
6Subtract a positive and a negative number
Multiplication7Multiply a positive number and a negative number
8Multiply two positive numbers
9Multiply two negative numbers
Division10Divide an even number from 2
11Divide an odd number from 2

Example 2 – Ecommerce Application

Let’s see 1 more example where we are supposed to test an eCommerce Application and we need to write Test Scenarios for the features that we should be testing in that. So, what could be the features or functionalities in an eCommerce Application.

Here are some List of Features, that we need to test in an eCommerce Functionality

  1. Create account or Register Customer
  2. Login
  3. Search Product
  4. Browse Product
  5. Product List Page (PLP)
  6. Product Details Page (PDP)
  7. Add to Cart Functionality
  8. Shopping Cart or Shopping Bag Functionality
  9. Checkout Page
  10. Order Confirmation Page
  11. Emails – Order Confirmation Email and Cancellation Emails
  12. Order Cancellation Functionality
  13. Order Returns Functionality
  14. Refunds Functionality

Now, If we have to write Test Scenarios for the above Functionality, then we can write in below manner.

FunctionalityTest Scenario
Create account or Register CustomerTest the Create Account Functionality with email ID and Mobile No.
LoginTest Login functionality for valid and invalid credentials
Search ProductTest the search functionality and ensure that products are correctly displayed based on the user’s search criteria.
Browse ProductTest the browse functionality and ensure that products are correctly displayed.
Product List Page (PLP)Test the PLP Page with Search and Browse Functionality
Product Details Page (PDP)Verify that the product description and pricing information are accurate and displayed correctly.
Add to Cart FunctionalityVerify that add-to-cart and remove-from-cart functionality works fine.
Shopping Cart or Shopping Bag FunctionalityVerify that Shopping Cart is getting updated correctly after adding the product to cart and after removing the product from cart.
Checkout PageTest the checkout process, if we are able to enter billing and shipping information. Are we able to do payment processing.
Order Confirmation PageVerify that the order confirmation page is displayed and contains all the necessary order details.
Emails – Order Confirmation Email and Cancellation EmailsTest the email notifications and ensure that users receive confirmation emails for their orders.
Order Cancellation FunctionalityValidate that the user is able to Cancel the Order online within a limited time period
Order Returns FunctionalityValidate that the user is able to Returnthe Order online after the shipment of the Order
Refunds FunctionalityValidate the Refunds for Return and Cancel Functionality

Importance of Test Scenario

  1. If we create Test Scenario for all the requirements, then it is ensured that we have covered each and every requirement.
  2. It is a fast way to identify the most important functionality to be tested. Assigning priority to a test scenario is quiet easy and fast.
  3. Test Scenarios are 1 line statements, So it is easy for Business Analyst and other stakeholders to go through it and review it.

Summary

We have discussed below topics in this session

  1. What is a Test Scenario
  2. How to write a Test Scenario
  3. Example of Test Scenario
  4. Importance of Test Scenarios

Question

Question for the session is, Write Test Scenarios for Online Banking Applications

Leave a Comment