首页 | 本学科首页   官方微博 | 高级检索  
     检索      

一种基于扩展有限状态机的自动化测试用例生成方法
引用本文:杨瑞,陈振宇,张智轶,刘子聪,徐宝文.一种基于扩展有限状态机的自动化测试用例生成方法[J].中国科学:信息科学,2014(5):588-609.
作者姓名:杨瑞  陈振宇  张智轶  刘子聪  徐宝文
作者单位:[1]南京大学计算机软件新技术国家重点实验室,南京210046 [2]南京大学计算机科学与技术系,南京210046
基金项目:国家重点基础研究发展计划(批准号:2014CB340702)和国家自然科学基金(批准号:61170067,61170071,61373013)资助项目.
摘    要:扩展有限状态机(EFSM)是使用最广泛的测试模型之一.由于不可行路径的存在,运用EFSM模型生成测试用例仍然是个难题.本文提出了一种基于EFSM模型的自动化测试用例生成方法 (ATGEM).为解决不可行路径问题,首先提出一种基于数据流分析的路径可行性度量方法来预测路径的可行性,以尽可能避开不可行路径,提高测试用例自动化生成的效率.然后通过建立动态可执行模型来获取运行时反馈信息作为搜索算法的适应度函数(fitness function),实现测试数据和预言信息的自动生成.该方法结合静态分析和动态分析技术生成一个较优可行路径子集和对应测试用例来达到指定的覆盖准则,能够应用于多种数据类型的测试用例生成,适用范围较广.通过实验在多个EFSM模型上验证了ATGEM方法中测试用例生成和路径可行性度量方法的有效性,实验结果表明,利用路径可行性度量方法可以大幅度提高测试用例生成效率,与现有方法相比,ATGEM中的测试用例生成方法具有更高的效率.

关 键 词:测试用例生成  扩展有限状态机  可执行模型  路径可行性  测试预言

A new approach of automated test case generation on extended finite state machine
YANG Rui,CHEN ZhenYu,ZHANG ZhiYi,LIU ZiCong XU BaoWen.A new approach of automated test case generation on extended finite state machine[J].Scientia Sinica Techologica,2014(5):588-609.
Authors:YANG Rui  CHEN ZhenYu  ZHANG ZhiYi  LIU ZiCong XU BaoWen
Institution:1 State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210046, China 2 Department Computer Science and Technology, Nanjing University, Nanjing 210046, China)
Abstract:Extended finite state machine (EFSM) is among the most popular models for model-based testing. However, automated test case generation on EFSM models is still a challenging task since an EFSM model may contains infeasible paths. This paper proposed a novel approach (ATGEM) to generate test case and construct oracle information from EFSM automatically. To address the infeasible problem, a metric based on data flow analysis is presented to predict the infeasible probability so as to bypass the infeasible paths as far as possible and improve the test case generation efficiency. Afterwards, an executable EFSM model is developed to obtain runtime feedback information as a fitness function in order to generate test data and construct oracle information automatically. This approach, which can generate various types data and has a wide range of applications,conlbines static analysis and dynamic analysis aims to find a preferable feasible path subset to generate test cases and meet adequacy coverage criteria. The experimental results on several EFSM models show that test cause generation method and path feasibility metric have good effectiveness. Utilizing path feasibility metric call speed up the process of test case generation greatly, and ATGEM is more efficient than existing method.
Keywords:test case generation  EFSM model-based testing  executable model  path feasibility analysis  testoracle
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号