Test Scenario
Test Scenario
In order to help you understand the difference Test Scenario and Test Cases,
specific test cases for this Test Scenario would be
Example 2
Test cases that can be written for the above Test Scenarios include:
Test Scenario: Travelling By Airways
Test cases can include scenarios like:
1. The flight is as per the scheduled time.
2. The flight is not as per the scheduled time.
3. An emergency situation has ensued (heavy rainfall and storm).
In the same way, a separate set of test cases can be written for other remaining scenarios.
Anything that can be tested is a Test Scenario. Thus we can state that any software
functionality that is under test can be divided into multiple smaller functionalities and can be
termed a ‘Test Scenario’.
Before delivering any product to the client, the quality of the product needs to be appraised
and evaluated. Test scenario aids in assessing the functional quality of a software application
that is in conformance with its business requirements.
A tester scenario is a process wherein the tester tests a software application from an end-user
perspective. The performance and quality of the software application are thoroughly assessed
before implementation in the production environment.
Example 3
Identify requirements
Write test scenarios (one line pointers of what to test)
Design detailed instructions on how to test (test cases)
When writing test scenarios, we classify them into positive and negative conditions. (When you think
about it, is it really important to make this classification? If yes, what purpose does it serve? We have to
test them all anyways, isn’t it?) It beats me too, for the most part. But I think it is an attempt to establish
adequate coverage and helps to establish that we are testing both the happy and alternate paths the
system is supposed to handle. Please comment below, if you know of any other reasons why this is
done.
Now, let’s look at a few requirements, write test scenarios and perform the classification.
#1) Login: A user who enters correct credentials gets into the system. If the credentials are incorrect,
access is denied and an error message is displayed.
#2) View products: Let’s assume there is an online catalog of all the products available in the system
and it displays them all in a list when “View products” link is clicked.
#3) Logout: When clicked on this link, the user is logged out.
I am going to write few Test scenarios for these requirements.
Table A: The right way
Test scenario ID Test scenario description Positive/Negati
TS_login_01 Validate if the user logs in successfully if the credentials entered are correct Positive
TS_login_02 Validate if the user is not allowed access when the credentials entered are incorrect Negative
TS_ViewProduct_01 Validate if all the items are listed when View products link is clicked Positive
TS_logout_01 Validate if the already logged in user is signed out of the system when logout is Positive
clicked
TS_login_01 Validate if the user logs in successfully if the credentials entered are correct Positive
TS_login_02 Validate if the user is not allowed access when the credentials entered are incorrect Negative
TS_ViewProduct_01 Validate if all the items are listed when View products link is clicked Positive
TS_ViewProduct_02 Validate if the all the items are not listed when view products link is clicked Negative
TS_logout_01 Validate if the already logged in user is signed out of the system when logout is Positive
clicked
TS_logout_02 Validate if the user does not log out when logout link is clicked Negative
For login’s successful case, there is an equal and opposite case when it won’t be successful. Not all
requirements are supposed to be that way and for them, there is really no compulsion to write a
negative scenario.
Bottom line: Not every requirement should have negative cases.
At this point, if you are thinking “How will I know” or “I’m still not sure”, here is a simple cheat sheet that
will help.
If there is one generalization we can make about applications is that they are dynamic. The input (data,
clicks, etc.) that we provide will cause the application to be a certain way and generate a certain output.
A simple correlation between the input and output variables will make this easy to comprehend.
Incorrect (incorrect login info) Incorrect (system logs them in) – “Oh, the horror!” :) Bug/defect
So, you see from the above table, we can say that we categorize the primary flow as positive and the
alternate flow (also the correct behavior of the application) is marked as negative.
The last two cases in red are in fact, bugs. Testing is about validation of requirements and when they
don’t work as intended, we find bugs. Since we don’t go validating for defects, the last two cases are
invalid.
Following the same line of thought and applying it to logout and view products, here is what you will
get.
View products (click) Incorrect (not list or incorrect list display) Bug/defect
As you can see, for these requirements, there isn’t a possibility to supply an incorrect input. Therefore,
there need not be negative test scenarios/cases written