Upload
shon-watson
View
212
Download
0
Embed Size (px)
Citation preview
ISECON 2006-Dallas 1
Representing and Generating Mutant Programs in Support of
Measuring Test Suite Effectiveness
Ronald Finkbine, Ph.D.Indiana University Southeast
New Albany, [email protected]
ISECON 2006-Dallas 2
Introduction Definitions Purpose Background Mutation Operators Sample Database Flow Summary
ISECON 2006-Dallas 3
Definitions Source program Test suite Mutation operator (s) Mutant Seed with a fault
ISECON 2006-Dallas 4
Purpose Inject common syntax changes Induce branch execution Measure ratio of mutants killed by test suite Between 0 and 1, higher is better Strength of test suite Examine equivalent mutants (better code?)
ISECON 2006-Dallas 5
Background Fortran, Mothra, (Ada) MuJava (JMutation) C, Proteum Java Objects, Sofya GAMUT – uses genetic algorithms Parasoft Insure++
ISECON 2006-Dallas 6
Mutation Operators Scalars – integer, floats, char data Increment, decrement, set constant Operators – math, logic, relational Collections – empty, remove, add, mutate
element, reorder
ISECON 2006-Dallas 7
Sample – Token Set
import java.io.*;class test {public static void main (String[] args) { System.out.println ("hello world"); } //main} //class test
Figure 1
…Token 1 1 1 importToken 2 1 8 javaToken 3 1 12 .Token 4 1 13 ioToken 5 1 15 .Token 6 1 16 *Token 7 1 17 ;…
Figure 2
ISECON 2006-Dallas 8
Token_Tbl and MutantOp_Tbl Number Column Line Value Spelling
Number TokenNumber MutOperator CompilesStatus
ISECON 2006-Dallas 9
MutantTokens_Tbl Number Column Line Value Spelling
ISECON 2006-Dallas 10
MutantExecution_Tbl Number PgmOrMutant RunTimeExpected TestCaseNumber TestCaseResult
ISECON 2006-Dallas 11
TestCase_Tbl Number ControlFileName InputFileName OutputFileName
ISECON 2006-Dallas 12
Database Flow
ISECON 2006-Dallas 13
Summary Definitions Purpose Background Mutation Operators Sample Database Flow