Supporting Java Array Data Type in Constraint-Based Test Case Generation for Black-Box Method-Level Unit Testing

Chien-Lung Wang,Nai-Wei Lin
DOI: https://doi.org/10.1007/978-981-13-9190-3_79
2019-01-01
Abstract:Test case generation for arrays is more sophisticated than scalars. It involves the generation of both the size of an array and the values of the array elements. This issue is more challenging in black-box testing than in white-box testing because the specification usually does not describe how arrays are processed in the program. This paper proposes a constraint-based approach to generate test cases for Java arrays in black-box method-level unit testing. The constraint-based framework in this paper uses Object Constraint Language as the specification language. The constraint-based specification is then converted into a constraint-based test model, called constraint logic graph. A constraint logic graph is a succinct representation of the disjunctive normal form of the specification. Test case generation is formulated as a set of constraint satisfaction problems generated from the constraint logic graph. These constraint satisfaction problems are then solved using the constraint logic programming to generate the test cases.
What problem does this paper attempt to address?