Font Size: a A A

Adaptive Random Test Case Generation By Central Compensation Strategy

Posted on:2021-05-30Degree:MasterType:Thesis
Country:ChinaCandidate:M T QuanFull Text:PDF
GTID:2428330629488458Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of information technology,software systems have affected all aspects of our lives,and their reliability has also attracted a lot of attention.Software testing is an important way to ensure the quality of software,and its goal is to detect faults that cause program failures with less overhead.Random testing(RT)is one of the most basic software testing methods.It has been widely used in industry because its simplicity and the ease of implementation.RT selects test cases from the input domain of program in a random manner,and its failure-detection ability is limited.Adaptive random testing(ART)improves the diversity of test cases by maintaining a certain distance between test cases,which can improve the effectiveness of random testing.The FSCS-ART(Fixed-Size-Candidate-Set ART)algorithm is a typical version of ART and also follows the idea of “uniform distribution”.It considers the distance measure from the candidate test cases to the executed test cases,and selects the candidate that is farthest from the executed test cases as the next test case for test execution.However,as the size of executed test cases increases,each round of test case generation will require more computation overhead,and the heavy overhead limits its wide applications.In addition,the boundary effect in high-dimensional cases will cause the dramatic decrease of its failure-detection ability.In order to solve the above two problems,this paper proposes an ART algorithm named FSCS-CCS(Adaptive Random Testing by Center Compensation Strategy)by considering the center compensation strategy.First of all,for the boundary effect in the cases of high dimensions,FSCS-CCS algorithm uses dynamic partitioning to divide the program input domain equally,and selects the sparse sub-domain as the target region to generate the next test case.Based on the distance computation,a center compensation strategy is proposed to screen the candidate test cases,that is,the candidate test case closer to the center of sub-domain is preferentially selected as the next test case.At the same time,in order to avoid the probability of test cases locating in the boundary region to be too small,a random control strategy is introduced to make test cases have a certain probability to fall in the boundary regions.Finally,in order to improve the failuredetection efficiency of FSCS-CCS algorithm,the distance-aware forgetting strategy is used to reduce the computation overhead in low-dimensional cases.It also limits the query range of neighborhood region in high-dimensional cases to reduce the query and computation overhead.In order to verify the failure-detection ability and computation efficiency of the proposed FSCS-CCS algorithm,the simulation and empirical experiments are conducted in this paper.In the simulation experiments,four different dimensions including both low and high cases are taken into consideration.In each kind of dimension,three failure patterns are simulated with different failure rates.According to the experiment results,we can claim that FSCS-CCS algorithm effectively reduces the computation overhead while ensuring the failure-detection ability.In the empirical studies,the 28 real-life programs which are typical subject programs in the field of ART are taken for experimental analysis.Through the results of empirical experiments,it can be found that the FSCS-CCS algorithm is comparable to or better than the FSCSART algorithm in failure-detection ability.At the same time,the algorithm has a linear time complexity,which exhibits the better computation performance than FSCS-ART algorithm.In summary,the proposed FSCS-CCS algorithm can generate test cases with low computation overhead,and ensure the satisfied failure-detection ability.Based on the above observations,the work in this paper provides a reference for the theoretical research and practical application of adaptive random testing.
Keywords/Search Tags:Software testing, Adaptive random testing, Test case generation, Central compensation strategy
PDF Full Text Request
Related items