摘 要: 针对复杂软件中测试用例难生成问题,提出一种融入聚类和进化算法的软件缺陷测试方法,开发一套智能软件测试系统。首先,对被测程序采用变异测试方法注入缺陷;基于不同策略对缺陷聚类。然后,针对多个缺陷簇,建立测试用例生成问题的优化模型,并采用进化算法生成能检测缺陷的测试用例。最后,基于不同评价指标,完成软件测试报告。测试结果表明,基于测试用例检测缺陷的成功率、缺陷率,以及消耗时间和迭代次数等指标,验证了所提方法提高了检测缺陷检测率、降低了测试的时间及提高了测试用例生成的效率。由此可见,人工智能融于软件测试技术,不仅提升了软件测试效率,而且丰富人工智能应用领域。 |
关键词: 软件测试;测试用例生成;聚类;进化算法 |
中图分类号: TP311
文献标识码: A
|
基金项目: 江苏省高等学校自然科学研究重大项目(21KJA520006);徐州市科技计划项目(KC21007). |
|
Generation Method of Software Test Case based on Intelligent Optimization |
DANG Xiangying, LI Jinfeng
|
(School of Information Engineering, Xuzhou University of Technology, Xuzhou 221018, China )
dangpaper@163.com; 41407770@qq.com
|
Abstract: Aiming at the problem that test cases are difficult to generate in complex software, this paper proposes a software fault testing method incorporating clustering and evolutionary algorithms, and an intelligent software testing system is developed. First, mutation test is used to inject faults into the program under test, and the faults are clustered based on different strategies. Then, for multiple fault clusters, an optimization model of test case generation problem is established, and an evolutionary algorithm is used to generate test cases that can detect faults. Finally, the software test report is completed based on different evaluation indicators. The test results show that the proposed method improves the fault detection rate, reduces the test time and improves the efficiency of test case generation based on the success rate, fault rate, time consumption and iteration number of test case detection. It can be seen that the integration of AI (Artificial Intelligence) into software testing technology not only improves the efficiency of software testing, but also enriches the application field of AI. |
Keywords: software testing; test case generation; clustering; evolutionary algorithm |