Test Scenarios and Test Cases

Test Scenarios:

Test Scenario is the high-level action of the functionality, it is described in a sentence and not have detailed steps. The one Test Scenario may contain one test case or multiple test cases. The Test Scenario document is the prerequisite for writing Test cases. The scenario document should be reviewed by leads, any discrepancies in understanding the functionalities can be rectified before investing more time in writing test cases and testing.

How to write Test Scenarios:

Test scenarios can be defined as functionalities that need to be tested. The tester can divide 1 business requirement into various Scenarios. It is also known as Test Condition or Test Possibility.

Step 1) Read All the required documents based on which test scenarios are to be drafted like FRS, BRS, and SRS of the system that needs to be tested.

Step 2) To figure out all the possible real-world scenarios regarding the requirement. Drafting all the possible user interactions. Determining technical aspects of the requirement. Tester needs to evaluate all kinds of possible scenarios like positive and negative scenarios.

Step 3) After reading all the documents and conducting a comprehensive analysis on the same, list out all the scenarios based on that to verify each feature as mentioned in the document.

Step 4) After listing out all the possible scenarios, a Traceability Matrix is created to ensure that all the business requirements are covered. It will help you not to miss out on any of the features.

Step 5) All the drafted test scenarios are reviewed by Clients, Stakeholders, and upper management.

Examples of Test Scenarios:

 Login Module

- Verify the valid login details (Username, password), and check that the home page is displayed.

- Verify the invalid Username and password and check for the home page.

- Verify for empty Username and password and check for the error message displayed.

- Verify the reset button to check if it clears the data

 Mailbox Page

- Verify the latest emails by clicking on the refresh buttons

- Verify all the radio buttons and checkboxes on the left window of the screen

- Verify that read emails are not highlighted

Important Points:

- Test scenarios are linear statements to guide testers about the testing sequence.

- It reduces the complexity and possibility of repetition. It could be considered a thread of operations

- It is a time saver activity.

- When a tester does not have enough time to cover up the testing, a test scenario document can be proved to be a relief

Test Cases

A Test case is a set of actions executed to verify a particular feature or functionality of your software application. A Test Case contains test steps, test data, preconditions, and postconditions developed for specific test scenarios to verify any requirement.               

For example: If testing Login Functionality is a test scenario. Test cases can be :
Test case 1:  verify the result on entering a valid User ID and password
Test case 2:  verify the result of entering an invalid User ID and password
Test case 3:  verify the result by keeping the User ID and password tab empty

So in simpler terms, such various events or incidences for testing purposes are known as test cases.

How to write Test cases:

Validate on which scenario you are going to write the test case. (here, let's take the example of the functionality of the Login screen with the User ID, Password, and Sign In buttons)

Test Case ID

Test case description

TC 1

verify the result by entering a valid User ID and password

To execute the test cases, you will also need test data to enter

Test Case ID

Test case description

Test Data

TC 1

verify the result by entering a valid User ID and password

UsedID: <>
Password: <>

After that, you will need steps to how to execute the test case. So the same is added below

Test Case ID

Test case description

Test Steps

Test Data

TC 1

verify the result on entering a valid User ID and password

1 Enter the User ID
2. Enter Password
3. Click on Sign In

UsedID: <>
Password: <>

After entering details, the tester should be always determined about the goals of testing which can be termed as expected results

During carrying out manual testing, a tester will always look for the expected results which will decide whether the test case is passed or failed. If the actual results and expected results are similar, then the test case is considered to be passed.

Test Case ID

Test case description

Test Steps

Test Data

Actual Results

Expected Results

TC 1

verify the result on entering a valid User ID and password

1 Enter the User ID
2. Enter Password
3. Click on Sign In

UsedID:<>
Password: <>

Login was successful

The user should be successfully logged in.

 

 

 

 

 

 

Actual results are the results that the tester faces at the time of testing and expected results are the results that are expected when a tester carries out the testing.

Apart from above mentioned different criteria, there are other elements also to consider. Like Pre Condition, Post Condition. Pre-condition is a requirement that should be fulfilled before running a test case. Examples of Pre Conditions are: To have a browser installed, installation of any environment, etc.  A Test case may include Post-Condition which specifies anything that applies after complete execution of a test case. Examples of Post-Conditions can be the time and date of login stored in the database.

Other Factors to Keep in Mind While Creating Test Cases:

- Easy understandable

- Keep End-user in Mind

- Avoid Repetition

- Never Assume

- 100% coverage of requirement

- Identifiable

- Use Testing Techniques

- Covering Edge cases

- Review

- Correct Test data

 

Related Tutorials