In this post, we will learn in details about Test Scenarios and Test Coverage with proper examples.
Test scenario is a moderate level of breakup of a business requirement in form of possible use cases to ensure more test coverage, to identify criticality of sub requirements which helps in finding critical bugs early stage of testing and prioritizing sequence of testing.
Testing is a process of testing an application against multiple requirements. Requirements might be lengthy and complex. We must break a requirement to sub requirements for better understanding and to be aware of end to end flow of application which are called Test Scenarios. By doing this, you can easily identify which parts of requirement should be tested first as these are critical parts of requirement. You can find critical bugs in critical part of requirement in early phase of testing. It also helps you to understand flow of actions or data in a requirement. For example: To test sub requirement 5, you must need to complete testing of sub requirements from 1 to 4.
We will see a real time example here:
Requirement: User should be able to withdraw money from ATM and should be informed with proper error message if something goes wrong.
Test Scenario 1: Successful withdrawal of money by User. (Priority: High) (Positive flow)
Test Scenario 2: Unsuccessful withdrawal of money by user because of different reasons. (Priority: Medium) (Negative flow)
Now you can decide that Test Scenario 1 is more critical and should be tested in early phase of testing.
Test case is detailed or step by step process/actions to be performed to test a test Scenario of an application. Test cases are further breakup of test Scenario with steps to perform testing. Test cases are derived from a Test Scenario and a Test Scenario can have multiple test cases.
Test cases for above Test Scenario 1 will be as below:
Test case 1: User withdraws money by providing all details correctly
Step 1: User enters his ATM card.
Step 2: User enters PIN.
Step 3: User selects account type.
Step 4: User enters withdrawal amount
Step 5: User receives amount.
Step 6: User takes out his card.
Test case 2: User withdraws multiple times.
Test case 3: User receives balance summary after withdrawal
Test cases for above Test Scenario 2 will be as below:
Test case 1: User enters wrong pin
Test case 2: User enters amount more than available amount
Test case 3: User enters wrong pin thrice
Test case 4: User takes a lot of time to select options
Advantages of writing test cases:
- Easy to understand requirements for anybody.
- Easy to perform actions step by step for testers.
- Identifying priority of test cases.
- Meaning full report with execution status of test cases.
- Coverage of functionality.
- You can link test case steps to a found bug.
- Understanding of dependency or linking of requirements.
- Allocation of tasks to tester becomes easy.
- Helps in tracking status closely.
If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.
Author: Amod Mahajan
My name is Amod Mahajan and I am an IT employee with 4+ years of experience in Software testing and staying in Bengaluru. My area of interest is Automation testing. I started from basics and went throw so many selenium tutorials. Thanks to Mukesh Otwani as his tutorials are easy and cover basics to advance. I have habit of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and now I am here. #KeepLearning #ShareLearning