In present paper we propose an approach to automatic generation of test data set based on application of the genetic algorithm. We consider original procedure for computation of the weights of code operations used to formulate the fitness function being the sum of these weights. Terminal objective and result of fitness function selection is maximization of code coverage by generated test data set. The idea of the genetic algorithm application approach is that first we choose the most complex branches of the program code for accounting in the fitness function. After taking the branch into account its weight is reset to zero in order to ensure maximum code coverage. By adjusting the algorithm, it is possible to ensure that the automatic test data generating algorithm finds the most distant from each other parts of the program code and, thus, the higher level of code coverage is attained. We give a detailed example illustrating the work and advantages of considered approach and suppose further improvements of the method.
CITATION STYLE
Serdyukov, K. E., & Avdeenko, T. V. (2019). Using genetic algorithm for generating optimal data sets to automatic testing the program code. In CEUR Workshop Proceedings (Vol. 2416, pp. 173–182). CEUR-WS. https://doi.org/10.18287/1613-0073-2019-2416-173-182
Mendeley helps you to discover research relevant for your work.