摘要
测试用例优先排序技术通过优化测试用例的执行次序来提高软件测试的效率,是增强型软件测试和回归测试的重要研究课题。针对基于需求的测试用例优先排序问题,提出了一种基于蚁群算法的求解方法,采用不同的测试用例间距离及用例序列评价策略,给出了该方法的2种不同实现方式。首先,针对黑盒测试特点,设计了基于需求的一般性测试用例序列评价指标;其次,提出测试用例吸引度概念,基于测试用例吸引度定义了测试用例间的距离;然后,给出了信息素更新策略、最优解集更新策略、局部最优解突变策略等主要设计策略,分别实现了该方法基于距离和基于指标的2种实现方式。实验结果表明,该方法具有很好的全局寻优能力,整体效果上优于粒子群算法、遗传算法和随机测试。
By optimizing the execution order of test cases,test case prioritization technology can improve the efficiency of software testing.It is an important research topic for enhanced software and regression testing.Aiming at the demand-based test case prioritization problem,a solution method based on ant colony algorithm is proposed.Based on different test case sequence evaluation strategies,two different implementations of the method are given.Firstly,according to the characteristics of black-box software testing,a general demand-based test case sequence evaluation index is designed.Secondly,the concept of test case aspiration is proposed,which was used to define the distance between test cases.Then,the main design strategies such as pheromone updating strategy,optimal solution set updating strategy,and local optimal solution mutation strategy are given.Finally,the two implementations(distance-based approach and index-based approach)are achieved.The experimental results show that this method had a good global search ability,and has better overall effect than other methods such as particle swarm algorithm,genetic algorithm and random testing.
作者
张卫祥
齐玉华
魏波
张敏
窦朝晖
ZHANG Wei-xiang;QI Yu-hua;WEI Bo;ZHANG Min;DOU Zhao-hui(Beijing Institute of Tracking and Telecommunications Technology,Beijing 100094,China)
出处
《计算机工程与科学》
CSCD
北大核心
2020年第2期241-249,共9页
Computer Engineering & Science
基金
国家自然科学基金(61502015)。
关键词
软件测试
测试用例优先排序
蚁群算法
黑盒测试
回归测试
增强型软件
software testing
test case prioritization
ant colony algorithm
black-box testing
regression testing
enhanced software