Bf. Jones et al., A STRATEGY FOR USING GENETIC ALGORITHMS TO AUTOMATE BRANCH AND FAULT-BASED TESTING, Computer journal (Print), 41(2), 1998, pp. 98-107
Genetic algorithms have been used successfully to generate software te
st data automatically; all branches were covered with substantially fe
wer generated tests than simple random testing. We generated test sets
which executed all branches in a variety of programs including a quad
ratic 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 domai
n for appropriate inputs. The genetic algorithms generated test data t
o give 100% branch coverage in up to two orders of magnitude fewer tes
ts than random testing. Whilst some of this benefit is offset by incre
ased 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 use
d for fault-based testing where faults associated with mistakes in bra
nch 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.