DocumentCode :
3587345
Title :
Using Genetic Algorithms to Repair JUnit Test Cases
Author :
Yong Xu ; Bo Huang ; Guoqing Wu ; Mengting Yuan
Author_Institution :
Sch. of Comput., Wuhan Univ., Wuhan, China
Volume :
1
fYear :
2014
Firstpage :
287
Lastpage :
294
Abstract :
JUnit test repair has been proposed as a way to alleviate the burden of maintaining the broken tests caused by evolving software. Existing techniques for JUnit test repair either focus on repairing failing assertions or fixing test case compilation errors rendered by evolving method declarations. The empirical work suggests that the synthesis of new method calls is often needed when repairing test cases in practice. In this work, we propose Test Fix, an approach to fix broken JUnit test cases by synthesizing new method calls. Test Fix reduces the synthesis to a search problem and uses a genetic algorithm to solve it. Evaluated on real world applications, preliminary experimental results show that Test Fix can repair broken tests with adding or deleting method calls. Evaluations on the performance of JUnit test repair technique using a genetic algorithm against a random search algorithm are also conducted. Experimental results indicate the clear superiority of genetic algorithms over random search algorithm.
Keywords :
genetic algorithms; program testing; search problems; JUnit test cases; JUnit test repair; Test Fix; genetic algorithms; random search algorithm; test case compilation errors; Biological cells; Genetic algorithms; Maintenance engineering; Search problems; Sociology; Software; Statistics;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering Conference (APSEC), 2014 21st Asia-Pacific
ISSN :
1530-1362
Print_ISBN :
978-1-4799-7425-2
Type :
conf
DOI :
10.1109/APSEC.2014.51
Filename :
7091322
Link To Document :
بازگشت