A hybrid Approach of Genetic Algorithm and Particle Swarm Technique to Software Test Case Generation

Similar documents
SOFTWARE TESTING STRATEGY APPROACH ON SOURCE CODE APPLYING CONDITIONAL COVERAGE METHOD

International Journal of Software and Web Sciences (IJSWS)

AN APPROACH FOR SOFTWARE TEST CASE SELECTION USING HYBRID PSO

GA as a Data Optimization Tool for Predictive Analytics

International Journal of Emerging Technologies in Computational and Applied Sciences (IJETCAS)

A Hybrid Model of Particle Swarm Optimization (PSO) and Artificial Bee Colony (ABC) Algorithm for Test Case Optimization

An ACO Approach to Solve a Variant of TSP

Numerical Research on Distributed Genetic Algorithm with Redundant

Proposed Software Testing Using Intelligent techniques (Intelligent Water Drop (IWD) and Ant Colony Optimization Algorithm (ACO))

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Alpha Cut based Novel Selection for Genetic Algorithm

ISSN: ISO 9001:2008 Certified International Journal of Engineering Science and Innovative Technology (IJESIT) Volume 2, Issue 3, May 2013

A Fast Computational Genetic Algorithm for Economic Load Dispatch

CLOUD DATABASE ROUTE SCHEDULING USING COMBANATION OF PARTICLE SWARM OPTIMIZATION AND GENETIC ALGORITHM

Optimization and Ranking in Web Service Composition using Performance Index

A Novel Binary Particle Swarm Optimization

Biogeography Based Optimization (BBO) Approach for Sensor Selection in Aircraft Engine

Applying Particle Swarm Optimization to Software Testing

A Binary Model on the Basis of Imperialist Competitive Algorithm in Order to Solve the Problem of Knapsack 1-0

Practical Applications of Evolutionary Computation to Financial Engineering

Keywords: Information Retrieval, Vector Space Model, Database, Similarity Measure, Genetic Algorithm.

Wireless Sensor Networks Coverage Optimization based on Improved AFSA Algorithm

Dynamic Generation of Test Cases with Metaheuristics

International Journal of Emerging Technologies in Computational and Applied Sciences (IJETCAS)

Hybrid Algorithm using the advantage of ACO and Cuckoo Search for Job Scheduling

Research Article Service Composition Optimization Using Differential Evolution and Opposition-based Learning

A resource schedule method for cloud computing based on chaos particle swarm optimization algorithm

A RANDOMIZED LOAD BALANCING ALGORITHM IN GRID USING MAX MIN PSO ALGORITHM

Cellular Automaton: The Roulette Wheel and the Landscape Effect

A Genetic Algorithm Approach for Solving a Flexible Job Shop Scheduling Problem

COMPUTATIONIMPROVEMENTOFSTOCKMARKETDECISIONMAKING MODELTHROUGHTHEAPPLICATIONOFGRID. Jovita Nenortaitė

Optimal PID Controller Design for AVR System

Web Service Selection using Particle Swarm Optimization and Genetic Algorithms

Genetic Algorithm. Based on Darwinian Paradigm. Intrinsically a robust search and optimization mechanism. Conceptual Algorithm

A Review And Evaluations Of Shortest Path Algorithms

Stock price prediction using genetic algorithms and evolution strategies

A Robust Method for Solving Transcendental Equations

An Efficient Approach for Task Scheduling Based on Multi-Objective Genetic Algorithm in Cloud Computing Environment

Extraction of Satellite Image using Particle Swarm Optimization

New Modifications of Selection Operator in Genetic Algorithms for the Traveling Salesman Problem

Research on the Performance Optimization of Hadoop in Big Data Environment

Volume 3, Issue 2, February 2015 International Journal of Advance Research in Computer Science and Management Studies

A Multi-Objective Performance Evaluation in Grid Task Scheduling using Evolutionary Algorithms

Implementing Ant Colony Optimization for Test Case Selection and Prioritization

Performance Evaluation of Task Scheduling in Cloud Environment Using Soft Computing Algorithms

LOAD BALANCING IN CLOUD COMPUTING

Optimization of PID parameters with an improved simplex PSO

Effect of Using Neural Networks in GA-Based School Timetabling

Minimizing Response Time for Scheduled Tasks Using the Improved Particle Swarm Optimization Algorithm in a Cloud Computing Environment

EA and ACO Algorithms Applied to Optimizing Location of Controllers in Wireless Networks

A New Software Data-Flow Testing Approach via Ant Colony Algorithms

International Journal of Emerging Technology & Research

A Genetic Algorithm Processor Based on Redundant Binary Numbers (GAPBRBN)

College of information technology Department of software

Genetic Algorithm Evolution of Cellular Automata Rules for Complex Binary Sequence Prediction

Application of GA for Optimal Location of FACTS Devices for Steady State Voltage Stability Enhancement of Power System

Software Project Planning and Resource Allocation Using Ant Colony Optimization with Uncertainty Handling

Manjeet Kaur Bhullar, Kiranbir Kaur Department of CSE, GNDU, Amritsar, Punjab, India

A Parallel Processor for Distributed Genetic Algorithm with Redundant Binary Number

Comparing Algorithms for Search-Based Test Data Generation of Matlab R Simulink R Models

Correspondence should be addressed to Chandra Shekhar Yadav;

SEARCH-BASED SOFTWARE TEST DATA GENERATION USING EVOLUTIONARY COMPUTATION

Keywords revenue management, yield management, genetic algorithm, airline reservation

DECISION TREE INDUCTION FOR FINANCIAL FRAUD DETECTION USING ENSEMBLE LEARNING TECHNIQUES

Evaluation of Different Task Scheduling Policies in Multi-Core Systems with Reconfigurable Hardware

Computational intelligence in intrusion detection systems

Electric Distribution Network Multi objective Design Using Problem Specific Genetic Algorithm

International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Méta-heuristiques pour l optimisation

Projects - Neural and Evolutionary Computing

Optimised Realistic Test Input Generation

Comparative Analysis of Load Balancing Algorithms in Cloud Computing

D A T A M I N I N G C L A S S I F I C A T I O N

Software Framework for Vehicle Routing Problem with Hybrid Metaheuristic Algorithms

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Effective Load Balancing for Cloud Computing using Hybrid AB Algorithm

LOAD BALANCING IN CLOUD USING ACO AND GENETIC ALGORITHM

The Applications of Genetic Algorithms in Stock Market Data Mining Optimisation

Flexible Neural Trees Ensemble for Stock Index Modeling

BMOA: Binary Magnetic Optimization Algorithm

QoS Guaranteed Intelligent Routing Using Hybrid PSO-GA in Wireless Mesh Networks

Schedule Risk Analysis Simulator using Beta Distribution

Designing a Linear FIR filter

Stock Market Index Prediction by Hybrid Neuro- Genetic Data Mining Technique

Search Algorithm in Software Testing and Debugging

HYBRID ACO-IWD OPTIMIZATION ALGORITHM FOR MINIMIZING WEIGHTED FLOWTIME IN CLOUD-BASED PARAMETER SWEEP EXPERIMENTS

Resource Provisioning in Single Tier and Multi-Tier Cloud Computing: State-of-the-Art

Leran Wang and Tom Kazmierski

Extended Finite-State Machine Inference with Parallel Ant Colony Based Algorithms

Genetic algorithms for changing environments

New binary representation in Genetic Algorithms for solving TSP by mapping permutations to a list of ordered numbers

Transcription:

A hybrid Approach of Genetic Algorithm and Particle Swarm Technique to Software Test Case Generation Abhishek Singh Department of Information Technology Amity School of Engineering and Technology Amity University Noida, Uttar Pradesh, India Naveen Garg Department of Information Technology Amity School of Engineering and Technology Amity University Noida, Uttar Pradesh, India Tajinder Saini Assistant Professor Department of Information Technology JMIT, Radaur, Haryana, India Abstract This paper presents A hybrid Genetic Particle swarm technique algorithm (HGPSTA) which is a technique that combines genetic algorithm (GA) and particle swarm optimization (PSO), which is used for Software Test Case Generation. Research Paper also presents the outcome of the research done in the area of software testing using the soft computing. Different soft computing approaches such as Particle Swarm Optimization (PSO) and Genetic Algorithm (GA), and hybrid of PSO and GA are used. These are used to compare and find the minimum software test cases for testing the software. Keywords: Software Testing, Genetic Algorithms, Particle Swarm Optimization, Software test cases. I. INTRODUCTION Software Testing is one of the time consuming and costly phases in software development process. It takes lot of time and consumes 55% of the cost of a software development, It requires a lot of effort on developing software testing tools that can reduce time and cost of software development. Generation of test cases depends on the skill of person and consumes a lot of effort. Therefore lots of chances which cause defects at the time of designing of test cases are enormous that leads to the insertion of bugs in the software system. Testing system is essential to make different good (suitable) test data from bad test (unsuitable) data, and so it should be proficient to detect good test data if they are generated. Testing is a means of making sure that the product meets the needs of the customer. Testing a software product is just a mechanism to compare the outputs on a given set of outputs and checking whether the output requirements are met. The software testing process also doesn t ensure that there is no error in the product but may that error is acceptable.[2,3] The application of artificial intelligence (AI) techniques is an emerging area of research in Software Engineering (SE) that focuses across two domains about the cross fertilization. Researchers have done some work in developing genetic algorithms (GA)- based test data generators. In this paper, we have tried to present the results of our research into the application of GA search approach and PSO, identifying those paths of software construct that are error prone.[4] In comparison to genetic search, the particle swarm optimization is a relatively recent optimization technique of the swarm intelligence paradigm. We initialize the system with random particles. Each particle maintains its own current position, its present velocity and its personal best position on the basis of which we generate the test cases. Compared with GA, PSO has some attractive characteristics. PSO has a good memory which helps to retain good solutions by particles. but in GA, all the prior knowledge to problem changes once the population is changed. It has constructive cooperation between particles, particles in the swarm share information between them. Vol. 3 Issue 4 April 2014 208 ISSN: 2319-1058

In this paper we develop an algorithm combining the power of GA, PSO, HGPSTA Hybrid Genetic Particle Swarm Technique Algorithm with a new multi objective fitness function. This paper also tries demonstrating the effectiveness of our proposed approach in case of number of generations. II. GENETIC ALGORITHM (GA) AND PARTICLE SWARM OPTIMIZATION (PSO) 2.1 Genetic Algorithm GA can be classified into five categories: (1) A representation of a guess called a chromosome. (2) An initial pool of chromosomes (3) A fitness function (4) A selection function and (5) A crossover operator and a mutation operator The GAs uses three basic operators (reproduction, crossover, and mutation) to manipulate the genetic composition of a population. Reproduction is a process by which people rated the current generation are reproduced in the new generation.[5][6] The crossover operator produces two-off springs (new candidate solutions) by recombination of the information from both parents. The mutation is a random change value of some of the genes in an individual. Flow Chart of Genetic Algorithm This iterative process goes on till any one possible termination criteria is met or if a known solution level is achieved. Pseudo code for GA is: Figure 1. Genetic Algorithm Flow Chart Initialize (population) Vol. 3 Issue 4 April 2014 209 ISSN: 2319-1058

Evaluate (population) While (stopping condition not satisfied) do { 1. Selection (population) 2. Crossover (population) 3. Mutate (population) 4. Evaluate (population) } 2.2 Particle swarm Optimization In comparison to GA, PSO is a relatively recent optimization technique of the swarm intelligence paradigm. The particles are initialized to the system with a population of random solutions [7,8]. Flow Chart for Particle Swarm Optimization Figure 2: Particle Swarm Optimization algorithm Flow Chart Pseudo Code for PSO 1:Procedure PSO 2: repeat 3: for i = 1 to number of individuals do 4: if G(~xi) > G(~pi) then. G () evaluates goodness 5: for d = 1 to dimensions do Vol. 3 Issue 4 April 2014 210 ISSN: 2319-1058

6: pid = xid. pid is the best state found so far 7: end for 8: end if 9: g = i. arbitrary 10: for j = indexes of neighbors do 11: if G(~pj) > G(~pg) then 12: g = j. g is the index of the best solution in the neighborhood 13: end if 14: end for 15: for d = 1 to number of dimensions do 16: vid(t) = f(xid(t 1), vid(t 1), pid, pgd). update velocity 17: vid 2 ( Vmax,+Vmax) 18: xid(t) = f(vid(t), xid(t 1)). update position 19: end for 20: end for 21: until stopping criteria 22: end procedure III. PROPOSED APPROACH Hybrid Genetic Particle Swarm Technique algorithm (HGPSTA) Generating test cases is time consuming and also an error-prone task. Evolutionary structural testing (EST), is an automatic test case generation technique, to ease the testing process.[1] EST interprets the task of test case generation as an optimization problem and tries to solve it using a search technique, i.e. a genetic algorithm and particle swarm technique. [9] Vol. 3 Issue 4 April 2014 211 ISSN: 2319-1058

Figure 3. Hybrid Genetic Particle Swarm Technique algorithm Flow Graph We combine the Pso and GA techniques to improve the efficiency of the testing process. Proposed hybrid approach is the combination of genetic and particle swarm algorithm to automatic test-data generation for searching test cases. The proposed hybrid system includes 3 main operators: enhancement, crossover, and mutation. The proposed approach has three main operators: enhancement, crossover and mutations Enhancement PSO is used to enhance individuals of the same generation. Once we calculate the fitness value of all individuals belonging to same population the most successful first half are marked. In place of reproducing the individuals to GA S directly we use PSO to enhance individuals. Crossover: To produce successful individuals among parents of the crossing operation are selected from the only people improved. To select parents for crossing operation, the selection scheme roulette wheel is used. Mutation: The mutation is an operator such that the allele of a gene is randomly changed so that new genetic material may be introduced into the population. IV. EXPERIMENT RESULTS In the present work, Genetic Algorithm (GA), Particle Swarm Optimization (PSO) and A hybrid Genetic Particle swarm technique algorithm (HGPSTA) have been developed for fitness function which is based on dominance relation between two nodes. The fitness function based on the criteria of data flow coverage. The fitness function that is taken in this research is depending on the dominance relation between nodes of data flow graph. The main goal of research is to combine the power of two algorithms GA and PSO. It proves its power and effectiveness towards solving the testing problems. Initial population for GA, PSO and HGPSTA program is generated randomly. Experiments are conducted 10 times for averaging results. In each attempt, search functions are Iterated for sufficient number of generations for each of ten runs. Experiments are conducted on seven programs they are GTN This is program for finding greatest of three numbers. PRIME this is the simplest program check whether a given number is Prime number or not. RM This program is loop based program which finds remainder of two integer numbers. BS - This program is based on Bubble Sorting algorithm. QE This programs finds the roots of Quadratic Equation. MM this is array and loop based program that find minimum and maximum value from an array. HCF this program accepts two inputs and finds Highest Common Factor between these two integer numbers. Results are analyzed by changing the size of populations with different mutation and crossover probability in GA and HGPSTA. In case of PSO and also the results are determined by changing the number of individuals. The results of the proposed HGPSTA are compared with GA and PSO. As shown in figures 4 HGPSTA performs better than GA and PSO in number of generation. Vol. 3 Issue 4 April 2014 212 ISSN: 2319-1058

Figure 4. Comparisons of HGPSTA PSO and GA w. r. t. Number of Generations From figure 5, it can be analy zed easily that number of test cases generated in case of HGPSTA is less than GA and PSO. Figure 5. Comparisons of HGPSTA PSO and GA w. r. t. Number of Test Cases. Vol. 3 Issue 4 April 2014 213 ISSN: 2319-1058

V. CONCLUSION AND FUTURE WORK In this paper we have proposed an algorithm for generating test cases using combining the power of GA and PSO, HGPSTA Hybrid of Genetic Particle Swarm Combined Algorithm. Experiments show the effectiveness of the proposed HGPSTA compared to the PSO and GA techniques. The results of our new approach, HGPSTA is better than GA and PSO. HGPSTA achieves 100 percent coverage in less number of iterations. Future work is to analyze the test case generation using hybrid PSO and ACO (Ant colony optimization) and compare its fectiveness with our HGPSTA. REFERENCES ` [1] N. Mansour, and M. Salame, Data Generation for Path Testing, Software Quality Control Vol.12, No.2, pp.121-136, 2004. [2] J. Lin, and P. Yeh, Automatic test data generation for path testing using Gas, Information Sciences, Vol.131, No.1-4, pp. 47-64, 2001. [3] S. Wappler, and J. Wegener, Evolutionary unit testing of object oriented software using strongly-typed genetic programming, Proceedings of the 8th Annual Conference on Genetic and Evolutionary Computation, Seattle, Washington, USA, July 08-12, 2006. GECCO '06. ACM, New York, NY, pp. 1925-1932, 2006. [4] A. Windisch, S. Wappler and J. Wegener, Applying particle swarm optimization to software testing, ACM, GECCO, London, England, United Kingdom, New York, pp. 1121-1128, 2007. [5] Dr. Velur Rajappa, Arun Biradar, Satanik Panda, Efficient Software Test Case Generation Using Genetic Algorithm Based Graph Theory, First International Conference on Emerging Trends in Engineering and Technology, ICETET '08, pp.298-303, 2008. [6] M. R. Girgis, Automatic test data generation for data flow testing using genetic algorithm, Journal of Universal Computer Science, Vol. 11, No. 6, pp. 898 915, 2005. [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] J. J. Liang, A. K. Qin, P. N. Suganthan, and S. Baskar. Comprehensive learning particle swarm optimizer for global optimization of multimodal functions. IEEE Transactions on Evolutionary Computation, 10:281 295, 2006. [9] K. Li, Z. Zhang and J. Kou Breading software test data with Genetic-Particle swarm mixed Algorithms, Journal of computers, Vol. 5, No. 2, pp. 258-265, 2010. Vol. 3 Issue 4 April 2014 214 ISSN: 2319-1058