期刊文献+

面向类集成测试序列生成的强化学习研究 被引量:2

Generation Method of Class Integration Test Order Based on Reinforcement Learning
下载PDF
导出
摘要 集成测试是软件测试过程中不可缺少的步骤,针对在集成测试中如何对系统中的类合理排序的问题,国内外研究者提出了多种生成类集成测试序列的方法,然而他们大多没有将测试桩复杂度作为评估测试代价的指标.针对该问题,提出面向类集成测试序列生成的强化学习研究方法,以总体测试桩复杂度为评价测试代价的指标,生成测试代价尽可能低的类集成测试序列.首先,定义强化学习任务,根据任务设定算法的追求目标;其次,进行程序的静态分析,根据分析得到的结果计算测试桩复杂度;然后,将测试桩复杂度的计算融入奖励函数的设计中,为选择下一步动作提供信息和依据;最后,通过奖励函数反馈值函数,通过值函数的设定保证累计奖励最大化.当智能体完成规定训练次数,系统会选择获得最大累计奖励值的类集成测试序列进行输出,即为我们追求的测试代价尽可能低的结果.实验结果表明,与现有方法相比,在以总体测试桩复杂度为评价指标时,提出的方法结果更优. Integration testing is an indispensable step in the software testing process.In response to the problem of how to rationally sort the classes in the system in integration testing,researchers worldwide have proposed a variety of methods to generate class integration test orders.However,most of them didn’t take the stubbing complexity as the indicator,which is an important factor in evaluating the test cost.In order to solve this problem,this study proposes a method of generating a class integration test order based on reinforcement learning,using the overall stubbing complexity as the indicator to evaluate the test cost,and generating a class integration test order with the stubbing complexity as low as possible.First,the reinforcement learning task is defined,and the pursuit goal of the algorithm is set according to the task.Second,the static analysis of the program is performed and the stubbing complexity is calculated according to the results of the analysis.Then,the calculation of the stubbing complexity is integrated into the design of the reward function to provide information and basis for choosing the next action.Finally,the value function is fed back through the reward function,and the value function is set to ensure that the cumulative reward is maximized.When the agent completes the specified number of training times,the system will select the class integration test order that obtains the largest cumulative reward value for output,which costs the lowest stubbing complexity pursued.The experimental results show that the results obtained by this method are better than those obtained by other existing methods in terms of the overall stubbing complexity as the evaluation indicator.
作者 丁艳茹 张艳梅 姜淑娟 袁冠 王荣存 钱俊彦 DING Yan-Ru;ZHANG Yan-Mei;JIANG Shu-Juan;YUAN Guan;WANG Rong-Cun;QIAN Jun-Yan(Engineering Research Center of Mine Digitalization(China University of Mining and Technology),Ministry of Education,Xuzhou 221116,China;College of Computer Science and Technology,China University of Mining and Technology,Xuzhou 221116,China;Guangxi Key Laboratory of Trusted Software,Guilin University of Electronic Technology,Guilin 541004,China;Guangxi Key Laboratory of Multi-source Information Mining&Security,Guangxi Normal University,Guilin 541004,China)
出处 《软件学报》 EI CSCD 北大核心 2022年第5期1674-1698,共25页 Journal of Software
基金 国家自然科学基金(61673384,71774159,62162004,51874292) 广西可信软件重点实验室开放课题(kx201608) 广西自然科学基金重点项目(2018GXNSFDA138003)。
关键词 类集成测试序列 强化学习 测试桩 测试代价 奖励函数 class integration test order reinforcement learning test stub test cost reward function
  • 相关文献

参考文献13

二级参考文献77

共引文献55

同被引文献4

引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部