Font Size: a A A

Research On Cost-effective Adaptive Random Testing Algorithm For Object-oriented Software Testing

Posted on:2018-12-31Degree:MasterType:Thesis
Country:ChinaCandidate:L L ZhuFull Text:PDF
GTID:2348330533959262Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the rapid development of object oriented programming(OOP)technology,OOP has become one of the most popular programming technologies,and has been widely used in the design and development of object oriented software(OOS).The special features of object oriented(OO)language,such as inheritance,encapsulation and polymorphism,improve the reusability,scalability and interoperability of software,and also increase the difficulty of testing OO.Researchers have proposed a variety of test methods to test the safety of OOS,among which random testing(RT)is widely used due to its simplicity and ease of use.TY Chen et al.proposed adaptive random testing(ART)to improve the failure-detection effectiveness of RT.When applying ART to OOS,it is necessary to define a distance calculation metric to measure the dissimilarity between test cases.Ciupa et al.proposed an adaptive random testing for object-oriented software(ARTOO)to test a single class,the distance metric it used can calculate the distance between two objects.Based on ARTOO,Lin et al.proposed a divergence-oriented approach to adaptive random testing(DO-ART)to deal with multidimensional testing.Chen et al.proposed the object and method invocation sequence similarity(OMISS)metric and used it to calculate the distance between test cases involving an object set and a method invocation sequence,and a testing tool OMISS-ART.Experiments show that ARTOO,DO-ART and OMISS-ART are more effective than RT,and also are more time-consuming than RT.In order to reduce the time overhead of these three algorithms,in this paper,we propose to store the information of all the already executed test cases together and convert the calculation of the distances between a candidate and the already executed test cases,into the calculation of distance between one candidate information and one whole information to reduce the time overhead of each algorithm.The main work of this paper is as follows:1.OMISS-ARTsum is proposed in this paper.OMISS-ARTsum is an implementation of fixed-sized-candidate-set ART(FSCS-ART)by using theimproved OMISS metric and the max-sum selection criterion.When selecting next test case from the candidate set,traditional FSCS-ART with max-sum criterion calculates the distances of the candidate and each executed test case to get the sum distance,while OMISS-ARTsum stores the information of all the executed test cases into a whole,and calculates the sum distance between the candidate and the executed test case set once a time.Hence,OMISS-ARTsum nearly has a linear time overhead.2.ARTOOsum and DO-ARTsum are proposed in this paper.ARTOOsum and DO-ARTsum are two implementations of FSCS-ART by using the improved ARTOO metric and the max-sum selection criterion.Among them,ARTOOsum is used to deal with single method testing,and its test case contains an object and a method,and DO-ARTsum handles test case involving one object and multiple methods.Both ARTOOsum and DO-ARTsum store all of the executed test case information as a whole,and use the improved ARTOO metric to calculate the distance between a candidate and the executed test cases once a time,and select the candidate which is the farthest away from all the executed test cases.Therefore,ARTOOsum and DO-ARTsum almost have linear time complexity.3.A prototype system is designed and implemented.It is used to automately test the proposed algorithms in this paper and verify their effectiveness and efficiency.The system includes class diagram entry module,test case pool generation module,test drive module,algorithm execution module,and result statistics and analysis module etc.
Keywords/Search Tags:Object oriented software, Adaptive random testing, Test input, Time cost
PDF Full Text Request
Related items