Font Size: a A A

Research On Test Cases Generation Method Target At The Serialization Ofunrelated Behaviors

Posted on:2020-05-03Degree:MasterType:Thesis
Country:ChinaCandidate:X GuoFull Text:PDF
GTID:2428330596992645Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software with concurrent behaviors is more and more common in social production and life,but the uncertainty of the sequence of concurrent behaviors brings great challenges to software testing.Coloured Petri Net(CPN)model can accurately describe concurrent behaviors in software and is suitable for concurrent software testing based on CPN model.However,the uncertainty of the occurrence sequence of concurrent behaviors will cause the state space scale of CPN model to increase exponentially.Therefore,to acquire test cases,it is necessary to solve the state space explosion problem and realize the test with high coverage and low redundancy.In order to solve the above problems,the transitions in CPN model are divided into three types: tested behavior,related behavior and unrelated behavior.The test purpose is described by the tested behavior,and the coverage criteria is defined as performing path coverage for the tested behavior and its data-related behavior.A sequencing method of unrelated concurrent behaviors based on inhibitor arcs in model is proposed.The method determines the processing sequence according to nesting levels,and proposes sequencing algorithms for unrelated behaviors in different positions respectively,finally obtaining a non-redundant test sequence meeting the coverage criteria through the state space.The main research work of this thesis can be divided into the following parts:(1)Definitions of algorithm are proposed.This thesis describes the test purpose with the tested behavior and its data-related behavior,and proposes a test coverage criteria covering the execution path of tested behaviors and related behaviors.In addition,the original concept of CPN is extended to explain the features of CPN model that algorithm needs to identify and use.(2)An method for inhibitor arcs addition ranking is proposed.Select branch sets and concurrent branch sets are identified in a system model marking tested behaviors,related behaviors and unrelated behaviors,and inhibitor arc addition order of branch sets is determined according to nesting relation among the branch sets,so that inhibitor arc addition efficiency can be improved.(3)The sequential method for different situations is proposed.Aiming at select branch set and concurrent branch set,according to the position of tested behaviors and related behaviors in the branch set,different inhibitor arc adding methods are proposed for different situations.Sequential unrelated concurrent behaviors do not affect the execution of tested behaviors and related behaviors,and redundant execution paths caused by concurrent execution of unrelated behaviors are effectively removed.(4)The test case extraction operation from the state space of the model is proposed and the correctness of the algorithm is proved.After the CPN model completes the inhibitor arc addition operation,the CPN Tools is used to obtain the state space of the model.All execution paths in the state space are test cases.According to the test coverage criteria,the trace equivalence method is used to prove that test cases finally obtained are fully covered and have no redundancy.Finally,the test cases generation method target at the serialization of unrelated behaviors proposed in this paper is used to complete the test case generation of the article subscription software system instances.The result analysis verifies the coverage and non-redundancy of this method.
Keywords/Search Tags:concurrent software, CPN, inhibitor arc, serialization, test case
PDF Full Text Request
Related items