摘要
Web服务作为W3C认证的面向服务架构(service-oriented architecture,SOA)的实现方式,对外提供可用于黑盒测试的接口文档,如何有效地自动化生成测试用例成为Web服务自动化测试的首要问题。现有的测试工具对WSDL(Web services description language)的文档结构和数据之间的依赖关系考虑不足,且缺乏有效的测试数据生成方法,进而导致测试效率不高以及生成的测试用例无法覆盖全部的测试需求。为此,提出了Web服务自动化测试的技术框架,并实现了支持此框架的原型工具。该框架基于WSDL文档解析获取覆盖结构特征的SOAP(simple object access protocol)骨架集合,并采用可变力度组合测试模型生成满足元素组合的SOAP封装消息,之后通过有限状态机/接口契约模型获取操作序列测试路径,保证了操作序列测试数据的有效性。案例结果表明了所提框架生成的测试数据能够更好地满足测试需求,达到理想的测试覆盖率,并能够检测出更多的错误,且在用例规模上优于现有的方法。
Web services are the W3 C-endorsed realization of service-oriented architecture(SOA). Since Web services are tested in black-box via their interfaces, how to automatically generate effective test suites has become a key problem in Web services automatic testing. However, the existing tools take insufficient account of WSDL(Web services description language) schema structure and the dependency between data elements, and lack of effective means of test automation, which may lead to high cost and test data cant cover the test requirements. This paper proposes a test case generate framework and implements a tool which supports the above framework. At first, this framework acquires SOAP(simple object access protocol) skeletons which cover structural characteristics based on WSDL, then generates SOAP envelopes based on variable strength combinatorial testing model, finally generates operation sequence test path through the finite state machine/interface contract model. The experimental results show that the proposed framework can enable the test to achieve the desired coverage, while enhancing the fault detection ability and optimality on the size of existing approach.
出处
《计算机科学与探索》
CSCD
北大核心
2017年第11期1747-1763,共17页
Journal of Frontiers of Computer Science and Technology
基金
国家部委"十二五"课题~~
关键词
WEB服务
面向服务架构
自动化测试技术框架
可变力度组合测试
有限状态机
接口契约模型
Web services
service-oriented architecture
automation test framework
variable strength combinatorial test
finite state machine
interface contract model