Designing Test Cases

A test case is a detailed procedure that fully tests a feature or an aspect of a feature. Whereas the test plan describes what is to be tested, a test case describes how to perform a particular test. You need to develop a test case for each test listed in the test plan or test specification.

Test cases should be written by someone who understands the function or technology being tested and should go through a peer review.

Test cases include information such as the following:

  • Purpose of the test

  • Special hardware requirements, such as a modem

  • Special software requirements, such as a tool

  • Specific setup or configuration requirements

  • Description of how to perform the test

  • Expected results or success criteria for the test

Designing test cases can be a time-consuming phase in your testing schedule. Although you might be tempted to take shortcuts, the time you spend will pay off in the long run. You can conduct tests faster when they are carefully planned. Otherwise, testers spend time debugging and rerunning tests.

Organizations take a variety of approaches to documenting test cases; these range from developing detailed, recipe-like steps to writing general descriptions. In detailed test cases, the steps describe exactly how to perform the test. In descriptive test cases, the tester decides at the time of the test how to perform the test and what data to use.

Some advantages of detailed test cases are that they are reproducible and they are easier to automate. This approach is particularly important if you plan to compare the results of tests over time, such as when you are optimizing configurations. A disadvantage of detailed test cases is that they are more time-consuming to develop and maintain. On the other hand, test cases that are open to interpretation are not repeatable and can lead to debugging time that pertains more to the test itself than to what is being tested.

It is recommended that you find a compromise between the two extremes, one that tends toward more detail. Balance thoroughness with practicality to reach your goal of test integrity and manageability.

Table 4.1 provides an example of the first few steps of a detailed test case:

Table   4.1 Example Test Case

Step

Procedure

Success Criteria

Outcome

1

Log off the server, and return to the netlogon screen.

None.

 

2

Click the domain list to open it.

The local server name does not appear in the list.

 

3

Click the domain list to open it.

The root domain appears in the list.

 

4

Using an account with administrative privileges, log on to the server.

The account logs on to the server without error.