检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:刘超 丁蕊 朱雨寒 Liu Chao;Ding Rui;Zhu Yuhan(School of Mathematics&Science,Mudanjiang Normal University,Mudanjiang Heilongjiang 157000,China;School of Computing&Information Technology,Mudanjiang Normal University,Mudanjiang Heilongjiang 157000,China)
机构地区:[1]牡丹江师范学院数学科学学院,黑龙江牡丹江157000 [2]牡丹江师范学院计算机与信息技术学院,黑龙江牡丹江157000
出 处:《计算机应用研究》2024年第8期2467-2473,共7页Application Research of Computers
基 金:牡丹江师范学院资助项目(MNUGP202304,kjcx2022-020mdjnu,1451TD003);黑龙江省自然科学基金资助项目(LH2023F037);黑龙江省高等教育教学改革重点委托项目(SJGZ20200175);黑龙江省高等教育教学改革项目(SJGY20220607)。
摘 要:面向路径覆盖的测试是软件测试的重要方法之一。如何快速生成高质量测试数据使其满足路径覆盖要求,一直是研究热点问题。为解决现有智能优化方法运行时间长、探索过程不稳定以及生成测试用例冗余的问题,提出一种基于强化学习思想的选择策略,用于以路径覆盖为准则的测试数据生成中。通过将可执行路径定义为智能体状态,算法每一轮迭代更新后的数据选择定义为智能体动作,并将奖励函数与状态变化关联,在状态更新过程中使用贪心策略来引导输入数据不断向未获取状态变异更新,以此不断选择能够覆盖新可执行路径的数据,从而实现对待测程序所有执行路径覆盖的目标。实验结果表明,与其他算法相比,所提策略的运行时间和迭代次数明显降低,同时覆盖率快速提高。结合理论分析可以得出结论:所提策略在实际运用中能够有效实现路径覆盖并提高测试数据生成效率。Path-coverage oriented testing is a crucial method in software testing,and the rapid generation of high-quality test data to satisfy path coverage requirements has been a persistent research challenge.To address issues such as long running times,unstable exploration processes,and the generation of redundant test cases in existing intelligent optimization methods,this paper proposed a selection strategy based on the reinforcement learning paradigm applied to test data generation with path coverage as the criterion.By defining executable paths as the state of the intelligent agent,it defined the data selection after each iteration update as the agent’s action.It associated the reward function with state changes,and employed a greedy strategy during the state update process to guide input data towards continuous variations in unexplored states.This iterative selection process aimed to continuously choose data that covered new executable paths,thereby achieving the goal of covering all execution paths of the target program.Experimental results demonstrate that compared to other algorithms,the proposed strategy significantly reduces running times and iteration counts while achieving notable improvements in coverage.Theoretical ana-lysis supports the conclusion that the proposed strategy effectively realizes path coverage and enhances the efficiency of test data generation in practical applications.
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.49