## 1 Introduction
Note, however, that most often, when using GA, the researchers limit themselves to the so-called path-oriented generation approach, which does not provide the generator with a possibility of selecting among a set of paths, as in the goal-oriented generation approach, but focus only on one specific path [31]. As a result of running the GA, from the final generation of test cases individuals are selected that are the most fitted to traversing a given path. This can be either a path specified by the researcher, or the most complex path of the SUT. If the goal is to form a population of test cases that provides full coverage of all paths or at least some of the most complex paths of the program, then the classical GA is not suitable, since it drifts towards the most fitted (for example, the most difficult) path. That is, in the process of passing from one generation to another, all individuals will be more and more similar to each other. This problem can be solved by running the GA multiple times [32]. However, this approach cannot be called efficient, since the optimization problem is solved separately for each SUT path. Researchers are trying to solve the indicated problem of the GA drift using other evolutionary methods. In [33], the simulated repulsion algorithm based on particle systems was proposed for the automatic generation of diversity-oriented test sets (DOTS) obtained by taking random test sets and iteratively improving their diversity. Another means of increasing the diversity of the test cases is the combination of the GA with the Particle Swarm Optimization (PSO) method. Reference [34] compared two computational techniques, GA and PSO. It was noticed that PSO produces more distinct test cases than GA, but PSO can solve only discrete problems while the GA can solve both discrete and continuous ones. In [35], the GPSMA (Genetic-Particle Swarm Mixed Algorithm) was proposed using the individual's update mode to replace the mutation operation in the GA on the basis of population division. In [36], on the basis of the classical genetic algorithm, the algorithm divided the population into \"families,\" influencing the convergence efficiency by crossover in family, keeping the diversity of the population by crossover between families. In [37], an approach for coupling-based integration testing of object-oriented programs using PSO was proposed. With a certain success of hybrid evolutionary approaches to increase the diversity of the population, the problem of automating the test suite generation is far from a final solution. It should be noted that the majority of works use a simple formulation of fitness function that expresses the degree of coverage of an individual path with a test case. At the same time, in most papers, the mathematical form of the fitness function is not defined at all, while this is a very important aspect of GAs. Due to the formulation of fitness function, it is possible to increase the diversity of the population, see, for example, [38; 39]. In the present paper, we use the idea of an Improved Genetic Algorithm for Multiple Paths Automatic Software Test Case Generation proposed in [38], where an additional term responsible for the greatest diversity of the population, along with a term responsible for the complexity of each path, is included into the fitness function. We investigated this approach, identified its shortcomings, and proposed an improved form of the fitness function, as well as changes into the GA, allowing us to achieve a more uniform increase in the percentage of code coverage. Our research confirmed greater effectiveness of the proposed approach compared to the original version. The paper is organized as follows. Section 1 introduces the problem and gives the literature review. Section 2 discusses theoretical issues of the research, including the mathematical description of the proposed method. In Section 3, we describe experimental results for two different SUT. Section 4 provides the discussion of the results.