• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 软件工程 • 上一篇    下一篇

面向Web服务测试的单线执行序列生成方法

何娟娟1,刘冬梅1,朱鸿2,杜益宁1,周子健1,郑小宇1   

  1. (1.南京理工大学计算机科学与工程学院,江苏 南京 210094;
    2.英国Oxford Brookes大学计算与通讯系,英国 牛津 OX33 1HX)
  • 收稿日期:2018-10-11 修回日期:2018-12-06 出版日期:2019-06-25 发布日期:2019-06-25
  • 基金资助:

    国家自然科学基金(61502233,61402229);江苏高校“青蓝工程”;中央高校基本科研业务费专项资金(30916011328);欧盟移动云计算FP7项目MONICA(PIRSESGA2011295222)

A monic execution sequence generation
method for web service testing

HE Juanjuan1,LIU Dongmei1,ZHU Hong2,DU Yining1,ZHOU Zijian1,ZHENG Xiaoyu1   

  1. (1.School of Computer Science and Engineering,Nanjing University of Science and Technology,Nanjing 210094,China;
    2.Department of Computing and Communication Technologies,Oxford Brookes University,Oxford OX33 1HX,UK)
  • Received:2018-10-11 Revised:2018-12-06 Online:2019-06-25 Published:2019-06-25

摘要:

测试用例自动生成是实现Web服务自动化测试的关键,基于代数规约的传统测试技术均依赖于创建、初始化和复制被测对象等操作来验证测试结果的正确性,但第三方Web服务并不支持这些操作,无法将测试用例转换成可执行操作序列。一种可行的解决方案是将测试用例转换成只包含一个被测服务实例、不包括实例初始化、只对实例进行状态修改和检查的线性执行序列。改进已有工作,提出包含逆项的测试执行图TEGI来描述测试用例执行过程中的状态变化,设计TEGI构造算法和单线执行序列生成算法并实现相应原型工具。实验结果表明,提出的方法能够有效地自动完成测试用例生成,提高Web服务的可测试性。
 

关键词: Web服务, 代数规约, 单线测试序列, 测试执行图

Abstract:

Automatic test case generation plays a key role in automatic testing for web services. Existing testing techniques based on algebraic specifications rely on the creation, initialization, and replication of objects under test to verify the correctness of test results. However, their thirdparty nature means that such operations are not usually available, and thus it is hard to support transforming test cases into executable sequences of operations. One possible solution is to convert the test case into a linear execution sequence that contains only one instance of the service under test, does not include instance initialization, and only modifies and checks the instance states.  We improve the original work and propose to use the test execution graph with inverse terms (TEGI) to describe state changes during the execution of the test case. We design a TEGI construction algorithm and a monic execution sequence generation algorithm, and implement prototype tools.  A case study demonstrates that the proposal is feasible for automatic test case generation and can improve the testability of web services.
 

Key words: web service, algebraic specification, monic test sequence, test execution graph