An Automatic Generation Method for Path Expressions of CPN Model Focus on Tested Behaviors.
Sun Tao,Linjing Zhang,Huiping Ma
DOI: https://doi.org/10.1109/cscwd.2018.8465373
2018-01-01
Abstract:With the gradually development of distributed software, collaborative work became a trend. At the same time, due to the continuous improvement of software complexity, software testing is highly susceptible to the state space explosion, and it also makes the formation of the path expressions for test behaviors become very difficult. For the above problem, a new algorithm of path expressions automation generation which based on Colored Petri Nets (CPN) is proposed in this paper. First, a new coverage criterion for parallel software testing based on transition coverage is proposed in this paper. Second, searching and optimizing the FullPath according these coverage criteria. FullPath is a set of paths that from initial elements to tested target in here. Third, extract and integrate all the arc expressions on these paths, and the results expressions only about the output arc variable of the initial position. Next, analyzing logical relation between different nodes on these paths and get the final path expressions. These path expressions combine all the information of arc expressions, guard expressions and constraint relationship of the CPN model. In particular, we need to consider the synchronization relationship of the transition, i.e., we need to consider the equivalent problem of the same name variable on the different output arc. According to the path expressions, we could obtain that the token of current place whether to reach the tested place. And, the tester also could get the change of token in tested place. Besides, these expressions could reduce the redundant path maximally and ensure effective coverage, so, it could ensure correctness and sufficiency of the test. It could be used to guide tester analyze the flow of tokens and remove redundancy testing dataset. Finally, the analysis and demonstration of the examples show that this method is reasonable and effective.