Divide-by-zero exception raising via branch coverage

  • Authors:
  • Neelesh Bhattacharya;Abdelilah Sakti;Giuliano Antoniol;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;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'11 Proceedings of the Third international conference on Search based software engineering
  • Year:
  • 2011

Quantified Score

Hi-index 0.01

Visualization

Abstract

In this paper, we discuss how a search-based branch coverage approach can be used to design an effective test data generation approach, specifically targeting divide-by-zero exceptions. We first propose a novel testability transformation combining approach level and branch distance. We then use different search strategies, i.e., hill climbing, simulated annealing, and genetic algorithm, to evaluate the performance of the novel testability transformation on a small synthetic example as well as on methods known to throw divide-by-zero exceptions, extracted from real world systems, namely Eclipse and Android. Finally, we also describe how the test data generation for divide-by-zero exceptions can be formulated as a constraint programming problem and compare the resolution of this problem with a genetic algorithm in terms of execution time. We thus report evidence that genetic algorithm using our novel testability transformation out-performs hill climbing and simulated annealing and a previous approach (in terms of numbers of fitness evaluation) but is out-performed by constraint programming (in terms of execution time).