Parallel Software Testing Sequence Generation Method Based on State Pruning
Tao Sun, Ting Zhang, Xin Ning Guo · 2018
Testing for parallel software system is very difficult, because the number of states and execution sequences expands significantly caused by parallel behaviors. In this paper, a test sequences generation method based on Coloured Petri Net (CPN) is proposed, target at full coverage of occurrences in different orders to all behaviors under testing, and generating non-redundant test sequences. Firstly, test objective is described as segments of behaviors under testing, and the coverage criterion is defined as occurrences in different orders to all behavior under testing should be covered. Secondly, the Projection operation is defined to get the state space subgraph for each segment of behavior under testing, and all occurrences of behaviors in the segment are in the subgraph, so that test sequences could be got in the state space subgraph but not the full state space of the system model, the efficiency has improved to some extent. However, the state space subgraph is always big caused by complex parallel behaviors including behaviors under testing and other behaviors. Then State Node Pruning operation and Arc Pruning operation are performed in the subgraph to greatly reduce the scale of subgraph, and all states caused by other behaviors are pruned. The simplified subgraph still covers the occurrences in different orders to all behaviors under testing. So test sequences can be generated in the simplified subgraph. Finally, the FullPath operation defines the generation of all test sequences in the subgraph after simplification. By acquiring all sequences of each simplified subgraph and any sequence between adjacent subgraphs, the test sequence that covers all behaviors under testing is generated, and these test sequences do not include any redundant sequences. The experimental results show that this method is effective and efficient.