Skip to main content
QUICK REVIEW

[Paper Review] A Random Walk Based Algorithm for Structural Test Case Generation

Jifeng Xuan, He Jiang|arXiv (Cornell University)|Apr 16, 2017
Software Testing and Debugging TechniquesComputer Science25 references6 citations
TL;DR

This paper proposes WalkTest, a random walk-based algorithm for structural test case generation that frames test generation as an optimization problem. By prioritizing test goals based on solution cost rather than control flow dependence, WalkTest improves search efficiency and achieves superior performance—reducing running time and increasing condition-decision coverage compared to random testing and tabu search on benchmark programs.

ABSTRACT

Structural testing is a significant and expensive process in software development. By converting test data generation into an optimization problem, search-based software testing is one of the key technologies of automated test case generation. Motivated by the success of random walk in solving the satisfiability problem (SAT), we proposed a random walk based algorithm (WalkTest) to solve structural test case generation problem. WalkTest provides a framework, which iteratively calls random walk operator to search the optimal solutions. In order to improve search efficiency, we sorted the test goals with the costs of solutions completely instead of traditional dependence analysis from control flow graph. Experimental results on the condition-decision coverage demonstrated that WalkTest achieves better performance than existing algorithms (random test and tabu search) in terms of running time and coverage rate.

Motivation & Objective

  • To address the high cost and complexity of structural test case generation in software development.
  • To improve the efficiency of automated test case generation by leveraging random walk techniques from SAT solving.
  • To reduce reliance on control flow graph analysis by introducing cost-based prioritization of test goals.
  • To enhance search efficiency and coverage rate in structural testing through optimized test goal ordering.
  • To evaluate the performance of the proposed algorithm against existing methods like random testing and tabu search.

Proposed method

  • The algorithm frames structural test case generation as an optimization problem, where test goals are treated as constraints to satisfy.
  • It employs a random walk operator to iteratively explore the search space toward satisfying test goals.
  • Test goals are prioritized based on the estimated cost of their solutions, not traditional control flow dependencies.
  • The framework repeatedly applies the random walk operator to refine test cases and improve coverage.
  • Cost-based sorting of test goals guides the search toward more promising paths, enhancing convergence speed.
  • The approach is evaluated using condition-decision coverage as the primary metric on real-world software benchmarks.

Experimental results

Research questions

  • RQ1Can a random walk-based approach outperform traditional search-based methods in structural test case generation?
  • RQ2Does cost-based prioritization of test goals improve search efficiency compared to control flow-based analysis?
  • RQ3How does WalkTest compare to random testing and tabu search in terms of coverage rate and execution time?
  • RQ4Can the integration of random walk heuristics from SAT solving be effectively adapted to software test generation?
  • RQ5What impact does test goal ordering have on the convergence speed and effectiveness of test case generation?

Key findings

  • WalkTest achieved higher condition-decision coverage rates than random testing and tabu search on the evaluated benchmarks.
  • The algorithm reduced average running time compared to both baseline methods, indicating improved efficiency.
  • Cost-based sorting of test goals led to faster convergence by focusing search on high-impact test objectives.
  • The use of random walk operators enabled effective exploration of the test input space without exhaustive search.
  • Experimental results confirmed that the proposed method outperforms existing algorithms in both coverage and performance metrics.
  • The framework demonstrated scalability and robustness across multiple software modules in the evaluation.

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.