跳到主要导航 跳到搜索 跳到主要内容

Recovering fitness gradients for interprocedural Boolean flags in search-based testing

  • Yun Lin
  • , Jun Sun
  • , Gordon Fraser
  • , Ziheng Xiu
  • , Ting Liu
  • , Jin Song Dong
  • National University of Singapore
  • Singapore Management University
  • University of Passau

科研成果: 书/报告/会议事项章节 › 会议稿件 › 同行评审

27 引用 (Scopus)

摘要

In Search-based Software Testing (SBST), test generation is guided by fitness functions that estimate how close a test case is to reach an uncovered test goal (e.g., branch). A popular fitness function estimates how close conditional statements are to evaluating to true or false, i.e., the branch distance. However, when conditions read Boolean variables (e.g., if(x && y)), the branch distance provides no gradient for the search, since a Boolean can either be true or false. This flag problem can be addressed by transforming individual procedures such that Boolean flags are replaced with numeric comparisons that provide better guidance for the search. Unfortunately, defining a semantics-preserving transformation that is applicable in an interprocedural case, where Boolean flags are passed around as parameters and return values, is a daunting task. Thus, it is not yet supported by modern test generators. This work is based on the insight that fitness gradients can be recovered by using runtime information: Given an uncovered interprocedural flag branch, our approach (1) calculates context-sensitive branch distance for all control flows potentially returning the required flag in the called method, and (2) recursively aggregates these distances into a continuous value. We implemented our approach on top of the EvoSuite framework for Java, and empirically compared it with state-of-the-art testability transformations on non-trivial methods suffering from interprocedural flag problems, sampled from open source Java projects. Our experiment demonstrates that our approach achieves higher coverage on the subject methods with statistical significance and acceptable runtime overheads.

源语言英语
主期刊名ISSTA 2020 - Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis
编辑Sarfraz Khurshid, Corina S. Pasareanu
出版商Association for Computing Machinery, Inc
页440-451
页数12
ISBN(电子版)9781450380089
DOI
出版状态已出版 - 18 7月 2020
活动29th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2020 - Virtual, Online, 美国
期限: 18 7月 2020 → 22 7月 2020

丛书

姓名ISSTA 2020 - Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis

会议

会议29th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2020
国家/地区美国
市Virtual, Online
时期18/07/20 → 22/07/20

学术指纹

探究 'Recovering fitness gradients for interprocedural Boolean flags in search-based testing' 的科研主题。它们共同构成独一无二的学术指纹。

引用此