SlideShare a Scribd company logo
White-Box Software Testing
using Evolutionary Algorithms
         Yaser Sulaiman




                                1
Time for a break!




                    2
Pex




      3
White-box testing




                    4
photo by Simon Goldenberg   5
Test adequacy criteria




                         6
Statement       Branch
   Weakest




   Strongest




  Path         Condition

                           8
Coming up with test cases/data isn’t
       as easy as it sounds



                                 9
photo by racheocity   10
Cover as much as you can!




                            11
photo by [ d i e g o ]   12
Looks like an optimization
    problem.. sort of



                             13
So how about automating it?




                              14
Evolutionary algorithms




                          15
photo by ][/][   16
Genetic
 Algorithms
    (GA)




Evolutionary
 Algorithms




   Genetic
Programming
    (GP)


               17
GA




     18
Fitness
Selection
                 Function

       Chromosomes


Mutation        Crossover

                            19
GP




     20
Specialization of GA




                       21
Where individuals represent
  computer programs



                              22
GP evolves programs!




                       23
stolen from Wikipedia   24
Mathematically speaking




                          25
Given a set of inputs  and outputs
  , a program  is sought which
              satisfies

              = ()

                                  26
Fitness of a candidate program?




                              27
Expected output

                vs.

 = ()     Actual output

                                  28
2
  =            − 
          =1

  where  ∈  and  ∈ 



                                              29
Moving on to the surveyed papers




                              30
Brendt*   Tonella                Wappler*   Ahmed*
 2002      2004                   2006       2008




                    *   et al.                       31
Brendt*   Tonella                Wappler*   Ahmed*
 2002      2004                   2006       2008




                    *   et al.                       32
“Breeding software test cases with
       genetic algorithms”



                                33
“Breeding software test cases with
       genetic algorithms”



                                34
Fossil record




                35
Relative fitness function




                            36
Berndt et al. (2002)   37
3 factors affect the fitness function




                                   38
1. Novelty

measure of uniqueness



                        39
2. Proximity

measure of closeness



                       40
3. Severity

measure of seriousness



                         41
“simple rules, complex behavior”




                               42
Explorers, prospectors, and miners




                               43
Brendt*   Tonella                Wappler*   Ahmed*
 2002      2004                   2006       2008




                    *   et al.                       44
“Evolutionary testing of classes”




                                45
“Evolutionary testing of classes”




                                46
Object-oriented testing




                          47
Class Under Test (CUT)
           &
Method Under Test (MUT)



                          48
Sequence of object constructions &
          method calls



                                49
Tonella (2004) focuses on
representation and operators



                               50
A chromosome isn’t just a sequence
     of input values anymore



                               51
$a=A():$b=B():$a.m(int, $b) @ 3




                             52
Brendt*   Tonella                Wappler*   Ahmed*
 2002      2004                   2006       2008




                    *   et al.                       53
“Evolutionary unit testing of object-
 oriented software using strongly-
   typed genetic programming”



                                  54
“Evolutionary unit testing of object-
 oriented software using strongly-
   typed genetic programming”



                                  55
GP that is type-aware




                        56
Wappler & Wegener (2006) focus
  on call sequence feasibility



                            57
Wappler & Wegener (2006)   58
Method Call Dependence Graph
          (MCDG)



                           59
Wappler & Wegener (2006)   60
A sequence is feasible if it
corresponds to an acyclic subgraph
           of the MCDG



                                61
Wappler & Wegener (2006)   62
Brendt*   Tonella                Wappler*   Ahmed*
 2002      2004                   2006       2008




                    *   et al.                       63
“GA-based multiple paths test data
          generator”



                                64
“GA-based multiple paths test data
          generator”



                                65
Ahmed & Hermadi (2008) focus on
the efficiency of test data generation



                                   66
Generating multiple test data to
cover multiple target paths in one
             GA run



                                67
Requires incorporating the paths
 within the fitness calculation



                               68
// TODO: Redigest the paper.




                          69
Let’s compare the surveyed papers




                               70
Evolutionary        Object-   Coverage
  Paper
                  Algorithm         Oriented   Criterion

Berndt et al.
                       GA                       Branch
  (2002)
  Tonella
                       GA                       Branch
  (2004)
Wappler &
Wegener         Strongly-Typed GP               Branch
 (2006)
 Ahmed &
 Hermadi               GA                        Path
  (2008)


                                                           71
A direction for future work




                              72
The reverse direction




                        73
Evolutionary
Program                  Test Cases
           Algorithm




                                      74
Evolutionary
Program                  Test Cases
           Algorithm




                                      75
Writing test cases first?




                            76
It’s called TDD




                  77
photo by nyuhuhuu   78
photo by Magic Madzik   79
TDD + GP isn’t a new idea




                            80
81
Take-home messages




                     82
Generating test cases can be
       challenging



                               83
Testing object-oriented software
 provides even more challenges



                               84
Evolutionary algorithms can be
 used to solve [some of] these
           problems



                                 85
Even software developers turn to
 Mother Nature for inspiration



                               86
…</presentation>
  <questions>…



                   88

More Related Content

PDF
Numerical Solutions to Ordinary Differential Equations in Scilab
PDF
IWLCS'2007: Substructural Surrogates for Learning Decomposable Classification...
PDF
Analyzing the impact of genetic parameters on gene grouping genetic algorithm...
PDF
Substructrual surrogates for learning decomposable classification problems: i...
PDF
Modeling XCS in class imbalances: Population sizing and parameter settings
PDF
CCC-Bicluster Analysis for Time Series Gene Expression Data
PPTX
MTP_10MT61R20_Rajesh_Jha
PDF
Requirements Based Testing
Numerical Solutions to Ordinary Differential Equations in Scilab
IWLCS'2007: Substructural Surrogates for Learning Decomposable Classification...
Analyzing the impact of genetic parameters on gene grouping genetic algorithm...
Substructrual surrogates for learning decomposable classification problems: i...
Modeling XCS in class imbalances: Population sizing and parameter settings
CCC-Bicluster Analysis for Time Series Gene Expression Data
MTP_10MT61R20_Rajesh_Jha
Requirements Based Testing

Similar to White-Box Software Testing using Evolutionary Algorithms (20)

PDF
Automated Testing and Safety Analysis of Deep Neural Networks
PDF
MVTec AD: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection
PDF
Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-G...
PPTX
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
PPTX
History Class - For software testers
PDF
ICSE10b.ppt
PDF
MexADL
PDF
Optimizing Requirements Decisions with KEYS
PPT
Black box-software-testing-douglas-hoffman2483
PDF
Nanometer Testing: Challenges and Solutions
PDF
Abraham q3 2008
PDF
PDF
Transcription Factor DNA Binding Prediction
ODP
Формальная верификация как средство тестирования (в Java)
PPTX
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PDF
How we Built a Large Scale Matched Pair Analysis Engine (MCPairs) using OpenE...
PDF
Can we induce change with what we measure?
PPTX
Improved Query Reformulation for Concept Location using CodeRank and Document...
DOC
Seminar Report On Taguchi Methods2
PPTX
The relationship between test and production code quality (@ SIG)
Automated Testing and Safety Analysis of Deep Neural Networks
MVTec AD: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection
Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-G...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
History Class - For software testers
ICSE10b.ppt
MexADL
Optimizing Requirements Decisions with KEYS
Black box-software-testing-douglas-hoffman2483
Nanometer Testing: Challenges and Solutions
Abraham q3 2008
Transcription Factor DNA Binding Prediction
Формальная верификация как средство тестирования (в Java)
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
How we Built a Large Scale Matched Pair Analysis Engine (MCPairs) using OpenE...
Can we induce change with what we measure?
Improved Query Reformulation for Concept Location using CodeRank and Document...
Seminar Report On Taguchi Methods2
The relationship between test and production code quality (@ SIG)
Ad

Recently uploaded (20)

PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced IT Governance
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Modernizing your data center with Dell and AMD
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced IT Governance
Sensors and Actuators in IoT Systems using pdf
Chapter 3 Spatial Domain Image Processing.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
GamePlan Trading System Review: Professional Trader's Honest Take
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Modernizing your data center with Dell and AMD
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Ad

White-Box Software Testing using Evolutionary Algorithms