What is a Test Case?
The test case templates are a set of conditions or variables made according to the requirements provided; after the execution of these test cases, a tester will decide whether a system satisfies the requirements or works correctly. In order to achieve the best out of a product at the end of its production phase, you will need to make sure that it is defect-free. A test case may, in the end, be a scientific method not only for detecting defects but for creating a clear view on how to eliminate them.
Features of Test Case Template:
The requirement which are provided to the team and for which the test cases are to be written.
The priority code indicates the impact of this defect on the project:
H = High (extremely important, the project cannot be successful without this defect being resolved)
M = Medium (important to project success, but a workaround exists)
L = Low (desirable, but with little effect to project success if the defect is not fixed)
Test Case ID:
A test case ID is a unique Id and is important, as you will be able to document your results without any difficulty. It helps in avoiding the execution of repeated test cases. An ID can be marked however is needed to be; if you have multiple systems, you can start with a short acronym of the program's name or even with the full name, whichever is suitable and understandable.
Test Case Description:
The test case description field will include all detailed information about the test case. It won’t contain any sequences or steps of the testing phase, but it will have a specific purpose that the tester should keep in mind while executing.
Test Case Steps:
These are the test steps written elaborately and in the order in which it requires to be executed. While writing test steps, it should be made sure to provide as many details as possible. They are simple and precise, contains all the information required in concise short steps. Depending on how complicated the objective is, you may need to give the tester a few more steps, but always keep them short and specific.
This can be considered the most important part as this field describes the tester on what results he should expect, given that the system is defect-free. It’s the behavior predicted by the specification, or another source, of the component or system under specified conditions mentioned in the requirement.
Once the tester provides all the inputs (Test Data) and follows the necessary steps, he should now get his testing results. The results can be both positive and negative; they can either confirm that the program is working according to the requirement or give an entirely different result. Although it is more preferred to have positive results, negative results will help you a lot by detecting a defect hidden in the code.
This field simply describes the status of a test case which can Pass/Fail/Not Executed/Suspended.
Module/Page Name: It depicts the Module or Page Name for which the test cases will be written.
It depicts the environment which will be used while executing the test cases.
The tester will give a remark regarding the test cases.
Test data have been specially identified for use in tests, usually of a computer program. Some data may be used in a confirmatory way to verify that a given set of input to a given function produces some expected result.
The requirements that need to be taken care of prior to the execution of this test case and to execute these test cases, all pre-conditions should be listed down.
Postconditions are conditions or predicates that must always be true, just after the execution of some segment of code or after an operation in a formal specification. Postconditions are sometimes tested using assertions within the code itself.
Sometimes there are dependencies on other test cases, such as if one fails, others should not be executed. It is important to list down the dependencies as well.
Guidelines to use Test Case Template
- Test cases should be written in such a way that you test only one thing at a time. Test cases should not overlap or be complicated. Try to make your test cases ‘atomic’.
- Be assured that all positive scenarios and negative scenarios are covered.
- Language should be taken care of by:
- It should be written in simple and easy-to-understand language.
- The names used should be exact and consistent.
- Make use of active voice instead of passive voice.
- Characteristics of a good test case:
- Accurate: Exacts the purpose.
- Economical: No unnecessary steps or words.
- Traceable: Capable of being traced to requirements.
- Repeatable: Can be used to perform the test again and again.
- Reusable: Can be reused whenever necessary.