节点文献
面向服务系统的自动化测试平台的设计与实现
Design and Implementation of an Automated Testing Platform for Service-oriented Systems
【作者】 赵文怡;
【作者基本信息】 上海交通大学 , 软件工程(专业学位), 2018, 硕士
【摘要】 面向服务的架构具备协议无关性、位置透明性和松耦合性等特性,因而成为企业级应用系统的主流架构。它能使企业平台架构的构建方式变得更为灵活,帮助企业更加迅速有效地响应业务发展变化、并且达到利用业务的发展变化在竞争中取得领先的目的。然而,面向服务的架构在提升灵活性的同时,为了支撑架构和业务快速灵活的增长,系统的数量越来越多,单个业务处理过程所覆盖的系统链路也越来越长。因此,基于面向服务架构设计的系统(简称面向服务的系统)的测试成本和测试复杂度也变得越来越高,传统的自动化测试工具和平台难以支撑如此复杂的测试场景。面向服务的系统需要怎样的自动化测试平台,如何提升面向服务的系统的自动化测试效率,这一系列问题对软件测试提出了新的挑战,同时也提供了新机遇。本文从面向服务的系统的自动化测试需求出发,对在面向服务的系统上实施自动化测试进行了研究,设计并实现了一个自动化测试平台,支持面向服务的系统的接口测试和集成测试。在本自动化测试平台设计与实现过程中主要对提升自动化测试的稳定性、灵活性、通用性方面进行了深入研究。本测试平台针对面向服务的系统的特性,不依赖WEB页面驱动自动化测试,转而从被测系统的服务出发,覆盖完整系统链路,完成对应业务的自动化测试;解决因页面端变更频繁而导致自动化脚本失效、用例运行失败的问题,使自动化测试执行和脚本维护趋于稳定。本测试平台的测试模板以组件化为基础,通过实现各种测试组件,丰富本测试平台的自动化原子能力。通过组件构建出符合某个业务场景或功能的测试模板,可以通过模板中组件的增删和排序功能实现自动化测试脚本灵活变更,自由伸缩的能力。本测试平台的测试模板既可以由多个组件组成,针对复杂系统链路进行集成测试,也可以只由单个组件组成,针对单个系统接口进行接口测试。使接口测试平台和集成测试平台得以整合,形成通用的自动化测试平台,降低测试人员学习和实施成本,更完整地展现自动化测试的整体情况。目前该自动化测试平台已上线,正常运行了24个月。原来在使用其他测试工具的背景下,一个业务功能的自动化实施成本需要占据整体测试周期的一半以上。通过本自动化测试平台,自动化实施成本降低到整体测试周期的三分之一。单个测试用例执行耗时平均60秒左右,比原来自动化测试耗时降低一半,测试执行效率显著提升。并且自动化测试执行的稳定性大幅提升,测试用例总体成功率从60%提升至近100%。
【Abstract】 The features of service oriented architecture include loose coupling,location transparency and protocol independence.Thus become the mainstream architecture of enterprise application system.It enables enterprise system architecture to be more flexible,enabling enterprises to respond quickly and effectively to business changes,and use business changes to gain competitive advantage.However,while SOA is improving flexibility,in order to support the rapid and flexible growth of architecture and business,the number of systems is increasing.And the system path covered by a single business process is also growing.Therefore,the test cost and test complexity of the serviceoriented systems are also getting higher and higher.The traditional automated testing tools and platforms are difficult to support such a complex test scenario.What kind of automated testing platform is needed for service-oriented systems and how to improve the efficiency of automated testing of service-oriented systems.This series of problems poses new challenges for software testing,but also provides new opportunities.This paper starts from the requirement of automated testing for the service-oriented systems,studies the implementation of automated testing on the service-oriented systems,designs and implements an automated testing platform to support interface testing and integration testing on the service-oriented systems.In the process of design and implementation of this automated test platform,the stability,flexibility and generality of the automated testing are mainly studied.Considering of the characteristics of the service-oriented systems,this test platform does not rely on web driven automated testing,it starts from the service of the tested system,covers the complete system path,completes the corresponding business automated testing.It solves the problem of the failure of automated script and the failure of execution caused by the frequent change of web UI.And therefore the automated testing execution and script maintenance tend to be stable.The test template of this test platform is based on component,and enriches the automated atomic ability of the test platform by implementing various test components.A test template that is suitable for a business scenario or function is constructed through components,and the ability of automated testing scripts to change flexibly and freely is achieved by adding and deleting functions of components in templates.The test template of this test platform can be composed of multiple components for integration test of a complex system path or be composed of a single component for interface testing of a single system interface.Therefore,the interface test platform and integration test platform can be integrated to form a general automated testing platform,which can reduce the cost of implementation and learning,and show the overall situation of automated testing.At present,the automated testing platform has been on-line and has been running for 24 months.In the background of using other automated testing tools,the cost of automated implementation of a business function needs to occupy more than half of the total testing cycle.The cost of automated implementation is reduced to 1/3 of the whole test cycle through this automated testing platform.The average execution time of a single test case is about 60 seconds,half the time of the original automated testing,which is a significant improvement in the efficiency of the test.And the stability of automated testing execution has been greatly improved.The total success rate of test cases increased from 60% to nearly 100%.
【Key words】 SOA; Software Testing; Automated Testing; Interface Testing; Integration Testing;