Design and Implementation of a Constraint-Based Test Case Generator for Black-Box Method-Level Unit Testing
博士 === 國立中正大學 === 資訊工程研究所 === 103 === Software testing is still the main approach to ensuring software quality. Software testing involves the formulation of the test case generation problem: The specification of the software behaviors; the partitioning of software behaviors into equivalence classes;...
Main Authors: | , |
---|---|
Other Authors: | |
Format: | Others |
Language: | en_US |
Published: |
2015
|
Online Access: | http://ndltd.ncl.edu.tw/handle/06190123901503326640 |
Summary: | 博士 === 國立中正大學 === 資訊工程研究所 === 103 === Software testing is still the main approach to ensuring software quality. Software testing involves the formulation of the test case generation problem: The specification of the software behaviors; the partitioning of software behaviors into equivalence classes; the management of test coverage criteria to achieve specified software quality; the determination of test input and expected output for a representative software behavior in an equivalence class; the construction of a test fixture for this representative software behavior.
We design and implement a constraint-based test case generator for black-box method-level unit testing. The test case generation problem is formulated as a constraint satisfaction problem. The software behaviors are specified using the Universal Modeling Language class diagrams and the Object Constraint Language. The partitioning of software behaviors into equivalence classes and the management of test coverage criteria are based on constraint logic graphs. A constraint logic graph can be viewed as a succinct graphical representation of the disjunctive normal form of a logic constraint expression. Each complete path in the constraint logic graph corresponds to a conjunctive clause in the disjunctive normal form and corresponds to a test case. The determination of the test input and expected output for this test case is formulated as a constraint satisfaction problem in constraint logic programming predicates. Constraint logic programming provides powerful constraint solving capability and can solve the test input and expected output simultaneously. The construction of the test fixture for this test case is also formulated as a constraint satisfaction problem and solved by constraint logic programming.
The constraint-based test case generator can run in console mode or in a plugin for Eclipse integrated development environment. Console mode supports fast test case generation and verification. The plugin for Eclipse supports a user-friendly interface integrated with development environment.
In the future, this constraint-based test case generator can be easily extended to support test case generation for white-box method-level unit testing, test case generation for class-level unit testing. and test case
|
---|