Prioritizing JUnit test cases: An empirical assessment and cost-benefits analysis

被引:50
作者
Do, H [1 ]
Rothermel, G [1 ]
Kinneer, A [1 ]
机构
[1] Univ Nebraska, Dept Comp Sci & Engn, Lincoln, NE 68588 USA
关键词
software maintenance; regression testing; testing object-oriented software; test case prioritization; empirical studies; cost-benefits analysis;
D O I
10.1007/s10664-006-5965-8
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test case prioritization provides a way to run test cases with the highest priority earliest. Numerous empirical studies have shown that prioritization can improve a test suite's rate of fault detection, but the extent to which these results generalize is an open question because the studies have all focused on a single procedural language, C, and a few specific types of test suites. In particular, Java and the JUnit testing framework are being used extensively to build software systems in practice, and the effectiveness of prioritization techniques on Java systems tested under JUnit has not been investigated. We have therefore designed and performed a controlled experiment examining whether test case prioritization can be effective on Java programs tested under JUnit, and comparing the results to those achieved in earlier studies. Our analyses show that test case prioritization can significantly improve the rate of fault detection of JUnit test suites, but also reveal differences with respect to previous studies that can be related to the language and testing paradigm. To investigate the practical implications of these results, we present a set of cost-benefits models for test case prioritization, and show how the effectiveness differences observed can result in savings in practice, but vary substantially with the cost factors associated with particular testing processes.
引用
收藏
页码:33 / 70
页数:38
相关论文
共 32 条
[1]   Is mutation an appropriate tool for testing experiments? [J].
Andrews, JH ;
Briand, LC ;
Labiche, Y .
ICSE 05: 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2005, :402-411
[2]  
[Anonymous], P 24 INT C SOFTW ENG
[3]  
[Anonymous], COMM ACM
[4]   Dividing strategies for the optimization of a test suite [J].
Chen, TY ;
Lau, MF .
INFORMATION PROCESSING LETTERS, 1996, 60 (03) :135-141
[5]  
CHEN YF, 1994, PROC INT CONF SOFTW, P211
[6]   Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact [J].
Do, HS ;
Elbaum, S ;
Rothermel, G .
EMPIRICAL SOFTWARE ENGINEERING, 2005, 10 (04) :405-435
[7]   Selecting a cost-effective test case prioritization technique [J].
Elbaum, S ;
Rothermel, G ;
Kanduri, S ;
Malishevsky, AG .
SOFTWARE QUALITY JOURNAL, 2004, 12 (03) :185-210
[8]   Understanding the effects of changes on the cost-effectiveness of regression testing techniques [J].
Elbaum, S ;
Kallakuri, P ;
Malishevsky, A ;
Rothermel, G ;
Kanduri, S .
SOFTWARE TESTING VERIFICATION & RELIABILITY, 2003, 13 (02) :65-83
[9]   Test case prioritization: A family of empirical studies [J].
Elbaum, S ;
Malishevsky, AG ;
Rothermel, G .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (02) :159-182
[10]   Incorporating varying test costs and fault severities into test case prioritization [J].
Elbaum, S ;
Malishevsky, A ;
Rothermel, G .
PROCEEDINGS OF THE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 2001, :329-338