当前位置: X-MOL 学术J. Electron. Test. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
DFS-KeyLevel: A Two-Layer Test Scenario Generation Approach for UML Activity Diagram
Journal of Electronic Testing ( IF 0.9 ) Pub Date : 2023-02-03 , DOI: 10.1007/s10836-023-06045-y
Xiaozhi Du , Jinjin Zhang , Kai Chen , Yanrong Zhou

For automatic generation of test scenarios from UML (Unified Modeling Language) activity diagrams (ADs) are very important for improving test efficiency. However, state-of-the-art approaches mainly focus on simple approaches, without specifically considering the case of concurrent activity, which may result in the path explosion problem during the generation of test scenarios. In this paper, we put forward DFS-KeyLevel, a two-layer test scenario generation approach for UML Activity Diagram. First, the ADs of the software under test are modeled and preprocessed, and each concurrent module in each AD is simplified to a composite node. Then, primary test scenarios are generated from the concurrent activity modules using our proposed KeyLevel method. Next, the high-layer test scenarios are generated from the simplified AD with our improved Depth-First Search (DFS) algorithm. Finally, the primary and high-layer test scenarios are combined to generate the final test scenarios for the AD. The experimental results show that this DFS-KeyLevel is superior to the previous approaches. The DFS-KeyLevel can generate more test scenarios under constraints. Compared with DFS-LevelPermutes, the number of test scenarios generated by our DFS-KeyLevel is 1.13 times higher. Compared with Depth-First Search and Breadth-First Search (DFS-BFS) and Improved-DFS (IDFS), the DFS-KeyLevel produced 2.37 times test scenarios. The average coverage rates of staggered activities and total activity logical path coverage (TALPC) of the DFS-KeyLevel are 83.67% and 84% respectively, which is significantly higher than the above three approaches. In addition, when our method is applied to a real embedded system, it significantly reduces test scenarios generated to avoid path explosion while ensuring enough test scenarios.



中文翻译:

DFS-KeyLevel:UML 活动图的两层测试场景生成方法

对于从 UML(统一建模语言)自动生成测试场景,活动图 (AD) 对于提高测试效率非常重要。然而,最先进的方法主要集中在简单的方法上,没有专门考虑并发活动的情况,这可能导致测试场景生成过程中的路径爆炸问题。在本文中,我们提出了DFS-KeyLevel,一种用于UML活动图的两层测试场景生成方法。首先对被测软件的AD进行建模和预处理,将每个AD中的并发模块简化为一个复合节点。然后,使用我们提出的 KeyLevel 方法从并发活动模块生成主要测试场景。下一个,高层测试场景是使用我们改进的深度优先搜索 (DFS) 算法从简化的 AD 生成的。最后将初级和高层测试场景结合起来,生成最终的AD测试场景。实验结果表明,这种 DFS-KeyLevel 优于以前的方法。DFS-KeyLevel 可以在约束下生成更多的测试场景。与 DFS-LevelPermutes 相比,我们的 DFS-KeyLevel 生成的测试场景数量高出 1.13 倍。与深度优先搜索和广度优先搜索(DFS-BFS)和改进的 DFS(IDFS)相比,DFS-KeyLevel 产生了 2.37 倍的测试场景。DFS-KeyLevel的交错活动平均覆盖率和总活动逻辑路径覆盖率(TALPC)分别为83.67%和84%,明显高于上述三种方法。此外,当我们的方法应用于真实的嵌入式系统时,它显着减少了生成的测试场景,避免了路径爆炸,同时确保了足够的测试场景。

更新日期:2023-02-04
down
wechat
bug