摘要
由于软件测试数据待测行为段序列连接存在冗余,导致目标路径覆盖率降低,提出基于状态空间剪枝的软件测试数据扩增算法。通过并发无关行为段在软件测试内的位置实施分类,依据分类结果采用状态空间剪枝算法,缩减状态空间的规模后,采用测序序列生成算法采用状态节点投影,对所有待测行为段实施操作和判断,按照状态空间实施全序列连接操作,生成全覆盖、无冗余的测试序列;采用自适应粒子群优化算法,设置初始参数、初始种群,判断终止条件,在扩增的测试数据覆盖目标路径时,输入覆盖的测试序列数据完成软件测试数据扩增。实验结果表明,上述算法在软件测试数据扩增效率高,耗时低,平均运行时间低至0.51s,目标路径覆盖率高达到1.0,并且后期的目标路径覆盖率平稳。
Due to the redundancy of the sequence connection of the behavior segments of the software test data to be tested,the target path coverage is reduced.A software test data amplification algorithm based on state space pruning is proposed.Firstly,the positions of concurrent independent behavior segments in software testing were classified,and through the classification results,the pruning algorithm of state space was applied to reduce the size of state space.Secondly,sequencing sequence generation algorithm and state node projection were used to operate and judge all the behavior segments to be tested.Then,according to the state space,full sequence join operations were implemented to generate full coverage and non-redundant test sequences.Then,the adaptive particle swarm optimization algorithm was introduced to set the initial parameters and population,and judge the termination conditions.Eventually,when the amplified test data covered the target path,the covered test sequence data were input to complete the amplification of software test data.The experimental results show that the algorithm has high amplification efficiency,low time consuming(0.51 s)and high and stable target path coverage(1.0).
作者
张昇
刘春宝
ZHANG Sheng;LIU Chun-bao(Jilin University,Changchun Jilin 130041,China)
出处
《计算机仿真》
北大核心
2021年第9期348-352,共5页
Computer Simulation
关键词
状态空间剪枝
软件测试
数据扩增
测试序列
状态空间
自适应粒子群优化
State space pruning
Software testing
Data amplification
Test sequence
State space
Adaptive particle swarm optimization