Movatterモバイル変換


[0]ホーム

URL:


CN115617639A - Payment overtime alarm test method and system - Google Patents

Payment overtime alarm test method and system
Download PDF

Info

Publication number
CN115617639A
CN115617639ACN202110782254.3ACN202110782254ACN115617639ACN 115617639 ACN115617639 ACN 115617639ACN 202110782254 ACN202110782254 ACN 202110782254ACN 115617639 ACN115617639 ACN 115617639A
Authority
CN
China
Prior art keywords
payment
order
overtime
component
order table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110782254.3A
Other languages
Chinese (zh)
Other versions
CN115617639B (en
Inventor
刘德建
郑贞贞
宋诗莹
薛锶涵
李凌
王柟
林琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianqing Online Interactive Technology Co LtdfiledCriticalFujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202110782254.3ApriorityCriticalpatent/CN115617639B/en
Publication of CN115617639ApublicationCriticalpatent/CN115617639A/en
Application grantedgrantedCritical
Publication of CN115617639BpublicationCriticalpatent/CN115617639B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供了一种支付超时告警测试方法,所述方法包括如下步骤:步骤S1、本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;步骤S2、设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;步骤S3、测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节;自动化监控更加的智能化,减少不必要的排查流程。

Figure 202110782254

The present invention provides a payment overtime alarm testing method, said method comprising the following steps: step S1, creating an order management database locally, creating a temporary order table and a historical overtime order table, setting the attribute order number and the timeout times of the historical overtime order table , each component pays the callback value; clear the temporary order table data before each test task is executed; step S2, set a test task, deploy the test task on the continuous integration tool jenkins, set the build frequency to a preset time, and continuously integrate the build The test task monitors the online order payment status; step S3, after the test task is completed, the test alarm message is pushed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message; automated monitoring is more Intelligent, reduce unnecessary investigation process.

Figure 202110782254

Description

Translated fromChinese
一种支付超时告警测试方法及其系统A payment overtime alarm testing method and system thereof

技术领域technical field

本发明涉及计算机通讯技术领域,特别是一种支付超时告警测试方法及其系统。The invention relates to the technical field of computer communication, in particular to a payment overtime alarm testing method and a system thereof.

背景技术Background technique

一个产品的订单支付涉及到产品自身和多个支付相关组件,以及第三方支付平台,多方之间彼此独立而又互相依赖,当出现支付超时时,用户在第三方支付平台已完成付费操作,金额已被扣除,但产品前台订单还是待支付状态,严重损害用户利益,产品方无法第一时间知晓问题,排查问题过程中流程繁杂。The order payment of a product involves the product itself and multiple payment-related components, as well as the third-party payment platform. The multiple parties are independent and interdependent. When the payment timeout occurs, the user has completed the payment operation on the third-party payment platform, and the amount It has been deducted, but the front desk order of the product is still pending payment, which seriously damages the interests of users. The product side cannot know the problem at the first time, and the process of troubleshooting the problem is complicated.

现有技术中出现支付超时情况时,人工测试存在以下缺点:When payment overtime occurs in the prior art, manual testing has the following disadvantages:

(1)无法快速定位异常环节,需要涉及到的多个支付相关组件方和产品方开发对各个支付流程中各个环节进行异常排查,浪费大量的时间和人力。(1) It is impossible to quickly locate the abnormal link, and it is necessary for multiple payment-related component parties and product parties involved to develop abnormal checks for each link in each payment process, wasting a lot of time and manpower.

(2)问题响应慢,出现问题无法第一时间被知晓,总是要等待外部反馈了才开始排查,损害用户利益。(2) The response to the problem is slow, and the problem cannot be known at the first time. It is always necessary to wait for external feedback before starting the investigation, which damages the interests of users.

(3)排查的流程每次都相同,同样的排查步骤人工重复执行,效率低下,浪费时间。(3) The inspection process is the same every time, and the same inspection steps are manually repeated, which is inefficient and wastes time.

发明内容Contents of the invention

为克服上述问题,本发明的目的是提供一种支付超时告警测试方法,能够自动化初步排查订单超时问题,锁定异常组件,避免了多个组件人员排查的时间和人力投入。In order to overcome the above problems, the purpose of the present invention is to provide a payment timeout alarm test method, which can automatically check the order timeout problem initially, lock abnormal components, and avoid the time and manpower investment of multiple component personnel to check.

本发明采用以下方案实现:一种支付超时告警测试方法,所述方法包括如下步骤:The present invention is realized by adopting the following scheme: a payment overtime alarm testing method, said method comprising the following steps:

步骤S1、本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;Step S1, create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of timeouts, and the payment callback value of each component; clear the data in the temporary order table before each test task is executed;

步骤S2、设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;Step S2, setting a test task, deploying the test task on the continuous integration tool jenkins, setting the build frequency to a preset time, continuously integrating and building the test task, and monitoring the online order payment status;

步骤S3、测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。Step S3, after the test task is completed, the test alarm message is pushed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.

进一步的,所述测试任务为:获取线上数据库第三方支付平台中已付费,且支付状态为待支付的订单到本地数据库,存放到所述临时订单表,本地的历史超时订单表读取临时订单表中原超时订单和新增的超时订单信息,对订单超时次数+1,筛选超时次数大于1的订单,依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节。Further, the test task is: obtain paid orders in the online database third-party payment platform, and the payment status is to be paid to the local database, store them in the temporary order table, and read the temporary historical timeout order table in the local database. For the original overtime order and newly added overtime order information in the order table, add 1 to the order timeout times, and filter the orders with overtime times greater than 1, and verify the payment callback value of the third-party payment platform and each component in turn to determine the payment abnormal link.

进一步的,所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;Further, the test task further specifically includes: obtaining the order form of the MySQL database of the third-party payment platform from the line by writing a script in Python+MySQL language, obtaining the payment callback of the third-party payment platform through query conditions is normal, and the payment status is pending The paid order record is written to the local temporary order table;

根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;

从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.

进一步的,所述依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节,具体为:根据支付流程中组件调用逻辑顺序进行校验:创建订单后,订单状态默认是待支付状态,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,产品服务端查询订单,订单状态更新;则支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常;依此来判断导致支付超时的源头异常组件或第三方支付平台。Further, the step of verifying the third-party payment platform and the payment callback value of each component in order to determine the payment abnormal link is as follows: verifying according to the logical sequence of component calls in the payment process: after creating an order, the order status defaults to pending payment status, after the user completes the payment operation, the third-party payment platform transmits the payment callback result to the payment center component, the payment center component transmits the payment callback value to the wallet component, and the wallet component transmits the payment callback value to the product server, and the product server queries the order, the order The status is updated; the payment center component queries the order, and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the callback of the third-party payment platform is normal; the wallet component queries the order, and checks the order status code field returned by the interface. If code=80010000, it means that the payment is successful , indicating that the payment callback returned by the payment center component is normal; the server queries the order, and checks the status field of the order status returned by the interface. When status=1, it means that the payment is successful, indicating that the payment callback value returned by the wallet component is normal; judge the cause of the payment timeout accordingly Abnormal components or third-party payment platforms at the source.

本发明还提供了一种支付超时告警测试系统,所述系统包括:测试准备模块、执行测试模块、测试结果收集模块;The present invention also provides a payment overtime alarm test system, said system comprising: a test preparation module, an execution test module, and a test result collection module;

所述测试准备模块,用于在本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;The test preparation module is used to create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of times overtime, and each component pays a callback value; before each test task is executed Clear the temporary order table data;

所述执行测试模块,设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;Described execution test module, a test task is set, the test task is deployed on the continuous integration tool jenkins, the construction frequency is set as a preset time, the continuous integration builds the test task, and monitors the online order payment status;

所述测试结果收集模块,用于测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。The test result collection module is used to push the test alarm message after the test task is completed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.

进一步的,所述测试任务为:获取线上数据库第三方支付平台中已付费,且支付状态为待支付的订单到本地数据库,存放到所述临时订单表,本地的历史超时订单表读取临时订单表中原超时订单和新增的超时订单信息,对订单超时次数+1,筛选超时次数大于1的订单,依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节。Further, the test task is: obtain paid orders in the online database third-party payment platform, and the payment status is to be paid to the local database, store them in the temporary order table, and read the temporary historical timeout order table in the local database. For the original overtime order and newly added overtime order information in the order table, add 1 to the order timeout times, and filter the orders with overtime times greater than 1, and verify the payment callback value of the third-party payment platform and each component in turn to determine the payment abnormal link.

进一步的,所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;Further, the test task further specifically includes: obtaining the order form of the MySQL database of the third-party payment platform from the line by writing a script in Python+MySQL language, obtaining the payment callback of the third-party payment platform through query conditions is normal, and the payment status is pending The paid order record is written to the local temporary order table;

根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;

从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.

进一步的,所述依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节,具体为:根据支付流程中组件调用逻辑顺序进行校验:创建订单后,订单状态默认是待支付状态,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,产品服务端查询订单,订单状态更新;则支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常;依此来判断导致支付超时的源头异常组件或第三方支付平台。Further, the step of verifying the third-party payment platform and the payment callback value of each component in order to determine the payment abnormal link is as follows: verifying according to the logical sequence of component calls in the payment process: after creating an order, the order status defaults to pending payment status, after the user completes the payment operation, the third-party payment platform transmits the payment callback result to the payment center component, the payment center component transmits the payment callback value to the wallet component, and the wallet component transmits the payment callback value to the product server, and the product server queries the order, the order The status is updated; the payment center component queries the order, and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the callback of the third-party payment platform is normal; the wallet component queries the order, and checks the order status code field returned by the interface. If code=80010000, it means that the payment is successful , indicating that the payment callback returned by the payment center component is normal; the server queries the order, and checks the status field of the order status returned by the interface. When status=1, it means that the payment is successful, indicating that the payment callback value returned by the wallet component is normal; judge the cause of the payment timeout accordingly Abnormal components or third-party payment platforms at the source.

本发明的有益效果在于:1.该测试方法能够自动化初步排查订单超时问题,锁定异常组件,避免了多个组件人员排查的时间和人力投入。2.自动化监控支付超时能够在第一时间发现问题,及时响应问题,减少用户损失,保持系统的可信度。3.自动化监控更加的智能化,将重复的人工排查流程方法进行简化,节约时间。The beneficial effects of the present invention are as follows: 1. The test method can automatically and preliminarily check the order overtime problem, lock abnormal components, and avoid the time and manpower input of multiple component personnel to check. 2. Automatic monitoring of payment overtime can detect problems at the first time, respond to problems in a timely manner, reduce user losses, and maintain the credibility of the system. 3. The automated monitoring is more intelligent, and the repetitive manual inspection process is simplified to save time.

附图说明Description of drawings

图1是本发明的方法流程示意图。Fig. 1 is a schematic flow chart of the method of the present invention.

图2是本发明的一实施例的流程示意图。Fig. 2 is a schematic flowchart of an embodiment of the present invention.

图3是本发明的一实施例中测试任务的具体流程示意图。Fig. 3 is a schematic flow chart of a test task in an embodiment of the present invention.

图4是本发明的系统原理框图。Fig. 4 is a functional block diagram of the system of the present invention.

具体实施方式detailed description

下面结合附图对本发明做进一步说明。The present invention will be further described below in conjunction with the accompanying drawings.

请参阅图1所示,本发明的一种支付超时告警测试方法,所述方法包括如下步骤:Please refer to shown in Fig. 1, a kind of payment overtime warning test method of the present invention, described method comprises the following steps:

步骤S1、本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;Step S1, create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of timeouts, and the payment callback value of each component; clear the data in the temporary order table before each test task is executed;

步骤S2、设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;Step S2, setting a test task, deploying the test task on the continuous integration tool jenkins, setting the build frequency to a preset time, continuously integrating and building the test task, and monitoring the online order payment status;

步骤S3、测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。Step S3, after the test task is completed, the test alarm message is pushed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.

如图2所示,是本发明的一实施例的流程示意图。本发明的一种支付超时告警测试方法,测试前准备:As shown in FIG. 2 , it is a schematic flow chart of an embodiment of the present invention. A kind of payment overtime warning test method of the present invention, preparation before test:

1.在本地(即客户端本地)创建订单管理的MySQL数据库,创建临时订单表,用来存放本次测试执行从项目线上(服务端线上)环境数据库拉取的超时订单,创建历史超时订单表,存放历史超时订单详情,历史超时订单表的属性有订单编号,超时次数,第三方支付平台返回的支付回调值,组件包括:支付中心组件和钱包组件,支付中心组件回调值,钱包组件支付回调值。1. Create a MySQL database for order management locally (that is, locally on the client side), and create a temporary order table to store the overtime orders pulled from the project online (server online) environment database during this test execution, and create historical overtime orders Table, which stores the details of historical overtime orders. The attributes of the historical overtime order table include order number, timeout times, and payment callback value returned by the third-party payment platform. The components include: payment center component and wallet component, payment center component callback value, and wallet component payment callback value.

2.每次测试任务执行前清空本地临时订单表数据。2. Clear the local temporary order table data before each test task execution.

如图3所示,测试执行:As shown in Figure 3, the test executes:

1.将测试任务部署在持续集成工具jenkins上,设置构建频率为预设时间,该预设时间为2-3分钟,持续集成构建测试任务,监控线上订单支付状况;1. Deploy the test task on the continuous integration tool jenkins, set the build frequency to the preset time, and the preset time is 2-3 minutes, continuously integrate the build test task, and monitor the online order payment status;

2.通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;2. Obtain the order form of the MySQL database of the third-party payment platform online by writing a script in Python+MySQL language, and obtain the order record of the payment callback of the third-party payment platform through the query condition is normal, and the payment status is pending payment, and write it to the local provisional order form;

3.根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在本地历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在本地历史超时订单表,则新增对应订单信息到本地历史超时订单表,超时次数累加1。3. Judging according to the order number in the local historical overtime order table, if the order acquired this time is already in the local historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; If the order is not in the local historical overtime order table, the corresponding order information is added to the local historical overtime order table, and the number of timeouts is accumulated by 1.

4.从本地历史超时订单表中筛选出超时次数大于1的订单,即:超时时间大于2分钟。4. Filter out the orders whose timeout times are greater than 1 from the local historical timeout order table, that is, the timeout time is greater than 2 minutes.

5.根据支付流程中组件调用逻辑顺序:创建订单后,订单状态默认是待支付状态,前端展示等待支付,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,服务端查询订单,订单状态更新。因此,支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常。依此判断导致支付超时的是源头异常组件或是第三方支付平台。5. According to the logical sequence of component calls in the payment process: after creating an order, the default status of the order is pending payment, and the front-end display is waiting for payment. After the user completes the payment operation, the third-party payment platform transmits the payment callback result to the payment center component, and the payment center component Pass the payment callback value to the wallet component, the wallet component passes the payment callback value to the product server, the server queries the order, and the order status is updated. Therefore, the payment center component queries the order and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the callback of the third-party payment platform is normal; the wallet component queries the order and checks the order status code field returned by the interface. If code=80010000 means the payment is successful, it means The payment callback returned by the payment center component is normal; the server queries the order and checks the status field of the order status returned by the interface. When status=1, the payment is successful, indicating that the payment callback value returned by the wallet component is normal. Based on this, it is judged that it is the source abnormal component or the third-party payment platform that caused the payment timeout.

6.通过通讯工具(如微信、QQ、邮箱)消息告警通知对应的组件负责人,消息内容包含订单编号和异常组件名称,异常组件支付回调值。6. Notify the person in charge of the corresponding component through the message alarm of the communication tool (such as WeChat, QQ, mailbox). The content of the message includes the order number and the name of the abnormal component, and the payment callback value of the abnormal component.

测试结果收集:Test result collection:

完成告警消息推送后,可以及时得到具体的超时订单编号,异常组件名称,异常组件支付回调值,根据推送消息中的异常组件回调值更加精准的定位导致支付超时的异常环节,以此作为切入点再次深入排查bug,减少不必要的排查流程。After the alarm message is pushed, you can get the specific overtime order number, abnormal component name, and abnormal component payment callback value in time. According to the abnormal component callback value in the push message, you can more accurately locate the abnormal link that leads to payment timeout, and use this as an entry point In-depth troubleshooting of bugs again to reduce unnecessary troubleshooting processes.

所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;The test task further specifically includes: obtaining the order form of the MySQL database of the third-party payment platform from the line by writing a script in Python+MySQL language, obtaining the payment callback of the third-party payment platform through query conditions is normal, and the payment status is an order to be paid Record, write to the local temporary order table;

根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;

从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.

如图4所示,本发明还提供了一种支付超时告警测试系统,所述系统包括:测试准备模块、执行测试模块、测试结果收集模块;As shown in Figure 4, the present invention also provides a payment overtime warning test system, said system comprising: a test preparation module, an execution test module, and a test result collection module;

所述测试准备模块,用于在本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;The test preparation module is used to create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of times overtime, and each component pays a callback value; before each test task is executed Clear the temporary order table data;

所述执行测试模块,设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;所述测试任务为:获取线上数据库第三方支付平台中已付费,且支付状态为待支付的订单到本地数据库,存放到所述临时订单表,本地的历史超时订单表读取临时订单表中原超时订单和新增的超时订单信息,对订单超时次数+1,筛选超时次数大于1的订单,依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节。Described execution test module, a test task is set, the test task is deployed on the continuous integration tool jenkins, the construction frequency is set as a preset time, the continuous integration builds the test task, and monitors the online order payment status; the test task is: Obtain the orders that have been paid in the third-party payment platform of the online database and the payment status is to be paid to the local database, store them in the temporary order table, and read the original overtime order and the newly added order in the temporary order table from the local historical overtime order table For overtime order information, add 1 to the number of timeout orders, filter orders with timeout times greater than 1, verify the payment callback value of the third-party payment platform and each component in turn, and determine the payment abnormal link.

所述测试结果收集模块,用于测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。The test result collection module is used to push the test alarm message after the test task is completed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.

所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;The test task further specifically includes: obtaining the order form of the MySQL database of the third-party payment platform from the line by writing a script in Python+MySQL language, obtaining the payment callback of the third-party payment platform through query conditions is normal, and the payment status is an order to be paid Record, write to the local temporary order table;

根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;

从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.

所述依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节,具体为:根据支付流程中组件调用逻辑顺序进行校验:创建订单后,订单状态默认是待支付状态,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,产品服务端查询订单,订单状态更新;则支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常;依此来判断导致支付超时的源头异常组件或第三方支付平台。The step of verifying the payment callback value of the third-party payment platform and each component in order to determine the payment abnormal link is as follows: verifying according to the logical sequence of component calls in the payment process: after creating an order, the order status defaults to the pending payment status, and the user After the payment operation is completed, the third-party payment platform transmits the payment callback result to the payment center component, the payment center component transmits the payment callback value to the wallet component, and the wallet component transmits the payment callback value to the product server, and the product server queries the order and updates the order status; Then the payment center component queries the order and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the third-party payment platform callback is normal; the wallet component queries the order and checks the order status code field returned by the interface. If code=80010000 means the payment is successful, it means the payment The payment callback returned by the central component is normal; the server queries the order, and checks the status field of the order status returned by the interface. When status=1, it means that the payment is successful, indicating that the payment callback value returned by the wallet component is normal; based on this, the source of the abnormal component that caused the payment timeout to be judged Or a third-party payment platform.

以上所述仅为本发明的较佳实施例,凡依本发明申请专利范围所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.

Claims (8)

Translated fromChinese
1.一种支付超时告警测试方法,其特征在于:所述方法包括如下步骤:1. A payment overtime warning test method is characterized in that: the method comprises the steps of:步骤S1、本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;Step S1, create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of timeouts, and the payment callback value of each component; clear the data in the temporary order table before each test task is executed;步骤S2、设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;Step S2, setting a test task, deploying the test task on the continuous integration tool jenkins, setting the build frequency to a preset time, continuously integrating and building the test task, and monitoring the online order payment status;步骤S3、测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。Step S3, after the test task is completed, the test alarm message is pushed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.2.根据权利要求1所述的一种支付超时告警测试方法,其特征在于:所述测试任务为:获取线上数据库第三方支付平台中已付费,且支付状态为待支付的订单到本地数据库,存放到所述临时订单表,本地的历史超时订单表读取临时订单表中原超时订单和新增的超时订单信息,对订单超时次数+1,筛选超时次数大于1的订单,依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节。2. A payment overtime warning test method according to claim 1, characterized in that: the test task is: obtain an order that has been paid in the online database third-party payment platform, and the payment status is to be paid to the local database , stored in the temporary order table, the local historical overtime order table reads the original overtime order and the newly added overtime order information in the temporary order table, adds 1 to the order timeout times, and filters the orders whose timeout times are greater than 1, and then checks the first The payment callback value of the three-party payment platform and each component determines the payment abnormal link.3.根据权利要求2所述的一种支付超时告警测试方法,其特征在于:所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;3. A kind of payment timeout warning test method according to claim 2, is characterized in that: described test task further specifically comprises: write the script by Python+MySQL language and obtain the order table of the MySQL database of third-party payment platform from the line , Obtain the order record of the third-party payment platform whose payment callback is normal and whose payment status is pending payment through the query conditions, and write it into the local temporary order table;根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.4.根据权利要求1所述的一种支付超时告警测试方法,其特征在于:所述依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节,具体为:根据支付流程中组件调用逻辑顺序进行校验:创建订单后,订单状态默认是待支付状态,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,产品服务端查询订单,订单状态更新;则支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常;依此来判断导致支付超时的源头异常组件或第三方支付平台。4. A payment overtime warning test method according to claim 1, characterized in that: the payment callback value of the third-party payment platform and each component is checked in turn to determine the abnormal payment link, specifically: according to the payment process Component call logic sequence for verification: After creating an order, the order status defaults to the pending payment status. After the user completes the payment operation, the third-party payment platform transmits the payment callback result to the payment center component, and the payment center component transmits the payment callback value to the wallet component. The wallet component transmits the payment callback value to the product server, and the product server queries the order, and the order status is updated; then the payment center component queries the order, and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the callback of the third-party payment platform is normal; the wallet component queries Order, check the order status code field returned by the interface, if code=80010000 means the payment is successful, it means that the payment callback returned by the payment center component is normal; the server queries the order, check the order status field returned by the interface, when status=1 means the payment is successful, It means that the payment callback value returned by the wallet component is normal; based on this, it can be judged that the source of the payment timeout is an abnormal component or a third-party payment platform.5.一种支付超时告警测试系统,其特征在于:所述系统包括:测试准备模块、执行测试模块、测试结果收集模块;5. A payment overtime warning test system, characterized in that: the system includes: a test preparation module, an execution test module, and a test result collection module;所述测试准备模块,用于在本地创建订单管理数据库,创建临时订单表和历史超时订单表,设置历史超时订单表的属性订单编号,超时次数,各组件支付回调值;每次测试任务执行前清空临时订单表数据;The test preparation module is used to create an order management database locally, create a temporary order table and a historical overtime order table, set the attribute order number of the historical overtime order table, the number of times overtime, and each component pays a callback value; before each test task is executed Clear the temporary order table data;所述执行测试模块,设置一测试任务,将测试任务部署在持续集成工具jenkins上,设置构建频率为一预设时间,持续集成构建测试任务,监控线上订单支付状况;Described execution test module, a test task is set, the test task is deployed on the continuous integration tool jenkins, the construction frequency is set as a preset time, the continuous integration builds the test task, and monitors the online order payment status;所述测试结果收集模块,用于测试任务完成后,将测试的告警消息进行推送,操作人员根据推送消息中的异常组件回调值来准确定位导致支付超时的异常环节。The test result collection module is used to push the test alarm message after the test task is completed, and the operator accurately locates the abnormal link that causes the payment timeout according to the callback value of the abnormal component in the push message.6.根据权利要求5所述的一种支付超时告警测试系统,其特征在于:所述测试任务为:获取线上数据库第三方支付平台中已付费,且支付状态为待支付的订单到本地数据库,存放到所述临时订单表,本地的历史超时订单表读取临时订单表中原超时订单和新增的超时订单信息,对订单超时次数+1,筛选超时次数大于1的订单,依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节。6. A payment overtime warning test system according to claim 5, characterized in that: the test task is: obtain the paid order in the online database third-party payment platform, and the payment status is to be paid to the local database , stored in the temporary order table, the local historical overtime order table reads the original overtime order and the newly added overtime order information in the temporary order table, adds 1 to the order timeout times, and filters the orders whose timeout times are greater than 1, and then checks the first The payment callback value of the three-party payment platform and each component determines the payment abnormal link.7.根据权利要求6所述的一种支付超时告警测试系统,其特征在于:所述测试任务进一步具体包括:通过Python+MySQL语言编写脚本从线上获取第三方支付平台的MySQL数据库的订单表,通过查询条件获取第三方支付平台支付回调正常,且支付状态为待支付的订单记录,写入到本地临时订单表;7. A kind of payment overtime warning test system according to claim 6, is characterized in that: described test task further specifically comprises: write the script by Python+MySQL language and obtain the order table of the MySQL database of third-party payment platform from the line , Obtain the order record of the third-party payment platform whose payment callback is normal and whose payment status is pending payment through the query conditions, and write it into the local temporary order table;根据本地历史超时订单表中的订单编号判断,如果本次获取的订单已在历史超时订单表中,则更新本地历史超时订单表中对应订单信息,超时次数累加1;如果本次获取的订单不在历史超时订单表,则新增对应订单信息到历史超时订单表,超时次数累加1;According to the order number in the local historical overtime order table, if the order acquired this time is already in the historical overtime order table, update the corresponding order information in the local historical overtime order table, and the number of timeouts will be accumulated by 1; if the order acquired this time is not in For the historical overtime order table, add the corresponding order information to the historical overtime order table, and the number of timeouts will be added to 1;从历史超时订单表中筛选出超时次数大于1的订单,其中,超时时间大于所述预设时间。Filtering out orders whose timeout times are greater than 1 from the historical timeout order table, wherein the timeout time is greater than the preset time.8.根据权利要求5所述的一种支付超时告警测试系统,其特征在于:所述依次校验第三方支付平台和各个组件的支付回调值,确定支付异常环节,具体为:根据支付流程中组件调用逻辑顺序进行校验:创建订单后,订单状态默认是待支付状态,用户完成支付操作后,第三方支付平台传递支付回调结果给支付中心组件,支付中心组件传递支付回调值给钱包组件,钱包组件传递支付回调值给产品服务端,产品服务端查询订单,订单状态更新;则支付中心组件查询订单,查看接口返回的TradeStatus字段,当TradeStatus=TRADE_SUCCESS说明第三方支付平台回调正常;钱包组件查询订单,查看接口返回的订单状态code字段,如果code=80010000表示支付成功,说明支付中心组件返回的支付回调正常;服务端查询订单,查看接口返回订单状态status字段,当status=1表示支付成功,说明钱包组件返回的支付回调值正常;依此来判断导致支付超时的源头异常组件或第三方支付平台。8. A payment overtime warning test system according to claim 5, characterized in that: the payment callback value of the third-party payment platform and each component is verified sequentially to determine the abnormal payment link, specifically: according to the payment process Component call logic sequence for verification: After creating an order, the order status defaults to the pending payment status. After the user completes the payment operation, the third-party payment platform transmits the payment callback result to the payment center component, and the payment center component transmits the payment callback value to the wallet component. The wallet component transmits the payment callback value to the product server, and the product server queries the order, and the order status is updated; then the payment center component queries the order, and checks the TradeStatus field returned by the interface. When TradeStatus=TRADE_SUCCESS, it means that the callback of the third-party payment platform is normal; the wallet component queries Order, check the order status code field returned by the interface, if code=80010000 means the payment is successful, it means that the payment callback returned by the payment center component is normal; the server queries the order, check the order status field returned by the interface, when status=1 means the payment is successful, It means that the payment callback value returned by the wallet component is normal; based on this, it can be judged that the source of the payment timeout is an abnormal component or a third-party payment platform.
CN202110782254.3A2021-07-122021-07-12 A payment timeout alarm testing method and systemActiveCN115617639B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110782254.3ACN115617639B (en)2021-07-122021-07-12 A payment timeout alarm testing method and system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110782254.3ACN115617639B (en)2021-07-122021-07-12 A payment timeout alarm testing method and system

Publications (2)

Publication NumberPublication Date
CN115617639Atrue CN115617639A (en)2023-01-17
CN115617639B CN115617639B (en)2025-08-05

Family

ID=84855335

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110782254.3AActiveCN115617639B (en)2021-07-122021-07-12 A payment timeout alarm testing method and system

Country Status (1)

CountryLink
CN (1)CN115617639B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107392722A (en)*2017-07-272017-11-24福建中金在线信息科技有限公司Order processing method, apparatus, electronic equipment and storage medium
CN107833113A (en)*2017-12-062018-03-23福建中金在线信息科技有限公司Abnormal order processing method, apparatus and electronic equipment
WO2019196244A1 (en)*2018-04-102019-10-17平安科技(深圳)有限公司Real-time order callback method and system
CN110633977A (en)*2019-08-022019-12-31深圳市融壹买信息科技有限公司Payment exception processing method and device and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107392722A (en)*2017-07-272017-11-24福建中金在线信息科技有限公司Order processing method, apparatus, electronic equipment and storage medium
CN107833113A (en)*2017-12-062018-03-23福建中金在线信息科技有限公司Abnormal order processing method, apparatus and electronic equipment
WO2019196244A1 (en)*2018-04-102019-10-17平安科技(深圳)有限公司Real-time order callback method and system
CN110633977A (en)*2019-08-022019-12-31深圳市融壹买信息科技有限公司Payment exception processing method and device and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪天星;程耕国;: "基于B/S的扫码支付平台的设计", 现代电子技术, no. 22, 12 November 2018 (2018-11-12), pages 57 - 60*

Also Published As

Publication numberPublication date
CN115617639B (en)2025-08-05

Similar Documents

PublicationPublication DateTitle
CN107291565B (en)Operation and maintenance visual automatic operation platform and implementation method
CN107908550B (en)Software defect statistical processing method and device
US8255899B2 (en)Techniques for upgrade dependency management
CN111274154A (en)Automatic testing method, device, equipment and storage medium
CN109344056B (en)Test method and test device
CN106951369A (en)The management method and device of a kind of joint debugging test
CN110188036A (en) A software testing method and device
CN113495755B (en)Information multidimensional analysis method and device
US20210073098A1 (en)Information processing system
CN105955749A (en)Continuous software project integration method and device
CN109254912A (en)A kind of method and device of automatic test
WO2018202172A1 (en)Mass comparison test method and system
CN116204410A (en)Database performance test method and device, electronic equipment and storage medium
CN115794545A (en)Automatic processing method of operation and maintenance data and related equipment thereof
CN108197147A (en)Number card database O&M method and device
CN111582754A (en)Risk checking method, device and equipment and computer readable storage medium
CN113014675B (en) Data processing method and device, electronic device and storage medium
CN115617639A (en)Payment overtime alarm test method and system
CN114626683A (en) Product update message notification method, device and electronic device based on RPA combined with AI
CN109683860B (en)Computer software project management platform, equipment and readable storage medium
CN101430688A (en)Database automatic detection system and its operation method
CN111915275A (en)Application operation process management method, device and system
CN113190251B (en) Data upgrading method and device, electronic device, and computer readable medium
CN117314269A (en)Quality inspection model management method, system, electronic equipment and storage medium
KR100962656B1 (en) Method and system for conducting tests for system maintenance and repair that efficiently improves test case recycling

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp