Constraint-Based Test Case Generation for White-Box Method-Level Unit Testing

碩士 === 國立中正大學 === 資訊工程研究所 === 105 === This thesis defines the test case generation problem as a constraint satisfaction problem, and implements a constraint-based test case generator for white-box method-level unit testing. A test case contains a test input and the corresponding expected output. For...

Full description

Bibliographic Details
Main Authors: CHANG,CHENG-HUNG, 張振鴻
Other Authors: LIN,NAI-WEI
Format: Others
Language:zh-TW
Published: 2017
Online Access:http://ndltd.ncl.edu.tw/handle/36b93f
Description
Summary:碩士 === 國立中正大學 === 資訊工程研究所 === 105 === This thesis defines the test case generation problem as a constraint satisfaction problem, and implements a constraint-based test case generator for white-box method-level unit testing. A test case contains a test input and the corresponding expected output. For test inputs, this tool first transforms the source program into a constraint model called a constraint logic graph. A constraint logic graph describes graphically the actual behaviors of a method or the constraint logic relationships between the inputs and the actual outputs of the method. On the constraint logic graph, this tool then performs equivalence class partitioning of the actual behaviors and test coverage criteria management using graph-based approaches to generate a small-quantity and wide-coverage group of representative behaviors for testing. The problem of generating the input for a representative behavior can be defined as a constraint satisfaction problem. This constraint satisfaction problem can be described and solved by a constraint logic programming language. For expected outputs, the expected behaviors of a method defined by the Object Constraint Language can also be viewed as a constraint satisfaction problem. Because the Object Constraint Language is non-executable, this tool will transform the specification described by the Object Constraint Language into an executable specification described by a constraint logic programming language. Given an input, the executable specification can be solved to generate the corresponding expected output. One of the features of this tool is that it uses an uniformed constraint-based approach to generate both test inputs and expected outputs for white-box method-level unit testing. Keywords- unit testing, white-box testing, constraint-based testing,test case generation, method-level testing, constraint logic programming