What is a Test case?
Test case definition
A test case is defined as a set of variables or conditions used to determine the proper functionality of a software application or system. Test cases typically describe inputs, actions/events, and the expected response(s). The main purpose of writing test cases is to verify the testing coverage of the software. Because of this, several test cases may be necessary to prove that a piece of software is functioning properly.
Formal and Informal Test Cases
The best way to completely verify that all software application requirements are met; there must at the least be one positive and one negative test case for each requirement. This rule carries through to each sub-requirement if they exist. A traceability matrix is often used to track the link between the requirement and the test. Written test cases must also include a description of the feature being tested, and the setup required in order for the test to be performed. A formal test-case is distinguished by an input and an expected output, which should test a pre-condition and a post-condition, respectively. If formal requirements do not exist, test cases should be written based on the accepted operation of a program that is similar in class.
Test Case Format
In addition to providing the results, test cases may also include the following information:
▪ Case ID
▪ Related requirement(s)
▪ Indication of automation.
▪ Pass/Fail Status (after execution)
▪ Remarks (after execution)
Designing Test Cases
While the test plan explains what is to be tested, a test case explains how to perform the test. A test case must be developed for all tests indicated in the test plan. Test cases should be written by someone who understands the function that is being tested, and should also be peer reviewed. It should include:
- Purpose of the test.
- Special requirements (hardware and software).
- Setup or configuration requirements.
- Description of how to test is to be performed.
- Expected results of test.
It is typical for organizations to generate detailed test cases because it is easier to determine pass or fail criteria, they are easy to reproduce, and automate. These benefits are especially important in organizations that compare test results over time. Detailed test cases can be time-consuming but test cases that leave too much open for interpretation are not repeatable and can consume even more time in the future.
You must read what is a test plan?