Revolutive IT™
 
Software Testing: The Structured Testing Methodology

Excerpt from the original document NIST Special Publication 500-235

S oftware testing is the process of executing software and comparing the observed behaviour to the desired behaviour. The major goal of software testing is to discover errors in the software, with a second goal of building confidence in the proper operation of the software when testing does not discover errors. The conflict between these two goals is apparent when considering a testing process that did not detect any errors. In the absence of other information, this could mean either that the software is high quality or that the testing process is low quality. There are many approaches to software testing that attemt to control the quality of the testing process to yield useful information about the quality of the software being tested.

For large systems, many errors are often found at the beginning of the testing process, with the observed error rate decreasing as errors are fixed in the software. When the observed error rate during testing approaches zero, statistical techniques are often used to determine a reasonnable point to stop testing. This approach has two significant weaknesses. First, the testing effort cannot be predicted in advance, since it is a function of the intermediate results of the testing effort itself. A related problem is that the testing schedule can expire long before the error rate drops to an acceptable level. Second, and perhaps more importantly, the statistical model only predicts the estimated error rate for the underlying test case distribution being used during the testing process. It may have little or no connection to the likelihood of errors manifesting once the system is delivered or to the total number of errors present in the software.

The structured testing methodology is a white box (or code-based, or glass box) testing approach. In white box testing, the software implementation itself is used to guide testing. A common white box testing criterion is to execute every executable statement during testing, and verify that the output is correct for all tests. In the more rigorous branch coverage approach, every decision outcome must be executed during testing. Structured testing is still more rigorous, requiring that each decision outcome be tested independently. A fundamental strength that all white box strategies share is that the entire software implementation is taken into account during testing, which facilitates error detection even when the software specification is vague or incomplete (and this is important because there is much more detail in the code than the requirement, so a test case developed from a requirement tends to exercise only a small fraction of the software that implements that requirement. Testing only at the requirements levels may miss many sources of error in the software itself.). A corresponding weakness is that if the software does not implement one or more requirements, white box testing may not detect the resultant errors of omission. Therefore, both white box and requirements-based testing are important to an effective testing process.

Relationship between complexity and testing

There is a strong connection between complexity and testing, and the structured testing methodology makes this connection explicit.

Complexity is a common source of error in software. This is true in both an abstract and a concrete sense, complexity beyond a certain point defeats the human mind's bility to perform accurate symbolic manipulations, and errors result. The same psychological factors that limit people's ability to do mental manipulations of more than the infamous "7+/-2" objects simultaneousely apply to software. Structured programming techniques can push this barrier further away, but not eliminate it entirely. In the concrete sense, numerous studies and general industry experience have shown that the cyclomatic complexity measure correlates with errors in software modules. Other factors being equal, the more complex a module is, the more likely it is to contain errors. Also, beyond a threshold of complexity, the likelihood that a module contains errors increases sharply. Given this information, many organization limit the cyclomatic complexity of their software modules, in an attempt to increase overall reliability. Deatailed recommendations have though to be followed when limiting or reducing complexity.


Our solutions are the most efficient, flexible, quality-based and cheaper of the market, due to our fully innovative and customer-driven approach. Discover them and compare them to the solutions provided you by our competitors.


 
Copyright 2002 Atlantis Technologies. All rights reserved.