In this tutorial, we will learn everything we need to know about test scenarios and scenario testing. Before starting with test scenarios and scenario testing, let’s first understand – what is a scenario?
A scenario is a credible and coherent story about how someone can use an application.
What is a Test Scenario?
A Test Scenario is a statement describing the functionality of the application to be tested. It is used for end-to-end testing of a feature and is generally derived from the use cases.
Test scenarios can serve as the basis for lower-level test case creation. A single test scenario can cover one or more test cases. Therefore a test scenario has a one-to-many relationship with the test cases.
As an example, consider a test scenario – “Verify that the user is not able to login with incorrect credentials”. Now, this test scenario can be further broken down into multiple test cases like-
- Checking that a user with the correct username and incorrect password should not be allowed to log in.
- Checking that a user with an incorrect username and correct password should not be allowed to log in.
- Verifying that users with incorrect usernames and incorrect passwords should not be allowed to log in.
Obviously, the test cases will have a well-defined format, explained in this post – Test case template.
Also, check – Difference b/w a test case and test scenario.
What is Scenario Testing?
Scenario testing is a type of testing carried out using scenarios derived from the use cases. Also, using scenario testing, complex application logic can be tested using easy-to-evaluate test scenarios.
Some characteristics of scenario testing are-
- Coherent – The test scenarios should be based on a coherent story about how the software application is used.
- Credible – They should be credible and focus on something that could happen in the real world.
- Motivating – They should motivate the stakeholders to get the issues fixed in case of the failed test scenario.
- Complex – The test scenarios normally involve a complex program or application flow.
- Easy to evaluate – The test result of the test scenario should be easy to evaluate as they involve complex logic.
Advantages of Test Scenarios
- Scenario testing can be carried out relatively faster than testing using test cases.
- It can ensure good test coverage since the test scenarios are derived from user stories.
- It saves a lot of time. Hence, these are better with projects having time constraints.
Test Scenario Template
A Test Scenario document can have the below fields-
- Module – The module or the component of the application.
- RequirementId – This field is optional and can be linked to the SRS.
- TestScenarioId – This field is the identifier of the test scenarios.
- Description – The description field describes the purpose of the test scenario.
You can also download the test case template in the XLS file format below.
Best Practices for Writing Test Scenarios
- Should be easy to understand.
- Easily executable.
- Should be accurate.
- Traceable or mapped with the requirements.
- Should not have any ambiguity.
Test Scenario Examples
Below is the list of test scenarios that are frequently asked in software testing interviews. In these test scenario examples, we are covering scenarios related to UI, functionality, non-functional requirements as well as negative test scenarios.
Although there can be numerous scenarios for any given application, we have limited the scenarios to the most basic and generic functionalities.
- Test Scenarios of ATM Machine
- Test Scenarios of Bike
- Test Scenarios of Calculator
- Test Scenarios of Car
- Test Scenarios of Chair
- Test Scenarios of Coffee Vending Machine
- Test Scenarios of DateField
- Test Scenarios of Door
- Test Scenarios of E-commerce Website
- Test Scenarios of Facebook
- Test Scenarios of Fan
- Test Scenarios of Flight Reservation System
- Test Scenarios of Gmail
- Test Scenarios of Google Search
- Test Scenarios of Hospital Management System
- Test Scenarios of Keyboard
- Test Scenarios of Kindle
- Test Scenarios of Lift
- Test Scenarios of Login Page
- Test Scenarios of Mobile Phone
- Test Scenarios of Mouse
- Test Scenarios of Microwave Oven
- Test Scenarios of Notepad
- Test Scenarios of Online Examination System
- Test Scenarios of Pen
- Test Scenarios of Pencil
- Test Scenarios of Registration Page
- Test Scenarios of Remote Control
- Test Scenarios of Stapler
- Test Scenarios of Table
- Test Scenarios of Triangle
- Test Scenarios of TV
- Test Scenarios of Wrist Watch
- Test Scenarios of Water Bottle
- Test Scenarios of Whatsapp
- Test Scenarios of White Board
- Test Scenarios of White Board Marker
- Test Scenarios of Youtube
I hope now you must have got a clear understanding of Test Scenarios. The example links given in this post will also help you understand scenario creation for different kinds of applications.