Generating Test Case for Object-Oriented Software Using Genetic Algorithm and Mutation Testing Method

Generating Test Case for Object-Oriented Software Using Genetic Algorithm and Mutation Testing Method

Yamina Mohamed Ben Ali (University of Badji Mokhtar, Algeria) and Fatma Benmaiza (University of Badji Mokhtar, Algeria)
Copyright: © 2012 |Pages: 9
DOI: 10.4018/jamc.2012010102
OnDemand PDF Download:
$30.00
List Price: $37.50

Abstract

This paper presents an automatic creation of software test cases based on the use of a genetic algorithm and a mutation testing technique. The aim of this work is then the optimization of a score function in order to give the best set of optimal test case needed for testing an oriented-object program. Therefore, the proposed search-based approach generates in a first time a set of mutants according to an input program for testing the output of methods belonging in the tested class. On the second time, the output of the mutants and the input program are compared to evaluate the performance of all chromosomes in the genetic population. Finally, at the end of the chromosomes evolution the best test case in retrieved as the optimal one.
Article Preview

2. Genetic Algorithms

Genetic algorithms (GA) (Holland, 1975; Goldberg, 1989) are probabilistic search algorithms inspired from biology. They represent an optimization tool where their aim is to find a problem solution to a given problem. Thus, genetic algorithms try to explore the problem search space in order to find progressively potential solutions through time. Based on inheritance, natural selection, mutation, and sexual reproduction, they try to give after many generations the optimal solution in a finite time.

The evolution process of a genetic algorithm works on an encoding of the search space, represented by a set of individuals (chromosomes) that form the genetic population. Each individual, called solution, is randomly created and evaluated according to a measure of the solution quality. Once initially created the individuals undergo changes according to recombination operators (crossover, mutation). A new population is then generated improving the fitness of its individuals. The genetic algorithm steps can be summarized as follows:

  • Step1. Initialize (population)

  • Step2. Evaluate (population)

  • Step3. Repeat

  • 3.1 Selection (population)

  • 3.2 Crossover (population)

  • 3.3 Mutate (population)

  • 3.4 Evaluate (population)

  • Step4. Until (stopping condition is satisfied)

Complete Article List

Search this Journal:
Reset
Open Access Articles: Forthcoming
Volume 9: 4 Issues (2018): 1 Released, 3 Forthcoming
Volume 8: 4 Issues (2017)
Volume 7: 4 Issues (2016)
Volume 6: 4 Issues (2015)
Volume 5: 4 Issues (2014)
Volume 4: 4 Issues (2013)
Volume 3: 4 Issues (2012)
Volume 2: 4 Issues (2011)
Volume 1: 4 Issues (2010)
View Complete Journal Contents Listing