What is test case?
Before learning about how to write test case in software testing, we need to understand the basic definition of the test case. It is a set of actions to validate the functionality is working according to requirements. We have to execute test cases as per the requirements. We also validate one or more system requirements and generate a pass or fail.
Test Case Definition :
Definition – Test case is a step-by-step execution to verify functionality as it is expected. Test cases are basically explained that “How to Test”
Advantages of Test Cases :
1. Designing Test cases help us to attend to details and ensure that the tests are from many views.
2. Test cases are reusable so we can use in the future and anyone can reference them and execute the test.
Tips: How to write test cases
Whenever you design test cases, just remember the below things: Short title
1. A strong description
2. Be clear and concise
3. Include the expected result
4. Avoid repetition
5. Use Testing Techniques
How to write Test Cases?
There is a standard format for writing Test cases. It is displayed below.
Sr No | Elements | Description |
1 | Test Case ID | The ID of the Test case |
2 | Objective | The summary/objective of the test case. |
3 | Requirement | Related requirements for Test case Id |
4 | Prerequisites | Any preconditions that must be mentioned prior to executing the test. |
5 | Test Steps | Step-by-step procedure to execute the test. |
6 | Test Data | The test data are used while executing the test. |
7 | Expected Result | The expected result of the test. |
8 | Actual Result | The actual result of the test, It’s to be mentioned after executing the test. |
9 | Status | Pass or Fail |
10 | Remarks | Comments on the test case. |
11 | Created By | The author name of the Test case |
12 | Date of Creation | The date of creation of the test case. |
13 | Executed By | The name of the person who executed the test. |
14 | Date of Execution | The date of execution of the test. |
15 | Test Environment | Test Environments such as Hardware, networks, and Software which the test will be executed. |
Example: how to write test cases in manual testing
A example for test cases is displayed below:
Examples of Test Cases
If you are looking for test cases examples in software testing for website elements, website testing, electrical appliances, non-electrical appliances or an interviews then please visit below link.
Summary:
How to write test cases:-Test cases are really important to measure client expectations. It must be executed to test cases because we can find defects that might be skipped in ad-hoc testing.
Read more: How to write Test Scenario?