Introduction to Test Scenario
A scenario for testing is a sentence defining the application’s functionality. It is used to finish the test of a function and is typically extracted from the use cases. one or more test cases may be protected by a single scenario. A test scenario, therefore, has one relation to many relationships with the test cases. Scenario testing is a form of scenario test performed using the use case scenarios. Complex application logics can be evaluated with scenario testing using basic scenarios for evaluation.
Why to create Test Scenarios?
Multiple test cases can be covered by one test scenario. The relation, therefore, between Test Scenarios and test cases is one-to-many. But each scenario must be taken care of by the tester while creating it. Testers create it to test the application from the point of view of an end-user. Testers seek from all the developers, stakeholders, and customers to prepare them that are critical.
Reason for creating them are as follows:
- Complete and proper Test Coverage is ensured by the creation of perfect Test Scenarios.
- Creation of them becomes critical to study the end-to-end functionalities of a program.
- Most important and critical end-to-end transactions or real-time application usage can be well determined with the proper help of them.
- They can be used as a tool for quick determination of testing workforce which further helps the clients or organizations for proposal creation and organization of testing workforce effectively and efficiently.
- For ensuring the thorough and proper testing of applications, approval of it is done at various levels including customers, business analysts, developers, etc.
Similarly, there can be certain circumstances in which the creation of it should be avoided.
- It may not be created in projects following Agile Methodologies such as Scrum, etc.
- When the applications to be tested are unstable, or too complicated or when the project is in a critical-time state creation of it may be avoided.
- Creation of it may be avoided for regression testing or for a new bug because in maintenance projects heavy documentations of them would happen beforehand in the former test cycles.
How Test Scenarios can be Written?
The following steps can be carried out by a tester for the creation of Test Scenarios:
- Step 1: The document of requirements such as Business Requirement Specification (BRS), Functional Requirement Specification (FRS), and System Requirement Specification (SRS) of the application to be tested should be read thoroughly and carefully. Manuals, books, use cases, etc. of the application under test can be referred for the same.
- Step 2: All the possible objectives and user actions should be figured out properly for every requirement. All the technical features of every requirement should also be determined.
- Step 3: All the possible causes of system hack and user evaluation should be done from a hacker’s perspective. User evaluation can be done by finding all the possibilities of user operation of the applications.
- Step 4: A complete list of all the possible test cases for verifying all the functionalities of the application should be made after completely reading the document of requirement and completing the analysis.
- Step 5: After the enlisting of all them, for verifying the requirement and its Test Scenario are matching a Traceability Matrix should be created.
- Step 6: All the created Test Scenarios are reviewed and evaluated by the supervisor. It is also further verified by all the stakeholders.
As per the project procedure, every Test Scenario must be matched to at least one user story or requirement. It is mandatory to verify every Test Scenario against its requirement separately, before multiple requirements in a single Test Scenario. Complex Test Scenarios with multiple requirements can be avoided for simplicity. Price is directly proportional to the number of them So, it is always advisable to run only selected and required according to customer priority.
Examples
Below are some examples:
Test Scenario for Buykart online shopping application
Test Scenarios which can be taken into consideration for the verification of an online shopping application Buykart is as follows:
Test Scenario 1: Login functionality checking
The test cases that can be considered for the creation are:
- Behavior of the application when entering a valid login id and a valid password can be checked.
- Behavior of application when entering a valid login id and an invalid password can be checked.
- Behavior of application when entering a invalid login id and a valid password can be checked.
- Behavior of application when entering a invalid login id and an invalid password can be checked.
- Behavior of application when signing in by entering login id alone without a password can be checked.
- Behavior of application when signing in by entering password alone without login id can be checked.
- Behavior of application when signing in without entering both login id and password can be checked.
- Behavior of application when forgot password is selected.
Test Scenario 2: Search functionality checking
The test cases that can be considered for the creation are:
- Behavior of the application when a valid product is searched.
- Behavior of the application when an invalid product is searched.
Test Scenario 3: Product details checking
The test cases that can be considered for the creation are:
- Behavior of the application when a product is selected.
- Behavior of the application a product is wish-listed.
- Behavior of the application when a product is added to cart.
- Behavior of the application when the Buy Now option is selected.
- Behavior of the application when an invalid address is entered.
- Behavior of the application when a valid address is entered.
- Behavior of the application when multiple payment options are checked.
Test Scenario 4: Payment functionality checking
The test cases that can be considered for the creation are:
- Behavior of the application when each payment option is selected.
- Behavior of the application when a valid payment option is chosen.
- Behavior of the application when an invalid payment option is chosen.
- Behavior of the application when a payment is successful.
- Behavior of the application when a payment is declined.
Test Scenario 5: Order details functionality checking
The test cases that can be considered for the creation are:
- Behavior of the application when each order is selected.
- Behavior of the application when the Return product option is selected.
- Behavior of the application when track product option is selected.
- Behavior of the application when the Review product option is selected.
Conclusion
It act as a proper guide to the testers and helps them to make testing more effective and efficient. It helps in reducing testing complexity and redundancy. Each test case is written in detail for better understanding. It is highly time-saving for testers.
Recommended Articles
This has been a guide to What is Test Scenario. Here we discuss how to create Test Scenarios with different examples. You may also have a look at the following articles to learn more –