SlideShare a Scribd company logo
1 of 15
Improving Evolutionary Testing by Means of
Efficiency Enhancement Techniques

Matteo Miraz, Pier Luca Lanzi, and Luciano Baresi
(presented by Daniele Loiacono)

Politecnico di Milano, Italy
2
Table of Contents

1. TestFul: an Evolutionary Test Approach for Java
2. Improving the Approach
   1. Seeding
   2. Hybridization
   3. Fitness Inheritance
3. Conclusions and Future Work




        DEI
Testful                                                              3




• Leverages Search-Based Techniques to generate Tests
   • We are not alone:
       • Search Based Software Engineering is a vibrant community!

• Targets stateful systems (e.g., Java classes)
   • A sequence of operations
     is required to exercise
     the features of a class




                                                                         enables
          DEI
Test Representation                           4




• A test is a sequence of operations
   • Assign a primitive value to a variable
      • char_0 = „c‟
   • Create an object
      • cut_1 = new CUT(char_0)
   • Invoke a method on an object
      • char_1 = cut_1.fooBar(int_1)


• Working on variables
   • Includes all the parameters‟ types
   • Enables polymorphism
      • Calculate compatibilities among types


          DEI
Our Evolutionary Testing Approach                                    5




Goal: Find tests that put objects in interesting states
• We use a NSGA-II Evolutionary Algorithm, guided by:
    Number of statements and branches covered
       • Tests with a high branch coverage stress more deeply the class
         under test and put objects in more interesting states
    Compactness of tests
       • Unnecessary long tests waste computational resources during their
         evaluation
• Recombination:
   • variable-length one-point crossover, replacement mutation




                crossover                    mutation



        DEI
Need for Efficiency Enhancement Techniques                                   6




•   Testful achieves good results
     • generates good tests for complex classes (GECCO ‟09 poster)

•   It requires huge computational requirements, because:

     • It starts the evolution from a population with a poor quality.
         • Most of the initial tests do not exercise any feature
         • The most difficult elements in the class are not exercised


     • It does not provide any guidance to exercise uncovered elements
         • The fitness function only counts the number of branch exercised


     • The fitness function is expensive
         • It requires to execute a test to measure its branch coverage




          DEI
Seeding                                                                      7




• Problem:
   •   Testful starts the evolution from a population with a poor quality.
• Solution:
   •   Run an inexpensive technique (random search) for a short time,
       and use its result as initial population
                      Branch Coverage with a Random Search




         DEI
Seeding                         8




             Simple Problem
                 (Fraction)




            Complex Problem
             (Red-Black Tree)




      DEI
Hybridization                                                 9




• Problem:
   • Testful does not provide any guidance to exercise uncovered
     branches
• Solution:
   •   Hybridize the evolutionary search
       with a local search
        • It focuses on the easiest
            branch not yet executed
            (works at method level)
        • It adopts a simpler search
            strategy (hill climbing)
   •   Which element to improve?
        • One of the best elements
        • 5% of the population
        • 10% of the population



         DEI
Hybridization                         10




                 Simple Problem
                     (Fraction)




                Complex Problem
                (Disjoint Set Fast)




       DEI
Fitness Inheritance                                                     11




• Problem:
   •   The fitness function is expensive
• Solution:
   •   Use Fitness Inheritance
        • Evaluate the “real” fitness only on a part of the population
        • Other individuals inherit the fitness of their parents
   •   Which policy to select individuals to evaluate?
        • Uniform selection
        • Fronteer selection: evaluate more often individuals on the frontier


• How to evaluate the improvements?
   •   Number of generation evaluated w.r.t. elapsed time
   •   Number of branch covered
        • (to evaluate the impact of a noisier fitness function)



         DEI
Fitness Inheritance: # of generations   12




             Complex Problem
               (Stack Array)




             More complex Problem
                (Red-Black Tree)




       DEI
Fitness Inheritance: branch executed                      13




                                         Simple Problem
                                             (Fraction)




                    Computationally-intensive Problem
                             (Disjoint Set Fast)




       DEI
Conclusions and Future Work                                    14




• Efficiency enhancement techniques allow Testful to reach better
  results using less computational resources
   • The improvement is even higher if the three efficiency
      enhancement techniques are combined
• We plan to leverage even more on the Seeding technique
   • To test newer versions of a class
   • To test similar classes of a class



        DEI
Improving Evolutionary Testing by Means of
Efficiency Enhancement Techniques

 M. Miraz, P. L. Lanzi, L. Baresi
 {miraz,lanzi,baresi}@elet.polimi.it



 http://code.google.com/p/testful/

More Related Content

Viewers also liked

Long tail (session 2)
Long tail (session 2)Long tail (session 2)
Long tail (session 2)
rtannir
 
Operations research luna
Operations research lunaOperations research luna
Operations research luna
jehill3
 

Viewers also liked (12)

Lives Saved Analyses for Child Survival Projects: Basic How-To Use LiST - Deb...
Lives Saved Analyses for Child Survival Projects: Basic How-To Use LiST - Deb...Lives Saved Analyses for Child Survival Projects: Basic How-To Use LiST - Deb...
Lives Saved Analyses for Child Survival Projects: Basic How-To Use LiST - Deb...
 
skill 7
skill 7skill 7
skill 7
 
Long tail (session 2)
Long tail (session 2)Long tail (session 2)
Long tail (session 2)
 
Death of jesus
Death of jesusDeath of jesus
Death of jesus
 
Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!Partnership Defined Quality: Acting it Out!
Partnership Defined Quality: Acting it Out!
 
Tuberculosis and PSI
Tuberculosis and PSITuberculosis and PSI
Tuberculosis and PSI
 
Maternal and Child Health Integrated Program – MCHIP
Maternal and Child Health Integrated Program – MCHIPMaternal and Child Health Integrated Program – MCHIP
Maternal and Child Health Integrated Program – MCHIP
 
The Current Condition of Mental Health in Afghanistan: Integrating Mental Hea...
The Current Condition of Mental Health in Afghanistan: Integrating Mental Hea...The Current Condition of Mental Health in Afghanistan: Integrating Mental Hea...
The Current Condition of Mental Health in Afghanistan: Integrating Mental Hea...
 
Maternal and Child Anemia- Why, what works, what needs more work?
Maternal and Child Anemia- Why, what works, what needs more work?Maternal and Child Anemia- Why, what works, what needs more work?
Maternal and Child Anemia- Why, what works, what needs more work?
 
Conceptual Frameworks: Health Systems and the Community
Conceptual Frameworks: Health Systems and the CommunityConceptual Frameworks: Health Systems and the Community
Conceptual Frameworks: Health Systems and the Community
 
Operations research luna
Operations research lunaOperations research luna
Operations research luna
 
Winter In Finland
Winter In FinlandWinter In Finland
Winter In Finland
 

Similar to CEC'10: Improving Evolutionary Testing by Means of Efficiency Enhancement Techniques

Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
alind tiwari
 
Principles of effort estimation
Principles of effort estimationPrinciples of effort estimation
Principles of effort estimation
CS, NcState
 
Asking Clarifying Questions in Open-Domain Information-Seeking Conversations
Asking Clarifying Questions in Open-Domain Information-Seeking ConversationsAsking Clarifying Questions in Open-Domain Information-Seeking Conversations
Asking Clarifying Questions in Open-Domain Information-Seeking Conversations
Mohammad Aliannejadi
 
Algebra team. 9.5.12
Algebra team. 9.5.12Algebra team. 9.5.12
Algebra team. 9.5.12
Mona Toncheff
 

Similar to CEC'10: Improving Evolutionary Testing by Means of Efficiency Enhancement Techniques (20)

History Class - For software testers
History Class - For software testersHistory Class - For software testers
History Class - For software testers
 
Machine Learning Made Simple: Differential evolution
Machine Learning Made Simple: Differential evolutionMachine Learning Made Simple: Differential evolution
Machine Learning Made Simple: Differential evolution
 
Avoiding test hell
Avoiding test hellAvoiding test hell
Avoiding test hell
 
Why advanced population initialization techniques perform poorly in high dime...
Why advanced population initialization techniques perform poorly in high dime...Why advanced population initialization techniques perform poorly in high dime...
Why advanced population initialization techniques perform poorly in high dime...
 
Technological Problem Solving Seminar
Technological Problem Solving SeminarTechnological Problem Solving Seminar
Technological Problem Solving Seminar
 
Developing Moving and Handling training
Developing Moving and Handling trainingDeveloping Moving and Handling training
Developing Moving and Handling training
 
Presentation of master thesis
Presentation of master thesisPresentation of master thesis
Presentation of master thesis
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
 
Agile process
Agile processAgile process
Agile process
 
Regularization in deep learning
Regularization in deep learningRegularization in deep learning
Regularization in deep learning
 
Susan epstein at ibm csig speaker series
Susan epstein at ibm csig speaker seriesSusan epstein at ibm csig speaker series
Susan epstein at ibm csig speaker series
 
Evaluating Semantic Search Systems to Identify Future Directions of Research
Evaluating Semantic Search Systems to Identify Future Directions of ResearchEvaluating Semantic Search Systems to Identify Future Directions of Research
Evaluating Semantic Search Systems to Identify Future Directions of Research
 
Principles of effort estimation
Principles of effort estimationPrinciples of effort estimation
Principles of effort estimation
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic Algorithm
 
Slides 2015 for contact 3
Slides 2015 for contact 3Slides 2015 for contact 3
Slides 2015 for contact 3
 
Asking Clarifying Questions in Open-Domain Information-Seeking Conversations
Asking Clarifying Questions in Open-Domain Information-Seeking ConversationsAsking Clarifying Questions in Open-Domain Information-Seeking Conversations
Asking Clarifying Questions in Open-Domain Information-Seeking Conversations
 
Etm551 lecture05
Etm551 lecture05Etm551 lecture05
Etm551 lecture05
 
Comparing Incremental Learning Strategies for Convolutional Neural Networks
Comparing Incremental Learning Strategies for Convolutional Neural NetworksComparing Incremental Learning Strategies for Convolutional Neural Networks
Comparing Incremental Learning Strategies for Convolutional Neural Networks
 
4.6 Evaluation
4.6 Evaluation4.6 Evaluation
4.6 Evaluation
 
Algebra team. 9.5.12
Algebra team. 9.5.12Algebra team. 9.5.12
Algebra team. 9.5.12
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

CEC'10: Improving Evolutionary Testing by Means of Efficiency Enhancement Techniques

  • 1. Improving Evolutionary Testing by Means of Efficiency Enhancement Techniques Matteo Miraz, Pier Luca Lanzi, and Luciano Baresi (presented by Daniele Loiacono) Politecnico di Milano, Italy
  • 2. 2 Table of Contents 1. TestFul: an Evolutionary Test Approach for Java 2. Improving the Approach 1. Seeding 2. Hybridization 3. Fitness Inheritance 3. Conclusions and Future Work DEI
  • 3. Testful 3 • Leverages Search-Based Techniques to generate Tests • We are not alone: • Search Based Software Engineering is a vibrant community! • Targets stateful systems (e.g., Java classes) • A sequence of operations is required to exercise the features of a class enables DEI
  • 4. Test Representation 4 • A test is a sequence of operations • Assign a primitive value to a variable • char_0 = „c‟ • Create an object • cut_1 = new CUT(char_0) • Invoke a method on an object • char_1 = cut_1.fooBar(int_1) • Working on variables • Includes all the parameters‟ types • Enables polymorphism • Calculate compatibilities among types DEI
  • 5. Our Evolutionary Testing Approach 5 Goal: Find tests that put objects in interesting states • We use a NSGA-II Evolutionary Algorithm, guided by:  Number of statements and branches covered • Tests with a high branch coverage stress more deeply the class under test and put objects in more interesting states  Compactness of tests • Unnecessary long tests waste computational resources during their evaluation • Recombination: • variable-length one-point crossover, replacement mutation crossover mutation DEI
  • 6. Need for Efficiency Enhancement Techniques 6 • Testful achieves good results • generates good tests for complex classes (GECCO ‟09 poster) • It requires huge computational requirements, because: • It starts the evolution from a population with a poor quality. • Most of the initial tests do not exercise any feature • The most difficult elements in the class are not exercised • It does not provide any guidance to exercise uncovered elements • The fitness function only counts the number of branch exercised • The fitness function is expensive • It requires to execute a test to measure its branch coverage DEI
  • 7. Seeding 7 • Problem: • Testful starts the evolution from a population with a poor quality. • Solution: • Run an inexpensive technique (random search) for a short time, and use its result as initial population Branch Coverage with a Random Search DEI
  • 8. Seeding 8 Simple Problem (Fraction) Complex Problem (Red-Black Tree) DEI
  • 9. Hybridization 9 • Problem: • Testful does not provide any guidance to exercise uncovered branches • Solution: • Hybridize the evolutionary search with a local search • It focuses on the easiest branch not yet executed (works at method level) • It adopts a simpler search strategy (hill climbing) • Which element to improve? • One of the best elements • 5% of the population • 10% of the population DEI
  • 10. Hybridization 10 Simple Problem (Fraction) Complex Problem (Disjoint Set Fast) DEI
  • 11. Fitness Inheritance 11 • Problem: • The fitness function is expensive • Solution: • Use Fitness Inheritance • Evaluate the “real” fitness only on a part of the population • Other individuals inherit the fitness of their parents • Which policy to select individuals to evaluate? • Uniform selection • Fronteer selection: evaluate more often individuals on the frontier • How to evaluate the improvements? • Number of generation evaluated w.r.t. elapsed time • Number of branch covered • (to evaluate the impact of a noisier fitness function) DEI
  • 12. Fitness Inheritance: # of generations 12 Complex Problem (Stack Array) More complex Problem (Red-Black Tree) DEI
  • 13. Fitness Inheritance: branch executed 13 Simple Problem (Fraction) Computationally-intensive Problem (Disjoint Set Fast) DEI
  • 14. Conclusions and Future Work 14 • Efficiency enhancement techniques allow Testful to reach better results using less computational resources • The improvement is even higher if the three efficiency enhancement techniques are combined • We plan to leverage even more on the Seeding technique • To test newer versions of a class • To test similar classes of a class DEI
  • 15. Improving Evolutionary Testing by Means of Efficiency Enhancement Techniques M. Miraz, P. L. Lanzi, L. Baresi {miraz,lanzi,baresi}@elet.polimi.it http://code.google.com/p/testful/