Font Size: a A A

Optimizing Test Case Generation For EFSM-based Systems Using Deep Reinforcement Learning

Posted on:2024-06-29Degree:MasterType:Thesis
Country:ChinaCandidate:C P WuFull Text:PDF
GTID:2568307115495294Subject:Electronic information
Abstract/Summary:PDF Full Text Request
Software testing is a critical process in ensuring the quality of software.Among the various automated testing methods,testing based on Extended Finite State Machine(EFSM)has been widely adopted due to its ability to enhance testing efficiency and effectiveness.The automatic generation of test cases is an essential prerequisite for conducting EFSM testing.EFSM test case consists of two essential components: test sequence and input data sequence.The test sequence denotes the transition path that satisfies a specific coverage criterion,while the input data sequence comprises a sequence of input data that can activate the transition path.However,the existence of data dependencies among transition predicates in the EFSM model poses a significant challenge in generating executable test cases automatically.Moreover,the derivation of the corresponding reasonable input data for a potentially executable test sequence in an efficient manner remains a formidable task.In this thesis,we propose a novel approach that employs Deep Reinforcement Learning(DRL)techniques to optimize test case generation for EFSM.Specifically,we formulate the problems of executable test sequence generation and corresponding input data sequence derivation as sequential decision-making problems and employ DRL to optimize the solutions.To evaluate the feasibility and effectiveness of our approach,we conduct in-depth comparative experiments on five classical EFSMs.The experimental results demonstrate that our approach not only ensures the executability of the generated test sequence but also significantly accelerates the input data sequence derivation process,thus demonstrating its efficacy and practicality.The primary focus of this thesis can be condensed into the following three aspects:(1)An automatic EFSM test sequence generation approach based on DRL and Ant Colony Optimization(ACO)is proposed.Specifically,we model the path finding problem between any two transitions in EFSM as a DRL decision problem,with dependency relations as states and transition selection as actions.Based on ACO,the total path with the shortest length from the feasible solutions of the path combination is found as the final test sequence.The experimental results reveal that the proposed approach shows significant success in generating executable test sequences,and the sequence length is closely aligned with the theoretical optimal solution.(2)A DRL-based EFSM input data sequence derivation approach is proposed.By defining states based on input variable deviations and actions based on adaptive exploration,we transform the input data inference problem into a DRL decision problem.To evaluate the performance of our approach,we conduct a series of experiments.Specifically,compared to GA-based and PSO-based methods,IDSG-DRL can reduce the average number of iteration steps by up to 87.09%,78.57%,and 56.35%,respectively.Regarding the average runtime,our approach is about 3.52 and 1.58 times faster than the GA-based and PSO-based methods.(3)A prototype DRL-based EFSM test case generation system is designed for the proposed method.The system can support the automatic generation and optimization of executable test cases.At the same time,the system also provides a concise visualization interface for experimental results,which is convenient for testers to make intuitive experimental observations.
Keywords/Search Tags:Extended Finite State Machine, Test Sequence Generation, Input Data Sequence Derivation, Deep Reinforcement Learning, Ant Colony Optimization
PDF Full Text Request
Related items