SlideShare a Scribd company logo
IOSR Journal of Computer Engineering (IOSR-JCE)
e-ISSN: 2278-0661,p-ISSN: 2278-8727, Volume 17, Issue 1, Ver. II (Jan – Feb. 2015), PP 75-78
www.iosrjournals.org
DOI: 10.9790/0661-17127578 www.iosrjournals.org 75 | Page
Application of Genetic Algorithm and Particle Swarm
Optimization in Software Testing
Deepti Arora1
, Anurag Singh Baghel2
1,2,
(Gautam Buddha University,Uttar Pradesh,India)
Abstract: This paper will describe a method for optimizing software testing by finding the most error prone
paths in the program. This can be achieved by a meta-heuristic technique, that is by using genetic algorithm
and particle swarm optimization. As exhaustive software testing is not possible where software is tested with all
the possible inputs , those parts of software are also tested which are not error prone..Goal is to generate test
cases using both the algorithms and then comparative study is done between Particle swarm optimization and
genetic algorithm.
Keywords: Software Testing, Meta-heuristics , Genetic Algorithms, Particle Swarm Optimization, Software test
cases.
I. Introduction
Testing is the one of the crucial phase that is performed during software development. It is a primary
technique which is used to gain consumer confidence in the software. It is conducted by executing the program
developed with test inputs and comparing the observed output with the expected one .[1]Software testing is done
to identify any errors or missing requirements in contrary to the actual requirements. It is done to validate the
quality of the software testing using minimal cost and efforts and to generate high quality test cases. It uncovers
the error in the software, including errors in requirement analysis, design document, coding, system resources
and system environments, hardware problems and their interfaces to the software .[2] It is very time consuming
and laborious activity. It is costly and consumes about 50% of the cost of the software development.[3]. Main
goal of testing to find as many faults as possible in a software. As mentioned earlier it a time consuming activity
,as it is impossible to test the software unit with all the combinations of inputs so there is a need to design
minimum no. of test cases that will discover as many faults as possible . However, software testing automation
is not a straight forward process. For years a lot of research have been done in this area to generate test cases
,researchers developed methods like random test case generator, symbolic test data generators and dynamic test
data generators. This paper applied the EST (Evolutionary software testing ) techniquie.EST is the automatic
software test case generation technique which in turn will reduce the cost of development of software. EST
interprets the task of test case generation as an optimization problem and tries to solve it using a search
technique .EST uses an meta-heuristic search technique that is genetic algorithm to convert the task of test case
generation into an optimal problem. Evolutionary Testing search for optimal test parameter combinations that
satisfy a test criterion. Test criterion is represented fitness function that measures how well optimization
parameters that are automatically generated are satisfying the given test criterion .There are variety of
techniques for test case generation but in this paper we will focus on genetic algorithm and particle swarm
optimization technique.
This paper will present the result of our research in into the application of GA and PSO search
approach, to find optimal solution in the software construct.
II. Genetic Algorithm
Genetic Algorithm (GA) are heuristic search algorithm.[4]They are based on the evolutionary idea of
natural selection and genetics. Genetic algorithm is inspired by the Dalton’s theory about evolution that is
survival of the fittest. Genetic algorithm is a part of evolutionary computing which is a growing field of
Artificial Intelligence. GA exploits the historical information to direct the search in region of better performance
with in the search space. [5] In this way competition among individuals for better resources results in fittest
individual dominating over the weaker ones. Genetic Algorithms are more robust hence they are better than
conventional AI(Artificial Intelligence). GA does not break easily even if there is a slightly change in the input
and it also does not get affected by noise. GA offer benefit over typical search of optimization problem in
searching large state space, multimodal search space and n dimensional surface.
Distinct element in GA is individual and population. Individual represents single solution while
population represents set of Solutions which is currently involved in this search process. Each individual is
represented as chromosome. That is an Initial pool of chromosomes. Population size can be few dozens to
thousands. To do optimization fitness function is required to select the best solution from the population and
Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing
DOI: 10.9790/0661-17127578 www.iosrjournals.org 76 | Page
discard those not so good solutions. GA consists of following operators that is Selection Operator chromosomes
are selected for cross-over based on the value of the fitness function Cross- Over Operator combine two
chromosomes to produce new chromosomes. Mutation Operator in this value is randomly changed to create new
genes in the individual.
Pseudo code of GA
Initialize (population)
Evaluate Fitness of the population
While (termination condition is met) do
{
Selection(Population)
Cross-over(Population)
Mutation(population)
Evaluate (Population)
}
GA [6] starts with randomly generated population of individuals or chromosomes .Fitness of individual
is calculated based on some fitness function. After the fitness is calculated selection of individuals is done based
on the Roulette –Wheel Selection method i.e an individual having higher fitness value has the more chance of
getting selected .Then Cross over operator is applied to produce new offspring in the population that may have
better characteristics than their parents. Mutation is done to introduce new individual in the population .its is
done by flipping the bit of the chromosomes.
III. Particle Swarm Optimization
Particle Swarm Optimization (PSO) [7] is a relatively recent heuristic search method. It is similar to
GA in the sense that both are evolutionary algorithms .It is one of the meta-heuristics approach that optimizes a
problem and try to improve candidate solution iteratively. PSO is generally used to solve those problems
whose solution can be represented as a point in an n-dimensional space. In PSO potential solution is called
particle. A number of particles are randomly set into motion through this space. Each particle posses its current
position, current velocity ,and its pbest position .Pbest is the personal best position explored so far. It also
incorporates Gbest that global best position achieved by all its individuals. It is a simple approach and it is
effective across a variety of problem domains.
Pseudo code for PSO
The PSO algorithm consists of just few steps, which are repeated until some stopping condition is
met. The steps are as follow:
 Initialize the population of individuals with current position and, velocity.
 Evaluate the fitness of the individual particle (Pbest).
 Keep track of the individual highest fitness (Gbest).
 Modify velocity based on Pbest and Gbest location.
 Update the particle position.
PSO starts with initialization of particle velocity and current position. Here particle is in 2-D space .
Fitness value of the particle is calculated according to function. If the fitness of the particle is better than its
previous value update particle x and y position that is its personal best position. Also if the value is better than
gbest position update global best position of the particle. Apply equations to update the x and y velocity vector
of the particles. Process repeats until termination criteria is met or the optimal solution is found.
IV. Implementation
Genetic Algorithm is implemented in c language. result is as follows. GA approach to problem to
maximize the function (1) F(x)=x3
-x2
. X represent 5 digit unsigned binary integer .i.e x can take value [0,31].
Four randomly generated solution to problem are 14,18,24,30. Fitness of the individual is calculated by the
function F(x).String no. 4 has the maximum value having more chances of getting selected. here N is 4 . One
point Crossover is performed in a couple. New offspring is generated. Mutation is performed. We get new
generation Again the process is repeated till the maximum possible value of the solution is obtained .Luckily in
this case in the second iteration we will get desired value. Whereas In most of the cases GA traps in local
optima. But here We have got the global optimum solution.
Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing
DOI: 10.9790/0661-17127578 www.iosrjournals.org 77 | Page
Table 1
String
N o.
Initial Population Value of x F(x)=X3
-x2
pi Expected
Count(N*pi)
1 01111 15 3150 0.072 0.289
2 10010 18 5508 0.126 0.505
3 10101 21 8820 0.202 0.809
4 11110 30 26100 0.598 2.395
Sum 43578 1 4
Average 10894 0.25 1
Max 26100 0.598 2.395
Table 2
Before
Crossover
After
Crossover
Mutation
Of element 3 at
position 2
New
Generation is as follows
(Value of x)
01111 01110 01110 14
10010 10011 10011 19
10101 10100 10110 22
11110 11111 11111 31
Particle Swarm Optimization
For Mathematical function (2) val=(x-15)4
-(y-20)2
+9
Particle is initialized with current position and velocity. Program will search for optimal solution
through the movement of particle. Program will keep track of personal best and global best position of the
particle and update its position and velocity .Optimal solution here is to minimize the mathematical function
.PSO is implemented in C language. How the particle moves in the search space to find global best solution is
shown in the Fig 1 & Fig 2. Finally the optimum solution is found when x=15 and y=20.For more complex
problems where it is not possible to easily solve the problem mathematically ,these algorithms can be used.
Figure 1 Movement of particles to find optimum solution
Figure 2 Global best solution
Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing
DOI: 10.9790/0661-17127578 www.iosrjournals.org 78 | Page
V. Comparison Of GA And PSO
Genetic Algorithm and Particle Swarm Optimization technique are both evolutionary search algorithm
and have been applied in variety of problem domains.[8 &9] GA can be applied to number of problems like N-
queens problem, Travel salesman problem to find optimal solution. GA suffers from the drawback that it traps in
local optima, that is it does not know how to sacrifice short term fitness for long term fitness. It does not keep in
account the global best position of the individual. This drawback is overcome by Particle Swarm optimization
technique which tracks the particle personal best position as well as global best position ,hence it moves toward
global optima without getting trapped in local optima. GA has been popular because of its parallel nature of
search ,and essentially because it can solve non linear ,multi model problems. It can handle both Continuous and
discrete variables where as PSO can easily handle Continuous variables. In comparison to GA ,PSO has few
parameters and it is easy to implement .Calculation of PSO Algorithm is very simple though it is difficult to
implement with problem of non coordinate system .It is problem dependent, Problem having continuous
variables PSO is superior to GA .Many researchers have compared both the technologies .PSO outperforms
GA, and is more effective in general however superiority of PSO is problem dependent.
VI. Conclusion
PSO is relatively recent heuristic approach, It is similar to Genetic algorithm in a way that they both are
population based evolutionary algorithms. Paper is reported on the application of Genetic Algorithm and
Particle Swarm Optimization. Paper described the basic concepts of GA and PSO ,how the test cases are
generated using genetic algorithm and how they are useful in finding the optimal solution to the problem.
Comparative study is done between both the algorithm where GA can be useful and how PSO overcome the
drawback of GA. We also intend to extend the approach described here so that it is useful to solve many
problems like knapsack problem.
References
[1]. B. Beizer,Software testing techniques, Second Edition, Van Nostrand Reinhold, NewYork, 1990.
[2]. Nirmal Kumar Gupta and Dr. Mukesh Kumar Rohil,, Using Genetic Algorithm for Unit Testing Of Object Oriented Software,
IJSSST, Vol.10, No.3.
[3]. S. Desikan and G. Ramesh, ,Software testing principles & practices, Pearson Education, 2007.
[4]. K. F. Man, ,K. S. Tang, and S. Kwong,,Genetic Algorithms: Concepts and Applications, IEEE Transaction on Industrial Electronics
,VOL. 43, NO. 5, October 1996..
[5]. Abhishek Singhal, Swati Chandna and Abhay Bansal, Optimization of Test Cases Using Genetic Algorithm, International Journal of
Emerging Technology and Advanced Engineering ISSN 2250-2459, Volume 2, Issue 3, March 2012.
[6]. Sanjay Singla, Dharminder Kumar, H M Rai3 and Priti Singla, Hybrid PSO Approach to Automate Test Data Generation for Data
Flow Coverage with Dominance Concepts, International Journal of Advanced Science and Technology Vol. 37, December, 2011
[7]. K. Agrawal and G. Srivastava, Towards software test data generation using discrete quantum particle swarm optimization, ISEC,
Mysore,India, pp. 65-68, February 2010
[8]. Andreas Windisch, Stefan Wappler and Joachim Wegener, Applying Particle Swarm Optimization to Software Testing,
GECCO’07, July 7–11, 2007, London, England, United Kingdom Copyright 2007 ACM 978-1-59593-697-4/07/0007.
[9]. Praveen Ranjan Srivastava1 and Tai-hoon Kim2, Application of Genetic Algorithm in Software Testing,, International Journal of
Software Engineering and Its Applications Vol. 3, No.4, October 2009.

More Related Content

What's hot

Coevolution of Second-order-mutant
Coevolution of Second-order-mutant Coevolution of Second-order-mutant
Coevolution of Second-order-mutant
IJECEIAES
 
Introduction to particle swarm optimization
Introduction to particle swarm optimizationIntroduction to particle swarm optimization
Introduction to particle swarm optimization
Mrinmoy Majumder
 
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATIONEVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
ijcsit
 
E034023028
E034023028E034023028
E034023028
ijceronline
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
Derek Kane
 
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
ijcsa
 
Biology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering OptimizationBiology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering Optimization
Xin-She Yang
 
Explainable AI in Drug Hunting
Explainable AI in Drug HuntingExplainable AI in Drug Hunting
Explainable AI in Drug Hunting
Ed Griffen
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
Uday Wankar
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
adil raja
 
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
csandit
 
The potential role of ai in the minimisation and mitigation of project delay
The potential role of ai in the minimisation and mitigation of project delayThe potential role of ai in the minimisation and mitigation of project delay
The potential role of ai in the minimisation and mitigation of project delay
Pieter Rautenbach
 
Introduction to genetic programming
Introduction to genetic programmingIntroduction to genetic programming
Introduction to genetic programming
abhishek singh
 
Dowload Paper.doc.doc
Dowload Paper.doc.docDowload Paper.doc.doc
Dowload Paper.doc.docbutest
 
Application of Genetic Algorithm in Software Engineering: A Review
Application of Genetic Algorithm in Software Engineering: A ReviewApplication of Genetic Algorithm in Software Engineering: A Review
Application of Genetic Algorithm in Software Engineering: A Review
IRJESJOURNAL
 

What's hot (16)

50120140504022
5012014050402250120140504022
50120140504022
 
Coevolution of Second-order-mutant
Coevolution of Second-order-mutant Coevolution of Second-order-mutant
Coevolution of Second-order-mutant
 
Introduction to particle swarm optimization
Introduction to particle swarm optimizationIntroduction to particle swarm optimization
Introduction to particle swarm optimization
 
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATIONEVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
EVOLUTIONARY COMPUTING TECHNIQUES FOR SOFTWARE EFFORT ESTIMATION
 
E034023028
E034023028E034023028
E034023028
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
A Non-Revisiting Genetic Algorithm for Optimizing Numeric Multi-Dimensional F...
 
Biology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering OptimizationBiology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering Optimization
 
Explainable AI in Drug Hunting
Explainable AI in Drug HuntingExplainable AI in Drug Hunting
Explainable AI in Drug Hunting
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
AUTOMATIC GENERATION AND OPTIMIZATION OF TEST DATA USING HARMONY SEARCH ALGOR...
 
The potential role of ai in the minimisation and mitigation of project delay
The potential role of ai in the minimisation and mitigation of project delayThe potential role of ai in the minimisation and mitigation of project delay
The potential role of ai in the minimisation and mitigation of project delay
 
Introduction to genetic programming
Introduction to genetic programmingIntroduction to genetic programming
Introduction to genetic programming
 
Dowload Paper.doc.doc
Dowload Paper.doc.docDowload Paper.doc.doc
Dowload Paper.doc.doc
 
Application of Genetic Algorithm in Software Engineering: A Review
Application of Genetic Algorithm in Software Engineering: A ReviewApplication of Genetic Algorithm in Software Engineering: A Review
Application of Genetic Algorithm in Software Engineering: A Review
 

Viewers also liked

P01052131135
P01052131135P01052131135
P01052131135
IOSR Journals
 
K1303058689
K1303058689K1303058689
K1303058689
IOSR Journals
 
G017133033
G017133033G017133033
G017133033
IOSR Journals
 
D012261521
D012261521D012261521
D012261521
IOSR Journals
 
Comparative Study on Self Confidence among University Level Football, Kho-Kho...
Comparative Study on Self Confidence among University Level Football, Kho-Kho...Comparative Study on Self Confidence among University Level Football, Kho-Kho...
Comparative Study on Self Confidence among University Level Football, Kho-Kho...
IOSR Journals
 
J010515361
J010515361J010515361
J010515361
IOSR Journals
 
H012466575
H012466575H012466575
H012466575
IOSR Journals
 
H012645760.iosr jmce p2
H012645760.iosr jmce p2H012645760.iosr jmce p2
H012645760.iosr jmce p2
IOSR Journals
 
La Silvicutura de la guadua en países latinoamericanos"
La Silvicutura de la guadua en países latinoamericanos" La Silvicutura de la guadua en países latinoamericanos"
La Silvicutura de la guadua en países latinoamericanos"
Festival Internacional del Bambú
 

Viewers also liked (9)

P01052131135
P01052131135P01052131135
P01052131135
 
K1303058689
K1303058689K1303058689
K1303058689
 
G017133033
G017133033G017133033
G017133033
 
D012261521
D012261521D012261521
D012261521
 
Comparative Study on Self Confidence among University Level Football, Kho-Kho...
Comparative Study on Self Confidence among University Level Football, Kho-Kho...Comparative Study on Self Confidence among University Level Football, Kho-Kho...
Comparative Study on Self Confidence among University Level Football, Kho-Kho...
 
J010515361
J010515361J010515361
J010515361
 
H012466575
H012466575H012466575
H012466575
 
H012645760.iosr jmce p2
H012645760.iosr jmce p2H012645760.iosr jmce p2
H012645760.iosr jmce p2
 
La Silvicutura de la guadua en países latinoamericanos"
La Silvicutura de la guadua en países latinoamericanos" La Silvicutura de la guadua en países latinoamericanos"
La Silvicutura de la guadua en países latinoamericanos"
 

Similar to M017127578

L018147377
L018147377L018147377
L018147377
IOSR Journals
 
Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
anurag singh
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Respa Peter
 
B017410916
B017410916B017410916
B017410916
IOSR Journals
 
B017410916
B017410916B017410916
B017410916
IOSR Journals
 
T01732115119
T01732115119T01732115119
T01732115119
IOSR Journals
 
Software testing using genetic algorithms
Software testing using genetic algorithmsSoftware testing using genetic algorithms
Software testing using genetic algorithms
Nurhussen Menza
 
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
AI Publications
 
Using particle swarm optimization to solve test functions problems
Using particle swarm optimization to solve test functions problemsUsing particle swarm optimization to solve test functions problems
Using particle swarm optimization to solve test functions problems
riyaniaes
 
Comparison between the genetic algorithms optimization and particle swarm opt...
Comparison between the genetic algorithms optimization and particle swarm opt...Comparison between the genetic algorithms optimization and particle swarm opt...
Comparison between the genetic algorithms optimization and particle swarm opt...
IAEME Publication
 
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
IAEME Publication
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
Priti Punia
 
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer  Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
ijsc
 
Optimal rule set generation using pso algorithm
Optimal rule set generation using pso algorithmOptimal rule set generation using pso algorithm
Optimal rule set generation using pso algorithm
csandit
 
Performance Analysis of GA and PSO over Economic Load Dispatch Problem
Performance Analysis of GA and PSO over Economic Load Dispatch ProblemPerformance Analysis of GA and PSO over Economic Load Dispatch Problem
Performance Analysis of GA and PSO over Economic Load Dispatch Problem
IOSR Journals
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Harshal Jain
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software Testing
Ghanshyam Yadav
 
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZERMARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
ijsc
 
Predictive job scheduling in a connection limited system using parallel genet...
Predictive job scheduling in a connection limited system using parallel genet...Predictive job scheduling in a connection limited system using parallel genet...
Predictive job scheduling in a connection limited system using parallel genet...Mumbai Academisc
 
Genetic Approach to Parallel Scheduling
Genetic Approach to Parallel SchedulingGenetic Approach to Parallel Scheduling
Genetic Approach to Parallel Scheduling
IOSR Journals
 

Similar to M017127578 (20)

L018147377
L018147377L018147377
L018147377
 
Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
B017410916
B017410916B017410916
B017410916
 
B017410916
B017410916B017410916
B017410916
 
T01732115119
T01732115119T01732115119
T01732115119
 
Software testing using genetic algorithms
Software testing using genetic algorithmsSoftware testing using genetic algorithms
Software testing using genetic algorithms
 
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
 
Using particle swarm optimization to solve test functions problems
Using particle swarm optimization to solve test functions problemsUsing particle swarm optimization to solve test functions problems
Using particle swarm optimization to solve test functions problems
 
Comparison between the genetic algorithms optimization and particle swarm opt...
Comparison between the genetic algorithms optimization and particle swarm opt...Comparison between the genetic algorithms optimization and particle swarm opt...
Comparison between the genetic algorithms optimization and particle swarm opt...
 
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
COMPARISON BETWEEN THE GENETIC ALGORITHMS OPTIMIZATION AND PARTICLE SWARM OPT...
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer  Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
 
Optimal rule set generation using pso algorithm
Optimal rule set generation using pso algorithmOptimal rule set generation using pso algorithm
Optimal rule set generation using pso algorithm
 
Performance Analysis of GA and PSO over Economic Load Dispatch Problem
Performance Analysis of GA and PSO over Economic Load Dispatch ProblemPerformance Analysis of GA and PSO over Economic Load Dispatch Problem
Performance Analysis of GA and PSO over Economic Load Dispatch Problem
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software Testing
 
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZERMARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
 
Predictive job scheduling in a connection limited system using parallel genet...
Predictive job scheduling in a connection limited system using parallel genet...Predictive job scheduling in a connection limited system using parallel genet...
Predictive job scheduling in a connection limited system using parallel genet...
 
Genetic Approach to Parallel Scheduling
Genetic Approach to Parallel SchedulingGenetic Approach to Parallel Scheduling
Genetic Approach to Parallel Scheduling
 

More from IOSR Journals

A011140104
A011140104A011140104
A011140104
IOSR Journals
 
M0111397100
M0111397100M0111397100
M0111397100
IOSR Journals
 
L011138596
L011138596L011138596
L011138596
IOSR Journals
 
K011138084
K011138084K011138084
K011138084
IOSR Journals
 
J011137479
J011137479J011137479
J011137479
IOSR Journals
 
I011136673
I011136673I011136673
I011136673
IOSR Journals
 
G011134454
G011134454G011134454
G011134454
IOSR Journals
 
H011135565
H011135565H011135565
H011135565
IOSR Journals
 
F011134043
F011134043F011134043
F011134043
IOSR Journals
 
E011133639
E011133639E011133639
E011133639
IOSR Journals
 
D011132635
D011132635D011132635
D011132635
IOSR Journals
 
C011131925
C011131925C011131925
C011131925
IOSR Journals
 
B011130918
B011130918B011130918
B011130918
IOSR Journals
 
A011130108
A011130108A011130108
A011130108
IOSR Journals
 
I011125160
I011125160I011125160
I011125160
IOSR Journals
 
H011124050
H011124050H011124050
H011124050
IOSR Journals
 
G011123539
G011123539G011123539
G011123539
IOSR Journals
 
F011123134
F011123134F011123134
F011123134
IOSR Journals
 
E011122530
E011122530E011122530
E011122530
IOSR Journals
 
D011121524
D011121524D011121524
D011121524
IOSR Journals
 

More from IOSR Journals (20)

A011140104
A011140104A011140104
A011140104
 
M0111397100
M0111397100M0111397100
M0111397100
 
L011138596
L011138596L011138596
L011138596
 
K011138084
K011138084K011138084
K011138084
 
J011137479
J011137479J011137479
J011137479
 
I011136673
I011136673I011136673
I011136673
 
G011134454
G011134454G011134454
G011134454
 
H011135565
H011135565H011135565
H011135565
 
F011134043
F011134043F011134043
F011134043
 
E011133639
E011133639E011133639
E011133639
 
D011132635
D011132635D011132635
D011132635
 
C011131925
C011131925C011131925
C011131925
 
B011130918
B011130918B011130918
B011130918
 
A011130108
A011130108A011130108
A011130108
 
I011125160
I011125160I011125160
I011125160
 
H011124050
H011124050H011124050
H011124050
 
G011123539
G011123539G011123539
G011123539
 
F011123134
F011123134F011123134
F011123134
 
E011122530
E011122530E011122530
E011122530
 
D011121524
D011121524D011121524
D011121524
 

Recently uploaded

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

M017127578

  • 1. IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661,p-ISSN: 2278-8727, Volume 17, Issue 1, Ver. II (Jan – Feb. 2015), PP 75-78 www.iosrjournals.org DOI: 10.9790/0661-17127578 www.iosrjournals.org 75 | Page Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing Deepti Arora1 , Anurag Singh Baghel2 1,2, (Gautam Buddha University,Uttar Pradesh,India) Abstract: This paper will describe a method for optimizing software testing by finding the most error prone paths in the program. This can be achieved by a meta-heuristic technique, that is by using genetic algorithm and particle swarm optimization. As exhaustive software testing is not possible where software is tested with all the possible inputs , those parts of software are also tested which are not error prone..Goal is to generate test cases using both the algorithms and then comparative study is done between Particle swarm optimization and genetic algorithm. Keywords: Software Testing, Meta-heuristics , Genetic Algorithms, Particle Swarm Optimization, Software test cases. I. Introduction Testing is the one of the crucial phase that is performed during software development. It is a primary technique which is used to gain consumer confidence in the software. It is conducted by executing the program developed with test inputs and comparing the observed output with the expected one .[1]Software testing is done to identify any errors or missing requirements in contrary to the actual requirements. It is done to validate the quality of the software testing using minimal cost and efforts and to generate high quality test cases. It uncovers the error in the software, including errors in requirement analysis, design document, coding, system resources and system environments, hardware problems and their interfaces to the software .[2] It is very time consuming and laborious activity. It is costly and consumes about 50% of the cost of the software development.[3]. Main goal of testing to find as many faults as possible in a software. As mentioned earlier it a time consuming activity ,as it is impossible to test the software unit with all the combinations of inputs so there is a need to design minimum no. of test cases that will discover as many faults as possible . However, software testing automation is not a straight forward process. For years a lot of research have been done in this area to generate test cases ,researchers developed methods like random test case generator, symbolic test data generators and dynamic test data generators. This paper applied the EST (Evolutionary software testing ) techniquie.EST is the automatic software test case generation technique which in turn will reduce the cost of development of software. EST interprets the task of test case generation as an optimization problem and tries to solve it using a search technique .EST uses an meta-heuristic search technique that is genetic algorithm to convert the task of test case generation into an optimal problem. Evolutionary Testing search for optimal test parameter combinations that satisfy a test criterion. Test criterion is represented fitness function that measures how well optimization parameters that are automatically generated are satisfying the given test criterion .There are variety of techniques for test case generation but in this paper we will focus on genetic algorithm and particle swarm optimization technique. This paper will present the result of our research in into the application of GA and PSO search approach, to find optimal solution in the software construct. II. Genetic Algorithm Genetic Algorithm (GA) are heuristic search algorithm.[4]They are based on the evolutionary idea of natural selection and genetics. Genetic algorithm is inspired by the Dalton’s theory about evolution that is survival of the fittest. Genetic algorithm is a part of evolutionary computing which is a growing field of Artificial Intelligence. GA exploits the historical information to direct the search in region of better performance with in the search space. [5] In this way competition among individuals for better resources results in fittest individual dominating over the weaker ones. Genetic Algorithms are more robust hence they are better than conventional AI(Artificial Intelligence). GA does not break easily even if there is a slightly change in the input and it also does not get affected by noise. GA offer benefit over typical search of optimization problem in searching large state space, multimodal search space and n dimensional surface. Distinct element in GA is individual and population. Individual represents single solution while population represents set of Solutions which is currently involved in this search process. Each individual is represented as chromosome. That is an Initial pool of chromosomes. Population size can be few dozens to thousands. To do optimization fitness function is required to select the best solution from the population and
  • 2. Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing DOI: 10.9790/0661-17127578 www.iosrjournals.org 76 | Page discard those not so good solutions. GA consists of following operators that is Selection Operator chromosomes are selected for cross-over based on the value of the fitness function Cross- Over Operator combine two chromosomes to produce new chromosomes. Mutation Operator in this value is randomly changed to create new genes in the individual. Pseudo code of GA Initialize (population) Evaluate Fitness of the population While (termination condition is met) do { Selection(Population) Cross-over(Population) Mutation(population) Evaluate (Population) } GA [6] starts with randomly generated population of individuals or chromosomes .Fitness of individual is calculated based on some fitness function. After the fitness is calculated selection of individuals is done based on the Roulette –Wheel Selection method i.e an individual having higher fitness value has the more chance of getting selected .Then Cross over operator is applied to produce new offspring in the population that may have better characteristics than their parents. Mutation is done to introduce new individual in the population .its is done by flipping the bit of the chromosomes. III. Particle Swarm Optimization Particle Swarm Optimization (PSO) [7] is a relatively recent heuristic search method. It is similar to GA in the sense that both are evolutionary algorithms .It is one of the meta-heuristics approach that optimizes a problem and try to improve candidate solution iteratively. PSO is generally used to solve those problems whose solution can be represented as a point in an n-dimensional space. In PSO potential solution is called particle. A number of particles are randomly set into motion through this space. Each particle posses its current position, current velocity ,and its pbest position .Pbest is the personal best position explored so far. It also incorporates Gbest that global best position achieved by all its individuals. It is a simple approach and it is effective across a variety of problem domains. Pseudo code for PSO The PSO algorithm consists of just few steps, which are repeated until some stopping condition is met. The steps are as follow:  Initialize the population of individuals with current position and, velocity.  Evaluate the fitness of the individual particle (Pbest).  Keep track of the individual highest fitness (Gbest).  Modify velocity based on Pbest and Gbest location.  Update the particle position. PSO starts with initialization of particle velocity and current position. Here particle is in 2-D space . Fitness value of the particle is calculated according to function. If the fitness of the particle is better than its previous value update particle x and y position that is its personal best position. Also if the value is better than gbest position update global best position of the particle. Apply equations to update the x and y velocity vector of the particles. Process repeats until termination criteria is met or the optimal solution is found. IV. Implementation Genetic Algorithm is implemented in c language. result is as follows. GA approach to problem to maximize the function (1) F(x)=x3 -x2 . X represent 5 digit unsigned binary integer .i.e x can take value [0,31]. Four randomly generated solution to problem are 14,18,24,30. Fitness of the individual is calculated by the function F(x).String no. 4 has the maximum value having more chances of getting selected. here N is 4 . One point Crossover is performed in a couple. New offspring is generated. Mutation is performed. We get new generation Again the process is repeated till the maximum possible value of the solution is obtained .Luckily in this case in the second iteration we will get desired value. Whereas In most of the cases GA traps in local optima. But here We have got the global optimum solution.
  • 3. Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing DOI: 10.9790/0661-17127578 www.iosrjournals.org 77 | Page Table 1 String N o. Initial Population Value of x F(x)=X3 -x2 pi Expected Count(N*pi) 1 01111 15 3150 0.072 0.289 2 10010 18 5508 0.126 0.505 3 10101 21 8820 0.202 0.809 4 11110 30 26100 0.598 2.395 Sum 43578 1 4 Average 10894 0.25 1 Max 26100 0.598 2.395 Table 2 Before Crossover After Crossover Mutation Of element 3 at position 2 New Generation is as follows (Value of x) 01111 01110 01110 14 10010 10011 10011 19 10101 10100 10110 22 11110 11111 11111 31 Particle Swarm Optimization For Mathematical function (2) val=(x-15)4 -(y-20)2 +9 Particle is initialized with current position and velocity. Program will search for optimal solution through the movement of particle. Program will keep track of personal best and global best position of the particle and update its position and velocity .Optimal solution here is to minimize the mathematical function .PSO is implemented in C language. How the particle moves in the search space to find global best solution is shown in the Fig 1 & Fig 2. Finally the optimum solution is found when x=15 and y=20.For more complex problems where it is not possible to easily solve the problem mathematically ,these algorithms can be used. Figure 1 Movement of particles to find optimum solution Figure 2 Global best solution
  • 4. Application of Genetic Algorithm and Particle Swarm Optimization in Software Testing DOI: 10.9790/0661-17127578 www.iosrjournals.org 78 | Page V. Comparison Of GA And PSO Genetic Algorithm and Particle Swarm Optimization technique are both evolutionary search algorithm and have been applied in variety of problem domains.[8 &9] GA can be applied to number of problems like N- queens problem, Travel salesman problem to find optimal solution. GA suffers from the drawback that it traps in local optima, that is it does not know how to sacrifice short term fitness for long term fitness. It does not keep in account the global best position of the individual. This drawback is overcome by Particle Swarm optimization technique which tracks the particle personal best position as well as global best position ,hence it moves toward global optima without getting trapped in local optima. GA has been popular because of its parallel nature of search ,and essentially because it can solve non linear ,multi model problems. It can handle both Continuous and discrete variables where as PSO can easily handle Continuous variables. In comparison to GA ,PSO has few parameters and it is easy to implement .Calculation of PSO Algorithm is very simple though it is difficult to implement with problem of non coordinate system .It is problem dependent, Problem having continuous variables PSO is superior to GA .Many researchers have compared both the technologies .PSO outperforms GA, and is more effective in general however superiority of PSO is problem dependent. VI. Conclusion PSO is relatively recent heuristic approach, It is similar to Genetic algorithm in a way that they both are population based evolutionary algorithms. Paper is reported on the application of Genetic Algorithm and Particle Swarm Optimization. Paper described the basic concepts of GA and PSO ,how the test cases are generated using genetic algorithm and how they are useful in finding the optimal solution to the problem. Comparative study is done between both the algorithm where GA can be useful and how PSO overcome the drawback of GA. We also intend to extend the approach described here so that it is useful to solve many problems like knapsack problem. References [1]. B. Beizer,Software testing techniques, Second Edition, Van Nostrand Reinhold, NewYork, 1990. [2]. Nirmal Kumar Gupta and Dr. Mukesh Kumar Rohil,, Using Genetic Algorithm for Unit Testing Of Object Oriented Software, IJSSST, Vol.10, No.3. [3]. S. Desikan and G. Ramesh, ,Software testing principles & practices, Pearson Education, 2007. [4]. K. F. Man, ,K. S. Tang, and S. Kwong,,Genetic Algorithms: Concepts and Applications, IEEE Transaction on Industrial Electronics ,VOL. 43, NO. 5, October 1996.. [5]. Abhishek Singhal, Swati Chandna and Abhay Bansal, Optimization of Test Cases Using Genetic Algorithm, International Journal of Emerging Technology and Advanced Engineering ISSN 2250-2459, Volume 2, Issue 3, March 2012. [6]. Sanjay Singla, Dharminder Kumar, H M Rai3 and Priti Singla, Hybrid PSO Approach to Automate Test Data Generation for Data Flow Coverage with Dominance Concepts, International Journal of Advanced Science and Technology Vol. 37, December, 2011 [7]. K. Agrawal and G. Srivastava, Towards software test data generation using discrete quantum particle swarm optimization, ISEC, Mysore,India, pp. 65-68, February 2010 [8]. Andreas Windisch, Stefan Wappler and Joachim Wegener, Applying Particle Swarm Optimization to Software Testing, GECCO’07, July 7–11, 2007, London, England, United Kingdom Copyright 2007 ACM 978-1-59593-697-4/07/0007. [9]. Praveen Ranjan Srivastava1 and Tai-hoon Kim2, Application of Genetic Algorithm in Software Testing,, International Journal of Software Engineering and Its Applications Vol. 3, No.4, October 2009.