Previous [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [ 10] [ 11] [ 12] [ 13] [ 14]

Journal of Information Science and Engineering, Vol. 32 No. 2, pp. 365-387 (March 2016)

A Constraint-Based Framework for Test Case Generation in Method-Level Black-Box Unit Testing

Department of Computer Science and Information Engineering
National Chung Cheng University
Chiayi, 621 Taiwan

Automatic test case execution in test-driven development provides an excellent return on investment. However, test cases in test-driven development are usually designed manually. Manual acquisition of test cases is laborious, time-consuming, and error-prone. Model-based testing is a technique to automatically generate test cases from software models. Model-based test-driven development provides an opportunity to automate both test case generation and test case execution. This paper proposes and implements a constraint- based framework for automatic test case generation in method-level black-box unit testing. This framework uniformly solved the test case generation problem using constraint logic graphs and constraint logic programming. This framework effectively performs equivalence class partitioning and test coverage criteria management on constraint logic graphs, and simultaneously generates test input and expected output using constraint logic programming. This unifying constraint-based framework can serve as a nucleus for test case generation in model-based unit testing in the future, including method-level black-box, method-level white-box, and class-level unit testing.

Keywords: constraint-based testing, black-box testing, unit testing, method-level unit testing, constraint satisfaction problem, constraint logic programming

Full Text () Retrieve PDF document (201603_07.pdf)

Received October 13, 2014; accepted January 6, 2015.
Communicated by Meng Chang Chen.
1 Correspondence to: Department of Computer Science and Information Engineering, National Chung Cheng
University, Chiayi, 621 Taiwan.
2 E-mail: