| As software development technology continues to advance,software functionality and performance are also constantly improving,making the shortening of software development cycles a trend.However,testing is an indispensable part of software development,and the time and cost of testing are relatively high,making it difficult to keep up with the pace of software development.Moreover,for new software development models such as continuous integration,the efficiency and accuracy of testing are even more demanding.Therefore,improving testing efficiency and accuracy has become the starting point for software testing.Test case prioritization technology is an effective means to improve testing efficiency and accuracy.Currently,most test case sorting algorithms are based on code metrics and static analysis techniques,usually only considering some specialized indicators,such as historical execution information,code complexity,and coverage,which cannot fully reflect the actual needs of software testing.Therefore,this method is usually not accurate enough and requires a high computational cost.In recent years,the introduction of deep learning and reinforcement learning techniques has provided new ideas and opportunities for the reform of test case sorting technology.Test case sorting methods based on deep learning can use some deep learning models,such as Long Short-Term Memory(LSTM),to capture context information,complex patterns,and dependencies in test cases,thereby more accurately determining the priority order between test cases.Reinforcement learning,as a widely used technique in the field of artificial intelligence,has also become a hot research direction for test case sorting technology.Its use of adaptive methods to learn how to sort test cases can enable algorithms to gradually learn the limited execution sequence of test cases by constantly receiving environmental feedback,and establish a relationship between behavior and reward.In addition,the reinforcement learning method is not limited by indicators and can be flexibly adjusted according to actual conditions,making it more widely applicable.This paper proposes a reinforcement learning-based test case prioritization method that combines test case historical execution information with test case similarity.Specifically,the historical execution information is used as input to train an LSTM model,and the LSTM prediction is used as the reward function output to guide the learning strategy of the intelligent agent in the reinforcement learning process.Additionally,the method utilizes test case similarity as an auxiliary measure to help the agent learn a more reasonable test case prioritization strategy,employing an actor-critic based reinforcement learning algorithm.Experimental results demonstrate that the proposed method outperforms existing methods in terms of test case prioritization,and has practical value.Test case prioritization is a research focus,and the use of deep learning and reinforcement learning in this area is a promising direction for further exploration with good prospects.In the future,these methods can be further improved in efficiency and accuracy to better adapt to the rapidly changing software development environment and provide better technical support for continuous integration in software development. |