1、 Azad Hind Fauz Marg, Dwarka, Sector -3, New Delhi - 110078, India AbstractThe overall aim of the software industry is to ensure delivery of high quality software to the end user. Toensure high quality software, it is required to test software. Testing ensures that software meets user specifications
2、 and requirements. However, the field of software testing has a number of underlying issues like effective generation of test cases, prioritisation of test cases etc which need to be tackled. These issues demand on effort, time and cost of the testing.Different techniques and methodologies have been
3、 proposed for taking care of these issues. Use of evolutionary algorithms for automatic test generation has been an area of interest for many researchers.Genetic Algorithm (GA) is one such form of evolutionary algorithms. In this research paper, we present a survey of GA approach for addressing the
4、various issues encountered during software testing.Keywords: Software testing, Genetic Algorithm1. IntroductionTesting is primarily done on software as well as in web for testing client and server architecture. Software testing is one of the major and primary techniques for achieving high quality so
5、ftware. Software testing is done to detect presence of faults, which cause software failure. However, software testing is a time consuming and expensive task 29, 20, 28. It consumes almost 50% of the software system development resources 3, 20. Software testing can also be defined as process of veri
6、fying and validating software to ensure that software meets the technical as well as business requirements as expected 16.Verification is done to ensure that the software meets specification and is close to structural testing whereas validation is close to the functional testing and is doneby execut
7、ing software under test (SUT) 18. Broadly, testing techniques include functional (black box) and structural (white box) testing. Functional testing is basedon functional requirements whereas structural testing is done on code itself 13 10 24. Gray box testing is hybrid of white box testing and black
8、 box testing 8.Testing can be done either manually or automatically by using testing tools. It is found that automated software testing is better than manual testing. However, very few test data generation tools are commercially available today 14. Various techniques have been proposed for generatin
9、g test data or test cases automatically. Recently, lot of work is being done for test cases generation using soft computing techniques like fuzzy logic, neural networks, GA, genetic programming and evolutionary computation providing keys to the problem areas of software testing.Evolutionary testing
10、is an emerging methodology for automatically producing high quality test data 10. GA is well known form of the evolutionary algorithms conceived by John Holland in United States during late sixties 6 25. In 21, evolutionary black box testing is also applied on embedded systems to test its functional
11、 and non-functional properties. GA has been applied in many optimization problems for generating test plans for functionality testing, feasible test cases and in many other areas 5 15. GA has also been used in model based test case generation 3 23 26 27. In object oriented unit testing as well as in
12、 the black box testing, GA is used for automatic generation of test cases 23, 10, 15. Concerning testing of web applications, many tools, new techniques and methods have been developed to address issues like maintainability, testability, security, performance, correctness and reliability of web appl
13、ication 8. Web applications are composed of web pages and components and interaction between them executes web servers, HTTP, browser (the client side) and networks. A web page is information viewed on the client side in a single browser window 16. In 30, user session data of web application is used
14、 to generate test cases by applying GA.In this research paper, a survey of different software testing techniques where GA is efficiently used is presented. This paper is divided into 4 sections. Section 2 describes briefly the working of a GA. In section 3, applications of GA in different types of s
15、oftware testing is described. Section 4 concludes the paper and gives an overview of our future work.2. Genetic Algorithm: A Brief IntroductionIn the past, evolutionary algorithms have been applied in many real life problems. GA is one such evolutionaryalgorithm. GA has emerged as a practical, robus
16、t optimization technique and search method. A GA is a search algorithm that is inspired by the way nature evolves species using natural selection of the fittest individuals.The possible solutions to problem being solved are represented by a population of chromosomes. A chromosome is a string of bina
17、ry digits and each digit that makes up a chromosome is called a gene. This initial population can be totally random or can be created manually using processes such as greedy algorithm. The pseudo code of a basic algorithm for GA is as follows 6:-Initialize (population)Evaluate (population)While (sto
18、pping condition not satisfied)Selection (population)Crossover (population)Mutate (population)GA uses three operators on its population which are described below: Selection: A selection scheme is applied to determine how individuals are chosen for mating based on their fitness. Fitness can be defined
19、 as a capability of an individual to survive and reproduce in an environment. Selection generates the new population from the old one, thus starting a new generation. Each chromosome is evaluated in present generation to determine its fitness value. This fitness value is used to select the better ch
20、romosomes from the populationfor the next generation. Crossover or Recombination: After selection, the crossover operation is applied to the selected chromosomes. It involves swapping of genes or sequence of bits in the string between two individuals. This process is repeated with different parent i
21、ndividuals until the next generation has enough individuals. After crossover, the mutation operator is applied to a randomly selected subset of the population. Mutation: Mutation alters chromosomes in small ways to introduce new good traits. It is applied to bring diversity in the population.3. Usin
22、g Genetic Algorithm in SoftwareTestingIn this section we will discuss in detail the applications of GA in different areas of testing like test planning 5, minimization of test cases in regression testing 11, model based testing 3 23 26 27 and web testing 30.3.1 Applications of GA in White Box Testin
23、gStructural testing can be done in the form of data flow testing or path testing. Path testing involves generating a set of paths that will cover every branch in the program and finding the set of test cases that will execute every path in this set of program path 16 18. In data flow testing, the fo
24、cus is on the points at which variables receive values and the points at which these values are used 2. Next, we will discuss briefly some of the research work regarding the applications of GA in white box testing.3.1.1 Data Flow TestingM.R. GirgisGirgis 7 has proposed a structural oriented automati
25、c test data generation technique that uses a GA guided by the data flow dependencies in the program to fulfil the all-uses criterion. The program to be tested is converted into a Control Flow Graph (CFG) where each node represents a block in a program and the edges of the flow graph depict the contr
26、ol flow of the statements.Variables in a program under test are divided into cuses and p-uses variables. c-uses variables are those which are used in computations or as a predicates in a program whereas p-uses variables are associated with edges of the flow graph. In order to fulfil the all-uses cri
27、teria, the def-clear path (a path containing no new definition of a current variable) from each definition of a variable to each use of that variable need to be determined. To find out the set of paths satisfying alluses criteria, it is necessary to determine def c-use(dcu) and def p-use(dpu) of a v
28、ariable i.e. the def- clear paths to their c-use at node i and def-clear paths to their p-use at edge (i, j).Using the location of a variable defs and uses in a program under test, combined with the Basic state reach algorithm, the sets dcu(i)and dpu(i,j) are determined. From the Basic state reach a
29、lgorithm two sets reach (i) and avail (i) are determined where reach (i) is the set of all variable defs that “reach” node i and set avail (i) is the set of all “available” variable defs at node i i.e. The union of set of global defs at node i and the set of all defs that reach this node. dcu(i) : r
30、each(i)c -use(i) (1)dpu(i, j) : avail(i) p - use(i, j)List of all dcu and dpu sets in the procedure calls satisfying the all-uses criterion are determined along with killing nodes (nodes containing other definition of a variable in a current path) that must not be included in the current path. In th
31、is approach, GA accepts instrumented version of the program under test, the list of def-use sets to be covered, the number of input variables, and the domain and the precision of each input variables as an input. A binary vector is used to represent a chromosome. The length of the input is determined by the domain and the precision. The domain is represented by Di = ai, bi where each variable in a program takes values from the range ai, bi. Each domain Di should be cut into equal size ranges if decimal places di is desired for a variab
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1