| With informatization increasing,computer software has been extensively applied in various field of technical industry and people’s lives.The size and complexity of computer software is constantly improving.As an important means of ensuring software quality and improving its reliability,software testing plays a vital role in software development.Among numerous software testing techniques,Metamorphic Testing(MT),an effective testing technique for lightening Oracle Problem during software testing,has been a wide application in software testing activities that are lack of Test Oracle such as,Artificial Intelligence and Search Engine.However,Metamorphic Relation(MR),as the key of MT,often requires software testers to obtain it on the basis of understanding the requirements specification of the program,and it is difficult to identify it automatically.Therefore,how to construct multiple MRs simply and efficiently for programs is becoming a heated topic in the field of MT.Among the existing methods for identifying and generating MRs,the method for prediction MRs based on machine learning has gained more researcher’s attention in recent years.Among them,the metamorphic relationship prediction method MRpredT uses text mining technology to process the program’s comments,which then are to measure the similarity among programs in order to achieve the purpose of MR’ reuse.Study has been shown that the method has an excellent performance in predicting MRs for matrix manipulation programs.On the basis of MRpredT,this thesis firstly proposes MRpredCC from the perspective of improving the effectiveness of predicting MRs.MRpredCC comprehensively considers the full mining of the two parts of the program code and comments,so as to improve the calculation efficiency of program similarities.Subsequently,from the perspective of increasing the program diversity of the dataset,machine learning programs such as recommender systems are added to the program set originally only for matrix operations to measure the MR recommendation performance of the MRpredCC.Finally,this thesis will conduct experiments respectively to select the optimal similarity calculation method and classification model from four candidate similarity calculation methods and four candidate classification models in order to make the MRpredCC the best performance.In addition,with a purpose of testing the effectiveness of MRpredCC,this thesis has a detailed analysis.The experimental results show that compared with MRpredT,MRpredCC has a better prediction effect in the prediction of MRs.The automatic identification and generation technology of MR benefits software developments,which is also beneficial to testers to apply MT to effectively test software products and saves a lot of time and cost by replacing complicated manual identification of MRs.This thesis proposes MRpredCC by improving the program similarity calculation strategy of MRpredT,which will provide some references for academic study and industrial application of MT. |