State-of-the-art search-based approaches for test case generation work at test case level, where tests are represented as sequences of statements. These approaches make use of genetic operators (i.e., mutation and crossover) that create test variants by adding, altering, and removing statements from existing tests. While this encoding schema has been shown to be very effective for many-objective test case generation, the standard crossover operator (single-point) only alters the structure of the test cases but not the input data. In this paper, we argue that changing both the test case structure and the input data is necessary to increase the genetic variation and improve the search process. Hence, we propose a hybrid multi-level crossover (HMX) operator that combines the traditional test-level crossover with data-level recombination. The former evolves and alters the test case structures, while the latter evolves the input data using numeric and string-based recombinational operators. We evaluate our new crossover operator by performing an empirical study on more than 100 classes selected from open-source Java libraries for numerical operations and string manipulation. We compare HMX with the single-point crossover that is used in EvoSuite w.r.t structural coverage and fault detection capability. Our results show that HMX achieves a statistically significant increase in 30% of the classes up to 19% in structural coverage compared to the single-point crossover. Moreover, the fault detection capability improved up to 12% measured using strong mutation score.
翻译:测试案例生成工作在测试案件级别上采用最先进的搜索方法进行测试案件生成工作,测试是作为报表序列表示的。这些方法利用基因操作员(即突变和交叉翻转),通过添加、改变和删除现有测试的语句来创建测试变量。虽然这种编码系统已证明对许多客观测试案例生成非常有效,但标准交叉操作员(单点)只能改变测试案例生成的结构,而不是输入数据。在本文中,我们争辩说,必须改变测试案例结构和输入数据,以便增加遗传变异和改进搜索进程。因此,我们建议建立一个混合的多层次交叉操作员(即突变和交叉翻转),通过添加、改变和删除现有测试的语句来创建测试变量变异变量。虽然标准交叉操作员(单点)只能改变测试案例生成过程的结构结构,但标准交叉操作员(单点)只能改变测试案例生成数据的结构结构结构结构结构。我们评估新的交叉操作员,通过对从开放的断层化贾瓦图书馆中挑选的100多个班级进行实验研究,以便增加遗传变化范围,改进结构测试范围。我们用系统测试系统中的系统测试了系统测试能力。我们用了系统测试系统测试系统测试系统测试了系统进行大幅测试能力,用系统测试结果,用系统测试了系统测试结果显示了系统测试能力。