SlideShare a Scribd company logo
1 of 39
Download to read offline
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Constraint-based Fitness Function
for Search-based Software Testing
Abdelilah Sakti Yann-Ga¨el Gu´eh´eneuc Gilles Pesant
Department of Computer and Software Engineering
´Ecole Polytechnique de Montr´eal, Qu´ebec, Canada
May 21, 2013
CPAIOR, Yorktown Heights
Pattern Trace Identification, Detection, and Enhancement in Java
SOftware Cost-effective Change and Evolution Research Lab
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
What is the cost of a programming error ?
2 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
What is the cost of a programming error ?
Every year inadequate infrastructure software costs the U.S.
economy around 60 billion $.
2 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
What is the cost of a programming error ?
Every year inadequate infrastructure software costs the U.S.
economy around 60 billion $.
Between 1985 and 1987 : the radiotherapy
machine Therac-25 sent to patients a X-ray dose
100 times greater than expected.
At least five deaths ;
Several other patients were severely affected
by radiation.
2 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
What is the cost of a programming error ?
Every year inadequate infrastructure software costs the U.S.
economy around 60 billion $.
Between 1985 and 1987 : the radiotherapy
machine Therac-25 sent to patients a X-ray dose
100 times greater than expected.
At least five deaths ;
Several other patients were severely affected
by radiation.
Only a high quality software can reduce errors cost.
Testing is an important technique for validating and
checking the correctness of software.
Despite that the testing may cost more than 50% of the
budget of critical software, it remains an inevitable
phase in the life cycle of software.
2 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Software testing
Formal Methods
Is a way of modelling and verifying a software by using
mathematics or logic techniques ;
Aims to prove and argue that a software respect some
properties (e.g., an undesired behaviour will never
occur).
Some complex programmes are difficult or impossible to
model.
3 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Software testing
Formal Methods
Is a way of modelling and verifying a software by using
mathematics or logic techniques ;
Aims to prove and argue that a software respect some
properties (e.g., an undesired behaviour will never
occur).
Some complex programmes are difficult or impossible to
model.
Informal or Pragmatic Techniques
Performed by executing a real implementation on a
small subset of all possible inputs data that satisfies
some criteria (e.g., all statements, all branches...) ;
Aims to show the presence of errors.
3 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Software testing
Formal Methods
Is a way of modelling and verifying a software by using
mathematics or logic techniques ;
Aims to prove and argue that a software respect some
properties (e.g., an undesired behaviour will never
occur).
Some complex programmes are difficult or impossible to
model.
Informal or Pragmatic Techniques
Performed by executing a real implementation on a
small subset of all possible inputs data that satisfies
some criteria (e.g., all statements, all branches...) ;
Aims to show the presence of errors.
One main challenge is automating inputs data generation.
3 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Search Based Software Testing (SBST)
4 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Search Based Software Testing (SBST)
Fitness Evaluation
The Fitness Evaluation is the core of SBST.
4 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
What is the cost of a
programming error ?
Software testing
Search Based Software
Testing (SBST)
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Search Based Software Testing (SBST)
Fitness Evaluation
The Fitness Evaluation is the core of SBST.
An evolution in the fitness evaluation may bring a significant
enhancement to SBST
4 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i2 : (30, −20, −20)
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyy == z
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
Test candidate fAL fSE
i1 3
i2
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyy == z
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
Test candidate fAL fSE
i1 3+90
91
i2
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyy == z
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
Test candidate fAL fSE
i1 3+90
91
90
91
i2
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyy > 0
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
Test candidate fAL fSE
i1 3+90
91
90
91 +31
32
i2
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx == 10
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
Test candidate fAL fSE
i1 3+90
91
90
91 +31
32 +0
i2
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
i2
Test candidate fAL fSE
i1 3+90
91 = 3.9890 90
91 +31
32 +0= 1.9577
i2 2 + 21
22 =2.9545 0 + 21
22 + 20
21 =1.9068
5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Motivating Example
1 int sample(int x,int y,int z){
2 if(y==z)
3 if(y>0)
4 if(x==10)
5 ...//Target
6 }
tinyx, y, z
tinyy == z
tinyEND
tinyy > 0
tinyx == 10
tinyTarget
i1 : (10,−30,60)
i1
Critical Branch of i1
i2 : (30, −20, −20)
i2
Test candidate fAL fSE
i1 3+90
91 = 3.9890 90
91 +31
32 +0= 1.9577
i2 2 + 21
22 =2.9545 0 + 21
22 + 20
21 =1.9068
Both fitness functions favour i2 over i1 because either they
do not consider non-executed branches or they ignore some
branches’ future.5 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Fitness Function Based on Branch Hardness
Combines SBST with static analysis of the
non-executed branches.
Prioritizes branches according to how hard it is to
satisfy them.
6 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Fitness Function Based on Branch Hardness
Combines SBST with static analysis of the
non-executed branches.
Prioritizes branches according to how hard it is to
satisfy them.
Defines the difficulty to satisfy a constraint in terms of
its arity and its projection tightness (the ratio of the
approximate number of solutions to the size of its
search space).
6 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Fitness Function Based on Branch Hardness
Combines SBST with static analysis of the
non-executed branches.
Prioritizes branches according to how hard it is to
satisfy them.
Defines the difficulty to satisfy a constraint in terms of
its arity and its projection tightness (the ratio of the
approximate number of solutions to the size of its
search space).
1. The lower the arity of the constraint, the less freedom
we have to choose some of its variables in order to
evolve the test candidate.
6 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Fitness Function Based on Branch Hardness
Combines SBST with static analysis of the
non-executed branches.
Prioritizes branches according to how hard it is to
satisfy them.
Defines the difficulty to satisfy a constraint in terms of
its arity and its projection tightness (the ratio of the
approximate number of solutions to the size of its
search space).
1. The lower the arity of the constraint, the less freedom
we have to choose some of its variables in order to
evolve the test candidate.
2. A projection tightness close to 0 will indicate high
constrainedness and hardness to satisfy a constraint.
6 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Branch-Hardness Metrics
Difficulty Coefficient (DC)
DC is a possible representation of the hardness of a
branch ;
Each constraint has its own DC that is determined
according to its arity and tightness ;
DC(c) = B2 · 1
arityc
+ B · (1 − tightness) + 1 .
7 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Branch-Hardness Metrics
Difficulty Coefficient (DC)
DC is a possible representation of the hardness of a
branch ;
Each constraint has its own DC that is determined
according to its arity and tightness ;
DC(c) = B2 · 1
arityc
+ B · (1 − tightness) + 1 .
Difficulty Level (DL)
DL is based on DC ranking (r) ;
DL is a representation of a relative hardness level of a
constraint in a set of constraints ;
DL(c, C) =
|C|, if r = 0
2r−1 · (|C| + 1), if r > 0
.
7 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Branch-Hardness Fitness Functions
DC Fitness Function (fDC)
DC is used as a penalty coefficient for breaking a
constraint ;
The target of this fitness function is determining a
standard-branch-distance.
fDC(i, C) = c∈C DC(c) · η(i, c) .
8 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Branch-Hardness Fitness Functions
DC Fitness Function (fDC)
DC is used as a penalty coefficient for breaking a
constraint ;
The target of this fitness function is determining a
standard-branch-distance.
fDC(i, C) = c∈C DC(c) · η(i, c) .
DL Fitness Function (fDL)
DL is used as a constant penalty for breaking a
constraint in a set of constraints to satisfy ;
fDL(i, C) = c∈C (i, c) + η(i, c),
where (i, c) =
0, if η(i, c) = 0
DL(c, C), if η(i, c) = 0
.
8 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Applying fDC on our motivating example
Assume that all domains are equal to [−99, 100].
DC for each branch
1. DC(”y == z”) = 102 · 0.5 + 10 · 0.995 + 1 = 60.95 ;
2. DC(”y > 0”) = 102 · 1 + 10 · 0.5 + 1 = 106 ;
3. DC(”x == 10”) = 102 · 1 + 10 · 0.995 + 1 = 110.95.
9 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Overview
Branch-Hardness Metrics
Branch-Hardness Fitness
Functions
Applying fDC on our
motivating example
Evaluation
Conclusions
Applying fDC on our motivating example
Assume that all domains are equal to [−99, 100].
DC for each branch
1. DC(”y == z”) = 102 · 0.5 + 10 · 0.995 + 1 = 60.95 ;
2. DC(”y > 0”) = 102 · 1 + 10 · 0.5 + 1 = 106 ;
3. DC(”x == 10”) = 102 · 1 + 10 · 0.995 + 1 = 110.95.
(fDC) for each test candidate
fDC(i1, C) = 60.95· 90
91 +106· 31
32 +110.95· 0
1 = 162.9677 ;
fDC(i2, C) = 60.95· 0
1 +106· 21
22 +110.95· 20
21 = 206.8485.
Contrary to fAL and fSE this fitness function makes the
adequate choice by choosing the test candidate i1 instead of
i2.
9 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Subjects and configuration
EA Results
SA Results
Conclusions
Evaluation
Subjects and configuration
analysed meta-heuristics and fitness functions
Two widely used meta-heuristic algorithms are
analysed : Simulated Annealing (SA) and Evolutionary
Algorithm (EA).
fAL and fSE from the literature ;
fSEL a natural combination of fAL and fSE ;
Our fitness functions fDC and fDL.
10 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Subjects and configuration
EA Results
SA Results
Conclusions
Evaluation
Subjects and configuration
analysed meta-heuristics and fitness functions
Two widely used meta-heuristic algorithms are
analysed : Simulated Annealing (SA) and Evolutionary
Algorithm (EA).
fAL and fSE from the literature ;
fSEL a natural combination of fAL and fSE ;
Our fitness functions fDC and fDL.
Subjects
440 synthetic test targets that were randomly generated.
20 executions for every combination of fitness function
and meta-heuristic algorithm.
If test data was not found after 25000 (respectively
100000) fitness evaluations for EA (respectively SA),
the search was terminated.
10 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Subjects and configuration
EA Results
SA Results
Conclusions
Evaluation
EA Results
0 5000 10000 15000 20000 25000
0
20
40
60
80
EA: Comparing all fitnesses on 440 test targets
Evaluations
Approach Level
Symbolic Enhanced
Symbolic Enhanced with levels
Difficulty Coefficient
Difficulty Level
11 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Subjects and configuration
EA Results
SA Results
Conclusions
Evaluation
SA Results
0e+00 2e+04 4e+04 6e+04 8e+04 1e+05
0
20
40
60
80
SA: Comparing all fitnesses on 440 test targets
Evaluations
BranchCoverage% Approach Level
Symbolic Enhanced
Symbolic Enhanced with levels
Difficulty Coefficient
Difficulty Level
12 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Conclusions
Two new metrics to measure the difficulty to satisfy a
constraint in the context of test case generation for
software testing are defined ;
Two new fitness functions for SBST are defined ;
Our new fitness functions are significantly more effective
and efficient than with the largely used fitness functions
from the literature.
The obtained results are promising but more
experiments must be performed.
13 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Conclusions
Two new metrics to measure the difficulty to satisfy a
constraint in the context of test case generation for
software testing are defined ;
Two new fitness functions for SBST are defined ;
Our new fitness functions are significantly more effective
and efficient than with the largely used fitness functions
from the literature.
The obtained results are promising but more
experiments must be performed.
Future work
Performing more experiments on real world programs ;
Extending our approach by defining new ways to
compute projection tightness for constraints involving
other data types than integer.
13 / 14
Constraint-based
Fitness Function
for Search-based
Software Testing
Abdelilah Sakti,
Yann-Ga¨el
Gu´eh´eneuc, Gilles
Pesant
Introduction
Motivating
Example
Fitness Function
Based on Branch
Hardness
Evaluation
Conclusions
Thank you
Questions ?
14 / 14

More Related Content

What's hot

Effectiveness of test case
Effectiveness of test caseEffectiveness of test case
Effectiveness of test caseijseajournal
 
Testing and test case generation by using fuzzy logic and n
Testing and test case generation by using fuzzy logic and nTesting and test case generation by using fuzzy logic and n
Testing and test case generation by using fuzzy logic and nIAEME Publication
 
IRJET - Neural Network based Leaf Disease Detection and Remedy Recommenda...
IRJET -  	  Neural Network based Leaf Disease Detection and Remedy Recommenda...IRJET -  	  Neural Network based Leaf Disease Detection and Remedy Recommenda...
IRJET - Neural Network based Leaf Disease Detection and Remedy Recommenda...IRJET Journal
 
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...CS, NcState
 
Integrating goals after prioritization and
Integrating goals after prioritization andIntegrating goals after prioritization and
Integrating goals after prioritization andijseajournal
 
Chapter 4 - Performance Testing Tasks
Chapter 4 - Performance Testing TasksChapter 4 - Performance Testing Tasks
Chapter 4 - Performance Testing TasksNeeraj Kumar Singh
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mockingZeeshan Khan
 
Multi objective genetic algorithm for regression
Multi objective genetic algorithm for regressionMulti objective genetic algorithm for regression
Multi objective genetic algorithm for regressioneSAT Publishing House
 
Multi objective genetic algorithm for regression testing reduction
Multi objective genetic algorithm for regression testing reduction Multi objective genetic algorithm for regression testing reduction
Multi objective genetic algorithm for regression testing reduction eSAT Journals
 
AI-Driven Software Quality Assurance in the Age of DevOps
AI-Driven Software Quality Assurance in the Age of DevOpsAI-Driven Software Quality Assurance in the Age of DevOps
AI-Driven Software Quality Assurance in the Age of DevOpsChakkrit (Kla) Tantithamthavorn
 
Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Journal Papers
 
Automated exam question set generator using utility based agent and learning ...
Automated exam question set generator using utility based agent and learning ...Automated exam question set generator using utility based agent and learning ...
Automated exam question set generator using utility based agent and learning ...Journal Papers
 
Benchmarking machine learning techniques
Benchmarking machine learning techniquesBenchmarking machine learning techniques
Benchmarking machine learning techniquesijseajournal
 
Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...eSAT Publishing House
 
Software Testing Outline Performances and Measurements
Software Testing Outline Performances and MeasurementsSoftware Testing Outline Performances and Measurements
Software Testing Outline Performances and Measurementsijtsrd
 
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature Survey
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature SurveyPareto-Optimal Search-Based Software Engineering (POSBSE): A Literature Survey
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature SurveyAbdel Salam Sayyad
 

What's hot (19)

Effectiveness of test case
Effectiveness of test caseEffectiveness of test case
Effectiveness of test case
 
Testing and test case generation by using fuzzy logic and n
Testing and test case generation by using fuzzy logic and nTesting and test case generation by using fuzzy logic and n
Testing and test case generation by using fuzzy logic and n
 
Dc35579583
Dc35579583Dc35579583
Dc35579583
 
IRJET - Neural Network based Leaf Disease Detection and Remedy Recommenda...
IRJET -  	  Neural Network based Leaf Disease Detection and Remedy Recommenda...IRJET -  	  Neural Network based Leaf Disease Detection and Remedy Recommenda...
IRJET - Neural Network based Leaf Disease Detection and Remedy Recommenda...
 
20 54-1-pb
20 54-1-pb20 54-1-pb
20 54-1-pb
 
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
 
Integrating goals after prioritization and
Integrating goals after prioritization andIntegrating goals after prioritization and
Integrating goals after prioritization and
 
Chapter 4 - Performance Testing Tasks
Chapter 4 - Performance Testing TasksChapter 4 - Performance Testing Tasks
Chapter 4 - Performance Testing Tasks
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mocking
 
Multi objective genetic algorithm for regression
Multi objective genetic algorithm for regressionMulti objective genetic algorithm for regression
Multi objective genetic algorithm for regression
 
Multi objective genetic algorithm for regression testing reduction
Multi objective genetic algorithm for regression testing reduction Multi objective genetic algorithm for regression testing reduction
Multi objective genetic algorithm for regression testing reduction
 
AI-Driven Software Quality Assurance in the Age of DevOps
AI-Driven Software Quality Assurance in the Age of DevOpsAI-Driven Software Quality Assurance in the Age of DevOps
AI-Driven Software Quality Assurance in the Age of DevOps
 
Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...Towards formulating dynamic model for predicting defects in system testing us...
Towards formulating dynamic model for predicting defects in system testing us...
 
Automated exam question set generator using utility based agent and learning ...
Automated exam question set generator using utility based agent and learning ...Automated exam question set generator using utility based agent and learning ...
Automated exam question set generator using utility based agent and learning ...
 
Benchmarking machine learning techniques
Benchmarking machine learning techniquesBenchmarking machine learning techniques
Benchmarking machine learning techniques
 
Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...Software testing effort estimation with cobb douglas function a practical app...
Software testing effort estimation with cobb douglas function a practical app...
 
Software Testing Outline Performances and Measurements
Software Testing Outline Performances and MeasurementsSoftware Testing Outline Performances and Measurements
Software Testing Outline Performances and Measurements
 
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature Survey
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature SurveyPareto-Optimal Search-Based Software Engineering (POSBSE): A Literature Survey
Pareto-Optimal Search-Based Software Engineering (POSBSE): A Literature Survey
 
@#$@#$@#$"""@#$@#$"""
@#$@#$@#$"""@#$@#$"""@#$@#$@#$"""@#$@#$"""
@#$@#$@#$"""@#$@#$"""
 

Similar to Cpaior13.ppt

Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software TestingBeat Fluri
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2Yudep Apoi
 
Development of software defect prediction system using artificial neural network
Development of software defect prediction system using artificial neural networkDevelopment of software defect prediction system using artificial neural network
Development of software defect prediction system using artificial neural networkIJAAS Team
 
Generation of Search Based Test Data on Acceptability Testing Principle
Generation of Search Based Test Data on Acceptability Testing PrincipleGeneration of Search Based Test Data on Acceptability Testing Principle
Generation of Search Based Test Data on Acceptability Testing Principleiosrjce
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptVijayaPratapReddyM
 
Thesis+of+abdelilah+sakti.ppt
Thesis+of+abdelilah+sakti.pptThesis+of+abdelilah+sakti.ppt
Thesis+of+abdelilah+sakti.pptPtidej Team
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)KMS Technology
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSrikanth Krishnamoorthy
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingRachel Davis
 
Unit Testing Essay
Unit Testing EssayUnit Testing Essay
Unit Testing EssayDani Cox
 
But Did You Test It
But Did You Test ItBut Did You Test It
But Did You Test ItRuth Blakely
 
A Complexity Based Regression Test Selection Strategy
A Complexity Based Regression Test Selection StrategyA Complexity Based Regression Test Selection Strategy
A Complexity Based Regression Test Selection StrategyCSEIJJournal
 
Fundamental Test Process - APRIDILA ANGGITA SURI
Fundamental Test Process - APRIDILA ANGGITA SURIFundamental Test Process - APRIDILA ANGGITA SURI
Fundamental Test Process - APRIDILA ANGGITA SURIApridila Anggita Suri
 

Similar to Cpaior13.ppt (20)

Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software Testing
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2
 
Development of software defect prediction system using artificial neural network
Development of software defect prediction system using artificial neural networkDevelopment of software defect prediction system using artificial neural network
Development of software defect prediction system using artificial neural network
 
Software testing
Software testingSoftware testing
Software testing
 
Generation of Search Based Test Data on Acceptability Testing Principle
Generation of Search Based Test Data on Acceptability Testing PrincipleGeneration of Search Based Test Data on Acceptability Testing Principle
Generation of Search Based Test Data on Acceptability Testing Principle
 
D017642026
D017642026D017642026
D017642026
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.ppt
 
Thesis+of+abdelilah+sakti.ppt
Thesis+of+abdelilah+sakti.pptThesis+of+abdelilah+sakti.ppt
Thesis+of+abdelilah+sakti.ppt
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)
 
Ssbse12a.ppt
Ssbse12a.pptSsbse12a.ppt
Ssbse12a.ppt
 
50120140501001
5012014050100150120140501001
50120140501001
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By Srikanth
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application Testing
 
Unit Testing Essay
Unit Testing EssayUnit Testing Essay
Unit Testing Essay
 
But Did You Test It
But Did You Test ItBut Did You Test It
But Did You Test It
 
Software Testing - SDLC Model
Software Testing - SDLC ModelSoftware Testing - SDLC Model
Software Testing - SDLC Model
 
A Complexity Based Regression Test Selection Strategy
A Complexity Based Regression Test Selection StrategyA Complexity Based Regression Test Selection Strategy
A Complexity Based Regression Test Selection Strategy
 
Fundamental Test Process - APRIDILA ANGGITA SURI
Fundamental Test Process - APRIDILA ANGGITA SURIFundamental Test Process - APRIDILA ANGGITA SURI
Fundamental Test Process - APRIDILA ANGGITA SURI
 

More from Yann-Gaël Guéhéneuc

Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Yann-Gaël Guéhéneuc
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Yann-Gaël Guéhéneuc
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Yann-Gaël Guéhéneuc
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Yann-Gaël Guéhéneuc
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Yann-Gaël Guéhéneuc
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...Yann-Gaël Guéhéneuc
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesYann-Gaël Guéhéneuc
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Yann-Gaël Guéhéneuc
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1Yann-Gaël Guéhéneuc
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6Yann-Gaël Guéhéneuc
 

More from Yann-Gaël Guéhéneuc (20)

Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its Consequences
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
 
Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
 
ICSOC'21
ICSOC'21ICSOC'21
ICSOC'21
 
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
 
Msr20.ppt
Msr20.pptMsr20.ppt
Msr20.ppt
 
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Iwesep19.ppt
 
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt
Icsoc20.ppt
 
Icsoc18.ppt
Icsoc18.pptIcsoc18.ppt
Icsoc18.ppt
 

Recently uploaded

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Recently uploaded (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Cpaior13.ppt

  • 1. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti Yann-Ga¨el Gu´eh´eneuc Gilles Pesant Department of Computer and Software Engineering ´Ecole Polytechnique de Montr´eal, Qu´ebec, Canada May 21, 2013 CPAIOR, Yorktown Heights Pattern Trace Identification, Detection, and Enhancement in Java SOftware Cost-effective Change and Evolution Research Lab
  • 2. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions What is the cost of a programming error ? 2 / 14
  • 3. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions What is the cost of a programming error ? Every year inadequate infrastructure software costs the U.S. economy around 60 billion $. 2 / 14
  • 4. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions What is the cost of a programming error ? Every year inadequate infrastructure software costs the U.S. economy around 60 billion $. Between 1985 and 1987 : the radiotherapy machine Therac-25 sent to patients a X-ray dose 100 times greater than expected. At least five deaths ; Several other patients were severely affected by radiation. 2 / 14
  • 5. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions What is the cost of a programming error ? Every year inadequate infrastructure software costs the U.S. economy around 60 billion $. Between 1985 and 1987 : the radiotherapy machine Therac-25 sent to patients a X-ray dose 100 times greater than expected. At least five deaths ; Several other patients were severely affected by radiation. Only a high quality software can reduce errors cost. Testing is an important technique for validating and checking the correctness of software. Despite that the testing may cost more than 50% of the budget of critical software, it remains an inevitable phase in the life cycle of software. 2 / 14
  • 6. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Software testing Formal Methods Is a way of modelling and verifying a software by using mathematics or logic techniques ; Aims to prove and argue that a software respect some properties (e.g., an undesired behaviour will never occur). Some complex programmes are difficult or impossible to model. 3 / 14
  • 7. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Software testing Formal Methods Is a way of modelling and verifying a software by using mathematics or logic techniques ; Aims to prove and argue that a software respect some properties (e.g., an undesired behaviour will never occur). Some complex programmes are difficult or impossible to model. Informal or Pragmatic Techniques Performed by executing a real implementation on a small subset of all possible inputs data that satisfies some criteria (e.g., all statements, all branches...) ; Aims to show the presence of errors. 3 / 14
  • 8. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Software testing Formal Methods Is a way of modelling and verifying a software by using mathematics or logic techniques ; Aims to prove and argue that a software respect some properties (e.g., an undesired behaviour will never occur). Some complex programmes are difficult or impossible to model. Informal or Pragmatic Techniques Performed by executing a real implementation on a small subset of all possible inputs data that satisfies some criteria (e.g., all statements, all branches...) ; Aims to show the presence of errors. One main challenge is automating inputs data generation. 3 / 14
  • 9. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Search Based Software Testing (SBST) 4 / 14
  • 10. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Search Based Software Testing (SBST) Fitness Evaluation The Fitness Evaluation is the core of SBST. 4 / 14
  • 11. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction What is the cost of a programming error ? Software testing Search Based Software Testing (SBST) Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Search Based Software Testing (SBST) Fitness Evaluation The Fitness Evaluation is the core of SBST. An evolution in the fitness evaluation may bring a significant enhancement to SBST 4 / 14
  • 12. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } 5 / 14
  • 13. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget 5 / 14
  • 14. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i2 : (30, −20, −20) 5 / 14
  • 15. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) 5 / 14
  • 16. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyy == z tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) Test candidate fAL fSE i1 3 i2 5 / 14
  • 17. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyy == z tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) Test candidate fAL fSE i1 3+90 91 i2 5 / 14
  • 18. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyy == z tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) Test candidate fAL fSE i1 3+90 91 90 91 i2 5 / 14
  • 19. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyy > 0 tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) Test candidate fAL fSE i1 3+90 91 90 91 +31 32 i2 5 / 14
  • 20. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx == 10 tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) Test candidate fAL fSE i1 3+90 91 90 91 +31 32 +0 i2 5 / 14
  • 21. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) i2 Test candidate fAL fSE i1 3+90 91 = 3.9890 90 91 +31 32 +0= 1.9577 i2 2 + 21 22 =2.9545 0 + 21 22 + 20 21 =1.9068 5 / 14
  • 22. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Motivating Example 1 int sample(int x,int y,int z){ 2 if(y==z) 3 if(y>0) 4 if(x==10) 5 ...//Target 6 } tinyx, y, z tinyy == z tinyEND tinyy > 0 tinyx == 10 tinyTarget i1 : (10,−30,60) i1 Critical Branch of i1 i2 : (30, −20, −20) i2 Test candidate fAL fSE i1 3+90 91 = 3.9890 90 91 +31 32 +0= 1.9577 i2 2 + 21 22 =2.9545 0 + 21 22 + 20 21 =1.9068 Both fitness functions favour i2 over i1 because either they do not consider non-executed branches or they ignore some branches’ future.5 / 14
  • 23. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Fitness Function Based on Branch Hardness Combines SBST with static analysis of the non-executed branches. Prioritizes branches according to how hard it is to satisfy them. 6 / 14
  • 24. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Fitness Function Based on Branch Hardness Combines SBST with static analysis of the non-executed branches. Prioritizes branches according to how hard it is to satisfy them. Defines the difficulty to satisfy a constraint in terms of its arity and its projection tightness (the ratio of the approximate number of solutions to the size of its search space). 6 / 14
  • 25. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Fitness Function Based on Branch Hardness Combines SBST with static analysis of the non-executed branches. Prioritizes branches according to how hard it is to satisfy them. Defines the difficulty to satisfy a constraint in terms of its arity and its projection tightness (the ratio of the approximate number of solutions to the size of its search space). 1. The lower the arity of the constraint, the less freedom we have to choose some of its variables in order to evolve the test candidate. 6 / 14
  • 26. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Fitness Function Based on Branch Hardness Combines SBST with static analysis of the non-executed branches. Prioritizes branches according to how hard it is to satisfy them. Defines the difficulty to satisfy a constraint in terms of its arity and its projection tightness (the ratio of the approximate number of solutions to the size of its search space). 1. The lower the arity of the constraint, the less freedom we have to choose some of its variables in order to evolve the test candidate. 2. A projection tightness close to 0 will indicate high constrainedness and hardness to satisfy a constraint. 6 / 14
  • 27. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Branch-Hardness Metrics Difficulty Coefficient (DC) DC is a possible representation of the hardness of a branch ; Each constraint has its own DC that is determined according to its arity and tightness ; DC(c) = B2 · 1 arityc + B · (1 − tightness) + 1 . 7 / 14
  • 28. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Branch-Hardness Metrics Difficulty Coefficient (DC) DC is a possible representation of the hardness of a branch ; Each constraint has its own DC that is determined according to its arity and tightness ; DC(c) = B2 · 1 arityc + B · (1 − tightness) + 1 . Difficulty Level (DL) DL is based on DC ranking (r) ; DL is a representation of a relative hardness level of a constraint in a set of constraints ; DL(c, C) = |C|, if r = 0 2r−1 · (|C| + 1), if r > 0 . 7 / 14
  • 29. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Branch-Hardness Fitness Functions DC Fitness Function (fDC) DC is used as a penalty coefficient for breaking a constraint ; The target of this fitness function is determining a standard-branch-distance. fDC(i, C) = c∈C DC(c) · η(i, c) . 8 / 14
  • 30. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Branch-Hardness Fitness Functions DC Fitness Function (fDC) DC is used as a penalty coefficient for breaking a constraint ; The target of this fitness function is determining a standard-branch-distance. fDC(i, C) = c∈C DC(c) · η(i, c) . DL Fitness Function (fDL) DL is used as a constant penalty for breaking a constraint in a set of constraints to satisfy ; fDL(i, C) = c∈C (i, c) + η(i, c), where (i, c) = 0, if η(i, c) = 0 DL(c, C), if η(i, c) = 0 . 8 / 14
  • 31. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Applying fDC on our motivating example Assume that all domains are equal to [−99, 100]. DC for each branch 1. DC(”y == z”) = 102 · 0.5 + 10 · 0.995 + 1 = 60.95 ; 2. DC(”y > 0”) = 102 · 1 + 10 · 0.5 + 1 = 106 ; 3. DC(”x == 10”) = 102 · 1 + 10 · 0.995 + 1 = 110.95. 9 / 14
  • 32. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Overview Branch-Hardness Metrics Branch-Hardness Fitness Functions Applying fDC on our motivating example Evaluation Conclusions Applying fDC on our motivating example Assume that all domains are equal to [−99, 100]. DC for each branch 1. DC(”y == z”) = 102 · 0.5 + 10 · 0.995 + 1 = 60.95 ; 2. DC(”y > 0”) = 102 · 1 + 10 · 0.5 + 1 = 106 ; 3. DC(”x == 10”) = 102 · 1 + 10 · 0.995 + 1 = 110.95. (fDC) for each test candidate fDC(i1, C) = 60.95· 90 91 +106· 31 32 +110.95· 0 1 = 162.9677 ; fDC(i2, C) = 60.95· 0 1 +106· 21 22 +110.95· 20 21 = 206.8485. Contrary to fAL and fSE this fitness function makes the adequate choice by choosing the test candidate i1 instead of i2. 9 / 14
  • 33. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Subjects and configuration EA Results SA Results Conclusions Evaluation Subjects and configuration analysed meta-heuristics and fitness functions Two widely used meta-heuristic algorithms are analysed : Simulated Annealing (SA) and Evolutionary Algorithm (EA). fAL and fSE from the literature ; fSEL a natural combination of fAL and fSE ; Our fitness functions fDC and fDL. 10 / 14
  • 34. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Subjects and configuration EA Results SA Results Conclusions Evaluation Subjects and configuration analysed meta-heuristics and fitness functions Two widely used meta-heuristic algorithms are analysed : Simulated Annealing (SA) and Evolutionary Algorithm (EA). fAL and fSE from the literature ; fSEL a natural combination of fAL and fSE ; Our fitness functions fDC and fDL. Subjects 440 synthetic test targets that were randomly generated. 20 executions for every combination of fitness function and meta-heuristic algorithm. If test data was not found after 25000 (respectively 100000) fitness evaluations for EA (respectively SA), the search was terminated. 10 / 14
  • 35. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Subjects and configuration EA Results SA Results Conclusions Evaluation EA Results 0 5000 10000 15000 20000 25000 0 20 40 60 80 EA: Comparing all fitnesses on 440 test targets Evaluations Approach Level Symbolic Enhanced Symbolic Enhanced with levels Difficulty Coefficient Difficulty Level 11 / 14
  • 36. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Subjects and configuration EA Results SA Results Conclusions Evaluation SA Results 0e+00 2e+04 4e+04 6e+04 8e+04 1e+05 0 20 40 60 80 SA: Comparing all fitnesses on 440 test targets Evaluations BranchCoverage% Approach Level Symbolic Enhanced Symbolic Enhanced with levels Difficulty Coefficient Difficulty Level 12 / 14
  • 37. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Conclusions Two new metrics to measure the difficulty to satisfy a constraint in the context of test case generation for software testing are defined ; Two new fitness functions for SBST are defined ; Our new fitness functions are significantly more effective and efficient than with the largely used fitness functions from the literature. The obtained results are promising but more experiments must be performed. 13 / 14
  • 38. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Conclusions Two new metrics to measure the difficulty to satisfy a constraint in the context of test case generation for software testing are defined ; Two new fitness functions for SBST are defined ; Our new fitness functions are significantly more effective and efficient than with the largely used fitness functions from the literature. The obtained results are promising but more experiments must be performed. Future work Performing more experiments on real world programs ; Extending our approach by defining new ways to compute projection tightness for constraints involving other data types than integer. 13 / 14
  • 39. Constraint-based Fitness Function for Search-based Software Testing Abdelilah Sakti, Yann-Ga¨el Gu´eh´eneuc, Gilles Pesant Introduction Motivating Example Fitness Function Based on Branch Hardness Evaluation Conclusions Thank you Questions ? 14 / 14