Code Complete by McConnell Steve

Code Complete by McConnell Steve

Author:McConnell, Steve [McConnell, Steve]
Language: eng
Format: mobi, epub
Tags: COMPUTERS / Software Development & Engineering / General
Publisher: Microsoft Press
Published: 2009-11-29T16:00:00+00:00


(1)Count "1" for the routine itself.

(2)Count "2" for the for.

(3)Count "3" for the if.

(4)Count "4" for the if and "5" for the &&.

(5)Count "6" for the if.

In this example, you'll need one initial test case plus one for each of the five keywords, for a total of six. That doesn't mean that any six test cases will cover all the bases. It means that, at a minimum, six cases are required. Unless the cases are constructed carefully, they almost surely won't cover all the bases. The trick is to pay attention to the same keywords you used when counting the number of cases needed. Each keyword in the code represents something that can be either true or false; make sure you have at least one test case for each true and at least one for each false.

Here is a set of test cases that covers all the bases in this example:

Case



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.