Automated test generators, such as search based software testing (SBST) techniques, replace the tedious and expensive task of manually writing test cases. SBST techniques are effective at generating tests with high code coverage. However, is high code coverage sufficient to maximise the number of bugs found? We argue that SBST needs to be focused to search for test cases in defective areas rather in non-defective areas of the code in order to maximise the likelihood of discovering the bugs. Defect prediction algorithms give useful information about the bug-prone areas in software. Therefore, we formulate the objective of this thesis: \textit{Improve the bug detection capability of SBST by incorporating defect prediction information}. To achieve this, we devise two research objectives, i.e., 1) Develop a novel approach (SBST$_{CL}$) that allocates time budget to classes based on the likelihood of classes being defective, and 2) Develop a novel strategy (SBST$_{ML}$) to guide the underlying search algorithm (i.e., genetic algorithm) towards the defective areas in a class. Through empirical evaluation on 434 real reported bugs in the Defects4J dataset, we demonstrate that our novel approach, SBST$_{CL}$, is significantly more efficient than the state of the art SBST when they are given a tight time budget in a resource constrained environment.
翻译:自动测试生成器,例如基于搜索的软件测试(SBST)技术,取代人工写作测试案例的繁琐和昂贵的任务。 SBST技术在生成高代码覆盖的测试中有效。 然而,高代码覆盖率足以使发现的错误数量最大化吗? 我们争辩说,SBST需要侧重于在有缺陷的地区而不是代码中无缺陷的地区搜索测试案例,以便最大限度地提高发现错误的可能性。 缺陷预测算法提供了软件中易出现错误的区域的有用信息。 因此,我们制定了这一论文的目标:\textit{通过纳入缺陷预测信息来提高SBST的错误检测能力。 为了实现这一目标,我们设计了两个研究目标,即:(1) 开发一种新颖的方法(SBST$+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}