We write the most effective test case

What is a test case?


A test case is a professional documentation of a tester, a sequence of actions aimed at checking 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. The test plan describes what work, how and when should be carried out as part of product testing, as well as what is necessary for their implementation.

Why do I need test cases?


Test cases should help us verify the product without reading all the documentation. Once written, a convenient test case in support will save testers a lot of time and effort.

Test case attributes


Any test case necessarily includes:

  • Unique test case identifier - necessary for convenient storage and navigation of our test sets.
  • The name is the main topic or 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 met.
    For example, only a registered user can leave a comment on your portal. So for the test case “Creating a comment” it will be necessary to fulfill the precondition “user is registered” and “user is authorized”
  • Steps - a description of the sequence of actions that should lead us to the expected result
  • The expected result is the result: what we expect to see after completing the steps.


It’s not necessary, but it is advisable to add an editing history to the test case attribute - this will greatly facilitate your life. A concise change log, where it is reflected: by whom, how, and when the test case was changed.

What else do you need to know before creating a test case?


Firstly, each completed test case gives us one of three results:

1. A positive result if the actual result is equal to the expected result,
2. A negative result is m if the actual result is not equal to the expected result. In this case, an error was found.
3. The test is blocked if, after one of the steps, the continuation of the test is not possible. In this case, the same error was found.

Secondly, one specific thing is checked with 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 associated test case can always be deleted due to uselessness or it can be changed, in this case, it will become unclear how to execute the test case in which there are links.

Also, due to the dependence of test cases, you may feel that the product under test 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 this 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 need a username and password, otherwise this script will not be possible.

Also, one should not be too detailed in the case. For example, if we check the possibility of creating a comment, then we should not write in which corner of the screen the login window should be. Excessive information only complicates the passage of the test case.

Also popular now: