摘要
测试用例优先排序技术能够有效提高回归测试效率,是软件测试的热点研究课题之一。针对基于需求的测试用例优先排序方法可操作性差的问题,提出了一种改进的基于测试点覆盖和离散粒子群优化算法的求解方法(TCP-DPSO)。首先,把影响排序的各种因素分为测试收益型因素和测试成本型因素两大类,通过加权平均的方式进行归一化,得到基于需求的通用测试平均收益率评价指标;然后,利用交换子和基本交换序列定义粒子的位置和速度,借鉴遗传算法(GA)变异策略引入变异算子,采用时变惯性权重调整粒子的探索能力和开发能力,促进可持续进化和逼近优化目标。实验结果表明,TCP-DPSO在最优解质量上与遗传算法相当,大幅优于随机测试,在最优解成功率和平均求解时间上优于遗传算法,具有更好的算法稳定性。
With the ability to improve regression testing efficiency, test case prioritization has become a hot topic in software testing research. Since test case prioritization based on requirement is usually inefficient, a test case prioritization method based on discrete particle swarm optimization and test-point coverage, called Discrete Particle Swarm Optimization for Test Case Prioritization (TCP-DPSO) was proposed. Firstly, the various factors affecting prioritization were divided into two categories: Cost-Keys and Win-Keys, and then general test average yield index by normalizing was obtained. Then, particle's position and velocity were defined by use of switcher and basic switching sequence, the mutation operator was introduced by referencing mutation strategy of Genetic Algorithm (GA), and the exploration and development capabilities were adjusted by adopting variable inertia weight, which could promote sustainable evolution and approach optimization goals. The experimental results show that TCP-DPSO is similar to GA and dramatically better than random testing on optimal solution quality and it is superior to GA on success rate and average computing time, which indicates its better algorithm stability.
出处
《计算机应用》
CSCD
北大核心
2017年第1期108-113,169,共7页
journal of Computer Applications
基金
国家自然科学基金资助项目(61502015)~~
关键词
软件测试
测试用例优先排序
离散粒子群优化
评价指标
黑盒测试
software testing
test case prioritization
Discrete Particle Swarm Optimization (DPSO)
evaluation index
functional testing