摘要
测试用例自动生成是实现Web服务自动化测试的关键,基于代数规约的传统测试技术均依赖于创建、初始化和复制被测对象等操作来验证测试结果的正确性,但第三方Web服务并不支持这些操作,无法将测试用例转换成可执行操作序列。一种可行的解决方案是将测试用例转换成只包含一个被测服务实例、不包括实例初始化、只对实例进行状态修改和检查的线性执行序列。改进已有工作,提出包含逆项的测试执行图TEG-I来描述测试用例执行过程中的状态变化,设计TEG-I构造算法和单线执行序列生成算法并实现相应原型工具。实验结果表明,提出的方法能够有效地自动完成测试用例生成,提高Web服务的可测试性。
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.
作者
何娟娟
刘冬梅
朱鸿
杜益宁
周子健
郑小宇
HE Juan-juan;LIU Dong-mei;ZHU Hong;DU Yi-ning;ZHOU Zi-jian;ZHENG Xiao-yu(School of Computer Science and Engineering,Nanjing University of Science and Technology,Nanjing 210094,China;Department of Computing and Communication Technologies,Oxford Brookes University,Oxford OX33 1HX,UK)
出处
《计算机工程与科学》
CSCD
北大核心
2019年第6期1034-1043,共10页
Computer Engineering & Science
基金
国家自然科学基金(61502233,61402229)
江苏高校“青蓝工程”
中央高校基本科研业务费专项资金(30916011328)
欧盟移动云计算FP7项目MONICA(PIRSES-GA-2011-295222)
关键词
WEB服务
代数规约
单线测试序列
测试执行图
web service
algebraic specification
monic test sequence
test execution graph