What is a Test Case? (Test Case Defined..)
Test case — It is a set of conditions or variables which a tester will determine whether a system under test satisfies requirements or works correctly. A Test Case contains test steps, test data, precondition, post-condition developed for specific test scenario to verify any requirement. A good test case should include adequate information on what action should happen and what kind of results we should expect. A few other bits of information also need to be recorded for future reference.
Given below are some of the common fields that are included in a test case :
1) ID: a unique number for each test
2) Title: a brief description of the test
3) Priority: identification of the importance of the test case to make sure the software is working appropriately. High priority test cases must pass before the software is rolled out. Low priority means that the project can be rolled out even if the test case does not pass.
4) Executed by: the person executing the test case, (for future reference)
5) Executed Date: the date on which the test is run
6) Preconditions: certain conditions that must be fulfilled before running the test.
Ex: a user might need to log in. This field can also refer to prior test cases.
7) Inputs: the actual values we need to input before executing the test
8) Test Step: the series of actions a tester must undertake to make sure the desired results are obtained
9) Expected Result: the results that developers expect to see given the provided inputs.
10) Actual Result: the actual output of the test
11) Status: whether the test passed (matched expectations) or failed (did not match expectations)
A good test case should be:
· Effective — find faults
· Repeatable — Can be used to perform the test over and over.
· Reusable — Can be reused if necessary.
· Exemplary — Represent Others
· Evolutionary — Easy to maintain
· Economic — Cheap to use
How to write a good test case??
- Make it really simple and atomic; so that it will be understandable. Make sure to use a simple language style.
- Use Active voice instead of passive voice.
- Do not make a test case complicate or overlap.
Test Case Example 01
Test Case Example 02
Test Case Example 03
References
Software Quality Assurance from theory to implementation — Daniel Galin