A test case is a kind of document, which includes the test data, preconditions, expected & actual results, etc. It is based on the test scenarios to check the results and compares it with the requirement. Test case has been created on the basis of requirement document. Writing effective test cases is the most important qualification a tester must have. All test cases are classified as positive/negative. Positive test case gives the valid inputs and should get positive results. Negative test case gives the invalid inputs and should get the proper error message.
Here are the fields of test case template:
Test case ID: It indicates the Unique ID for test cases. You should assign a unique ID to each test case e.g. ‘TC_001’ indicating 'test case #1’.
Test priority (Low/Medium/High): This will be useful during executing the test cases which decides the order.
Module Name: Mention name of main module or sub module.
Test Designed By: Name of tester
Test Designed Date: Date when wrote
Test Executed By: Name of tester who executed the test case, to be filled after the execution of test case.
Test Execution Date: Date when the tester executed the test case.
Test Title/Name: Title of the test case. e.g. Verify the registration overlay with valid details.
Test Summary/Description: Test case objective in brief.
Pre-condition: It includes the pre-requirement that must be done before executing the test case.
Dependencies: It includes the dependencies (if any) on any other test cases or test requirement.
Test Steps: List the steps in brief to execute the test case. Write the test steps in the proper order in which it should be executed.
Test Data: It is used as an input for the test case. You can use different test data sets to verify the result.
Expected Result: In this, you will mention the expected output that what should be the result for that particular test case and describe the expected result in brief.
Post-condition: Mention the condition of the system after the test case execution.
Actual result: In this, you will describe the system's behaviour after executing the test case.
Status (Pass/Fail): Compare the expected and actual result if they are not same then mark this test as failed. Otherwise update as passed.
Notes/Comments/Questions: Mention the special condition (if any) or the related query of the test case.
Add following fields if necessary:
Defect ID/Link: Mention the defect number or link if the status of that test case fails.
Requirements: Mention the Requirement ID or exact section number for which this test case has been written.
Automation? (Yes/No): Whether this test case is automated or not. It is used to track the automation status.