scholarly journals Generating Diverse Test Suites for Gson Through Adaptive Fitness Function Selection

Author(s):  
Hussein Almulla ◽  
Gregory Gay
2022 ◽  
Vol 27 (2) ◽  
Author(s):  
Hussein Almulla ◽  
Gregory Gay

AbstractSearch-based test generation is guided by feedback from one or more fitness functions—scoring functions that judge solution optimality. Choosing informative fitness functions is crucial to meeting the goals of a tester. Unfortunately, many goals—such as forcing the class-under-test to throw exceptions, increasing test suite diversity, and attaining Strong Mutation Coverage—do not have effective fitness function formulations. We propose that meeting such goals requires treating fitness function identification as a secondary optimization step. An adaptive algorithm that can vary the selection of fitness functions could adjust its selection throughout the generation process to maximize goal attainment, based on the current population of test suites. To test this hypothesis, we have implemented two reinforcement learning algorithms in the EvoSuite unit test generation framework, and used these algorithms to dynamically set the fitness functions used during generation for the three goals identified above. We have evaluated our framework, EvoSuiteFIT, on a set of Java case examples. EvoSuiteFIT techniques attain significant improvements for two of the three goals, and show limited improvements on the third when the number of generations of evolution is fixed. Additionally, for two of the three goals, EvoSuiteFIT detects faults missed by the other techniques. The ability to adjust fitness functions allows strategic choices that efficiently produce more effective test suites, and examining these choices offers insight into how to attain our testing goals. We find that adaptive fitness function selection is a powerful technique to apply when an effective fitness function does not already exist for achieving a testing goal.


2014 ◽  
Vol 15 (S1) ◽  
Author(s):  
Timothy Rumbell ◽  
Danel Draguljić ◽  
Jennifer Luebke ◽  
Patrick Hof ◽  
Christina M Weaver

Author(s):  
K E Serdyukov ◽  
T V Avdeenko

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.


2009 ◽  
Vol 08 (01) ◽  
pp. 47-56 ◽  
Author(s):  
CHENGYAN LI ◽  
XIAOFEI XU ◽  
DECHEN ZHAN

Deterioration occurs for most items in the real world, such as decay, spoilage, evaporation, and so on. The deterioration of item may cause extra costs for inventory storage and additional costs from shortage. In this paper, Joint replenishment problem (JRP) model with exponentially distribution deterioration rate was proposed. The objective function of the JRP model was to minimize the setup costs, inventory holding costs and deterioration costs. Genetic algorithm (GA) was used for solving this problem and researches were also made in aspects such as chromosome coding, fitness function, selection, crossover and mutation operations etc. Procedure of adaptive adjusting of genetic parameters was designed to prevent the premature convergence and refine the performance of GA. Numerical examples demonstrate the effectiveness of the model and algorithm presented in this paper, and the total relevant costs are significantly influenced by the varying rate of deterioration.


2016 ◽  
pp. 649-668
Author(s):  
Hadj Ahmed Bouarara ◽  
Reda Mohamed Hamou ◽  
Abdelmalek Amine ◽  
Amine Rahmani

The popularization of computers, the number of electronic documents available online /offline and the explosion of electronic communication have deeply rocked the relationship between man and information. Nowadays, we are awash in a rising tide of information where the web has impacted on almost every aspect of our life. Merely, the development of automatic tools for an efficient access to this huge amount of digital information appears as a necessity. This paper deals on the unveiling of a new web information retrieval system using fireworks algorithm (FWA-IR). It is based on a random explosion of fireworks and a set of operators (displacement, mapping, mutation, and selection). Each explosion of firework is a potential solution for the need of user (query). It generates a set of sparks (documents) with two locations (relevant and irrelevant). The authors experiments were performed on the MEDLARS dataset and using the validation measures (recall, precision, f-measure, silence, noise and accuracy) by studying the sensitive parameters of this technique (initial location number, iteration number, mutation probability, fitness function, selection method, text representation, and distance measure), aimed to show the benefit derived from using such approach compared to the results of others methods existed in literature (taboo search, simulated annealing, and naïve method). Finally, a result-mining tool was achieved for the purpose to see the outcome in graphical form (3d cub and cobweb) with more realism using the functionalities of zooming and rotation.


2009 ◽  
Vol 56 (4) ◽  
pp. 469-484 ◽  
Author(s):  
L. Doitsidis ◽  
N. C. Tsourveloudis ◽  
S. Piperidis

Sign in / Sign up

Export Citation Format

Share Document