摘要
类集成测试序列的确定是面向对象类集成测试技术中的一个重要课题。合理的类集成测试序列可以降低为其构造测试桩的总体复杂度,从而减小测试代价。针对粒子群优化算法容易早熟的缺陷,文中提出一种基于梦境粒子群优化算法的类集成测试序列生成方法。首先把每个类集成测试序列映射为一维空间中的一个粒子,然后将粒子看作有做梦能力的个体。每个迭代周期分为白天和夜间两个阶段,在白天阶段粒子正常移动,而在夜间阶段粒子根据各自的做梦能力扭曲当前位置。如此,粒子有机会在当前位置附近进行搜索,使得算法减缓收敛速度,避免过早陷入局部最优。实验结果表明,多数情况下该方法可以得到测试代价更小的类集成测试序列。
Determination of class integration test sequence is an important topic in object-oriented software integration testing.Reasonable class integration test sequence can reduce the overall complexity of test stub,and then reduce test cost.For particle swarm optimization algorithm,it is easy to be precocious.So a class integration test sequence determination method based on dream particle swarm optimization algorithm was proposed in this paper.First,each sequence is taken as a particle in one dimensional space.Then,every particle is considered to be a dreamer.Each iteration cycle is divided into two phases:day and night.In the daytime,particles move to new locations,and during the night,they contort the locations gained at day phase according to dreaming ability.In this way,particle has the opportunity to search near the current location,so that the algorithm can converge slowly and avoid falling into local optimum too early.The experimental results show that the proposed approach takes a lower test cost in most cases.
作者
张悦宁
姜淑娟
张艳梅
ZHANG Yue-ning;JIANG Shu-juan;ZHANG Yan-mei(Mine Digitization Engineering Research Center of the Ministry of Education,School of Computer Science and Technology, China University of Mining and Technology,Xuzhou,Jiangsu 221116,China;Guangxi Key Laboratory of Trusted Software,Guilin University of Electronic Technology,Guilin,Guangxi 541004,China)
出处
《计算机科学》
CSCD
北大核心
2019年第2期159-165,共7页
Computer Science
基金
国家自然科学基金(61673384
61502497)
广西可信软件重点实验室开放课题(kx201530)资助
关键词
测试序列
集成测试
测试代价
梦境粒子群优化算法
局部最优
Test sequence
Integration testing
Test cost
Dream particle swarm optimization algorithm
Local optimum