Today, most automated test generators, such as search-based software testing (SBST) techniques focus on achieving high code coverage. However, high code coverage is not sufficient to maximise the number of bugs found, especially when given a limited testing budget. In this paper, we propose an automated test generation technique that is also guided by the estimated degree of defectiveness of the source code. Parts of the code that are likely to be more defective receive more testing budget than the less defective parts. To measure the degree of defectiveness, we leverage Schwa, a notable defect prediction technique. We implement our approach into EvoSuite, a state of the art SBST tool for Java. Our experiments on the Defects4J benchmark demonstrate the improved efficiency of defect prediction guided test generation and confirm our hypothesis that spending more time budget on likely defective parts increases the number of bugs found in the same time budget.
翻译:今天,大多数自动测试发电机,如基于搜索的软件测试(SBST)技术,都侧重于实现高代码覆盖率。然而,高代码覆盖率不足以使发现的错误数量最大化,特别是在测试预算有限的情况下。在本文中,我们提议了一种自动化测试生成技术,该技术也以源代码的估计缺陷程度为指导。该代码中可能存在更多缺陷的部分比缺陷较少的部分得到较多的测试预算。为了衡量缺陷程度,我们利用Schwa这一显著缺陷预测技术。我们把方法运用到EvoSUite,这是爪哇SBST的先进工具。我们对Defects4J基准的实验表明,缺陷预测引导测试生成的效率有所提高,并证实了我们的假设,即在可能存在缺陷的部分上花费更多的时间预算会增加在同一预算期间发现的错误的数量。