A Test-Suite Reduction Based on DU-Chain Requirements Optimization
*1
Lili Pan,
2
Tiane Wang,
1
Jiaohua Qin,
1
Shaohong Zhong
1
College of Computer and Information Engineering, Central South University of Forestry and
Technology, Changsha, 410004 , China,E-mail;{ lily_pan@163.com, qinjiaohua@163.com,
shaoh_zhong@yahoo.com.cn}
2
The Commission Institute, Hunan Electric Power Transmission and Substation Construction
Company, Changsha, 410004, China, wte1688@163.com
Abstract
Data-flow testing is an approach for DU (definition-use) chain testing. DU chain reflects
relationships between definitions and uses of variables which are basic factors in a program.
Therefore, the DU chain testing is very important. The DU-chain testing includes a series of testing
coverage criteria, such as: full definition testing, full calculation reference testing, full predicate
references testing and so on. One common assumption of all these testing criteria is that each program
path is executable. However, many experiments show that some paths may be infeasible, meaning that
analyzing DU chains of these infeasible paths is not only useless but also increases testing cost. This
paper proposes an approach to reduce DU-chain test suite by optimizing test requirement set. Firstly,
we refine the DU-chain equation as we decrease the iterative times of the DU-chain equation by taking
the infeasible paths in the program into account. Then, we obtain an optimized DU-chain test
requirement set when the useless DU chains are eliminated in the program with the refined DU chain
equation. Finally, the test suite is reduced based on the refined DU-chain test requirement set.
Experiment shows that the test coverage rate is increased and the DU-chain test requirement set is
refined after the useless DU chains are eliminated, and the size of test suite is reduced.
Keywords: Data Flow Testing, Du Chain, Infeasible Path, Data Flow Equation, Test-Suite
Reduction
1. Introduction
Software testing exists throughout the entire process of software development, as it is an important
method to ensure the software quality. The quality and quantity of test case of software testing are two
important indicators of the effectiveness and efficiency of software testing. Testers need to design a set
of test cases according to test requirements (test target). Especially in the regression testing process,
software requirements change constantly, new test cases are created and redundancy test case is
increased accordingly, and the size of test set is growing larger and larger. Correspondingly, the
maintenance cost of test suite increases, while the test efficiency decreases
[1,2]
. Therefore, it is very
necessary and meaningful to study on methods to simplify test case.
Currently, there have been a great many achievements on test case simplifications
[2-7]
. Johnson etc.
used greedy algorithm to select test cases to meet as many test requirements as possible
[2,3]
. Harrold etc.
used heuristic algorithms to simplify test suite
[4]
. Chen etc. created an algorithm to separate test cases
and self-simplify individually
[5]
. The paper [6] proposed to minimize test requirements, then to use
greedy algorithms, heuristic algorithms or optimization algorithms to define the minimum test cases.
These algorithms focused on size reduction of test suite. But actually, to optimize test requirement set
is more efficient on test-suite reduction
[7]
.
Data flow testing is mainly targeted at test program DU
[8-9]
. The DU chain reflects the relationship
between variable definitions and variable references, both of which are the most basic program
components. Therefore, it is very important to test the DU chain. The DU chain testing produces many
standards, such as: all-du-paths, all-defs, all-uses and so on. All these standards assume that all paths in
the program are feasible, while a large number of experiments show that there are infeasible paths as
well
[10]
. As a result, the analysis of DU chain on infeasible path is not only useless, but also increases
the testing cost. If the path from a variable definition or assignment to the variable reference is
infeasible, then the DU chain is invalid, and there is no need to run the data flow test on the chain. And
A Test-Suite Reduction Based on DU-Chain Requirements Optimization
Lili Pan, Tiane Wang, Jiaohua Qin, Shaohong Zhong
Journal of Convergence Information Technology(JCIT)
Volume 7, Number 21, Nov 2012
doi : 10.4156/jcit.vol7.issue21.68