随着互联网金融的发展,金融业务变得更加复杂,产品功能迭代更加快速.为了支持业务的发展,金融应用开始进行支持Dubbo协议的开发.现有的接口测试框架和工具在支持Dubbo协议、多人协作及测试用例维护及数据分析上都存在问题:首先,没有很好的工具支持Dubbo协议的测试,已有的Dubbo测试框架无法很好地推广;其次,复杂业务会涉及多个应用,目前的框架很少考虑多系统间的自动化配合;再次,单机版自动化测试工具或纯编码方式的自动化测试框架不利于多人协作编写自动化测试用例及脚本的维护;最后,数据分析一般是查看单个子系统测试用例的执行结果,无法很好地对数据进行全局分析.为了更好地管理大批量用例及支持多子系统版本迭代,在已有老框架基础上,使用分布式技术设计并实现了一个灵活的可视化的Dubbo接口自动化测试平台:基于界面操作,提供基于可视化的数据驱动及关键字驱动方式,支持编写复杂测试用例,并基于接口解析的方式,自动生成测试用例.详细表述了可视化的Dubbo接口测试平台的架构、用例管理及用例执行;展示了新平台与老框架的耗时对比、用例增长对比和新平台日常自动化执行情况.
With the development of online finance, the financial business has become increasingly complex and product iterations have become more frequent. Financial applications have started to use the Dubbo protocol for programming to support this prosperous business. There are some problems, however, in supporting testing of the Dubbo protocol, multiplayer collaboration, maintenance, and data analysis with the current testing tools. First, these tools can only be used to test the Dubbo protocol and the Dubbo testing framework that exists at present is difficult to promote. Second, complex businesses involve multiple applications; the current system does not consider automated collaboration among multiple systems. Third, single-machine automatic testing tools or coded automatic testing frames are not good for multiplayer collaboration in writing automatic test cases and maintenance. Finally, data analysis is usually the execution result when reviewing single-system test cases so it cannot provide a holistic analysis of data. In order to manage a large quantity test cases and support multi-system upgrades, this paper uses distribution technology to design and implement a flexible and visible Dubbo automatic testing platform with the existing testing framework. Based on an interface application, the paper provides visible data-driven and keyword-driven methods and supports the programming of complex test cases. It can also generate the interfaces that you need to test and can generate test cases according to them automatically. This paper describes the architecture of this user-friendly Dubbo testing platform and the management of test cases and execution in a detailed way. Lastly, it shows a comparison of cost vs. time and a comparison of automated test case growth between the old framework and the daily execution results of the new platform's automation testing.
[1] 席涛, 郑贤强. 大数据时代互联网产品的迭代创新设计方法研究[J]. 包装工程, 2016, 37(8):1-4.
[2] 周永红, 张彦祥. 金融软件的自动化测试探索与创新之路[J]. 中国金融电脑, 2018(1):64-68.
[3] TAY B H, ANANDA A L. A survey of remote procedure calls[J]. ACM SIGOPS Operating Systems Review, 1990, 24(3):68-79.
[4] APACHE SOFTWARE FOUNDATION. Apache Dubbo[OB/OL].[2018-06-20]. http://Dubbo.apache.org/.
[5] SoapUI. Available[EB/OL]. (2017-12-04)[2018-07-01]. https://www.soapui.org/.
[6] SOAP. WWW, Service Architecture, Soap[EB/OL]. (2016-07-17)[2018-07-01]. https://www.service-architecture.com/articles/web-services/soap.html.
[7] 杨超. 基于分布式服务框架Dubbo的集群式服务器的研究与实现[D]. 北京:北京邮电大学, 2017.
[8] Apache JMeterTM. The Apache Software Foundation[EB/OL]. (2016-07-17)[2018-07-01]. http://jmeter.apache.org/index.html.
[9] MICRO FOCUS. LoadRunner Load Testing Software[EB/OL]. (2017-08-30)[2018-07-01]. https://www.microfocus.com/en-us/products/loadrunner-load-testing/overview.
[10] NIELSEN H F, GETTYS J, BAIRD-SMITH A, et al. Network performance effects of HTTP/1.1[J]. ACM Sigcomm Computer Communication Review, 1997, 27(4):155-166.
[11] MENG F Y. Phoenix Framewor[EB/OL]. (2016-07-17)[2018-07-01]. http://www.cewan.la/.
[12] SHANG Y, ZHANG X L, FENG Y B, et al. Research and application of automated testing tool based on STAF[C]//Proceedings of the 2nd International Conference on Computer Science and Electronics Engineering. Paris:Atlantis Press, 2013:2336-2339.
[13] SOURCE FORGE. Software Testing Automation Framework (STAF)[EB/OL]. (2016-12-31)[2018-07-01]. http://staf.sourceforge.net/index.php.
[14] HE Z H, ZHANG X, ZHU X Y. Design and implementation of automation testing framework based on keyword driven[J]. Applied Mechanics and Materials, 2014, 602/603/604/605:2142-2146.
[15] ECMA INTERNATIONAL. The JSON Data Interchange Syntax[EB/OL]. (2016-12-31)[2018-07-01]. http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf.
[16] JOY J, SINGH D P. A generic framework design to enhance capabilities of an enterprise test automation framework[C]//International Conference on Applied and Theoretical Computing and Communication Technology. IEEE, 2016:207-212.
[17] GRIFFIN L, RYAN K, DE LEASTAR E, et al. Scaling instant messaging communiction services:A comparison of blocking and non-blocking techniques[C]//2011 IEEE Symposium on Computers and Communications. IEEE, 2011:550-557.
[18] JUNQUEIRA F, REED B. ZooKeeper:Distributed Process Coordination[M].[S.l]:O'Reilly Media, Inc. 2013.
[19] BURROWS M. The Chubby lock service for loosely-coupled distributed systems[C]//OSDI'06:7th USENIX Symposium on Operating Systems Design and Implementation. USENIX Association, 2006:335-350.
[20] MAVEN. The Apache Software Foundation[EB/OL].[2018-07-01]. https://maven.apache.org/what-is-maven. html.
[21] TestNG. The Apache Software Foundation[EB/OL]. (2017-12-19)[2018-07-01]. http://testng.org/doc/documentation-main.html.
[22] REESE W. Nginx:The high-performance web server and reverse proxy[J]. Linux Journal, 2008, 2008(173):2.
[23] GITHUB. Netflix, Eureka[EB/OL].[2018-07-01]. https://github.com/Netflix/eureka.
[24] EHCACHE. Software AG USA[EB/OL]. (2017-05-25)[2018-07-01]. http://www.ehcache.org/about/index.html.
[25] REDIS. Redis Labs[EB/OL]. (2017-07-00)[2018-07-01]. https://redis.io/topics/introduction.
[26] Netflix, Ribbon[EB/OL]. (2018-04-28)[2018-07-01]. https://github.com/Netflix/ribbon.