Skip to main content
QUICK REVIEW

[Paper Review] A Factorial Experiment on Scalability of Search Based Software Testing

Arash Mehrmand, Robert Feldt|arXiv (Cornell University)|Jan 12, 2011
Software Testing and Debugging TechniquesComputer Science40 references5 citations
TL;DR

This study uses a factorial experiment to compare genetic algorithm (GA)-based search-based software testing (SBST) against random testing across Java programs of increasing complexity generated via Grammatical Evolution. Results show GA consistently outperforms random testing in achieving higher statement and branch coverage, especially as code complexity rises, demonstrating GA's superior efficiency in automated test data generation.

ABSTRACT

Software testing is an expensive process, which is vital in the industry. Construction of the test-data in software testing requires the major cost and to decide which method to use in order to generate the test data is important. This paper discusses the efficiency of search-based algorithms (preferably genetic algorithm) versus random testing, in soft- ware test-data generation. This study differs from all previous studies due to sample programs (SUTs) which are used. Since we want to in- crease the complexity of SUTs gradually, and the program generation is automatic as well, Grammatical Evolution is used to guide the program generation. SUTs are generated according to the grammar we provide, with different levels of complexity. SUTs will first undergo genetic al- gorithm and then random testing. Based on the test results, this paper recommends one method to use for automation of software testing.

Motivation & Objective

  • To evaluate the scalability and efficiency of search-based software testing (SBST) using genetic algorithms (GA) versus random testing across varying code complexities.
  • To automate the generation of software under test (SUTs) with controlled, increasing complexity using Grammatical Evolution (GE).
  • To compare the effectiveness of GA and random testing in achieving high statement and branch coverage across low, medium, and high-complexity programs.
  • To identify limitations in automated test generation and execution, particularly related to program semantics, loops, and instrumentation overhead.

Proposed method

  • A factorial experimental design was used, with factors including test technique (GA vs. random testing), code complexity (low, medium, high), and coverage goals (statement and branch coverage).
  • Grammatical Evolution (GE) was employed to automatically generate Java programs with predefined complexity levels using a custom BNF grammar.
  • Each generated SUT was tested using both GA and random testing to measure statement and branch coverage percentages.
  • Coverage was measured across 3 complexity levels (75, 150, 300 statements; 25, 50, 100 branches), with 10 programs per complexity level.
  • Instrumentation was applied to track coverage, though it introduced performance overhead, especially in nested or complex loop structures.
  • Problems such as infinite loops, out-of-range values, and unreachable conditions were mitigated via loop exit conditions and BNF constraints.

Experimental results

Research questions

  • RQ1How does the performance of genetic algorithm (GA) compare to random testing in achieving statement and branch coverage across programs of increasing complexity?
  • RQ2To what extent does automated program generation via Grammatical Evolution (GE) enable scalable and repeatable experimentation in SBST?
  • RQ3What are the key limitations of GA and random testing when applied to automatically generated, complex Java programs?
  • RQ4How do factors like unreachable conditions, infinite loops, and data overflow affect test coverage and tool reliability in SBST?

Key findings

  • Genetic algorithm (GA) significantly outperformed random testing in achieving both statement and branch coverage across all complexity levels.
  • At high complexity levels (300 statements, 100 branches), GA achieved substantially higher coverage than random testing, with coverage percentages consistently above 90% for GA and below 70% for random testing.
  • Random testing was faster in execution time but failed to achieve meaningful coverage on complex code, making it ineffective for real-world testing.
  • The number of statements was found to be a poor indicator of code complexity; conditions and control flow structures were far more influential in determining test difficulty.
  • Instrumentation and loop handling (especially exit-loop mechanisms) introduced performance bottlenecks and limited full test coverage, particularly in complex or nested structures.
  • The use of BNF-based program generation via GE enabled controlled, scalable experimentation but introduced challenges in controlling semantic behavior and avoiding pathological code.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.