doi:

DOI: 10.3724/SP.J.1016.2013.02429

Chinese Journal of Computers (计算机学报) 2013/36:12 PP.2429-2440

Evolutionary Generation of Test Data for Paths Coverage Based on Scarce Data Capturing


Abstract:
Using genetic algorithms to generate test data for path coverage is a hot topic in software testing automation. The established fitness functions of previous methods cannot provide adequate protection to a scarce datum which covers a node difficult to be covered, so the efficiency of generating test data needs to be improved. In this study, scarce data are dynamically captured during the evolutionary generation of test data. We obtain the contribution of an individual by counting up the number of individuals which traverse each node of the target path, and regard this contribution as a weight to adjust the fitness of the individual. In this way, the fitness of a scarce datum can be increased and the scarce datum can be kept in the subsequent evolution, so the efficiency of generating test data is improved. The proposed method is applied to generate test data for covering paths of two benchmark and six industrial programs, and is compared with traditional and random methods. The experimental results confirm that the proposed method is efficient in generating test data for path coverage.

Key words:software testing,path coverage,genetic algorithms,scarce data,fitness adjustment

ReleaseDate:2014-07-21 17:04:08



PDF