Genetic Algorithms for Randomized Unit Testing

被引:52
作者
Andrews, James H. [1 ]
Menzies, Tim [2 ]
Li, Felix C. H. [1 ]
机构
[1] Univ Western Ontario, Dept Comp Sci, London, ON N6A 2B7, Canada
[2] W Virginia Univ, Lane Dept Comp Sci & Elect Engn, Morgantown, WV 26506 USA
基金
美国国家科学基金会;
关键词
Software testing; randomized testing; genetic algorithms; feature subset selection; search-based optimization; testing tools; SOFTWARE TEST DATA; GENERATION; CHECKING;
D O I
10.1109/TSE.2010.46
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Randomized testing is an effective method for testing software units. The thoroughness of randomized unit testing varies widely according to the settings of certain parameters, such as the relative frequencies with which methods are called. In this paper, we describe Nighthawk, a system which uses a genetic algorithm (GA) to find parameters for randomized unit testing that optimize test coverage. Designing GAs is somewhat of a black art. We therefore use a feature subset selection (FSS) tool to assess the size and content of the representations within the GA. Using that tool, we can reduce the size of the representation substantially while still achieving most of the coverage found using the full representation. Our reduced GA achieves almost the same results as the full system, but in only 10 percent of the time. These results suggest that FSS could significantly optimize metaheuristic search-based software engineering tools.
引用
收藏
页码:80 / 94
页数:15
相关论文
共 48 条
[1]  
ANDREWS J, 2009, P 5 INT C PRED MOD S
[2]  
ANDREWS J, 2007, P 22 IEEE ACM INT C
[3]  
ANDREWS J.H., 2006, Proceedings of the 1st international workshop on Random testing, P36, DOI [10.1145/1145735.1145741, DOI 10.1145/1145735.1145741]
[4]   General test result checking with log file analysis [J].
Andrews, JH ;
Zhang, YJ .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2003, 29 (07) :634-648
[5]  
[Anonymous], 1994, Encyclopedia of software Engineering
[6]  
[Anonymous], P ACM SIGSOFT INT S
[7]   Automatically checking an implementation against its formal specification [J].
Antoy, S ;
Hamlet, D .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2000, 26 (01) :55-69
[8]  
Ball T, 2004, LECT NOTES COMPUT SC, V2999, P1
[9]  
Berner S, 2007, PROC INT CONF SOFTW, P612
[10]   An overview of JML tools and applications [J].
Burdy L. ;
Cheon Y. ;
Cok D.R. ;
Ernst M.D. ;
Kiniry J.R. ;
Leavens G.T. ;
Leino K.R.M. ;
Poll E. .
International Journal on Software Tools for Technology Transfer, 2005, 7 (3) :212-232