Mathematics (Feb 2021)

Mutated Specification-Based Test Data Generation with a Genetic Algorithm

  • Rong Wang,
  • Yuji Sato,
  • Shaoying Liu

DOI
https://doi.org/10.3390/math9040331
Journal volume & issue
Vol. 9, no. 4
p. 331

Abstract

Read online

Specification-based testing methods generate test data without the knowledge of the structure of the program. However, the quality of these test data are not well ensured to detect bugs when non-functional changes are introduced to the program. To generate test data effectively, we propose a new method that combines formal specifications with the genetic algorithm (GA). In this method, formal specifications are reformed by GA in order to be used to generate input values that can kill as many mutants of the target program as possible. Two classic examples are presented to demonstrate how the method works. The result shows that the proposed method can help effectively generate test cases to kill the program mutants, which contributes to the further maintenance of software.

Keywords