Classification Tree Method
Classification Tree Method
by Frank Bchner From problem definition to test case specification using the Classification Tree Method Testing is a compulsory step in the software development process. However, the planning of such testing often raises the same questions: o o o o o o How many tests should be run? What test data should be used? How can error sensitive tests be created? How can redundant tests be avoided? Have any test cases been overlooked? When is it safe to end testing?
Anyone who has been confronted with such issues will be glad to know that the Classification Tree Method offers a systematic procedure to create test case specifications based on a problem definition.
Tool Support
To design the Classification Tree and for further use of the Classification Tree Method, it is reasonable to use a tool that supports drawing the Classification Tree and specifying test cases. The Classification Tree Editor CTE) has been especially created for this purpose. It comes complete with its own graphical editor that is intended specifically for drawing Classification Trees.
Forming Classes
Classes are now formed for the base classifications, where all possible values of an aspect are classified both completely and disjunctively. Since the initial value covers all integer numbers, it would be reasonable to form a class for positive values, a class for negative values and another class for the value zero. Classes are shown in the Classification Tree as frameless nodes. The branches, which represent the classes, emerge from the classification nodes (in this case: "range_start").
A Systematic Approach
The same classes that were formed for the "range_start" classification can also be formed for "range_length." This means that a class for negative values is also implemented for the length. This is reasonable since the problem definition does not prohibit lengths from being negative values. Note, a test case that includes a negative length would have most likely been overlooked if this systematic approach with the Classification Tree Method had not been adopted. Since negative values can occur in both the initial value as well as the length, a negative initial value combined with a negative length would be a valid input. A test case for such a combination would most likely be missing in a set of spontaneously selected test cases. Note, the problem definition described is a relatively simple one. Imagine how many important test cases could be overlooked if problems with dozens of aspects or input parameters are to be tested. Two classes are formed for test values, so that in terms of "position" they are categorized as being either "inside" or "outside" the range.
Critical Values
It is generally recognized that during testing, critical values (also known as boundary values) of input parameters promise the most success if the objective is to generate malfunctions. This fact should also be taken into account using the Classification Tree Method. The classes and quantity of classes introduced depends on the problem definition and last but not least on the rating of the person who creates the Classification Tree. The criterion "where is a problem assumed to exist?" can serve as a guide here. The problem definition itself usually provides clues for critical values ("black box" approach), what is unfortunately not the case for the current problem definition, except considering the limits of the value range of the start value. Hence, a further classification can be introduced for the size of the start value.
Test Coverage
The number of test case specifications and thus the scope of a test remain in principle for the user to decide. However, based on the Classification Tree, its possible for some values to be determined that provide clues to the number of test cases reasonably required. The first value is the number of test cases, if each leaf class is included at least once in a test case specification. This number is known as the minimum criterion. In our example, the largest amount of leaf classes, namely seven, belong to the base classification "position." Seven is thus the value of the minimum criterion. The maximum criterion is the number of test cases that results when all permitted combinations of leaf classes are considered. In our example, the maximum criterion amounts to 105 (i.e. 5 * 3 * 7). A reasonable number of test case specifications obviously lies somewhere between the minimum and maximum criterion. As a rule of thumb, the total number of leaf classes (here: 5 + 3 + 7 = 15) gives an estimate for the number of test cases required to get sufficient test coverage. The objective of the Classification Tree Method is to determine a sufficient but minimum number of test case specifications. So generally speaking, it is not necessary to specify a test case for each possible combination. In fact, the Classification Tree Method should enable the user to use well-designed specifications, thus reducing the number of tests. The Classification Tree provides the necessary overview for this. In practical applications, this reduction of test cases is essential, since the maximum criterion can easily run into very high numbers. A large number of test cases does not automatically guarantee sufficient test coverage. This depends more on being able to produce test cases that are error sensitive and being able to avoid those that are redundant.
Due to the systematic approach and the compulsion to consider all test aspects when applying the Classification Tree Method, there is a high probability that the problem definition will be correctly represented in test case specifications. This probability can be raised by conducting review procedures. However, because of human participation in this transfer process, there is never complete assurance. The size of a Classification Tree can be a measure of a problems complexity. The number of test cases deemed essential by the Classification Tree Method forms on the one hand a good measure of the required test expenditure and can on the other hand also serve as an estimation of the required implementation expenditure.
Conclusion
The Classification Tree Method has even in the case of our simple example allowed us to derive test cases that would have more than likely been overlooked if test case specification was performed spontaneously. The CTE provides an overview of specified test cases and thus allows redundant test cases to come to light and the presence of error sensitive test cases to be verified. Furthermore, the documentation of specified test cases aids quality in the software development process.
Classification Tree
A diagram showing the iterative classification of test relevant aspects.
Leaf Class
A class in the Classification Tree that is not further divided into sub-classes.
Test case
A test case specification with concrete test data.
References
[1] http://www.hitex.de/perm/tessy.htm
Author's Biography
Frank Bchner studied Computer Science at the Technical University of Karlsruhe. Since graduating, he has spent twelve years working in the field of embedded systems. He is currently working at Hitex in Karlsruhe, Germany, as a software product manager.