We know that writing good test cases is one of the key activities within testing preparation. Sometimes it can be difficult to decide where to begin, therefore we would like to give you few useful tips for a quick start with a test case creation.
What is a test case?
“A test case is a set of conditions or variables under which a tester determines whether a system under test satisfies requirements and works correctly.”
Basically a test case is a set of steps and conditions which should be followed by tester during the test execution. A tester should follow the instructions in the test case to evaluate correct behavior / functionality of any application.
What is a benefit of creating test cases?
- Without a test case it is difficult to make sure what and how the application was previously tested. There is also no guarantee that the application will be tested the same way sometimes in the future.
- Without formal test cases, more mistakes in testing would occur and fewer genuine bugs in the software would be discovered.
- During the test case preparation, analyst has to define the testing data, test conditions, roles that tester would need for the test execution. Preparation of test cases basically mean that all of the possible scenarios have been decided in advance (and only once). Tester then follows the steps written in the test case and compares the actual result to the expected result.
How do you make your test cases great?
- Write them SIMPLE – Test cases need to have simple instructions in the steps. The directions should be transparent and easy to understand. Use the assertive language. (e.g. enter password, click on this etc.).
- Focus on ONE GOAL – Test only one functionality at a time. – If you try to test multiple conditions in one test case, it becomes very difficult to track the results and the errors.
- Be PRECISE – Do not assume any functionality and features of your software. Stick to the Specification Documents.
- Always follow the same RULES – Organize your test cases consistently. Using the same pattern in organizing your test cases makes the testing easier for you as well as your colleagues or successors
- Make them SHORT – If the test case contains a long list of steps and an error occurs, the developer would have to backtrack and repeat all the test steps. Having too many test steps can be a disadvantage for the tester, too. The tester would have to repeat each step to ensure that the bug was fixed.
- REUSE test cases – Keep in mind that good test cases could be re-used in the future for other projects/teams. That will save you a lot of time!
- REVIEW– send the final version of test case to your colleagues for peer review. Different people look at the same problem differently and your colleagues may improve parts of your test case, which you may have missed.
More ideas how to write good test cases:
tesena author collective