摘要
测试用例的选择在软件测试中十分重要,良好的测试用例可以减少时间和资源的使用,因此提出了一种基于遗传算法的UML活动图自动生成测试用例的算法。通过建立UML活动图模型,将活动图转换为有向图,然后采用深度优先搜索方法获得测试路径,应用遗传算法优化得到测试路径。该算法可以提供优先需要测试的路径,用于自动生成高质量的测试用例,提高测试任务的工作效率。
The selection of test cases in software testing is important,and the better test cases can reduce time and re?source usage. An algorithm of automatic generation test cases of UML activity diagram based on genetic algorithm is proposed. The activity diagram is converted into digraph by establishing UML activity diagram model. The testing path is acquired by adopting depth first search (DFS) method,and obtained by using genetic algorithm optimization. This algorithm can provide the path needed to be tested first to generate high quality test cases automatically. The work efficiency of the test task can be improved.
出处
《现代电子技术》
北大核心
2015年第19期117-120,124,共5页
Modern Electronics Technique
基金
国家电网公司科技项目资助(2014-06-487-S)