Boosting search based testing by using constraint based testing

  • Authors:
  • Abdelilah Sakti;Yann-Gaël Guéhéneuc;Gilles Pesant

  • Affiliations:
  • Department of Computer and Software Engineering, École Polytechnique de Montréal, Québec, Canada;Department of Computer and Software Engineering, École Polytechnique de Montréal, Québec, Canada;Department of Computer and Software Engineering, École Polytechnique de Montréal, Québec, Canada

  • Venue:
  • SSBSE'12 Proceedings of the 4th international conference on Search Based Software Engineering
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Search-Based Testing (SBT) uses an evolutionary algorithm to generate test cases. Traditionally, a random selection is used to generate an initial population and also, less often, during the evolution process. Such selection is likely to achieve lower coverage than a guided selection. We define two novel concepts: (1) a constrained population generator (CPG) that generates a diversified initial population that satisfies some test target constraints; and (2) a constrained evolution operator (CEO) that evolves test candidates according to some constraints of the test target. Either the CPG or CEO may substantially increase the chance of reaching adequate coverage with less effort. In this paper, we propose an approach that models a relaxed version of the unit under test as a constraint satisfaction problem. Based on this model and the test target, a CPG generates an initial population. Then, an evolutionary algorithm uses a CEO and this population to generate test input leading to the test target being covered. Our approach combines constraint-based testing (CBT) and SBT and overcomes the limitations associated with each of them. Using eToc, an open-source SBT tool, we implement a prototype of this approach. We present the empirical results of applying both CPG or CEO on three open-source programs and show that CPG or CEO improve SBT performance in terms of branch coverage by 11% while reducing computation time.