基于稀有数据扑捉的路径覆盖测试数据进化生成方法  被引量:20

Evolutionary Generation of Test Data for Paths Coverage Based on Scarce Data Capturing

在线阅读下载全文

作  者:张岩[1,2] 巩敦卫[1] 

机构地区:[1]中国矿业大学信息与电气工程学院,江苏徐州221116 [2]牡丹江师范学院工学院,黑龙江牡丹江157012

出  处:《计算机学报》2013年第12期2429-2440,共12页Chinese Journal of Computers

基  金:国家自然科学基金(61075061);黑龙江省高校青年学术骨干支持计划项目(1252G063);江苏省自然科学基金(BK2012566;BK2010187);高等学校博士学科点专项科研基金(20100095110006);中国矿业大学校优秀创新团队建设专项基金(2011ZCX002);牡丹江市科学技术计划项目(Z2013s043);牡丹江师范学院重点创新预研项目(SY201216)资助~~

摘  要:采用遗传算法自动生成路径覆盖的测试数据是软件测试自动化研究的热点.现有方法设计适应值函数时,对穿越难以覆盖节点的稀有数据保护不够理想,因而影响测试数据生成效率的提高.文中在测试数据进化生成时动态扑捉稀有数据,通过统计每代种群中目标路径各节点被穿越的个体数量,得到个体对生成穿越目标路径测试数据的贡献,以此作为权重调整个体的适应值,使得稀有数据的适应值增加,以便在后续进化中得到保留,从而提高测试数据生成的效率.基准程序和工业用例的测试结果表明,与传统方法及随机法比较,文中方法生成覆盖路径的测试数据效率较高.Using genetic algorithms to generate test data for path coverage is a hot topic in soft- ware testing automation. The established fitness functions of previous methods cannot provide adequate protection to a scarce datum which covers a node difficult to be covered, so the efficiency of generating test data needs to be improved. In this study, scarce data are dynamically captured during the evolutionary generation of test data. We obtain the contribution of an individual by counting up the number of individuals which traverse each node of the target path, and regard this contribution as a weight to adjust the fitness of the individual. In this way, the fitness of a scarce datum can be increased and the scarce datum can be kept in the subsequent evolution, so the efficiency of generating test data is improved. The proposed method is applied to generate test data for covering paths of two benchmark and six industrial programs, and is compared with traditional and random methods. The experimental results confirm that the proposed method isefficient in generating test data for path coverage.

关 键 词:软件测试 路径覆盖 遗传算法 稀有数据 适应值调整 

分 类 号:TP301[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象