An empirical evaluation of evolutionary algorithms for unit test suite generation

An empirical evaluation of evolutionary algorithms for unit test suite generation
复制标题

DOI:
10.1016/j.infsof.2018.08.010
复制
发表时间:
2018-12
期刊:
Inf. Softw. Technol.
影响因子:
--
通讯作者:
José Campos;Yan Ge;Nasser M. Albunian;G. Fraser;M. Eler;Andrea Arcuri
José Campos;Yan Ge;Nasser M. Albunian;G. Fraser;M. Eler;Andrea Arcuri
中科院分区:
其他
文献类型:
--
作者:
José Campos;Yan Ge;Nasser M. Albunian;G. Fraser;M. Eler;Andrea Arcuri

文献摘要

被引文献

相似文献

ContextEvolutionary算法已被证明在生成针对代码覆盖率优化的单元测试套件方面是有效的。虽然已经详细评估了这些算法的许多特定方面(例如,测试长度和旨在提高性能的不同种类的技术,如播种),进化算法的选择的影响迄今为止在文献中较少关注。由于理论上不可能设计出对所有可能问题都是最好的算法,软件工程问题中的常见方法是首先尝试最常见的算法,遗传算法,并且只有在之后才尝试改进它或将它与其他算法进行比较,以查看它们中的任何一个是否更适合于所解决的问题。本文的目的是进行这种分析,以阐明搜索算法的影响,适用于单元测试generation.MethodWe经验评估13种不同的进化算法和两种随机方法上选择的非平凡的开源类。所有算法都在EvoSuitetest生成工具中实现,其中包括最近的优化,例如在搜索过程中使用档案和优化多个覆盖标准。结果我们的研究表明,测试档案的使用使进化算法明显优于随机测试,它证实了DynaMOSA的许多-客观搜索算法是最有效的算法单元测试generation.ConclusionOur结果表明,算法的选择可以有一个实质性的影响,整个测试套件优化的性能。虽然我们可以提出一个建议,在实践中使用的算法,没有算法是明显的上级在所有情况下,建议未来的工作改进搜索算法的单元测试生成。
ContextEvolutionary algorithms have been shown to be effective at generating unit test suites optimised for code coverage. While many specific aspects of these algorithms have been evaluated in detail (e.g., test length and different kinds of techniques aimed at improving performance, like seeding), the influence of the choice of evolutionary algorithm has to date seen less attention in the literature.ObjectiveSince it is theoretically impossible to design an algorithm that is the best on all possible problems, a common approach in software engineering problems is to first try the most common algorithm, a genetic algorithm, and only afterwards try to refine it or compare it with other algorithms to see if any of them is more suited for the addressed problem. The objective of this paper is to perform this analysis, in order to shed light on the influence of the search algorithm applied for unit test generation.MethodWe empirically evaluate thirteen different evolutionary algorithms and two random approaches on a selection of non-trivial open source classes. All algorithms are implemented in theEvoSuitetest generation tool, which includes recent optimisations such as the use of an archive during the search and optimisation for multiple coverage criteria.ResultsOur study shows that the use of a test archive makes evolutionary algorithms clearly better than random testing, and it confirms that the DynaMOSA many-objective search algorithm is the most effective algorithm for unit test generation.ConclusionOur results show that the choice of algorithm can have a substantial influence on the performance of whole test suite optimisation. Although we can make a recommendation on which algorithm to use in practice, no algorithm is clearly superior in all cases, suggesting future work on improved search algorithms for unit test generation.