Premium
State generation and automated class testing
Author(s) -
Ball Thomas,
Hoffman Daniel,
Ruskey Frank,
Webber Richard,
White Lee
Publication year - 2000
Publication title -
software testing, verification and reliability
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.216
H-Index - 49
eISSN - 1099-1689
pISSN - 0960-0833
DOI - 10.1002/1099-1689(200009)10:3<149::aid-stvr206>3.0.co;2-t
Subject(s) - container (type theory) , computer science , white box testing , tree (set theory) , class (philosophy) , block (permutation group theory) , java , reliability (semiconductor) , black box , code coverage , reliability engineering , data mining , programming language , engineering , artificial intelligence , software , software development , mechanical engineering , mathematical analysis , software construction , power (physics) , physics , geometry , mathematics , quantum mechanics
The maturity of object‐oriented methods has led to the wide availability of container classes: classes that encapsulate classical data structures and algorithms. Container classes are included in the C++ and Java standard libraries, and in many proprietary libraries. The wide availability and use of these classes makes reliability important, and testing plays a central role in achieving that reliability. The large number of cases necessary for thorough testing of container classes makes automated testing essential. This paper presents a novel approach for automated testing of container classes based on combinatorial algorithms for state generation. The approach is illustrated with black‐box and white‐box test drivers for a class implemented with the red–black tree data structure, used widely in industry and, in particular, in the C++ Standard Template Library. The white‐box driver is based on a new algorithm for red–black tree generation. The drivers are evaluated experimentally, providing quantitative measures of their effectiveness in terms of block and path coverage. The results clearly show that the approach is affordable in terms of development cost and execution time, and effective with respect to coverage achieved. The results also provide insight into the relative advantages of black‐box and white‐box drivers, and into the difficult problem of infeasible paths. Copyright © 2000 John Wiley & Sons, Ltd.