摘 要: 传统的场景法在设计测试用例的过程中存在着构造场景困难、冗余度高、设计效率低下等问题。针对此问 题,提出了一种基于UML活动图的测试场景自动生成策略。在建立活动流图模型后,采用改进的深度优先搜索算法获 得路径集合,应用路径优化算法生成测试路径及测试场景。通过在商用的供应商协同平台的测试过程中应用该策略,验 证了其有效性。实践结果表明,该策略较好的解决了循环工作流产生的路径爆炸问题,降低了测试场景的冗余度。 |
关键词: 测试场景;活动流图;深度优先搜索;独立路径;自动生成 |
中图分类号: TP312
文献标识码: A
|
基金项目: 江苏省电力公司科技项目(No.J2014057);横向课题“供应商管理平台与车间作业现场管理平台”(KH150025);江苏省教育科学“十二五”规划2015年度高教重点课 题(B-b/2015/01/084);江苏省现代教育技术研究重点课题(2015-R-42743). |
|
A Scheme for Test Scene Automatic Generation Based on UML Activity Diagram |
CAO Yang,LIU Zhengtao
|
(College of Computer Science and Engineering, Sanjiang University, Nanjing 210012, China)
|
Abstract: In the process of designing test case through the traditional scene method,there are many problems,including scene construction difficulty,high redundancy and low design efficiency.To solve this problem,the paper proposes a scheme for test scene automatic generation based on UML activity diagram.On the basis of the activity flow graph,the improved depth-first search algorithm is adopted to obtain path collection,and the path optimization algorithm method is applied to generate test path and test scene.The effectiveness of this scheme has already been verified in a testing process of a commercial supplier collaboration platform.The practice results indicate that the scheme can effectively solve the problem of path explosion caused by cycle workflow and significantly reduce the redundancy of test scene. |
Keywords: test scene;activity flow graph;depth-first search;independent path;automatic generation |