Font Size: a A A

A Probability Adaptive Random Testing Approach Based On Program Dynamic Information And Its Application In Object-oriented Software Testing

Posted on:2021-02-27Degree:MasterType:Thesis
Country:ChinaCandidate:Q H BaoFull Text:PDF
GTID:2428330629987262Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the continuous integration of information technology and human society,human and software are increasingly inseparable.With the advent of the software,its quality problems have been a major problem that bothers people.Every year,billions of dollars are cost because of the quality of the software.For this purpose,many researchers continue to explore,hoping to find a practical and effective testing method.Now one of the most popular testing methods is random testing?RT?.Random testing has been favored by many people in the industry due to its fast implementation and simple operation.However,random testing also has the disadvantage of low detection efficiency.Through years of research,TY Chen et al.improved random testing and proposed an efficient algorithm named adaptive random testing?ART?,aiming at the feature of universal and continuous program faults.The basic idea of the ART algorithm is to distribute test cases as evenly as possible in the input domain to improve the efficiency of detecting software defects.Based on this idea,many ART algorithms have been proposed,among which probability adaptive random testing algorithm is one of the best detection algorithms.This thesis focuses on the analysis of one of probability adaptive random testing algorithms–an adaptive random testing algorithm based on the probability density function(Adaptive Random Testing through Test Profile,ARTTP).This method generates a probability density function through the executed test cases,and obtains the next test case by using the inverse transformation method.After analyzing the ARTTP algorithm,this thesis proposes an improvement on the shortcomings of the algorithm,and applies it to the testing of object-oriented programs.Finally,a test prototype system based on the two algorithms is implemented to carry out the experiments,and the results prove that the proposed algorithms have certain effectiveness.The main work of this thesis is as follows:1.In view of the shortcomings of the ARTTP algorithm,which is insufficient to consider the dynamic information of the programs,this thesis improves the algorithm and proposes two algorithms named Probability Adaptive Random Testing based on Regression Testing(PARTRT).The main idea of PARTRT-A algorithm is to first randomly generate a large number of test cases and execute them.Then the statement coverage and branch coverage information are obtained by instrumentation.On the basis of Probability Adaptive Random Testing algorithm in regression testing,different comparison methods are selected for different dynamic information to select test cases,so as to improve probability ART algorithm and further improve its detection effectiveness.The main idea of PARTRT-B algorithm is to generate test cases by probability ART algorithm and execute them.After obtaining the dynamic information,the test cases are selected by comparing different dynamic information,so as to improve the efficiency of detecting software defects.By testing different practical programs and comparing with other related algorithms,the results show that PARTRT algorithm has a higher superiority in detection effectiveness,and the time cost is not too high.2.Due to the numerous advantages of object-oriented programs,object-oriented programming is becoming more and more popular.However,the testing methods for object-oriented programs are still not mature.To solve this problem,we propose Adaptive Random Testing through Test Profile for Object-Oriented Software(ARTTP-OO).Because of the complex structure of object-oriented test cases,it is impossible to simply digitalize a test case to a point to generate a probability density function.For this reason,we propose to generate a test case at the edge of the input domain,and calculate the distance between the object-oriented test cases with the OMISS metric formula.Then the probability density function is generated through the distance,so the test cases can be selected for testing,and the application of ARTTP algorithm in the object-oriented programs is realized.By testing the real object-oriented programs,the ARTTP-OO algorithm has lower time cost without reducing the detection efficiency.3.A testing prototype system of the probability ART algorithms is designed and implemented.By inheriting the algorithm in the system,the algorithm testing automation is realized.The system mainly consists of two modules:numerical program testing module and object-oriented program testing module,and each module has its own submodule.Using the system to test the algorithm,it is proved that the prototype system can implement the algorithm in this thesis well and has high scalability.
Keywords/Search Tags:Random Testing, Adaptive Random Testing, Probability Density Function, Dynamic Information, Object-oriented Programs
PDF Full Text Request
Related items