Font Size: a A A

Research On Class Integration Test Order Generation Based On Deep Reinforcement Learning

Posted on:2024-02-22Degree:MasterType:Thesis
Country:ChinaCandidate:Y H ZhangFull Text:PDF
GTID:2568307118977999Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Software testing,as an important step in the software development lifecycle to ensure software safety,has been receiving increasing attention.In object-oriented programs,the testing order of classes affects the testing cost.Therefore,software testing researchers are committed to finding a suitable class integration testing order to reduce testing costs.Various methods for generating class integration testing orders have been proposed by domestic and foreign scholars,but the generated orders incur high costs.Some scholars have proposed reinforcement learning-based methods,but they still cannot solve the problem of high testing costs for programs with a large number of complex classes.Furthermore,research on reinforcement learning-based class integration testing order generation lacks comparative analysis.This thesis proposes a class integration testing order generation method based on Advantage Actor-Critic.The method improves the original Advantage Actor-Critic algorithm to align with the generation scenario of class integration testing orders.It extracts relationships between classes in the target program,calculates method coupling and attribute coupling,and designs elements of reinforcement learning,including state space,action space,and reward function,to continuously learn from experience and obtain the final class integration testing order.Experimental results demonstrate that when the overall complexity of the test harness is used as the evaluation metric,this method performs best in five out of seven tested programs.To further investigate the performance of different deep reinforcement learning algorithms in class integration testing order generation problems,this thesis selects four mainstream algorithms in deep reinforcement learning: Proximal Policy Optimization,Deep Q-learning Network,Deep Q-learning Network,and Soft Actor-Critic,for research on class integration testing order generation.Based on the current research status,the reward function design is improved.The improved reward function not only covers the overall complexity of the test harness but also considers the number of specific test harnesses and general test harnesses.Experimental results show that Proximal Policy Optimization performs best in terms of cumulative reward value(the main criterion),the number of specific test harnesses,and the number of general test harnesses among all programs.When the overall complexity of the test harness is used as the evaluation metric,Proximal Policy Optimization performs best in five out of six tested programs.This thesis designs and implements a class integration testing order generation tool based on deep reinforcement learning.The tool allows testing personnel to easily decide the testing order of different classes in a program and presents class integration testing orders generated using different reinforcement learning algorithms.It also provides displays of metrics such as the overall complexity of the test harness.This thesis has 31 figures,16 tables,and 86 references.
Keywords/Search Tags:integration test, test order, test stub complexity, reinforcement learning
PDF Full Text Request
Related items