Font Size: a A A

Machine Learning-based Software Fault Localization And Test Case Generation

Posted on:2021-04-23Degree:MasterType:Thesis
Country:ChinaCandidate:Y Z HeFull Text:PDF
GTID:2428330611980642Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of information technology and the expansion of its application,the scale and complexity of computer software are also increasing,which brings new challenges to software development and debugging.Software testing is the key to ensure software quality.Software debugging is an important part of software testing,and its purpose is to find faults in the software and correct them to ensure that the software operates as designed.Software test case generation is to generate test cases in accordance with the software design instructions.By inputting the generated test cases into the target software,the dynamic behavior of the program can be obtained.By comparing the execution result of the program with the expected execution result,debugger can determine whether the program is faulty.The spectrum-based fault localization method is the mainstream research content in the field of fault localization.This dynamic fault localization method executes a certain number of test cases on a program that may be faulty,and collects the coverage information of the program statements and the execution results of the test cases.The purpose is to find the execution results of the test cases that are different from the expected execution results and related statements and carry out a series of analysis to locate the fault.There are many existing spectrum fault methods,but there is still room for improvement in terms of accuracy and fault localization efficiency.Based on the existing research,this paper introduces machine learning algorithm XGBoost into the spectrum fault localization technology,and proposes a new fault localization method.It obtains the key statement information by using XGBoost and ranks the features by their importance.Then it checks the statements on the execution flow according to the search strategy to generate a complete suspiciousness statement list.This method has higher accuracy and efficiency than the traditional light-weight spectrum-based fault localization method.In addition,the operation of spectrum-based fault requires the support of test cases.At the same time,the quality of test cases also has a great impact on the accuracy of the fault localization.In view of the current lack of research on test case generation to facilitate spectrum-based fault localization,this paper also proposes a method for generating test cases using improved genetic algorithm,which can generate high quality test cases for spectrum-based fault localization.This method constructs the fitness function with three weighted parameters.It takes a small number of initial test cases as the initial population,and then inputs the spectrum information into XGBoost model to obtain information of potential faulty statements.In each iteration,the fitness function is used to evaluate individuals,guide the direction of population's evolution,and ultimately generate high-quality test cases.
Keywords/Search Tags:software testing, software fault localization, test case generation, XGBoost, Genetic Algorithm
PDF Full Text Request
Related items