Font Size: a A A

Research On Application Of Genetic Algorithm In Test Path Generation Of Interactive Overview Diagram

Posted on:2017-10-31Degree:MasterType:Thesis
Country:ChinaCandidate:S S YuFull Text:PDF
GTID:2348330503965373Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
With the rapid development of science and technology, all kinds of software products appear in people's life, so the quality of software is more and more important. Software testing is more complex and time-consuming, but good software testing program and test methods is significant for reducing the software development in the repeated labor and the work of software maintenance. In recent years, owing to the rapid development of object-oriented technology, a large number of software products are developed by object-oriented technology,which make the software testing based on UML model become particularly important.Activity diagram is used to describe the dynamic behavior of the system. Sequence diagram of UML model is used to describle the interactive relation of objects and the order of message. Interaction overview diagram is newly proposed in UML2.0, which combines the merit of these two figures, it can describe the process of the system and the details of the interaction between objects, so testing based on the interaction overview diagram will be more fully and adequately. So this article selects the UML interaction overview diagram as the research object.As a kind of search algorithm for solving optimization problems, genetic algorithm has been applied to software testing in recent years. It has been widely used in structural test data generation. Ahmed firstly apply genetic algorithm on the path of the test, but multi path. Doungsa-ard Chartchai use genetic algorithms to generate the test data of the UML state diagram. Yousef Nidal put the sequence diagram, class diagram and genetic algorithm together to complete automate generation of the test data. The research shows that the genetic algorithm can be well used in test data generation based on UML model, and can generate efficient test data. So this paper selects the genetic algorithm to generate the test path of interaction overview diagram.This paper takes UML interaction overview diagram as the research object, uses genetic algorithm to generate test paths interactionoverview diagram. The main works are as follows:(1) The basic theory knowledge of UML modeling language and genetic algorithm is introduced. With the research on the existing test methods of sequence diagram and interaction overview diagram,gives the formal definition of UML sequence diagram and interaction overview diagram.(2) The control structure and the interactive nodes of the interaction overview diagram are processed separately. Interaction overview diagram not only contains the system's business process information also contains the object interaction details.Firstly, under the condition that the interaction node detail information is not considered. The control flow information of the interactive overview diagram is transformed into the control flow graph according to the transformation rules. Since the interaction node in the interaction overview diagram is essentially a sequence diagram.So it is necessary to consider the details of the interaction node, which is transformed into a message call graph.(3) Generation of test path for control flow graph. Using the weight allocation algorithm based on the stack and information flow measurement method to distribute the weight of control flow graph.generate the coding length of the initial population by the number of the decide nodes. Coding method using 0-1 coding. Each individual gene represents a path of the control flow graph. The sum of the weights of the nodes in the calculation path is used as the fitness value of the path. Complete the crossover and mutation operations until the optimal test path is generated(4) The generation of test path for message call graph. Get the basic path of the message call graph in accordance with the basic path extraction algorithm. Select the length of the longest path in the message call graph as the length of the individual gene coding. Using the number of nodes to get the value of each gene. The value of the first gene for initial individuals is randomly generated.According to the value, randomly select a test path(gene). Generating initial population in this way. Construct the fitnessfunction byThe degree of coverage for the basic path. Selection, crossover and mutation to generate the optimal test path.(5) Test path generation for interaction overview diagram?Replace the corresponding node in the control flow diagram test path using the test path of each message call graph.
Keywords/Search Tags:UML model, interactive overview diagram, genetic algorithm, test path
PDF Full Text Request
Related items