首页|基于遗传算法与LightGBM融合的测试用例生成方法

基于遗传算法与LightGBM融合的测试用例生成方法

扫码查看
随着互联网技术不断发展,各类商务软件功能需求不断增加,且其复杂性逐渐提高,软件的可靠性与安全性受到了越来越多的关注,软件测试是软件质量保障的关键技术.由于现代商务软件产品具有需求变化频繁、版本迭代过快等特点,为其手工编写测试用例会耗费大量人力成本,尤其敏捷开发过程中,回归测试等需要产生大量重复用例.采用机器学习技术,基于遗传算法和LightGBM模型,提出了一个测试用例自动生成模型,创新贡献表现在:①将测试步骤抽象为有向图模型,简化测试用例数据;②采用遗传算法求解有向图可达路径,替代人工生成测试路径;③采用LightGBM模型加快遗传算法收敛速度,实验验证了所提出方法的有效性,满足测试覆盖准则.该模型可减少测试人员工作,加快测试速度,对提升项目质量、加快项目进度具有重要意义.
Test Case Generation Method Based on the Fusion of Genetic Algorithm and LightGBM
With the continuous development of Internet technology,the functional requirements of all kinds of business software are increasing,and their complexity is gradually increasing.The reliability and security of software have attracted more and more attention.Software testing is the key technology for software quality assurance.Due to the frequent changes in requirements and rapid version iteration of modern business software products,manually writing test cases for them will consume a lot of manpower costs,especially in agile development processes where regression testing and other tasks require a large number of repeated use cases.A test case automatic generation model based on genetic algorithm and LightGBM model is proposed using machine learning technology.The innovative contribution lies in:① Abstracting the test steps into a directed graph model,the test case data were simplified;(2)The genetic algorithm was used to solve reachable paths in directed graphs,replacing manually generated test paths;(3)Using the LightGBM model to accelerate the convergence speed of the genetic algorithm,the effectiveness of the proposed method was experimentally verified,meeting the testing coverage criteria.This model can reduce the workload of testers,accelerate testing speed,and is of great significance for improving project quality and accelerating project progress.

software testinggenetic algorithmsLightGBMdirected graphtest case generation

郝宵、谭文安

展开 >

上海第二工业大学计算机与信息工程学院,上海 201209

软件测试 遗传算法 LightGBM 有向图 测试用例生成

国家自然科学基金项目国家自然科学基金项目上海市研究生教育学会研究课题

61672022U1904186ShsgeG202207

2024

上海第二工业大学学报
上海第二工业大学

上海第二工业大学学报

影响因子:0.248
ISSN:1001-4543
年,卷(期):2024.41(2)