SlideShare a Scribd company logo
1 of 24
AN AUTOMATIC TEST DATA
GENERATION FOR DATA FLOW
  COVERAGE USING SOFT
  COMPUTING APPROACH

  SANJAY SINGLA, PRITI SINGLA
          AND H M RAI
     Vol. 2, No. 2, April 2011
PRESENTED BY


WAFA QAISER KHAN

    MS(SE)-2
ABSTRACT

 Testing is the most important quality
  assurance measure for software.
 Testing is time consuming and
  laborious process.
 Automatic test data generation would
  be useful to reduce the cost and time.
   Paper presents an automatic test data
    generation technique that uses a
    particle swarm optimization (PSO) to
    generate test data that satisfy data
    flow coverage criteria.
INTRODUCTION
 Almost every service/system we use
  today has an element of software in it.
 To make the system reliable,
  predictable and to run all the time and
  every time, software has to tested
  before delivery.
 Generally the goal of software testing
  is to design a set of minimal number of
  test cases such that it reveals as
  many faults as possible.
   An automated software testing can
    significantly reduce time and cost of
    developing software.
DATA FLOW ANALYSIS
TECHNIQUE
   This section uses the all-uses criterion
    and the data flow analysis technique.

   The example program determines the
    middle value of three given integers
    I, J, K.
EXAMPLE PROGRAM
 Defs and c-uses are associated with
  nodes.
 p-uses are associated with edges.
 Two sets dcu(i) and dpu(i,j) are
  determined.
 The def-clear paths are constructed
  from the dcu and dpu sets.
ALGORITHMS
GENETIC ALGORITHMS
 Inspired by Darwin’s theory of
  evolution.
 It generates useful solutions.
 Operates on strings called
  chromosomes.
 Each digit that makes up a
  chromosome is called a gene.
 Each chromosome has a fitness value
  associated with it, which is the
A basic pseudo algorithm for a GA:
   The fitness function used is
    mathematically expressed as:
PARTICLE SWARM
OPTIMIZATION
 Developed by Kennedy and Eberhart.
 Simulates the behaviour of bird
  flocking by which they find food
  sources.
 PSO algorithm works by having a
  population (called a swarm)
  of candidate solutions (called
  particles).
 These particles are moved around in
  the search-space according to a few
 For each particle i = 1, ..., S do:
  Initialize the particle's position with
  a uniformly distributed random vector:
  xi =[xi1 , xi2, … xid ]
 Initialize the particle's best known
  position to its initial position: pi ← xi
 If (f(pi) < f(g)) update the swarm's best
  known position: g ← pi
 Initialize the particle's velocity:
 vi =[vi1 , vi2, … vid ]
◦ For each particle i = 1, ..., S do:
       For each dimension d = 1, ..., n do:
         Update the particle's velocity: vi,d ← ω vi,d + cp rp (pi,d-xi,d) +
          cg rg (gd-xi,d)
         ω is the inertia weight and cp cg are the acceleration constants
          and rp rg are two random values in range [0,1]
       Update the particle's position: xi ← xi + vi
       If (f(xi) < f(pi)) do:
         Update the particle's best known position: pi ← xi
         If (f(pi) < f(g)) update the swarm's best known position: g ← pi


   Now g holds the best found solution.

   Stopping criterion: If the number of iterations
    exceeds the maximum number of iteration or
    accumulated coverage is 100% then stop.
CONCLUSION
A set of 12 small FORTRAN programs is used in the
experiments.
 PSO is able to generate test data
  automatically that cover successfully
  the sample program under all du path
  criteria.
 It requires less number of generation
  to achieve def- use percentage.
REFERENCES
1.http://www.sciacademypublisher.com/jo
   urnals/index.php/IJRRCS/article/view/4
   57
2.http://en.wikipedia.org/wiki/Particle_swa
   rm_optimization
THANKYOU

More Related Content

What's hot

Physics project final
Physics project final Physics project final
Physics project final jobbyjoseph50
 
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...IJECEIAES
 
Novel approaches to optomechanical transduction
Novel approaches to optomechanical transductionNovel approaches to optomechanical transduction
Novel approaches to optomechanical transductionOndrej Cernotik
 
CHAC Algorithm ECAL'07 Presentation
CHAC Algorithm ECAL'07 PresentationCHAC Algorithm ECAL'07 Presentation
CHAC Algorithm ECAL'07 PresentationAntonio Mora
 
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV ImageryUsing HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV ImageryWai Nwe Tun
 
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...Dr. Rajdeep Chatterjee
 
Turning robot locomotion using truncated fourier series and gravitational sea...
Turning robot locomotion using truncated fourier series and gravitational sea...Turning robot locomotion using truncated fourier series and gravitational sea...
Turning robot locomotion using truncated fourier series and gravitational sea...kameltreen
 

What's hot (9)

Physics project final
Physics project final Physics project final
Physics project final
 
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...
The Effect of Updating the Local Pheromone on ACS Performance using Fuzzy Log...
 
Novel approaches to optomechanical transduction
Novel approaches to optomechanical transductionNovel approaches to optomechanical transduction
Novel approaches to optomechanical transduction
 
40220140505002
4022014050500240220140505002
40220140505002
 
CHAC Algorithm ECAL'07 Presentation
CHAC Algorithm ECAL'07 PresentationCHAC Algorithm ECAL'07 Presentation
CHAC Algorithm ECAL'07 Presentation
 
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV ImageryUsing HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
 
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...
Newtonian Law Inspired Optimization Techniques Based on Gravitational Search ...
 
Turning robot locomotion using truncated fourier series and gravitational sea...
Turning robot locomotion using truncated fourier series and gravitational sea...Turning robot locomotion using truncated fourier series and gravitational sea...
Turning robot locomotion using truncated fourier series and gravitational sea...
 
K fold
K foldK fold
K fold
 

Similar to Automatic Test Data Generation Using Soft Computing Approaches

An optimal design of current conveyors using a hybrid-based metaheuristic alg...
An optimal design of current conveyors using a hybrid-based metaheuristic alg...An optimal design of current conveyors using a hybrid-based metaheuristic alg...
An optimal design of current conveyors using a hybrid-based metaheuristic alg...IJECEIAES
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Software Effort Estimation Using Particle Swarm Optimization with Inertia Weight
Software Effort Estimation Using Particle Swarm Optimization with Inertia WeightSoftware Effort Estimation Using Particle Swarm Optimization with Inertia Weight
Software Effort Estimation Using Particle Swarm Optimization with Inertia WeightWaqas Tariq
 
DriP PSO- A fast and inexpensive PSO for drifting problem spaces
DriP PSO- A fast and inexpensive PSO for drifting problem spacesDriP PSO- A fast and inexpensive PSO for drifting problem spaces
DriP PSO- A fast and inexpensive PSO for drifting problem spacesZubin Bhuyan
 
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...IJRESJOURNAL
 
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...IJCNCJournal
 
Concept Drift for obtaining Accurate Insight on Process Execution
Concept Drift for obtaining Accurate Insight on Process ExecutionConcept Drift for obtaining Accurate Insight on Process Execution
Concept Drift for obtaining Accurate Insight on Process Executioniosrjce
 
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...IRJET Journal
 
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...csandit
 
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...AIRCC Publishing Corporation
 
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...AIRCC Publishing Corporation
 
BPSO&1-NN algorithm-based variable selection for power system stability ident...
BPSO&1-NN algorithm-based variable selection for power system stability ident...BPSO&1-NN algorithm-based variable selection for power system stability ident...
BPSO&1-NN algorithm-based variable selection for power system stability ident...IJAEMSJORNAL
 
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTIONA COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTIONijsc
 
A Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential EvolutionA Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential Evolutionijsc
 
A scalable collaborative filtering framework based on co clustering
A scalable collaborative filtering framework based on co clusteringA scalable collaborative filtering framework based on co clustering
A scalable collaborative filtering framework based on co clusteringAllenWu
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...IOSR Journals
 

Similar to Automatic Test Data Generation Using Soft Computing Approaches (20)

An optimal design of current conveyors using a hybrid-based metaheuristic alg...
An optimal design of current conveyors using a hybrid-based metaheuristic alg...An optimal design of current conveyors using a hybrid-based metaheuristic alg...
An optimal design of current conveyors using a hybrid-based metaheuristic alg...
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Software Effort Estimation Using Particle Swarm Optimization with Inertia Weight
Software Effort Estimation Using Particle Swarm Optimization with Inertia WeightSoftware Effort Estimation Using Particle Swarm Optimization with Inertia Weight
Software Effort Estimation Using Particle Swarm Optimization with Inertia Weight
 
DriP PSO- A fast and inexpensive PSO for drifting problem spaces
DriP PSO- A fast and inexpensive PSO for drifting problem spacesDriP PSO- A fast and inexpensive PSO for drifting problem spaces
DriP PSO- A fast and inexpensive PSO for drifting problem spaces
 
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...
An Improved Adaptive Multi-Objective Particle Swarm Optimization for Disassem...
 
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...
CONSTRUCTING A FUZZY NETWORK INTRUSION CLASSIFIER BASED ON DIFFERENTIAL EVOLU...
 
Concept Drift for obtaining Accurate Insight on Process Execution
Concept Drift for obtaining Accurate Insight on Process ExecutionConcept Drift for obtaining Accurate Insight on Process Execution
Concept Drift for obtaining Accurate Insight on Process Execution
 
I017366469
I017366469I017366469
I017366469
 
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...
Saliency Based Hookworm and Infection Detection for Wireless Capsule Endoscop...
 
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
 
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...
USING CUCKOO ALGORITHM FOR ESTIMATING TWO GLSD PARAMETERS AND COMPARING IT WI...
 
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...
Using Cuckoo Algorithm for Estimating Two GLSD Parameters and Comparing it wi...
 
BPSO&1-NN algorithm-based variable selection for power system stability ident...
BPSO&1-NN algorithm-based variable selection for power system stability ident...BPSO&1-NN algorithm-based variable selection for power system stability ident...
BPSO&1-NN algorithm-based variable selection for power system stability ident...
 
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTIONA COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
 
A Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential EvolutionA Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential Evolution
 
A scalable collaborative filtering framework based on co clustering
A scalable collaborative filtering framework based on co clusteringA scalable collaborative filtering framework based on co clustering
A scalable collaborative filtering framework based on co clustering
 
M017127578
M017127578M017127578
M017127578
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
 

Automatic Test Data Generation Using Soft Computing Approaches

  • 1. AN AUTOMATIC TEST DATA GENERATION FOR DATA FLOW COVERAGE USING SOFT COMPUTING APPROACH SANJAY SINGLA, PRITI SINGLA AND H M RAI Vol. 2, No. 2, April 2011
  • 2. PRESENTED BY WAFA QAISER KHAN MS(SE)-2
  • 3. ABSTRACT  Testing is the most important quality assurance measure for software.  Testing is time consuming and laborious process.  Automatic test data generation would be useful to reduce the cost and time.
  • 4. Paper presents an automatic test data generation technique that uses a particle swarm optimization (PSO) to generate test data that satisfy data flow coverage criteria.
  • 5. INTRODUCTION  Almost every service/system we use today has an element of software in it.  To make the system reliable, predictable and to run all the time and every time, software has to tested before delivery.  Generally the goal of software testing is to design a set of minimal number of test cases such that it reveals as many faults as possible.
  • 6. An automated software testing can significantly reduce time and cost of developing software.
  • 7. DATA FLOW ANALYSIS TECHNIQUE  This section uses the all-uses criterion and the data flow analysis technique.  The example program determines the middle value of three given integers I, J, K.
  • 9.
  • 10.  Defs and c-uses are associated with nodes.  p-uses are associated with edges.  Two sets dcu(i) and dpu(i,j) are determined.  The def-clear paths are constructed from the dcu and dpu sets.
  • 11.
  • 12.
  • 13. ALGORITHMS GENETIC ALGORITHMS  Inspired by Darwin’s theory of evolution.  It generates useful solutions.  Operates on strings called chromosomes.  Each digit that makes up a chromosome is called a gene.  Each chromosome has a fitness value associated with it, which is the
  • 14. A basic pseudo algorithm for a GA:
  • 15. The fitness function used is mathematically expressed as:
  • 16.
  • 17. PARTICLE SWARM OPTIMIZATION  Developed by Kennedy and Eberhart.  Simulates the behaviour of bird flocking by which they find food sources.  PSO algorithm works by having a population (called a swarm) of candidate solutions (called particles).  These particles are moved around in the search-space according to a few
  • 18.  For each particle i = 1, ..., S do: Initialize the particle's position with a uniformly distributed random vector: xi =[xi1 , xi2, … xid ]  Initialize the particle's best known position to its initial position: pi ← xi  If (f(pi) < f(g)) update the swarm's best known position: g ← pi  Initialize the particle's velocity: vi =[vi1 , vi2, … vid ]
  • 19. ◦ For each particle i = 1, ..., S do:  For each dimension d = 1, ..., n do:  Update the particle's velocity: vi,d ← ω vi,d + cp rp (pi,d-xi,d) + cg rg (gd-xi,d)  ω is the inertia weight and cp cg are the acceleration constants and rp rg are two random values in range [0,1]  Update the particle's position: xi ← xi + vi  If (f(xi) < f(pi)) do:  Update the particle's best known position: pi ← xi  If (f(pi) < f(g)) update the swarm's best known position: g ← pi  Now g holds the best found solution.  Stopping criterion: If the number of iterations exceeds the maximum number of iteration or accumulated coverage is 100% then stop.
  • 20.
  • 21. CONCLUSION A set of 12 small FORTRAN programs is used in the experiments.
  • 22.  PSO is able to generate test data automatically that cover successfully the sample program under all du path criteria.  It requires less number of generation to achieve def- use percentage.
  • 23. REFERENCES 1.http://www.sciacademypublisher.com/jo urnals/index.php/IJRRCS/article/view/4 57 2.http://en.wikipedia.org/wiki/Particle_swa rm_optimization