华东师范大学学报(自然科学版) ›› 2019, Vol. 2019 ›› Issue (4): 120-132,143.doi: 10.3969/j.issn.1000-5641.2019.04.012

• 计算机科学 • 上一篇    下一篇

一种分布式可视化Dubbo接口测试平台

李艳丽, 张宗勇, 冯捷, 李志辉   

  1. 平安壹钱包电子商务有限公司, 上海 200232
  • 收稿日期:2018-08-06 出版日期:2019-07-25 发布日期:2019-07-18
  • 通讯作者: 张宗勇,男,平安壹钱包高级总监,主要研究方向为互联网技术及安全.E-mail:zzynet@163.com. E-mail:zzynet@163.com
  • 作者简介:李艳丽,女,硕士,平安壹钱包资深测试,主要研究方向为自动化测试和中间件测试.E-mail:liyanlyee@qq.com.

A distributed user-friendly Dubbo interface testing platform

LI Yan-li, ZHANG Zong-yong, FENG Jie, LI Zhi-hui   

  1. Pingan eWallet Co., Ltd, Shanghai 200232, China
  • Received:2018-08-06 Online:2019-07-25 Published:2019-07-18

摘要: 随着互联网金融的发展,金融业务变得更加复杂,产品功能迭代更加快速.为了支持业务的发展,金融应用开始进行支持Dubbo协议的开发.现有的接口测试框架和工具在支持Dubbo协议、多人协作及测试用例维护及数据分析上都存在问题:首先,没有很好的工具支持Dubbo协议的测试,已有的Dubbo测试框架无法很好地推广;其次,复杂业务会涉及多个应用,目前的框架很少考虑多系统间的自动化配合;再次,单机版自动化测试工具或纯编码方式的自动化测试框架不利于多人协作编写自动化测试用例及脚本的维护;最后,数据分析一般是查看单个子系统测试用例的执行结果,无法很好地对数据进行全局分析.为了更好地管理大批量用例及支持多子系统版本迭代,在已有老框架基础上,使用分布式技术设计并实现了一个灵活的可视化的Dubbo接口自动化测试平台:基于界面操作,提供基于可视化的数据驱动及关键字驱动方式,支持编写复杂测试用例,并基于接口解析的方式,自动生成测试用例.详细表述了可视化的Dubbo接口测试平台的架构、用例管理及用例执行;展示了新平台与老框架的耗时对比、用例增长对比和新平台日常自动化执行情况.

关键词: 可视化, 分布式, 自动化测试平台, 接口自动解析, 用例管理, 用例执行, 负载均衡

Abstract: 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.

Key words: user-friendly, distributed, automation test framework, automation interfaces analysis, test case management, test case execution, load balance

中图分类号: