A Survey on Software Testing Techniques using Genetic Algorithm
The overall aim of the software industry is to ensure delivery of high quality software to the end user. To ensure high quality software, it is required to test software. Testing ensures that software meets user specifications and requirements. However, the field of software testing has a number of underlying issues like effective generation of test cases, prioritisation of test cases etc which need to be tackled. These issues demand on effort, time and cost of the testing. Different techniques and methodologies have been proposed for taking care of these issues. Use of evolutionary algorithms for automatic test generation has been an area of interest for many researchers. Genetic Algorithm (GA) is one such form of evolutionary algorithms. In this research paper, we present a survey of GA approach for addressing the various issues encountered during software testing.
💡 Research Summary
**
The paper presents a comprehensive survey of how Genetic Algorithms (GAs) have been employed to address persistent challenges in software testing, such as automatic test‑case generation, prioritization, and reduction. It begins by highlighting the high cost of testing—often consuming up to half of a project’s resources—and argues that evolutionary techniques offer a promising route to automation. A concise overview of GA fundamentals follows, describing the representation of test inputs as chromosomes, the design of fitness functions that reflect specific testing objectives (e.g., coverage of definition‑use pairs or path coverage), and the three canonical operators: selection, crossover, and mutation.
The core of the survey is organized around three major testing domains.
1. White‑Box (Structural) Testing
Data‑Flow Testing: Girgis (2007) converts the program under test into a Control Flow Graph (CFG) and extracts all definition‑use (def‑use) pairs. A GA evolves binary chromosomes that encode input values; the fitness function counts the number of covered def‑use pairs while also penalizing imprecise inputs. Experiments show that a custom random‑selection scheme outperforms classic roulette‑wheel selection, yet the study does not compare against other selection strategies such as tournament or stochastic universal sampling.
Path Testing: Srivastava and Tai (2009) assign weights to CFG edges using an 80‑20 rule (80 % to loops/branches, 20 % to sequential edges). Paths with higher cumulative weight are deemed critical and are tested first, improving test efficiency. In a related work, the same authors combine Ant Colony Optimization (ACO) with GA to generate safe execution sequences for the Resource Request algorithm and to evolve test data that maximizes the number of successful resource allocations. The ACO component consistently yields higher success rates than GA alone, but the hybrid approach is evaluated only on small benchmark programs, leaving scalability unanswered.
Graph‑Based Testing: Velur (2009) models the system’s intermediate states as a directed graph, encodes the graph as a binary string, and then constructs a dual graph to serve as the GA population. Fitness is derived from a “current maximum clique” algorithm, rewarding individuals that contain cliques of size five and independent sets of the same size. The method is well‑suited for network or system‑level testing where predictive models are scarce, but it relies exclusively on tournament selection and lacks a thorough justification of its fitness metric.
2. Model‑Based Testing
Alzabidi et al. (2010) introduce a Shifted‑Modified‑Similarity (SMS) fitness function, a variation of Hamming distance that measures the overlap between the edges of a target path and those traversed by a candidate test case. Experiments on several small programs reveal that double‑point crossover yields better convergence than single‑point crossover. However, the approach has not been validated on programs featuring complex data structures (loops, arrays, linked lists) or on industrial‑scale code bases.
3. Web Application Testing
The survey briefly mentions work that extracts user‑session data from web applications and feeds it into a GA to generate realistic test scenarios. While this demonstrates the feasibility of GA‑driven testing for client‑server interactions, the literature on web‑specific challenges (e.g., dynamic content, asynchronous calls) remains sparse.
Across all surveyed studies, a common pattern emerges: the majority of experiments are conducted on toy examples or academic benchmarks, and the reported improvements are often modest. Fitness function design is highly problem‑specific, and there is no consensus on a standardized metric for comparing GA‑based testing techniques. Moreover, most papers focus on a single evolutionary operator configuration, neglecting systematic comparisons among selection, crossover, and mutation variants.
The authors conclude by outlining several research directions needed to mature GA‑based testing:
- Conduct large‑scale empirical studies on real‑world software systems to assess scalability and practical impact.
- Explore multi‑objective formulations that simultaneously optimize coverage, execution time, and fault detection probability.
- Develop hybrid evolutionary frameworks that combine GA with other meta‑heuristics such as Particle Swarm Optimization (PSO) or Differential Evolution (DE) and evaluate their synergistic effects.
- Standardize benchmark suites and evaluation criteria to enable reproducible comparisons across studies.
- Integrate GA‑driven test generation into continuous integration/continuous deployment (CI/CD) pipelines, providing automated feedback to developers.
In summary, the survey confirms that Genetic Algorithms are a versatile tool for automating various aspects of software testing, offering measurable gains in test‑case generation and prioritization. Nevertheless, to transition from research prototypes to industrial practice, future work must address scalability, methodological rigor, and seamless integration with modern software development workflows.
Comments & Academic Discussion
Loading comments...
Leave a Comment