ISSN: [Keswani* et al., 7(1): January, 2018] Impact Factor: 4.116

Similar documents
The Genetic Algorithm for finding the maxima of single-variable functions

Revision of a Floating-Point Genetic Algorithm GENOCOP V for Nonlinear Programming Problems

A Genetic Algorithm for Graph Matching using Graph Node Characteristics 1 2

Usage of of Genetic Algorithm for Lattice Drawing

Clustering Analysis of Simple K Means Algorithm for Various Data Sets in Function Optimization Problem (Fop) of Evolutionary Programming

Towards Automatic Recognition of Fonts using Genetic Approach

Network Routing Protocol using Genetic Algorithms

Grid Scheduling Strategy using GA (GSSGA)

A NOVEL APPROACH FOR PRIORTIZATION OF OPTIMIZED TEST CASES

Meta- Heuristic based Optimization Algorithms: A Comparative Study of Genetic Algorithm and Particle Swarm Optimization

A Real Coded Genetic Algorithm for Data Partitioning and Scheduling in Networks with Arbitrary Processor Release Time

Using Genetic Algorithms in Integer Programming for Decision Support

MINIMAL EDGE-ORDERED SPANNING TREES USING A SELF-ADAPTING GENETIC ALGORITHM WITH MULTIPLE GENOMIC REPRESENTATIONS

A Genetic Algorithm for Minimum Tetrahedralization of a Convex Polyhedron

Selection of Optimal Path in Routing Using Genetic Algorithm

Inducing Parameters of a Decision Tree for Expert System Shell McESE by Genetic Algorithm

Introduction to Genetic Algorithms

Genetic Algorithm for Dynamic Capacitated Minimum Spanning Tree

Hybrid of Genetic Algorithm and Continuous Ant Colony Optimization for Optimum Solution

An Improved Genetic Algorithm based Fault tolerance Method for distributed wireless sensor networks.

Comparative Study on VQ with Simple GA and Ordain GA

Solving ISP Problem by Using Genetic Algorithm

4/22/2014. Genetic Algorithms. Diwakar Yagyasen Department of Computer Science BBDNITM. Introduction

Mobile Robots Path Planning using Genetic Algorithms

Calc Redirection : A Structure for Direction Finding Aided Traffic Monitoring

Automata Construct with Genetic Algorithm

A New Selection Operator - CSM in Genetic Algorithms for Solving the TSP

ANTICIPATORY VERSUS TRADITIONAL GENETIC ALGORITHM

Adaptive Crossover in Genetic Algorithms Using Statistics Mechanism

Genetic Algorithm for Dynamic Capacitated Minimum Spanning Tree

Genetic Algorithm for Finding Shortest Path in a Network

Role of Genetic Algorithm in Routing for Large Network

AN EVOLUTIONARY APPROACH TO DISTANCE VECTOR ROUTING

Research Article Path Planning Using a Hybrid Evolutionary Algorithm Based on Tree Structure Encoding

V.Petridis, S. Kazarlis and A. Papaikonomou

Segmentation of Noisy Binary Images Containing Circular and Elliptical Objects using Genetic Algorithms

A Genetic Algorithm Approach for Clustering

An experimental evaluation of a parallel genetic algorithm using MPI

GENERATIONAL MODEL GENETIC ALGORITHM FOR REAL WORLD SET PARTITIONING PROBLEMS

Genetic-PSO Fuzzy Data Mining With Divide and Conquer Strategy

Fuzzy Inspired Hybrid Genetic Approach to Optimize Travelling Salesman Problem

Codebook generation for Image Compression with Simple and Ordain GA

International Journal of Scientific & Engineering Research Volume 8, Issue 10, October-2017 ISSN

1. Introduction. 2. Motivation and Problem Definition. Volume 8 Issue 2, February Susmita Mohapatra

Automated Test Data Generation and Optimization Scheme Using Genetic Algorithm

Hierarchical Learning Algorithm for the Beta Basis Function Neural Network

Fault Detection in Control Systems via Evolutionary Algorithms

Job Shop Scheduling Problem (JSSP) Genetic Algorithms Critical Block and DG distance Neighbourhood Search

Genetic Algorithm for optimization using MATLAB

Learning Adaptive Parameters with Restricted Genetic Optimization Method

IMPROVING A GREEDY DNA MOTIF SEARCH USING A MULTIPLE GENOMIC SELF-ADAPTATING GENETIC ALGORITHM

GENETIC ALGORITHM VERSUS PARTICLE SWARM OPTIMIZATION IN N-QUEEN PROBLEM

Structural Optimizations of a 12/8 Switched Reluctance Motor using a Genetic Algorithm

EVOLVING LEGO. Exploring the impact of alternative encodings on the performance of evolutionary algorithms. 1. Introduction

Graphical Approach to Solve the Transcendental Equations Salim Akhtar 1 Ms. Manisha Dawra 2

Binary Representations of Integers and the Performance of Selectorecombinative Genetic Algorithms

A Technique for Design Patterns Detection

A Web-Based Evolutionary Algorithm Demonstration using the Traveling Salesman Problem

A THREAD BUILDING BLOCKS BASED PARALLEL GENETIC ALGORITHM

EECS 4313 Software Engineering Testing. Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang

Topological Machining Fixture Layout Synthesis Using Genetic Algorithms

CONCEPT FORMATION AND DECISION TREE INDUCTION USING THE GENETIC PROGRAMMING PARADIGM

Using Genetic Algorithm to Break Super-Pascal Knapsack Cipher

Automatic Selection of GCC Optimization Options Using A Gene Weighted Genetic Algorithm

Information Fusion Dr. B. K. Panigrahi

Experimental Comparison of Different Techniques to Generate Adaptive Sequences

GENETIC ALGORITHM with Hands-On exercise

A Genetic Algorithm-Based Approach for Energy- Efficient Clustering of Wireless Sensor Networks

Evolutionary Computation Algorithms for Cryptanalysis: A Study

Genetic algorithm based on number of children and height task for multiprocessor task Scheduling

INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & MANAGEMENT

Applying Evolutionary Algorithms and the No Fit Polygon to the Nesting Problem

Time Complexity Analysis of the Genetic Algorithm Clustering Method

A Comparative Study of Genetic Algorithm and Particle Swarm Optimization

A Review on Optimization of Truss Structure Using Genetic Algorithms

Optimization of Function by using a New MATLAB based Genetic Algorithm Procedure

Genetic Algorithms For Vertex. Splitting in DAGs 1

International Journal of Modern Engineering and Research Technology

CutLeader Nesting Technology

Partitioning Sets with Genetic Algorithms

Image Classification and Processing using Modified Parallel-ACTIT

A Genetic Programming Approach for Distributed Queries

Abstract. 1 Introduction

International Journal of Digital Application & Contemporary research Website: (Volume 1, Issue 7, February 2013)

Abstract. 1 Introduction

Heuristic Optimisation

A GENETIC ALGORITHM FOR CLUSTERING ON VERY LARGE DATA SETS

Evolution of the Discrete Cosine Transform Using Genetic Programming

A Genetic Algorithm for Multiprocessor Task Scheduling

MIC 2009: The VIII Metaheuristics International Conference. A Comparative Study of Adaptive Mutation Operators for Genetic Algorithms

CHAPTER 4 GENETIC ALGORITHM

IMPROVEMENT OF THE QUALITY OF VLSI CIRCUIT PARTITIONING PROBLEM USING GENETIC ALGORITHM

Robust Object Segmentation Using Genetic Optimization of Morphological Processing Chains

CLOSED LOOP SYSTEM IDENTIFICATION USING GENETIC ALGORITHM

Introduction to Genetic Algorithms. Based on Chapter 10 of Marsland Chapter 9 of Mitchell

Genetic Algorithms. Genetic Algorithms

DERIVATIVE-FREE OPTIMIZATION

Genetic algorithms and finite element coupling for mechanical optimization

Optimization Technique for Maximization Problem in Evolutionary Programming of Genetic Algorithm in Data Mining

Genetic Programming. and its use for learning Concepts in Description Logics

Transcription:

IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY AUTOMATIC TEST CASE GENERATION FOR PERFORMANCE ENHANCEMENT OF SOFTWARE THROUGH GENETIC ALGORITHM AND RANDOM TESTING Bright Keswani, Vikash Yadav Professor, Dept. of Comp. Application, Suresh Gyan Vihar University, Jaipur Research Scholar, Suresh Gyan Vihar University, Jaipur DOI:.58/zenodo.35957 ABSTRACT Software testing is most effort consuming phase in software development. One would like to minimize the efforts and maximize the number of faults detected. Hence test case generation may be treated as an optimization problem. One of the major difficulties in software testing is the automatic generation of test data that satisfy a given adequacy criterion. Generating test cases automatically will reduce cost and efforts significantly. In this paper, test case data is generated automatically using s and results are compared with. It is observed that s outperforms. KEYWORDS: Automatic test case generation, Equivalence Class Partitioning, etc. I. INTRODUCTION Testing is a process which needs to be done effectively. Exhaustive testing is not possible due to limitation of resources. In past, it is observed that test cases lie in different classes. Equivalence classes are to form a partition of set, where partition refers to a collection of mutually disjoint subsets where the union is the entire set [] []. This has two important implications for software testing: the fact that the entire set is represented provides a form of completeness and disjointedness ensures a form of non-redundancy. As the subsets are determined by a equivalence relation, the elements of one subset have something in common [3,, 5]. So the idea is to identify test cases by using one element from each equivalence class. If the classes were chosen wisely, it greatly reduces the potential redundancy in test cases. For example for an equilateral triangle test case, if one chose (3, 3, 3) as test case, then one would not expect to learn much from (6, 6, 6) or (50, 50, 50). The key of equivalence class testing is the choice of the equivalence relation, which partition the classes. For the sake of drawings, a function F of two variables x, x will be used. For example, Equivalence class partitions for a nextdate module, which return the very next date of the entered current date [6] [7]. To solve optimization problems there are a number of techniques and one of them is s. Genetic algorithms are population based search based on the Darwin's principle of survival of the fittest. is basically an evolutionary technique inspired by biological evolution. It was developed in 970's by J. Holland and his colleagues and his students at University of Michigan's [] []. It mimics the process of natural evolution. starts with an initial population and then applies genetic operators like selection, crossover, mutation and replacement on that population to evolve better and better individuals. can be terminated in either of two cases: maximum number of generations achieved or optimum value found. It can be done as under: It is a function of three variables and the boundaries are as follows: M = month ( <= month <=) D = date ( <= date <=3) Y = year (95 <= year <= 5) The invalid equivalence classes were: M = month < M3 = month > D = date < D3 = date > 3 Y = year < 95 Y3 = year > 5 So the robust test cases with equivalence class test may be as under: Table : Robust test cases for Equivalence Class Partitioning [86]

Month Date Year Remarks 5 96 All valid inputs - 96 M class 96 M3 class 5-96 D class 5 5 96 D3 class 5 900 Y class 5 Y3 class In this research, the researcher carried out the identification of these boundaries/intervals automatically through Genetic algorithm and random testing and then compares the results of both techniques. Genetic algorithm and random testing both starts with some random initial population and then use the fitness of individuals to progress towards the optimums, whereas random testing works randomly throughout the run. For this experiment, the distance from the boundaries is taken as the fitness of the individual chromosome. Unlike the boundary value analysis approach where this distance should be minimized, here the optimal distance is the distance between the boundary and a point p, where the location of p is to be somewhere in the middle of the two boundaries. The algorithms are coded in MATLAB 6a. II. for test case generation The proposed genetic algorithm for test case generation for Equivalence Class Partitioning is presented here. Firstly, the major components of are discussed and then overall algorithm is presented. In proposed value encoding is used in the chromosome i.e. real values are used to represent the input variables x,x,... of the program. The length of the chromosome depends on the number of variables [] [] [9]. Initial population is generated randomly. Fitness of each chromosome is determined by its difference from the boundaries of the variable. The optimal distance is the distance between the boundary and a point p, where the location of p is to be somewhere in the middle of the two boundaries. The more a variable is close to the boundaries the more it is declared fit. Selection is done to select parents for reproduction [6]. There are many methods to do this process. Roulette wheel and Random selection were used for and Random testing respectively in experiments. Rank Selection: It is a selection process based on fitness of an individual and total cumulative fitness. Random Selection: This selection in pure random, no knowledge is used in selection process. Crossover create new child from existing parents. It is one of important operators of genetic algorithm. Crossover operator used in experiments is arithmetic crossover. Following parameters are used in experiments:. Population Size: various population sizes are tried and best ones are taken for comparison i. e. 50 & 0.. Generations: program is executed with different number of generations and analysis of less number of generations and more number of generations is also taken into consideration i. e. 0, 500. 3. Encoding: chromosomes (test cases) are coded in real values, so Value encoding scheme of Genetic Algorithm is used.. Selection: Rank selection is used for, and Random selection is implemented for. 5. Crossover: number of crossovers available for real value coding, out of which arithmetic crossover is applied with 0.9 probability. 6. Mutation: uniform mutation is applied in experiments with 0.0 probability. 7. Replacement: Simple genetic algorithm replacement takes place, in which whole new population replaces the old one. III. Results & observations All inputs are taken from user, so that testing with different parameters can be done easily. User interface while running in MATLAB is as follows: - Inputs: [87]

No. of individuals in population : 50, No. of Variables :, No. of Generations : 500 limits of st variable : Lower limit : & Upper limit : limits of nd variable : Lower limit : & Upper limit : limits of 3rd variable : Lower limit : & Upper limit : Outputs: With, test cases generated as follows: Table : versus random testing for ECP Variables / Runs 3 5 Variable Variable Variable 3 Variable Variable Variable 3..5 9.9 9. 8. 6.7 9.5.3 8.9 8.0.7.5..6 9.8 9.8..5.8 9.7 8.7.7.5 7.8.7.8 9.7 8.6.6 3.6 Figure to Figure 5 shows the results of these executions as under: Difference from Boundary Values 8 6 Plot of Test Case Generation 0 0 0 0 300 00 500 Iterations Figure : versus random testing refer to row of Table [88]

Plot of Test Case Generation 7 Difference from Boundary Values Difference from Boundary Values 6 5 3 0 0 00 600 800 00 Iterations Figure : versus random testing refer to row of table Plot of Test Case Generation 5 3 0 0 0 0 300 00 500 Iterations Figure 3: versus random testing refer to row 3 of table [89]

Test Cases Generated From GA and s Variable 3(Range -) Variable (Range -) Variable (Range -) Figure : Results showing the final test cases analysis Test Case Generation Area for three variables range to Variable 3(Range -) 6 8 6 8 Variable (Range -) Variable (Range -) Figure 5: The area under the three variables as per their ranges (-) It is clearly visible from experiments that test cases with genetic algorithms spread over all classes, whereas random testing will generate test cases for small number of equivalence classes. So one can use Genetic algorithm to generate test cases automatically and get better and useful test cases as outputs. IV. CONCLUSION The overall results show evolutionary testing to be a promising approach for fully automating test case design for equivalence class partitioning technique of testing. To increase the efficiency and effectiveness, and thus to reduce the overall development cost for software-based systems, a systematic and automatic test case generator is required. Genetic algorithms search for relevant test cases in the input domain of the system under test. Due to [90]

the full automation of test case generation, the overall quality of software is also enhanced in comparison of using random testing. V. REFERENCES [] Beizer B. Software Testing Techniques. Van Nostrand Reinhold, nd edition, 990. [] Jorgenson C. Paul, Software Testing: A Craftsman Approach, CRC Press, nd Edition 0 pp 97-3. [3] Bertolino, A.: 'An overview of automated software testing', Journal Systems Software, Vol., pp. 33-38, 99 [] Deason, W. H., Brown, D. B., Chang, K. H., and II, J. H. C. (99). A Rule-Based Software Test Data Generator. IEEE Trans. on Knowl. and Data Eng., 3():8 7. [5] Dijkstra, E. W., Dahl, O. J., Hoare, C. A. R.: Structured programming, Academic Press., 97. [6] Duran J. W. and Ntafos S. C.: 'An Evaluation of ', IEEE Transactions on Software Engineering, Vol. SE-, No., pp. 38-, July 98 [7] Duran, J. W. and Ntafos S., 'A report on random testing', Proceedings 5th Int. Conf. on Software Engineering held in San Diego C.A., pp. 79-83, March 98 [8] Ferguson R. and Korel B. The chaining approach for software test data generation. IEEE Transactions on Software Engineering, 5():63-86, January 996. [9] Girard, E. and Rault, F. C.: 'A programming technique for software reliability', IEEE Symp. Computer Software Reliability, pp. -50, 973 [] Goldberg D. E., Genetic algorithms in search, optimization, and machine learning, Addison Wesley Longman, Inc., ISBN 0-- 767-5, 989. [] Hamlet D. & Taylor R., Partition testing does not inspire confidence, IEEE Transactions on Software Engineering, Vol. 6, 990, pp. 0-. [] Holland J., Adaptation in natural and artificial systems, University of Michigan Press, Ann Arbor, 975. [3] Ince, D. C.: The automatic generation of test data, The Computer Journal, Vol. 30, No., pp. 63-69, 987. [] Michalewicz Z., s + Data Structures = Evolution Programs, Springer-Verlag, nd edition, 99. [] Myers, G. J. (979). Art of Software Testing. John Wiley & Sons. [6] Offutt J. and Hayes J., A semantic model of program faults. In International Symposium on Software Testing and Analysis (ISSTA 96), pages 95{0. ACM Press, 996. [7] Taylor R.: 'An example of large scale random testing', Proc. 7th annual Pacific North West Software Quality Conference, Portland, OR, pp. 339-8, 989. [8] Tsoukalas M. Z., Duran J. W. and Ntafos S. C.: 'On some reliability estimation problems in random and partition testing', IEEE Transactions on Software Engineering, Vol. 9, No. 7, pp. 687-697, July 993 [9] Sonia Bhargava, Bright Keswani, Generic ways to improve SQA by meta-methodology for developing software projects, International Journal of Engineering Research and Applications, Vol. 3, Issue, pp 97-93, July 3. CITE AN ARTICLE Keswani, B., & Yadav, V. (n.d.). AUTOMATIC TEST CASE GENERATION FOR PERFORMANCE ENHANCEMENT OF SOFTWARE THROUGH GENETIC ALGORITHM AND RANDOM TESTING. INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY, 7(), 86-9. [9]