路径搜索是测试用例自动生成的重要环节。针对遗传算法在测试用例生成中的早熟缺陷,提出一种改进的异质协同演化算法,将种群划分成两个子种群,分别采用遗传子群和差分子群进行演化,在演化的过程中两个子种群相互协作,通过改进迁移间隔代数和迁移率这两个参数增加扰动,更加均衡遗传算法的全局探索与差异演化算法的局部搜索。实验结果表明,该算法比遗传算法和传统异质协同演化算法在生成测试用例的收敛性能方面更具优势,因此该方法更适合测试用例自动生成的应用中。
Path search is an important stage of the automatic generation of test cases. Aiming at the defect of precocity in genetic algorithm for the generation of test cases,this paper proposed a co-evolutionary algorithm of heterogeneous medium,which divided the group into two sub-groups: genetic group and differential group. These two small groups evolved through cooperation to exchange excellent elements by migration strategy. This method could balance the overall search capability of genetic algorithm and partial search of differential evolutionary algorithm. Also,the experimental results prove that this algorithm has more advantages than the traditional genetic algorithm in convergence performance of generating test cases. so this method is more suitable for the automatic generation of test cases.