A strategy for using genetic algorithms to automate branch and fault-based testing

被引:60
作者
Jones, BF [1 ]
Eyres, DE
Sthamer, HH
机构
[1] Univ Glamorgan, Dept Comp Studies, Pontypridd CF37 1DL, M Glam, Wales
[2] Daimler Benz AG, Correct Syst, D-10559 Berlin, Germany
关键词
D O I
10.1093/comjnl/41.2.98
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 [计算机科学与技术];
摘要
Genetic algorithms have been used successfully to generate software test data automatically; all branches were covered with substantially fewer generated tests than simple random testing. We generated test sets which executed all branches in a variety of programs including a quadratic equation solver, remainder, linear and binary search procedures, and a triangle classifier comprising a system of five procedures. We regard the generation of test sets as a search through the input domain for appropriate inputs. The genetic algorithms generated test data to give 100% branch coverage in up to two orders of magnitude fewer tests than random testing. Whilst some of this benefit is offset by increased computation effort, the adequacy of the test data is improved by the genetic algorithm's ability to generate test sets which are at or close to the input subdomain boundaries. Genetic algorithms may be used for fault-based testing where faults associated with mistakes in branch predicates are revealed. The software has been deliberately seeded with faults in the branch predicates (i.e. mutation testing), and our system successfully killed 97% of the mutants.
引用
收藏
页码:98 / 107
页数:10
相关论文
共 28 条
[1]
Beizer B., 2003, Software Testing Techniques
[2]
GATTO: A genetic algorithm for automatic test pattern generation for large synchronous sequential circuits [J].
Corno, F ;
Prinetto, P ;
Rebaudengo, M ;
Reorda, MS .
IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 1996, 15 (08) :991-1000
[3]
CONSTRAINT-BASED AUTOMATIC TEST DATA GENERATION [J].
DEMILLO, RA ;
OFFUTT, AJ .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1991, 17 (09) :900-910
[4]
AN EVALUATION OF RANDOM TESTING [J].
DURAN, JW ;
NTAFOS, SC .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1984, 10 (04) :438-444
[5]
Goldberg DE, 1989, GENETIC ALGORITHMS S
[7]
PARTITION TESTING DOES NOT INSPIRE CONFIDENCE [J].
HAMLET, D ;
TAYLOR, R .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1990, 16 (12) :1402-1411
[8]
HOLLAND JH, 1975, ADAPTATION NATURAL A
[9]
AN EMPIRICAL-EVALUATION OF RANDOM TESTING [J].
INCE, DC ;
HEKMATPOUR, S .
COMPUTER JOURNAL, 1986, 29 (04) :380-380
[10]
Automatic structural testing using genetic algorithms [J].
Jones, BF ;
Sthamer, HH ;
Eyres, DE .
SOFTWARE ENGINEERING JOURNAL, 1996, 11 (05) :299-306