ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2017, Vol. 54 ›› Issue (3): 669-680.doi: 10.7544/issn1000-1239.2017.20151053

• 软件技术 • 上一篇    

基于EFSM不定型切片测试用例自动生成的研究

苏宁,郭俊霞,李征,赵瑞莲   

  1. (北京化工大学信息科学与技术学院 北京 100029) (suning311@163.com)
  • 出版日期: 2017-03-01
  • 基金资助: 
    国家自然科学基金项目(61170082,61472025);教育部新世纪优秀人才支持计划项目(NCET-12-0757)

EFSM Amorphous Slicing Based Test Case Generation

Su Ning, Guo Junxia, Li Zheng,Zhao Ruilian   

  1. (College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 100029)
  • Online: 2017-03-01

摘要: 基于模型的测试是软件测试中一个重要分支,但随着模型规模的增大,测试用例生成也变得越来越困难.扩展有限状态机(extended finite state machine, EFSM)是一种广泛应用的模型,它是对有限状态机(finite state machine,FSM)的扩展,能够更精确地刻画软件系统的动态行为.对EFSM模型的测试主要包含2个部分:测试迁移路径的生成和覆盖测试迁移路径的测试数据的生成.基于搜索的方法已被应用于测试数据的生成.为了提高在大规模EFSM模型中测试用例生成的效率,在前期对EFSM模型非终止性研究新型依赖性分析和切片技术的基础上,提出了基于EFSM模型不定型切片的测试用例生成方法和测试用例补全方法.通过2个案例分析得出:基于模型切片可以更加准确地生成可行路径和提高测试强度.基于7个基准EFSM模型的实验结果表明,在大多数情况下,在切片上生成测试用例的效率都比在原模型上高.

关键词: EFSM模型, 依赖性分析, 切片, 测试用例生成, 测试用例补全

Abstract: Model based testing is a crucial dimension in software testing. However, with the increase of model scale, model based test case generation is becoming more and more arduous. Extended Finite State Machine (EFSM) has been widely used in industry, which is extended from Finite State Machine (FSM), and can depict the dynamic behavior of software system more accurately. EFSM based test case generation mainly includes two parts: test transition paths generation and test data generation that covers the test transition paths, in which search based technology is adapted in test data generation. In order to improve the efficiency of test case generation in large-scale EFSM models, EFSM slicing based test case generation and test case compensating are proposed based on the previous research on EFSM dependence analysis and slicing for non-termination of EFSM models. Two case studies are introduced to show that model slicing based test case generation is more accurate in feasible path generation and test intensity improvement. In this paper, the experiments on 7 standard EFSMs are conducted, and the results show that all of the test case generated from slice can be used in the original model, and in most cases, test case generation efficiency on slice is higher than that on the original model.

Key words: EFSM model, dependence analysis, slicing, test case generation, test case compensating

中图分类号: