What is a test case?
A test case is the professional documentation of a tester, a sequence of actions aimed at verifying any functionality that describes how to arrive at the actual result.
A set of test cases is called a test kit. Sometimes a test kit is confused with a test plan. A test plan describes what works, how and when they should be carried out as part of product testing, as well as what is needed to carry them out.
Why do we need test cases?
Test cases should help us to verify the product without reading all the documentation. Written once, an easy-to-support test case will save a lot of time and effort for testers.
Test Case Attributes
Any test case must include:
')
- The unique identifier of the test case is necessary for convenient storage and navigation through our test kits.
- The name is the main theme, or the idea of ​​the test case. A brief description of its essence.
- Preconditions - a description of conditions that are not directly related to the functional being tested, but must be fulfilled.
For example, only a registered user can leave a comment on your portal. This means that for the “Creating a comment” test case it will be necessary to fulfill the precondition “user is registered” and “user is authorized” - Steps - description of the sequence of actions that should lead us to the expected result
- Expected result - result: what we expect to see after the steps have been completed.
Not necessarily, but it is advisable to add an
editing history attribute to the test case - this will greatly facilitate your life. Laconic log of changes, where it is reflected: by whom, how and when the test case was changed.
What else you need to know before creating a test case?
First, each test case performed gives us one of three results:
1.
A positive result , if the actual result is equal to the expected result,
2.
A negative result if the actual result is not equal to the expected result. In this case, an error was found.
3.
Test execution is blocked if, after one of the steps, the test cannot be continued. In this case, the same error was found.
Secondly, one specific case is checked by one test case, and for this thing there should be only one expected result.
What should not be in the test case
1. Dependencies on other test cases;
2. Fuzzy wording of steps or expected result;
3. Lack of information necessary for passing the test case;
4. Excessive detail.
The first should be avoided, because: the connected test case can always be deleted because of its uselessness or it can be changed, in this case, it becomes unclear how to execute the test case in which there are references.
Also, due to the dependence of test cases, there may be a feeling that the product being tested will already lead to the desired state due to the execution of related test cases.
With the second I think everything is clear. If the description of the steps or the expected result is not clear, then it blocks the passage of the test case.
In the test case should be all the information that is necessary for its passage. For example, if we check the login window on the site, then we will need a login and password, otherwise the passage of this script will be impossible.
Also, do not overly detail the case. For example, if we check the possibility of creating a comment, then you should not write in which corner of the screen the login window should be. Excess information only makes it difficult to pass a test case.