CN111737140A - Interface automated testing method, apparatus, device, and computer-readable storage medium - Google Patents
Interface automated testing method, apparatus, device, and computer-readable storage medium Download PDFInfo
- Publication number
- CN111737140A CN111737140A CN202010597341.7A CN202010597341A CN111737140A CN 111737140 A CN111737140 A CN 111737140A CN 202010597341 A CN202010597341 A CN 202010597341A CN 111737140 A CN111737140 A CN 111737140A
- Authority
- CN
- China
- Prior art keywords
- engine
- test
- protocol
- target
- mock
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 679
- 238000000034 method Methods 0.000 claims abstract description 42
- 238000011144 upstream manufacturing Methods 0.000 claims description 31
- 230000008569 process Effects 0.000 claims description 23
- 239000000284 extract Substances 0.000 claims description 15
- 230000008859 change Effects 0.000 claims description 10
- 230000005856 abnormality Effects 0.000 claims description 4
- 238000012552 review Methods 0.000 abstract description 9
- 238000005516 engineering process Methods 0.000 abstract description 5
- 239000000047 product Substances 0.000 description 32
- 238000007726 management method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 239000000243 solution Substances 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- 239000012085 test solution Substances 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- KDYFGRWQOYBRFD-UHFFFAOYSA-N succinic acid Chemical compound OC(=O)CCC(O)=O KDYFGRWQOYBRFD-UHFFFAOYSA-N 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明涉及金融科技(Fintech)技术领域,本发明公开了一种接口自动化测试方法、装置、设备和计算机可读存储介质,该方法包括:在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;若存在与所述目标版本协议关联的基线版本协议,则比对所述目标版本协议与所述基线版本协议,获得协议更新信息;获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。本发明通过协议版本比对测试,不需要测试人员审核测试结果,提高了回归测试的效率。
The invention relates to the technical field of financial technology (Fintech), and discloses an interface automatic testing method, device, device and computer-readable storage medium. The method includes: when an interface protocol test request is received, obtaining the interface protocol The test request corresponds to the target version protocol to be tested; if there is a baseline version protocol associated with the target version protocol, compare the target version protocol with the baseline version protocol to obtain protocol update information; obtain the baseline version protocol Corresponding baseline test engine, update the baseline test engine according to the protocol update information to obtain a target test engine; generate a target test case according to the target test engine, run the target test case to obtain the target test of the target version protocol result. The present invention passes the protocol version comparison test, does not require testers to review the test results, and improves the efficiency of the regression test.
Description
技术领域technical field
本发明涉及金融科技(Fintech)技术领域,尤其涉及接口自动化测试方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of financial technology (Fintech), and in particular, to a method, apparatus, device and computer-readable storage medium for automatic interface testing.
背景技术Background technique
随着互联网技术,尤其是互联网金融科技(Fintech)的飞速发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,金融业务平台的功能越来越多。With the rapid development of Internet technology, especially Internet financial technology (Fintech), more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, and the functions of financial business platforms are becoming more and more more and more.
金融业务平台通常设置大量的数据接口,实现金融业务数据交互,在金融业务平台接口开发完成时,需要进行接口测试,由于数据接口较多则用于接口测试的测试用例也较多,当前测试用例主要通过手动编写较为麻烦,测试用例生成时间较长,接口测试效率较低,基于此部分开发者对提出了测试用例自动化生成方案,自动化生成测试用例缩短了测试用例的编写时间,一定程度上提高了接口测试效率,然而,针对频繁的回归测试,由于每次自动化生成的测试用例各不相同,每次得到到测试结果各不相同,每次都需要进行测试结果分析,测试结果中的错误发现效率低,回归测试的时间长。The financial business platform usually sets up a large number of data interfaces to realize the interaction of financial business data. When the interface development of the financial business platform is completed, interface testing is required. Since there are many data interfaces, there are many test cases for interface testing. The current test case Mainly through manual writing is more troublesome, the test case generation time is long, and the interface testing efficiency is low. Based on this, some developers have proposed an automatic test case generation scheme. The automatic generation of test cases shortens the writing time of test cases and improves the test case to a certain extent. The efficiency of interface testing is improved. However, for frequent regression testing, since the test cases generated by automation are different each time, and the test results obtained each time are different, test result analysis needs to be performed each time, and errors in the test results are found. Low efficiency and long regression testing time.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提出一种接口自动化测试方法、装置、设备及计算机可读存储介质,旨在解决当前接口回归测试方法,使用不同的测试用例每次得到到测试结果各不相同,每次都需要单独测试结果分析,测试结果中的错误发现效率低,回归测试的时间长的技术问题。The main purpose of the present invention is to provide an interface automatic testing method, device, equipment and computer-readable storage medium, aiming at solving the current interface regression testing method, using different test cases to obtain different test results each time, each time All need to analyze the test results separately, the errors in the test results are found to be inefficient, and the regression test time is long.
为实现上述目的,本发明提供一种接口自动化测试方法,所述接口自动化测试方法包括如下步骤:In order to achieve the above object, the present invention provides a method for automatic testing of interfaces, and the automatic testing method for interfaces comprises the following steps:
在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;When receiving the interface protocol test request, obtain the target version protocol to be tested corresponding to the interface protocol test request;
若存在与所述目标版本协议关联的基线版本协议,则比对所述目标版本协议与所述基线版本协议,获得协议更新信息;If there is a baseline version protocol associated with the target version protocol, comparing the target version protocol with the baseline version protocol to obtain protocol update information;
获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;Obtain the baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain the target test engine;
根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。Generate a target test case according to the target test engine, and run the target test case to obtain the target test result of the target version protocol.
可选地,所述在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议的步骤之后,所述方法包括:Optionally, after the step of acquiring the target version protocol to be tested corresponding to the interface protocol test request when an interface protocol test request is received, the method includes:
判断是否存在与所述目标版本协议关联的基线版本协议;Judging whether there is a baseline version protocol associated with the target version protocol;
若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议生成目标测试引擎,其中,所述目标测试引擎包括业务规则引擎、基础字段引擎和MOCK测试引擎;If the baseline version protocol associated with the target version protocol does not exist, analyze the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine and a MOCK test engine;
根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。Generate a target test case according to the target test engine, and run the target test case to obtain the target test result of the target version protocol.
可选地,所述若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议生成目标测试引擎的步骤,包括:Optionally, if the baseline version protocol associated with the target version protocol does not exist, the step of analyzing the target version protocol to generate a target test engine includes:
若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议,获取所述目标版本协议的业务场景标识;If the baseline version protocol associated with the target version protocol does not exist, analyze the target version protocol, and obtain the service scenario identifier of the target version protocol;
查询预设养数平台,获取所述业务场景标识对应的业务测试规则,汇总所述业务测试规则生成业务规则引擎;Querying the preset data platform, obtaining the business test rules corresponding to the business scenario identifiers, and summarizing the business test rules to generate a business rule engine;
遍历所述目标版本协议的协议属性,根据预先配置的发散规则和所述协议属性中的字段类型、字段长度和字段枚举进行发散生成基础字段引擎;Traverse the protocol attribute of the target version protocol, and generate a basic field engine according to the preconfigured divergence rule and the field type, field length and field enumeration in the protocol attribute;
从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议内容信息和所述协议上下游关系生成MOCK测试引擎;Pull the protocol content information and the protocol upstream and downstream relationship of the target version protocol from the preset protocol management platform, and generate a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationship;
将所述业务规则引擎、所述基础字段引擎和所述MOCK测试引擎组合生成目标测试引擎。A target test engine is generated by combining the business rule engine, the basic field engine and the MOCK test engine.
可选地,所述从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议内容信息和所述协议上下游关系生成MOCK测试引擎的步骤,包括:Optionally, the step of pulling the protocol content information and the protocol upstream and downstream relationships of the target version protocol from the preset protocol management platform, and generating a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationships, including :
从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议上下游关系,获取所述目标版本协议下游待MOCK的各目标下游协议;Pull the protocol content information of the target version protocol and the protocol upstream and downstream relationship from the preset protocol management platform, and obtain each target downstream protocol to be MOCK downstream of the target version protocol according to the protocol upstream and downstream relationship;
获取所述目标下游协议中预设配置的进行笛卡尔发散的目标字段,将所述目标下游协议根据所述目标字段做笛卡尔积,生成成功MOCK集合和失败MOCK集合;Acquiring the preset target field for Cartesian divergence in the target downstream protocol, performing a Cartesian product on the target downstream protocol according to the target field, and generating a successful MOCK set and a failed MOCK set;
将所述成功MOCK集合之间做笛卡尔积,获得成功类MOCK规则,将所述失败MOCK集合与所述成功MOCK集合中一个元素做笛卡尔积,获得失败类MOCK规则;Do Cartesian product between the described successful MOCK sets, obtain the successful class MOCK rule, do Cartesian product with an element in the described failure MOCK set and the described successful MOCK set, obtain the failure class MOCK rule;
将所述成功类MOCK规则和所述失败类MOCK规则汇总生成所述MOCK测试引擎。The MOCK test engine is generated by summarizing the success class MOCK rules and the failure class MOCK rules.
可选地,所述获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎的步骤,包括:Optionally, the step of obtaining the baseline test engine corresponding to the baseline version protocol, updating the baseline test engine according to the protocol update information, and obtaining the target test engine, includes:
获取所述基线版本协议对应的基线测试引擎,其中,所述基线测试引擎包括:业务规则引擎、基础字段引擎和/或MOCK测试引擎;Obtain the baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and/or a MOCK test engine;
查询预设养数平台,从所述预设养数平台中获取所述协议更新信息中的更新场景标识,及所述更新场景标识对应的更新测试规则,将所述更新测试规则添加到所述业务规则引擎,获得更新的业务规则引擎;Query the preset support platform, obtain the update scene identifier in the protocol update information from the preset support platform, and the update test rule corresponding to the update scene identifier, and add the update test rule to the Business rules engine, get updated business rules engine;
遍历所述协议更新信息的新增属性,根据所述新增属性中的变化类型、变化长度和新增枚举对所述基础字段引擎进行更新,获得更新的基础字段引擎;Traversing the newly added attributes of the protocol update information, and updating the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, to obtain an updated basic field engine;
将所述协议更新信息与所述MOCK测试引擎中的MOCK规则做笛卡尔积对所述MOCK测试引擎进行更新,获得更新的MOCK测试引擎;Do Cartesian product with the MOCK rule in described protocol update information and described MOCK test engine, described MOCK test engine is updated, obtain the MOCK test engine of update;
将所述更新的业务规则引擎、所述更新的基础字段引擎和所述更新的MOCK测试引擎组合获得目标测试引擎。A target test engine is obtained by combining the updated business rule engine, the updated basic field engine and the updated MOCK test engine.
可选地,所述根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果的步骤,包括:Optionally, the steps of generating a target test case according to the target test engine and running the target test case to obtain the target test result of the target version protocol include:
获取所述目标测试引擎中的业务规则引擎、基础字段引擎和MOCK测试引擎;Obtain the business rule engine, basic field engine and MOCK test engine in the target test engine;
从所述业务规则引擎中抽取业务引擎规则、从所述基础字段引擎中抽取字段引擎规则,和从所述MOCK测试引擎中抽取MOCK引擎规则;Extract business engine rules from the business rules engine, extract field engine rules from the basic field engine, and extract MOCK engine rules from the MOCK test engine;
根据所述业务引擎规则、所述字段引擎规则和所述MOCK引擎规则生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A target test case is generated according to the business engine rule, the field engine rule and the MOCK engine rule, and the target test case is run to obtain the target test result of the target version protocol.
可选地,所述根据所述业务引擎规则、所述字段引擎规则和所述MOCK引擎规则生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果的步骤,包括:Optionally, the step of generating a target test case according to the business engine rule, the field engine rule and the MOCK engine rule, and running the target test case to obtain the target test result of the target version protocol, includes:
获取所述业务引擎规则的基础案例,调用预设自动化测试平台处理所述基础案例生成业务报文,拦截所述业务报文生成业务类型测试用例;Obtaining the basic case of the business engine rule, calling a preset automated test platform to process the basic case to generate a business message, and intercepting the business message to generate a business type test case;
获取所述字段引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述字段引擎规则修改所述基础报文,生成字段类型测试用例;Obtain the field engine rules, call the preset automated test platform to process the required business engine rules to generate basic packets, intercept the basic packets, modify the basic packets according to the field engine rules, and generate field type test cases ;
获取所述MOCK引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述MOCK引擎规则处理所述基础报文,生成MOCK类型测试用例;Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases ;
将所述业务类型测试用例、所述字段类型测试用例和所述MOCK类型测试用例做笛卡尔积生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。The service type test case, the field type test case, and the MOCK type test case are performed a Cartesian product to generate a target test case, and the target test case is run to obtain the target test result of the target version protocol.
可选地,所述根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果的步骤之后,所述方法包括:Optionally, after generating a target test case according to the target test engine and running the target test case to obtain the target test result of the target version protocol, the method includes:
获取所述目标测试用例对应的预设业务流水号,将所述目标版本协议的目标测试结果与所述预设业务流水号关联保存;obtaining the preset service serial number corresponding to the target test case, and storing the target test result of the target version protocol in association with the preset service serial number;
在接收到测试结果比对请求时,以所述预设业务流水号为主键,获取所述目标版本协议对应的目标测试结果,和所述基线版本协议对应的基线测试结果;When receiving the test result comparison request, use the preset service serial number as the primary key to obtain the target test result corresponding to the target version protocol and the baseline test result corresponding to the baseline version protocol;
比对所述目标测试结果和所述基线测试结果去除冗余数据,输出比对异常信息。Comparing the target test result and the baseline test result to remove redundant data, and output comparison abnormality information.
此外,为实现上述目的,本发明还提供一种接口自动化测试装置,所述接口自动化测试装置包括:In addition, in order to achieve the above purpose, the present invention also provides an interface automatic testing device, the interface automatic testing device includes:
请求接收模块,用于在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;a request receiving module, configured to obtain the target version protocol to be tested corresponding to the interface protocol test request when receiving the interface protocol test request;
协议比对模块,用于若存在与所述目标版本协议关联的基线版本协议,则比对所述目标版本协议与所述基线版本协议,获得协议更新信息;a protocol comparison module, configured to compare the target version protocol and the baseline version protocol to obtain protocol update information if there is a baseline version protocol associated with the target version protocol;
引擎更新模块,用于获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;an engine update module, configured to obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine;
运行测试模块,用于根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A running test module is configured to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.
此外,为实现上述目的,本发明还提供一种接口自动化测试设备,所述接口自动化测试设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的接口自动化测试程序,所述接口自动化测试程序被所述处理器执行时实现如上所述的接口自动化测试方法的步骤。In addition, in order to achieve the above object, the present invention also provides an automatic interface test device, the interface automatic test device includes: a memory, a processor, and an automatic interface test stored on the memory and can be run on the processor. A program, when the interface automatic testing program is executed by the processor, implements the steps of the above-mentioned interface automatic testing method.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有接口自动化测试程序,所述接口自动化测试程序被处理器执行时实现如上所述的接口自动化测试方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, on which an automated interface test program is stored, and the automated interface test program is executed by a processor to achieve the above-mentioned The steps of the interface automation test method.
本发明提供一种接口自动化测试方法、装置、设备及计算机可读存储介质。本发明实施例中在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;判断是否存在与所述目标版本协议关联的基线版本协议,若存在与所述目标版本协议关联的基线版本协议,则判定为回归测试,比对所述目标版本协议与所述基线版本协议,获得协议更新信息;获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果,即,本实施例中通过更新测试引擎,并利用更新的测试引擎更新测试用例,与当前接口回归测试相比,当前的接口回归测试每次都是创建测试用例,由于每次的测试用例是一个新的用例,那么基于该测试用例获得的测试结果也是新的测试结果,每次都需要进测试结果分析,测试结果中错误发现的效率低;而本申请的测试用例是根据目标协议版本进行更新,目标协议版本获得的测试结果,与基线版本协议获得的测试结果相近,可以将同一个更新前后测试用例的测试结果进行比对,可以快速定位问题,提高了测试结果中错误发现的效率,不需要人工审核减少了测试人员人工审核的工作量,提高了接口自动化测试的效率。The present invention provides an interface automated testing method, apparatus, device and computer-readable storage medium. In the embodiment of the present invention, when an interface protocol test request is received, the target version protocol to be tested corresponding to the interface protocol test request is obtained; it is judged whether there is a baseline version protocol associated with the target version protocol, if there is a target version protocol associated with the target version protocol The baseline version protocol associated with the version protocol is determined as a regression test, and the target version protocol and the baseline version protocol are compared to obtain protocol update information; the baseline test engine corresponding to the baseline version protocol is obtained, and updated according to the protocol information to update the baseline test engine to obtain a target test engine; generate a target test case according to the target test engine, run the target test case to obtain the target test result of the target version protocol, that is, in this embodiment, pass the update test engine, and use the updated test engine to update test cases. Compared with the current interface regression test, the current interface regression test creates a test case every time. Since each test case is a new one, then based on the test case The obtained test result is also a new test result, which needs to be analyzed every time, and the efficiency of error detection in the test result is low; while the test case of this application is updated according to the target protocol version, and the test result obtained by the target protocol version, The test results obtained by the baseline version of the protocol are similar, and the test results of the same test case before and after the update can be compared, which can quickly locate the problem, improve the efficiency of error detection in the test results, and reduce the need for manual review. Manual review by testers The workload is improved, and the efficiency of interface automation testing is improved.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention;
图2为本发明接口自动化测试方法第一实施例的流程示意图;2 is a schematic flowchart of the first embodiment of the interface automated testing method of the present invention;
图3为本发明接口自动化测试方法第一实施例中MOCK测试引擎创建的具体场景示意图;3 is a schematic diagram of a specific scene created by a MOCK test engine in the first embodiment of the interface automated testing method of the present invention;
图4为本发明接口自动化测试方法第二实施例中的流程示意图;4 is a schematic flowchart of the second embodiment of the interface automated testing method of the present invention;
图5为本发明接口自动化测试方法第二实施例中业务规则引擎更新的场景示意图;5 is a schematic diagram of a scenario for updating a business rule engine in the second embodiment of the interface automated testing method of the present invention;
图6为本发明接口自动化测试方法第二实施例中基础字段引擎更新的场景示意图;6 is a schematic diagram of a scenario in which a basic field engine is updated in the second embodiment of the interface automated testing method of the present invention;
图7为本发明接口自动化测试方法第二实施例中MOCK测试引擎更新的流程示意图;Fig. 7 is the schematic flow chart of MOCK test engine update in the second embodiment of the interface automated testing method of the present invention;
图8为本发明接口自动化测试方法第四实施例中结果比对的场景示意图;8 is a schematic diagram of a scenario of result comparison in the fourth embodiment of the interface automated testing method of the present invention;
图9为本发明接口自动化测试装置一实施例的功能模块示意图。FIG. 9 is a schematic diagram of functional modules of an embodiment of an interface automated testing apparatus according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
现有的接口测试方案持续集成CI测试平台(Continuous Integration TestingPlatform:又叫自动化测试平台,制定好测试用例输入和预期校验点,可以手动或者自动触发执行的测试测试用例)该平台的测试方案提供自动化用例以及自动化计划的生成,需要手工构建树形式自动化用例,提供断言机制,支持内置函数和表达式计算断言结果,支持数据库查询预期与实际比较。Existing interface testing solutions Continuous Integration Testing Platform (Continuous Integration TestingPlatform: also known as automated testing platform, formulate test case input and expected checkpoints, test cases that can be manually or automatically triggered for execution) The platform's test solutions provide The generation of automated use cases and automated plans requires manual construction of automated use cases in the form of a tree, providing an assertion mechanism, supporting built-in functions and expressions to calculate assertion results, and supporting database query expectations and actual comparisons.
CI测试平台关联协议报文发送工具,协议发报工具需要手工组装接口报文执行,并需要手工检查运行结果和后台之间的交互是否正常,并自行输出测试报告作为后续测试记录沉淀。CI测试平台关联挡板平台该平台用于模拟上下游系统返回报文,也叫挡板系统,第一次使用挡板系统需要人工部署到使用上游系统中,并在上游系统所在的页面中设置MOCK挡板规则,通过启用或关闭规则来触发模拟挡板的生效。The CI test platform is associated with the protocol message sending tool. The protocol sending tool needs to manually assemble the interface message for execution, and manually check whether the interaction between the running result and the background is normal, and output the test report by itself as the follow-up test record. The CI test platform is associated with the baffle platform. This platform is used to simulate the return messages of the upstream and downstream systems. It is also called the baffle system. The first time the baffle system is used, it needs to be manually deployed to the upstream system and set on the page where the upstream system is located. MOCK shutter rules, trigger the simulation shutter to take effect by enabling or disabling the rules.
这样的接口测试方案测试测试用例编写成本高:现有CI测试场景覆盖不足,现存大量存量测试用例补充困难。现在有挡板平台每种场景都需要单独做配置,测试中大量异常场景构造挡板耗时耗力。测试测试用例断言编写复杂、易遗漏;测试测试用例的频繁回归测试,测试比对结果需要人工介入审核,大量的测试用例让人处于疲劳性分析的状态,不利于回归测试的高效进行,基于现有技术接口测试方案的不足,提出了本发明接口自动化测试方法、装置、设备及计算机可读存储介质。The cost of writing test cases for such an interface test solution is high: the coverage of existing CI test scenarios is insufficient, and it is difficult to supplement a large number of existing test cases. Now there are baffle platforms, each scenario needs to be configured separately, and it is time-consuming and labor-intensive to construct baffles in a large number of abnormal scenarios in the test. Test test case assertions are complicated to write and easy to miss; frequent regression testing of test test cases requires manual intervention and review of test comparison results, and a large number of test cases make people in a state of fatigue analysis, which is not conducive to efficient regression testing. Due to the deficiencies of the technical interface testing solutions, the method, device, equipment and computer-readable storage medium for automatic interface testing of the present invention are proposed.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention.
本发明实施例接口自动化测试设备可以是PC机或服务器。The interface automatic testing device in the embodiment of the present invention may be a PC or a server.
如图1所示,该接口自动化测试设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the interface automated testing equipment may include: a
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 1 does not constitute a limitation on the device, and may include more or less components than the one shown, or combine some components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及接口自动化测试程序。As shown in FIG. 1, the
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的接口自动化测试程序,并执行下述接口自动化测试方法中的操作。In the device shown in FIG. 1 , the
基于上述硬件结构,提出本发明接口自动化测试方法实施例。Based on the above hardware structure, an embodiment of the interface automatic testing method of the present invention is proposed.
参照图2,图2为本发明接口自动化测试方法第一实施例的流程示意图,所述方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of the first embodiment of the interface automated testing method of the present invention, and the method includes:
步骤S10,在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;Step S10, when receiving the interface protocol test request, obtain the target version protocol to be tested corresponding to the interface protocol test request;
本实施例中接口自动化测试方法应用于接口自动化测试设备,接口自动化测试设备是接口自动化测试计算机程序的硬件载体,本实施例中的自动化测试设备可以设置在不同金融机构。The interface automated testing method in this embodiment is applied to an interface automated testing device, which is a hardware carrier of an interface automated testing computer program, and the automated testing device in this embodiment can be set in different financial institutions.
接口自动化测试设备接收接口测试请求,其中,接口测试请求的触发方式不作具体限定,即,接口测试请求可以是用户主动触发的,例如,用户点击接口自动化测试设备显示界面中的:“接口测试”虚拟按键手动触发接口测试请求;此外,接口测试请求还可以是接口自动化测试设备自动触发的,例如,测试人员预先在接口测试设备中设置:在检测到接口版本更新时,自动触发接口测试请求,接口自动化测试设备实时地监测接口的状态,在接口自动化测试设备检测到发布新的接口协议版本时,接口自动化测试设备自动触发接口测试请求。The interface automated test device receives the interface test request, wherein the triggering method of the interface test request is not specifically limited, that is, the interface test request may be actively triggered by the user. The virtual button manually triggers the interface test request; in addition, the interface test request can also be automatically triggered by the interface automated test equipment. The interface automated testing device monitors the state of the interface in real time, and when the interface automated testing device detects that a new interface protocol version is released, the interface automated testing device automatically triggers an interface test request.
接口自动化测试设备在接收到接口协议测试请求时,接口自动化测试设备获取接口协议测试请求对应待测试的目标版本协议,其中,目标版本协议内容不做具体限定,即,目标版本协议可以是第一个版本的接口协议,还可以是第二个版本的接口协议及其以后更新版本的接口协议。When the interface automated test device receives the interface protocol test request, the interface automated test device obtains the target version protocol to be tested corresponding to the interface protocol test request, wherein the content of the target version protocol is not specifically limited, that is, the target version protocol may be the first one. The interface protocol of the first version can also be the interface protocol of the second version and the interface protocol of the later updated version.
步骤S20,判断是否存在与所述目标版本协议关联的基线版本协议;Step S20, judging whether there is a baseline version protocol associated with the target version protocol;
接口自动化测试设备在获取到待测试的目标版本协议之后,接口自动化测试设备获取目标版本协议的版本标识,接口自动化测试设备根据版本标识确定目标版本协议是否为第一个协议版本,在目标版本协议是第一个协议版本时,接口自动化测试设备判定不存在与目标版本协议关联的基线版本协议,接口自动化测试设备需要根据目标版本协议直接创建测试用例;在目标版本协议不是第一个协议版本时,接口自动化测试设备判定存在与目标版本协议关联的基线版本协议,接口自动化测试设备可以对基线版本协议的测试用例进行更新,生成目标版本协议对应的测试用例,其中,基线版本协议是项目储存库中每个工件版本在特定时期的一个“快照”,它提供一个正式标准,随后的工作基于此标准,并且只有经过授权后才能变更这个标准,建立一个初始基线后,以后每次对其进行的变更都将记录为一个差值,直到建成下一个基线版本协议。After the interface automated test equipment obtains the target version protocol to be tested, the interface automated test equipment obtains the version identifier of the target version protocol, and the interface automated test equipment determines whether the target version protocol is the first protocol version according to the version identifier. When it is the first protocol version, the interface automated test equipment determines that there is no baseline version protocol associated with the target version protocol, and the interface automated test equipment needs to directly create test cases according to the target version protocol; when the target version protocol is not the first protocol version , the interface automated test equipment determines that there is a baseline version protocol associated with the target version protocol, the interface automated test equipment can update the test cases of the baseline version protocol, and generate test cases corresponding to the target version protocol, wherein the baseline version protocol is the project repository A "snapshot" of each artifact version in a specific period, it provides a formal standard on which subsequent work is based and only authorized to change this standard Changes will be recorded as a delta until the next baseline version of the agreement is built.
本实施例中的技术方案是为了减少测试人员审核测试结果的操作,因此,接口自动化测试设备判断是否存在目标版本协议关联的基线版本协议,若存在与目标版本协议关联的基线版本协议,则根据基线版本协议进行测试用例更新,利用通过更新后的测试用例进行测试,获得测试结果,这样可以直接比对测试结果不需要进行人工审核。The technical solution in this embodiment is to reduce the operation of the tester to review the test results. Therefore, the interface automated testing equipment determines whether there is a baseline version protocol associated with the target version protocol. If there is a baseline version protocol associated with the target version protocol, according to The baseline version protocol is used to update test cases, and use the updated test cases to test to obtain test results, so that the test results can be directly compared without manual review.
为了方便理解,本实施例中先对不存在与目标版本协议关联的基线版本协议的接口测试进行说明,即本实施例中首先说明在目标版本协议是初始版本协议时,接口自动化测试设备对初始版本协议进行接口自动化测试的步骤,具体地:In order to facilitate understanding, this embodiment first describes the interface test that does not have a baseline version protocol associated with the target version protocol, that is, this embodiment first describes that when the target version protocol is the initial version The steps for automatic interface testing of the version protocol, specifically:
步骤S30,若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议生成目标测试引擎,其中,所述目标测试引擎包括业务规则引擎、基础字段引擎和MOCK测试引擎;Step S30, if there is no the baseline version protocol associated with the target version protocol, then analyze the target version protocol to generate a target test engine, wherein the target test engine includes a business rule engine, a basic field engine and a MOCK test engine;
若不存在与目标版本协议关联的基线版本协议,接口自动化测试设备则分析目标版本协议生成目标测试引擎,其中,目标测试引擎包括业务规则引擎、基础字段引擎和MOCK测试引擎,业务规则引擎(Business Rule Engine):根据部分特例的业务需求提供配置机制,并按照预设的配置生成测试用例池。基础字段引擎(Interface Field Rule Engine):根据接口的全量字段的属长度、必填性、枚举等属性自动生成基础字段校验测试用例池。MOCK引擎(Mock Rule Engine):MOCK服务是一个针对网络、代码、RMB的服务而提出的挡板工具,MOCK引擎是基于MOCK服务提出的一套异常场景测试用例自动化生成的方案;具体地,包括:If there is no baseline version protocol associated with the target version protocol, the interface automated test equipment analyzes the target version protocol to generate a target test engine, where the target test engine includes a business rule engine, a basic field engine, and a MOCK test engine. Rule Engine): Provide a configuration mechanism according to the business requirements of some special cases, and generate a test case pool according to the preset configuration. Basic field engine (Interface Field Rule Engine): Automatically generate basic field validation test case pools based on attributes such as attribute length, mandatory, and enumeration of all fields of the interface. MOCK Engine (Mock Rule Engine): MOCK service is a baffle tool proposed for network, code, and RMB services. MOCK engine is a set of solutions for automatic generation of abnormal scenario test cases based on MOCK service; specifically, including :
步骤a1,若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议,获取所述目标版本协议的业务场景标识;Step a1, if the baseline version protocol associated with the target version protocol does not exist, analyze the target version protocol, and obtain the service scenario identifier of the target version protocol;
步骤a2,查询预设养数平台,获取所述业务场景标识对应的业务测试规则,汇总所述业务测试规则生成业务规则引擎;Step a2, query the preset data support platform, obtain the business test rules corresponding to the business scenario identifiers, and summarize the business test rules to generate a business rule engine;
步骤a3,遍历所述目标版本协议的协议属性,根据预先配置的发散规则和所述协议属性中的字段类型、字段长度和字段枚举进行发散生成基础字段引擎;Step a3, traverse the protocol attribute of the target version protocol, and generate a basic field engine according to the pre-configured divergence rule and the field type, field length and field enumeration in the protocol attribute;
步骤a4,从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议内容信息和所述协议上下游关系生成MOCK测试引擎;Step a4, pulling the protocol content information and the protocol upstream and downstream relationship of the target version protocol from the preset protocol management platform, and generating a MOCK test engine according to the protocol content information and the protocol upstream and downstream relationship;
步骤a5,将所述业务规则引擎、所述基础字段引擎和所述MOCK测试引擎组合生成目标测试引擎。Step a5, combine the business rule engine, the basic field engine and the MOCK test engine to generate a target test engine.
若不存在与目标版本协议关联的基线版本协议,接口自动化测试设备则分析目标版本协议,获取目标版本协议的业务场景标识,本实施例中步骤a2接口自动化测试设备根据业务场景标识生成业务规则引擎,包括:接口自动化测试设备查询预设养数平台(预设养数平台是指预先设置的业务数据管理平台,预设养数平台中包含有各个接口对应的业务场景标识,业务场景标识相关的业务场景信息,和各个业务场景信息对应的业务测试规则,预设养数平台具体用于在批次执行完成,验证测试用例后,下个批次日切和日切同步时自动触发调用规则,实时抓取该批次符合要求形态的数据,并对数据进行管理的平台),获取业务场景标识对应的业务测试规则,汇总业务测试规则生成业务规则引擎。If there is no baseline version protocol associated with the target version protocol, the interface automated testing device analyzes the target version protocol and obtains the business scenario identifier of the target version protocol. In this embodiment, the interface automated testing device in step a2 generates a business rule engine according to the business scenario identifier. , including: interface automated test equipment querying the preset data platform (the preset data platform refers to the preset business data management platform, the preset data platform contains the business scenario identifiers corresponding to each interface, and the business scenario identifiers are related to the Business scenario information, and business test rules corresponding to each business scenario information, the preset support data platform is specifically used to automatically trigger the calling rules when the next batch of daily cuts and daily cuts are synchronized after the batch execution is completed and the test cases are verified. A platform that captures the batch of data that meets the required form in real time and manages the data), obtains the business test rules corresponding to the business scenario identifiers, and summarizes the business test rules to generate a business rules engine.
即,接口自动化测试设备在自动化测试平台人工配置一条自动化测试基础案例,用来维护动作排程及动作间的参数传递,业务规则引擎通过自动化测试平台中的基础案例和养数平台场景集合批量生成业务规则引擎池(1*n),待测协议养数平台场景更新后,业务引擎同步自动更新,补充到业务引擎池中,生成业务规则引擎。That is, the interface automated test equipment manually configures an automated test basic case on the automated test platform to maintain the action scheduling and parameter transfer between actions, and the business rule engine generates batches of the basic cases in the automated test platform and the set of scenarios of the support platform. The business rule engine pool (1*n), after the scenario of the platform to be tested is updated, the business engine will be automatically updated synchronously and added to the business engine pool to generate a business rule engine.
例如,业务规则引擎根据养数平台场景自动生成引擎数据储存到引擎池;养数平台场景变更触发自动更新引擎,支持人工维护,规则分为必过、成功、失败三类,其中必过规则用于生成字段类型测试用例和MOCK类型测试用例使用。业务引擎池包括引擎规则标识、养数平台在的场景标识、自动化测试平台基础规则标识、规则摘要、状态等字段。例如,规则摘要取自养数平台场景,如,养数平台场景“931”,摘要“按单结清-单笔,0T借款,停留在0T+1日”。For example, the business rules engine automatically generates engine data and stores it in the engine pool according to the scenario of the Yangshu platform; the scene change of the Yangshu platform triggers the automatic update of the engine and supports manual maintenance. The rules are divided into three categories: must-pass, success, and failure. Used to generate field type test cases and MOCK type test cases. The business engine pool includes fields such as the engine rule identifier, the scenario identifier of the Yangshu platform, the basic rule identifier of the automated test platform, the rule summary, and the status. For example, the rule summary is taken from the Yangshu platform scenario, for example, the Yangshu platform scene "931", the summary "settlement by order - single loan, 0T loan, stay on 0T+1 day".
本实施例中步骤a3接口自动化测试设备生成基础字段引擎,包括:接口自动化测试设备遍历目标版本协议的协议属性,根据预先配置的发散规则和协议属性中的字段类型、字段长度和字段枚举进行发散生成基础字段引擎。In this embodiment, the interface automated test equipment generates a basic field engine in step a3, which includes: the interface automated test equipment traverses the protocol attributes of the target version protocol, and performs field type, field length and field enumeration according to the preconfigured divergence rules and the protocol attributes. Divergent generation base field engine.
例如,1、若字段为STRING类型:若有默认值,发散出等于默认值、不等于默认值、为空字符串、为NULL几种情况;若有枚举值,发散出等于各个枚举值、非枚举值、为空字符串、为NULL几种情况;若无默认值和枚举值,发散出空字符串、NULL、等长、超长几种情况;2、若字段为DECIMAL类型:发散出空字符串、NULL值;发散出负数且maxLength(最大精度长度)等长delLength(最小数长度)等长随机数;0;0.0;0.00;maxLength等长delLength等长随机数;maxLength等长delLength超长随机数;maxLength超长delLength等长随机数;3、若字段为TIME类型:根据系统时间发散YYYYMMddHHmmss和一些非法情况量;4、若字段为NUMBER类型:空;负数且maxLength等长随机数;0;maxLength等长随机数;maxLength超长随机数;maxLength等长字母+随机数;5、若字段为MsgFieldArray类型:发散出空;一组数据;两组数据;将发散出的规则存入字段引擎池。For example, 1. If the field is of type STRING: if there is a default value, it will emit the cases equal to the default value, not equal to the default value, empty string, or NULL; if there is an enumeration value, it will emit a value equal to each enumeration value. , non-enumeration value, empty string, and NULL; if there is no default value and enumeration value, there are several cases of empty string, NULL, equal length, and super long; 2. If the field is of DECIMAL type : Emit empty strings, NULL values; scatter negative numbers and maxLength (maximum precision length) equal length delLength (minimum length) equal length random numbers; 0; 0.0; 0.00; maxLength equal length delLength equal length random numbers; maxLength, etc. Long delLength super long random number; maxLength super long delLength equal length random number; 3. If the field is of the TIME type: YYYYMMddHHmmss and some illegal conditions are diverged according to the system time; 4. If the field is of the NUMBER type: empty; negative and maxLength is the same length Random number; 0; maxLength equal length random number; maxLength super long random number; maxLength equal length letter + random number; 5. If the field is MsgFieldArray type: divergent and empty; one set of data; two sets of data; the rule that will diverge Stored in the field engine pool.
本实施例中步骤a4接口自动化测试设备生成MOCK测试引擎,MOCK引擎是根据协议上下游关系及属性值自动生成保存引擎规则的引擎池;MOCK引擎池包括引擎规则ID、MOCK报文头、MOCK报文体、规则摘要、状态等字段。摘要为下游服务id及要mock的服务状态,如,MOCK报文头“{"02100040":"response.errCode='0000';response.retStatus='S';response.retList=”;","02300298":"response.errCode='9999';response.retStatus='F';response.retList=”;"”,MOCK报文体“{"02100040":{"retCode":"30790000","retMsg":"MOCKSUCC"},"02300298":{"retCode":"30790002","retMsg":"MOCKFAIL"}}”,摘要{"02100040":"succ","02300298":"fail"},代表02100040协议返回成功,02300298服务返回失败。MOCK测试引擎生成的步骤,包括:In this embodiment, the step a4 interface automated test equipment generates a MOCK test engine, and the MOCK engine is an engine pool that automatically generates and saves engine rules according to the upstream and downstream relationships and attribute values of the protocol; the MOCK engine pool includes an engine rule ID, a MOCK header, and a MOCK message. Fields such as Style, Rule Summary, Status, etc. The summary is the downstream service id and the service status to be mocked, for example, MOCK header "{"02100040":"response.errCode='0000';response.retStatus='S';response.retList=";"," 02300298":"response.errCode='9999';response.retStatus='F';response.retList=";"",MOCK message body "{"02100040":{"retCode":"30790000","retMsg" :"MOCKSUCC"},"02300298":{"retCode":"30790002","retMsg":"MOCKFAIL"}}",summary{"02100040":"succ","02300298":"fail"}, representing 02100040 Protocol returns success, 02300298 Service returns failure. The steps of MOCK test engine generation, including:
步骤a41,从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议上下游关系,获取所述目标版本协议下游待MOCK的各目标下游协议;Step a41, pulling the protocol content information of the target version protocol and the protocol upstream and downstream relationships from the preset protocol management platform, and obtaining each target downstream protocol to be MOCKed downstream of the target version protocol according to the protocol upstream and downstream relationships;
步骤a42,获取所述目标下游协议中预设配置的进行笛卡尔发散的目标字段,将所述目标下游协议根据所述目标字段做笛卡尔积,生成成功MOCK集合和失败MOCK集合;Step a42, obtain the target field that carries out the Cartesian divergence of the preset configuration in the target downstream protocol, and perform the Cartesian product of the target downstream protocol according to the target field, and generate a successful MOCK set and a failed MOCK set;
步骤a43,将所述成功MOCK集合之间做笛卡尔积,获得成功类MOCK规则,将所述失败MOCK集合与所述成功MOCK集合中一个元素做笛卡尔积,获得失败类MOCK规则;Step a43, do Cartesian product between the described successful MOCK sets, obtain the successful class MOCK rule, make a Cartesian product with an element in the described failure MOCK set and the described successful MOCK set, obtain the failure class MOCK rule;
步骤a44,将所述成功类MOCK规则和所述失败类MOCK规则汇总生成所述MOCK测试引擎。In step a44, the MOCK test engine is generated by summarizing the success class MOCK rules and the failure class MOCK rules.
例如,1、接口自动化测试设备预先配置下游协议中哪些字段需要笛卡尔发散,各个属性成功枚举集合、失败枚举集合。如图3所示,协议1含属性A和B,其中A:{0},B:{a}为成功枚举值集合,A:{1},B:{b,c}为失败枚举值集合;2、接口自动化测试设备根据待测协议上下游关系(1:n),获取到下游需MOCK的协议;3、接口自动化测试设备每个下游协议根据发散字段配置做笛卡儿积生成各自成功、失败MOCK集合,如图3所示,接口1成功集合间做笛卡尔积{0}*{a}={0,a},失败集合间做笛卡尔积{1}*{b,c}={1,b},{1,c};4、各下游协议间成功类型集合做笛卡儿积生成成功类MOCK规则,写入引擎池;如图3接口1和接口2的成功MOCK集合进行笛卡尔积生成{0,a,d},{0,a,e};4、各下游协议失败类集合只需与其他所有协议第一个通过数据集进行组合,写入引擎池。如图3接口1失败MOCK集合和接口2第一个通过的成功MOCK集合进行笛卡尔积生成{1,b,d},{1,c,d},将成功类MOCK规则和失败类MOCK规则汇总生成MOCK测试引擎;接口自动化测试设备将业务规则引擎、基础字段引擎和MOCK测试引擎组合生成目标测试引擎。For example, 1. The interface automated test equipment pre-configures which fields in the downstream protocol need Cartesian divergence, and each attribute successfully enumerates the set and fails to enumerate the set. As shown in Figure 3,
接口自动化测试设备通过驱动目标测试引擎生成测试用例进行接口自动化测试,具体地:The interface automation test equipment generates test cases for interface automation testing by driving the target test engine, specifically:
步骤S40,根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。Step S40, generating a target test case according to the target test engine, and running the target test case to obtain a target test result of the target version protocol.
接口自动化测试设备中业务规则引擎驱动业务类型测试用例自动生成;基础字段引擎驱动协议字段类型测试用例自动生成;MOCK引擎驱动MOCK类型测试用例自动生成;目标测试引擎选择三大引擎数据进行笛卡尔积生成目标测试用例,即,接口自动化测试设备从目标测试引擎对应的引擎池中抽取业务类型测试用例、字段类型测试用例和MOCK类型测试用例,并将业务类型测试用例、字段类型测试用例和MOCK类型测试用例进行拼接,形成目标测试用例,接口自动化测试设备运行目标测试用例获得所述目标版本协议的目标测试结果。本实施例中接口自动化测试设备在目标协议版本是初始协议版本时创建测试用例,使得接口自动化测试更加高效。In the interface automation test equipment, the business rule engine drives the automatic generation of business type test cases; the basic field engine drives the automatic generation of protocol field type test cases; the MOCK engine drives the automatic generation of MOCK type test cases; the target test engine selects three engine data for Cartesian product Generate target test cases, that is, the interface automated test equipment extracts business type test cases, field type test cases, and MOCK type test cases from the engine pool corresponding to the target test engine, and converts business type test cases, field type test cases, and MOCK type test cases. The test cases are spliced to form a target test case, and the interface automated test equipment runs the target test case to obtain the target test result of the target version protocol. In this embodiment, the interface automated testing device creates a test case when the target protocol version is the initial protocol version, so that the interface automated testing is more efficient.
进一步地,参照图4,图4为本发明接口自动化测试方法第二实施例的流程示意图。Further, referring to FIG. 4 , FIG. 4 is a schematic flowchart of the second embodiment of the interface automated testing method of the present invention.
基于本发明接口自动化测试方法第一实施例,提出本发明接口自动化测试方法第二实施例;本实施例是第一实施例中步骤S20之后的步骤,本实施例与上述实施的区别在于:Based on the first embodiment of the automatic interface testing method of the present invention, a second embodiment of the automatic interface testing method of the present invention is proposed; this embodiment is a step after step S20 in the first embodiment, and the difference between this embodiment and the above implementation is:
步骤S50,若存在与所述目标版本协议关联的基线版本协议,则比对所述目标版本协议与所述基线版本协议,获得协议更新信息。Step S50, if there is a baseline version protocol associated with the target version protocol, compare the target version protocol with the baseline version protocol to obtain protocol update information.
若存在与目标版本协议关联的基线版本协议,接口自动化测试设备则比对目标版本协议与基线版本协议,获得协议更新信息,接口自动化测试设备根据协议更新信息进行测试引擎更新,具体地:If there is a baseline version protocol associated with the target version protocol, the interface automated test device compares the target version protocol with the baseline version protocol to obtain protocol update information, and the interface automated test device updates the test engine according to the protocol update information, specifically:
步骤S60,获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎。Step S60: Obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine.
接口自动化测试设备获取基线版本协议对应的基线测试引擎,接口自动化测试设备根据协议更新信息更新基线测试引擎,获得目标测试引擎,具体地,包括:The interface automated test device obtains the baseline test engine corresponding to the baseline version protocol, and the interface automated test device updates the baseline test engine according to the protocol update information to obtain the target test engine, specifically, including:
步骤b1,获取所述基线版本协议对应的基线测试引擎,其中,所述基线测试引擎包括:业务规则引擎、基础字段引擎和/或MOCK测试引擎;Step b1, obtaining the baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and/or a MOCK test engine;
步骤b2,查询预设养数平台,从所述预设养数平台中获取所述协议更新信息中的更新场景标识,及所述更新场景标识对应的更新测试规则,将所述更新测试规则添加到所述业务规则引擎,获得更新的业务规则引擎;Step b2, query the preset support platform, obtain the update scene identifier in the protocol update information from the preset support platform, and the update test rule corresponding to the update scene identifier, and add the update test rule Go to the business rule engine to obtain an updated business rule engine;
步骤b3,遍历所述协议更新信息的新增属性,根据所述新增属性中的变化类型、变化长度和新增枚举对所述基础字段引擎进行更新,获得更新的基础字段引擎;Step b3, traverse the newly added attributes of the protocol update information, and update the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtain an updated basic field engine;
步骤b4,将所述协议更新信息与所述MOCK测试引擎中的MOCK规则做笛卡尔积对所述MOCK测试引擎进行更新,获得更新的MOCK测试引擎;Step b4, the MOCK rule in described protocol update information and described MOCK test engine is done Cartesian product to described MOCK test engine and is updated, obtains the MOCK test engine of update;
步骤b5,将所述更新的业务规则引擎、所述更新的基础字段引擎和所述更新的MOCK测试引擎组合获得目标测试引擎。Step b5, combining the updated business rule engine, the updated basic field engine and the updated MOCK test engine to obtain a target test engine.
即,接口自动化测试设备获取基线版本协议对应的基线测试引擎,基线测试引擎包括:业务规则引擎、基础字段引擎和/或MOCK测试引擎,接口自动化测试设备分别更新业务规则引擎、基础字段引擎和/或MOCK测试引擎,参照图5,图5为本发明接口自动化测试方法第二实施例中业务规则引擎更新的场景示意图;本实施例中更新业务规则引擎的步骤b1包括:接口自动化测试设备查询预设养数平台,从预设养数平台中获取协议更新信息中的更新场景标识,及更新场景标识对应的更新测试规则,接口自动化测试设备将更新测试规则添加到业务规则引擎,获得更新的业务规则引擎。That is, the interface automated test equipment obtains the baseline test engine corresponding to the baseline version protocol, and the baseline test engine includes: a business rule engine, a basic field engine and/or a MOCK test engine, and the interface automated test equipment updates the business rule engine, basic field engine and/or respectively. Or MOCK test engine, referring to FIG. 5, FIG. 5 is a schematic diagram of a scenario of updating the business rule engine in the second embodiment of the interface automated testing method of the present invention; the step b1 of updating the business rule engine in the present embodiment includes: the interface automated testing equipment queries the Set up the data platform, obtain the update scenario ID in the protocol update information from the preset data platform, and the update test rule corresponding to the update scenario ID, and the interface automated test equipment adds the update test rule to the business rule engine to obtain the updated business. Rules engine.
参照图6,图6为本发明接口自动化测试方法第二实施例中基础字段引擎更新的场景示意图,本实施例中接口自动化测试设备更新基础字段引擎的步骤包括:1、同步协议管理平台(协议管理模块采用定时轮询机制实时拉取协议管理平台的最新版本协议以及上下游关系,自动同步到协议接口管理模块中,并提供个性化协议配置功能。后续引擎生成、更新依赖协议属性的定义及协议上下游关系,协议管理模块包括接口配置管理和上下游接口管理)新版本协议。2、比对目标版本协议和基线版本协议这两个新旧版本协议,获取到新增属性、属性新增枚举、类型变化、长度变化;3、根据新增属性、新增枚举、类型变更等信息依据后台定义规则自动发散新增引擎规则,补充添加到引擎池中,获得更新的业务规则引擎。Referring to FIG. 6, FIG. 6 is a schematic diagram of a scenario of updating the basic field engine in the second embodiment of the interface automated testing method of the present invention. The steps of updating the basic field engine by the interface automated testing equipment in this embodiment include: 1. Synchronizing the protocol management platform (protocol The management module uses the timing polling mechanism to pull the latest version of the protocol and the upstream and downstream relationships of the protocol management platform in real time, automatically synchronize it to the protocol interface management module, and provide personalized protocol configuration functions. Subsequent engine generation and update depend on the definition and The relationship between the upstream and downstream of the protocol, the protocol management module includes interface configuration management and upstream and downstream interface management) the new version of the protocol. 2. Compare the old and new versions of the target version protocol and the baseline version protocol, and obtain new attributes, new enumerations of attributes, type changes, and length changes; 3. According to new attributes, new enumerations, and type changes According to the rules defined in the background, the new engine rules are automatically distributed, and the additional information is added to the engine pool to obtain the updated business rules engine.
参照图7,图7为本发明接口自动化测试方法第二实施例中MOCK测试引擎更新的流程示意图;本实施例中接口自动化测试设备更新MOCK测试引擎的步骤包括:1、对比新老下游协议,识别并存储更新后的变化:新增枚举、新增字段、新增上下游结果口,删减无需处理;例如,a.如果新增枚举:用原有笛卡尔积数据集合与新增枚举重新笛卡尔积,补充到引擎池中。如图3接口1的A字段新增成功枚举2,成功MOCK集合增加枚举2与B字段成功MOCK集合做笛卡尔积生成{2,a}。新增的MOCK集合执行MOCK引擎生成逻辑生成引擎规则。b.如果新增字段:用原有笛卡尔积数据集合与新增字段的各枚举值重新笛卡尔积,补充到引擎池中。如图3接口1新增C字段,原成功或失败MOCK集合与C字段成功或失败枚举进行笛卡尔积,重组后的笛卡尔积组合更新原MOCK集合中的元素,比如:{0,a}为{0,a,w}等,同时新增剩余的规则补充到MOCK集合中。更新后的MOCK集合笛卡尔积后更新原MOCK引擎中的规则,并新增规则补充到引擎中。c.如果新增协议:判断上下游协议是否参与MOCK,若参与,重走MOCK引擎生成逻辑,获得更新的MOCK测试引擎。Referring to Fig. 7, Fig. 7 is the schematic flow chart of MOCK test engine update in the second embodiment of the interface automated test method of the present invention; the step of interface automated test equipment update MOCK test engine in the present embodiment comprises: 1, compare new and old downstream protocols, Identify and store updated changes: new enumerations, new fields, new upstream and downstream result ports, deletions do not need to be processed; for example, a. If new enumerations are added: use the original Cartesian product data set and add new ones The enumeration re-Cartesian product is added to the engine pool. As shown in Figure 3, the A field of
接口自动化测试设备将更新的业务规则引擎、更新的基础字段引擎和更新的MOCK测试引擎组合获得目标测试引擎,以通过目标测试引擎进行接口自动化测试,具体地:The interface automation test equipment obtains the target test engine by combining the updated business rule engine, the updated basic field engine and the updated MOCK test engine, so as to perform the interface automation test through the target test engine, specifically:
步骤S70,根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。Step S70, generating a target test case according to the target test engine, and running the target test case to obtain a target test result of the target version protocol.
接口自动化测试设备中业务规则引擎驱动业务类型测试用例自动生成;基础字段引擎驱动协议字段类型测试用例自动生成;MOCK引擎驱动MOCK类型测试用例自动生成;目标测试引擎选择三大引擎数据进行笛卡尔积生成目标测试用例,即,接口自动化测试设备从目标测试引擎对应的引擎池中抽取业务类型测试用例、字段类型测试用例和MOCK类型测试用例,并将业务类型测试用例、字段类型测试用例和MOCK类型测试用例进行拼接,形成目标测试用例,接口自动化测试设备运行目标测试用例获得目标版本协议的目标测试结果。In the interface automation test equipment, the business rule engine drives the automatic generation of business type test cases; the basic field engine drives the automatic generation of protocol field type test cases; the MOCK engine drives the automatic generation of MOCK type test cases; the target test engine selects three engine data for Cartesian product Generate target test cases, that is, the interface automated test equipment extracts business type test cases, field type test cases, and MOCK type test cases from the engine pool corresponding to the target test engine, and converts business type test cases, field type test cases, and MOCK type test cases. The test cases are spliced to form target test cases, and the interface automated test equipment runs the target test cases to obtain the target test results of the target version protocol.
本发明实施例中在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;判断是否存在与所述目标版本协议关联的基线版本协议,若存在与所述目标版本协议关联的基线版本协议,则判定为回归测试,比对所述目标版本协议与所述基线版本协议,获得协议更新信息;获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果,即,本实施例中通过更新测试引擎,并利用更新的测试引擎更新测试用例,与当前接口回归测试相比,当前的接口回归测试每次都是创建测试用例,由于每次的测试用例是一个新的用例,那么基于该测试用例获得的测试结果也是新的测试结果,而本发明实施例的测试用例是根据目标协议版本进行更新,目标协议版本获得的测试结果,与基线版本协议获得的测试结果相近,可以将同一个更新前后测试用例的测试结果进行比对,可以快速定位问题,提高了错误发现的效率,不需要人工审核减少了测试人员人工审核的工作量,提高了接口自动化测试的效率。In the embodiment of the present invention, when an interface protocol test request is received, the target version protocol to be tested corresponding to the interface protocol test request is obtained; it is judged whether there is a baseline version protocol associated with the target version protocol, if there is a target version protocol associated with the target version protocol The baseline version protocol associated with the version protocol is determined as a regression test, and the target version protocol and the baseline version protocol are compared to obtain protocol update information; the baseline test engine corresponding to the baseline version protocol is obtained, and updated according to the protocol information to update the baseline test engine to obtain a target test engine; generate a target test case according to the target test engine, run the target test case to obtain the target test result of the target version protocol, that is, in this embodiment, pass the update test engine, and use the updated test engine to update test cases. Compared with the current interface regression test, the current interface regression test creates a test case every time. Since each test case is a new one, then based on the test case The obtained test result is also a new test result, and the test case of the embodiment of the present invention is updated according to the target protocol version, the test result obtained by the target protocol version is similar to the test result obtained by the baseline version protocol, and the same before and after the update can be obtained. The test results of the test cases are compared, which can quickly locate the problem and improve the efficiency of error discovery. It does not require manual review, reduces the workload of manual review by testers, and improves the efficiency of automated interface testing.
进一步地,基于本发明接口自动化测试方法上述实施例,提出本发明接口自动化测试方法第三实施例。Further, based on the above embodiments of the automatic interface testing method of the present invention, a third embodiment of the automatic interface testing method of the present invention is proposed.
本实施例是第一实施例中步骤S40和/或第二实施例中步骤S70的细化,本实施例中给出了根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果的具体实现方式,包括:This embodiment is a refinement of step S40 in the first embodiment and/or step S70 in the second embodiment. In this embodiment, a target test case is generated according to the target test engine, and the target test case is obtained by running the target test case. The specific implementation of the target test result of the target version protocol includes:
获取所述目标测试引擎中的业务规则引擎、基础字段引擎和MOCK测试引擎;Obtain the business rule engine, basic field engine and MOCK test engine in the target test engine;
从所述业务规则引擎中抽取业务引擎规则、从所述基础字段引擎中抽取字段引擎规则,和从所述MOCK测试引擎中抽取MOCK引擎规则;Extract business engine rules from the business rules engine, extract field engine rules from the basic field engine, and extract MOCK engine rules from the MOCK test engine;
根据所述业务引擎规则、所述字段引擎规则和所述MOCK引擎规则生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A target test case is generated according to the business engine rule, the field engine rule and the MOCK engine rule, and the target test case is run to obtain the target test result of the target version protocol.
接口自动化设备获取目标测试引擎中的业务规则引擎、基础字段引擎和MOCK测试引擎;接口自动化设备从业务规则引擎中抽取业务引擎规则、从基础字段引擎中抽取字段引擎规则,和从MOCK测试引擎中抽取MOCK引擎规则;接口自动化设备根据业务引擎规则、字段引擎规则和MOCK引擎规则生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果,具体地,包括:The interface automation device obtains the business rule engine, the basic field engine and the MOCK test engine in the target test engine; the interface automation device extracts the business engine rules from the business rule engine, extracts the field engine rules from the basic field engine, and extracts the field engine rules from the MOCK test engine Extract MOCK engine rules; interface automation equipment generates target test cases according to business engine rules, field engine rules and MOCK engine rules, and runs the target test cases to obtain the target test results of the target version protocol, specifically, including:
获取所述业务引擎规则的基础案例,调用预设自动化测试平台处理所述基础案例生成业务报文,拦截所述业务报文生成业务类型测试用例;Obtaining the basic case of the business engine rule, calling a preset automated test platform to process the basic case to generate a business message, and intercepting the business message to generate a business type test case;
获取所述字段引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述字段引擎规则修改所述基础报文,生成字段类型测试用例;Obtain the field engine rules, call the preset automated test platform to process the required business engine rules to generate basic packets, intercept the basic packets, modify the basic packets according to the field engine rules, and generate field type test cases ;
获取所述MOCK引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述MOCK引擎规则处理所述基础报文,生成MOCK类型测试用例;Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases ;
将所述业务类型测试用例、所述字段类型测试用例和所述MOCK类型测试用例做笛卡尔积生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。The service type test case, the field type test case, and the MOCK type test case are performed a Cartesian product to generate a target test case, and the target test case is run to obtain the target test result of the target version protocol.
即,接口自动化测试设备生成获取业务引擎规则的基础案例,调用预设自动化测试平台处理所述基础案例生成业务报文,拦截业务报文生成业务类型测试用例,包括:1、获取业务引擎规则的自动化测试平台基础案例、养数平台场景标识,调用自动化测试平台,拦截自动化测试平台生成的报文落入测试用例池,生成业务类型测试用例。That is, the interface automated testing device generates a basic case for acquiring business engine rules, invokes a preset automated test platform to process the basic case to generate business packets, and intercepts the business packets to generate business type test cases, including: 1. Obtaining the business engine rules The basic case of the automated test platform, the scenario identification of the Yangshu platform, the call to the automated test platform, the interception of the packets generated by the automated test platform into the test case pool, and the generation of business-type test cases.
接口自动化测试设备基础字段类型测试用例生成过程:1、获取字段引擎规则。2、获取必过业务引擎规则。调用CI平台,拦截CI平台生成的报文;3、根据字段引擎规则,篡改报文A,得到用例报文A',落入用例池,生成基础字段类型测试用例。例如,测试用例id、名称为必过业务引擎和对应字段引擎id、摘要分别拼接。如,用例id“B0000000001_F15759718157471”,用例名称“按单结清-单笔,0T借款,停留在0T+1日,APP_TYPE枚举值范围内”。Interface automation test equipment basic field type test case generation process: 1. Obtain the field engine rules. 2. Obtain the business engine rules that must pass. Call the CI platform to intercept the packets generated by the CI platform; 3. According to the field engine rules, tamper with the packet A, get the use case packet A', fall into the use case pool, and generate the basic field type test case. For example, the test case id and name must pass the business engine and the corresponding field engine id and summary are concatenated respectively. For example, the use case id "B0000000001_F15759718157471", the use case name "single settlement - single, 0T loan, stay in 0T+1 day, within the range of APP_TYPE enumeration value".
接口自动化测试设备MOCK类型测试用例生成过程:1、获取MOCK引擎规则;2、获取必过业务引擎规则。调用CI平台,拦截CI平台生成的报文。落入用例池。3、全部mock用例生成之后,以用例“预设业务流水号”作为if条件拼接MOCK引擎中各个mock报文,生成MOCK配置。将MOCK配置推送到mockserver平台。接口自动化测试设备将业务类型测试用例、字段类型测试用例和MOCK类型测试用例做笛卡尔积生成目标测试用例,运行目标测试用例获得所述目标版本协议的目标测试结果。本实施例中根据目标测试引擎生成目标测试用例,不需要测试人员手动编写目标测试用例,提高了接口自动化测试的效率。Interface automation test equipment MOCK type test case generation process: 1. Obtain MOCK engine rules; 2. Obtain must pass business engine rules. Call the CI platform to intercept the packets generated by the CI platform. fall into the use case pool. 3. After all mock use cases are generated, use the use case "preset business serial number" as the if condition to splice each mock message in the MOCK engine to generate the MOCK configuration. Push the MOCK configuration to the mockserver platform. The interface automation test equipment makes a Cartesian product of the business type test case, the field type test case and the MOCK type test case to generate the target test case, and runs the target test case to obtain the target test result of the target version protocol. In this embodiment, the target test case is generated according to the target test engine, and the tester does not need to manually write the target test case, which improves the efficiency of automatic interface testing.
进一步地,基于本发明接口自动化测试方法上述实施例,提出了本发明接口自动化测试方法第四实施例。Further, based on the above-mentioned embodiments of the automatic interface testing method of the present invention, a fourth embodiment of the automatic interface testing method of the present invention is proposed.
本实施例是第一实施例中步骤S40和第二实施例中步骤S70的之后的步骤,本实施例中上述实施例的区别在于:This embodiment is a step after step S40 in the first embodiment and step S70 in the second embodiment. The difference between the above embodiments in this embodiment is:
获取所述目标测试用例对应的预设业务流水号,将所述目标版本协议的目标测试结果与所述预设业务流水号关联保存;obtaining the preset service serial number corresponding to the target test case, and storing the target test result of the target version protocol in association with the preset service serial number;
在接收到测试结果比对请求时,以所述预设业务流水号为主键,获取所述目标版本协议对应的目标测试结果,和所述基线版本协议对应的基线测试结果;When receiving the test result comparison request, use the preset service serial number as the primary key to obtain the target test result corresponding to the target version protocol and the baseline test result corresponding to the baseline version protocol;
比对所述目标测试结果和所述基线测试结果去除冗余数据,输出比对异常信息。Comparing the target test result and the baseline test result to remove redundant data, and output comparison abnormality information.
接口自动化测试设备获取目标测试用例对应的预设业务流水号,接口自动化测试设备将目标版本协议的目标测试结果与所述预设业务流水号关联保存;在接收到测试结果比对请求时,以所述预设业务流水号为主键,获取所述目标版本协议对应的目标测试结果,和所述基线版本协议对应的基线测试结果;比对所述目标测试结果和所述基线测试结果去除冗余数据,输出比对异常信息。The interface automated testing device obtains the preset service serial number corresponding to the target test case, and the interface automated testing device associates and saves the target test result of the target version protocol with the preset service serial number; The preset service serial number is the primary key, and the target test result corresponding to the target version protocol is obtained, and the baseline test result corresponding to the baseline version protocol is obtained; the target test result and the baseline test result are compared to remove redundancy Data, output comparison exception information.
具体地,参照图8,图8为本发明接口自动化测试方法第四实施例中结果比对的场景示意图;接口自动化测试设备获取目标版本协议的目标报文和目标DB;接口自动化测试设备获取基线版本协议的基线报文和基线目标DB,结果比对分为报文比对和DB比对,报文、DB比对是用例级比对,根据报文、DB对比结果回溯用例执行结果,报文比对仅对用例返回报文进行一致性比对即可,配置用例“预设业务流水号”和各个表主键关联关系。以全量库表主键作为DB比对SQL中的查询条件,生成子系统维度场景无关的全量库表查询语句,各个用例DB结果以“预设业务流水号”作为入参获取全量库表结果用例级备份,执行的测试计划与基线版本的返回报文做一致性校验,得到一致记录、不一致记录,以及基线版本缺失比对记录。不一致的差异记录可能为噪声,如时间戳等字段。提供噪生统计分析功能,方便人工维护噪声字段列表;本实施例中预设业务流水号为主键,进行测试结果比对,输出测试接口结果的异常信息,不需要测试人员进行人工审核,提高了回归测试效率。Specifically, referring to FIG. 8, FIG. 8 is a schematic diagram of a scenario of result comparison in the fourth embodiment of the interface automated testing method of the present invention; the interface automated testing device obtains the target message and target DB of the target version protocol; the interface automated testing device obtains the baseline The baseline packet of the version protocol and the baseline target DB, the result comparison is divided into packet comparison and DB comparison. The packet and DB comparison is a use case level comparison. The text comparison only needs to perform consistency comparison on the return packets of the use case, and configure the relationship between the use case "preset service serial number" and the primary key of each table. Use the primary key of the full database table as the DB to compare the query conditions in the SQL, and generate the full database table query statement irrespective of the subsystem dimension and scenario. The DB results of each use case use the "preset business serial number" as the input parameter to obtain the full database table results. Use case level Back up, the executed test plan is checked for consistency with the returned messages of the baseline version, and consistent records, inconsistent records, and missing comparison records of the baseline version are obtained. Inconsistent difference records may be noisy, fields such as timestamps. Provides the function of statistical analysis of noise generation, which is convenient for manual maintenance of the noise field list; in this embodiment, the business serial number is preset as the primary key, the test results are compared, and the abnormal information of the test interface results is output. Regression testing efficiency.
参照图9,图9本发明接口自动化测试装置一实施例的功能模块示意图,在本发明接口自动化测试装置的实施例中,所述接口自动化测试装置包括:Referring to FIG. 9, FIG. 9 is a schematic diagram of functional modules of an embodiment of the interface automatic testing device of the present invention. In the embodiment of the interface automatic testing device of the present invention, the interface automatic testing device includes:
请求接收模块,用于在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;a request receiving module, configured to obtain the target version protocol to be tested corresponding to the interface protocol test request when receiving the interface protocol test request;
协议比对模块,用于若存在与所述目标版本协议关联的基线版本协议,则比对所述目标版本协议与所述基线版本协议,获得协议更新信息;a protocol comparison module, configured to compare the target version protocol and the baseline version protocol to obtain protocol update information if there is a baseline version protocol associated with the target version protocol;
引擎更新模块,用于获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;an engine update module, configured to obtain a baseline test engine corresponding to the baseline version protocol, update the baseline test engine according to the protocol update information, and obtain a target test engine;
运行测试模块,用于根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A running test module is configured to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.
在一实施例中,所述接口自动化测试装置,包括:In one embodiment, the interface automated testing device includes:
协议判断模块,用于判断是否存在与所述目标版本协议关联的基线版本协议;a protocol judgment module for judging whether there is a baseline version protocol associated with the target version protocol;
引擎生成模块,用于若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议生成目标测试引擎,其中,所述目标测试引擎包括业务规则引擎、基础字段引擎和MOCK测试引擎;An engine generation module, configured to analyze the target version protocol to generate a target test engine if the baseline version protocol associated with the target version protocol does not exist, wherein the target test engine includes a business rule engine, a basic field engine and MOCK test engine;
运行测试模块,用于根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A running test module is configured to generate a target test case according to the target test engine, and run the target test case to obtain a target test result of the target version protocol.
在一实施例中,所述引擎生成模块,包括:In one embodiment, the engine generation module includes:
分析获取单元,用于若不存在与所述目标版本协议关联的所述基线版本协议,则分析所述目标版本协议,获取所述目标版本协议的业务场景标识;an analysis and acquisition unit, configured to analyze the target version protocol if the baseline version protocol associated with the target version protocol does not exist, and obtain a business scenario identifier of the target version protocol;
第一生成单元,用于查询预设养数平台,获取所述业务场景标识对应的业务测试规则,汇总所述业务测试规则生成业务规则引擎;a first generating unit, configured to query a preset data raising platform, obtain business test rules corresponding to the business scenario identifiers, and generate a business rule engine by summarizing the business test rules;
第二生成单元,用于遍历所述目标版本协议的协议属性,根据预先配置的发散规则和所述协议属性中的字段类型、字段长度和字段枚举进行发散生成基础字段引擎;a second generating unit, configured to traverse the protocol attributes of the target version protocol, and generate a basic field engine based on divergence according to preconfigured divergence rules and field types, field lengths and field enumeration in the protocol attributes;
第三生成单元,用于从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议内容信息和所述协议上下游关系生成MOCK测试引擎;The third generating unit is used to pull the protocol content information and the upstream and downstream relationship of the target version protocol from the preset protocol management platform, and generate a MOCK test engine according to the protocol content information and the upstream and downstream relationship of the protocol;
第四生成单元,用于将所述业务规则引擎、所述基础字段引擎和所述MOCK测试引擎组合生成目标测试引擎。The fourth generating unit is configured to combine the business rule engine, the basic field engine and the MOCK test engine to generate a target test engine.
在一实施例中,所述第三生成单元,还用于:In an embodiment, the third generating unit is further configured to:
从预设协议管理平台拉取所述目标版本协议的协议内容信息和协议上下游关系,根据所述协议上下游关系,获取所述目标版本协议下游待MOCK的各目标下游协议;Pull the protocol content information of the target version protocol and the protocol upstream and downstream relationship from the preset protocol management platform, and obtain each target downstream protocol to be MOCK downstream of the target version protocol according to the protocol upstream and downstream relationship;
获取所述目标下游协议中预设配置的进行笛卡尔发散的目标字段,将所述目标下游协议根据所述目标字段做笛卡尔积,生成成功MOCK集合和失败MOCK集合;Acquiring the preset target field for Cartesian divergence in the target downstream protocol, performing a Cartesian product on the target downstream protocol according to the target field, and generating a successful MOCK set and a failed MOCK set;
将所述成功MOCK集合之间做笛卡尔积,获得成功类MOCK规则,将所述失败MOCK集合与所述成功MOCK集合中一个元素做笛卡尔积,获得失败类MOCK规则;Do Cartesian product between the described successful MOCK sets, obtain the successful class MOCK rule, do Cartesian product with an element in the described failure MOCK set and the described successful MOCK set, obtain the failure class MOCK rule;
将所述成功类MOCK规则和所述失败类MOCK规则汇总生成所述MOCK测试引擎。The MOCK test engine is generated by summarizing the success class MOCK rules and the failure class MOCK rules.
在一实施例中,所述引擎更新模块,包括:In one embodiment, the engine update module includes:
引擎获取单元,用于获取所述基线版本协议对应的基线测试引擎,其中,所述基线测试引擎包括:业务规则引擎、基础字段引擎和/或MOCK测试引擎;An engine obtaining unit, used for obtaining the baseline test engine corresponding to the baseline version protocol, wherein the baseline test engine includes: a business rule engine, a basic field engine and/or a MOCK test engine;
第一更新单元,用于查询预设养数平台,从所述预设养数平台中获取所述协议更新信息中的更新场景标识,及所述更新场景标识对应的更新测试规则,将所述更新测试规则添加到所述业务规则引擎,获得更新的业务规则引擎;The first update unit is used to query the preset support platform, obtain the update scene identifier in the protocol update information, and the update test rule corresponding to the update scene identifier from the preset support platform, and use the The update test rule is added to the business rules engine to obtain the updated business rules engine;
第二更新单元,用于遍历所述协议更新信息的新增属性,根据所述新增属性中的变化类型、变化长度和新增枚举对所述基础字段引擎进行更新,获得更新的基础字段引擎;The second update unit is configured to traverse the newly added attributes of the protocol update information, update the basic field engine according to the change type, change length and newly added enumeration in the newly added attributes, and obtain the updated basic field engine;
第三更新单元,用于将所述协议更新信息与所述MOCK测试引擎中的MOCK规则做笛卡尔积对所述MOCK测试引擎进行更新,获得更新的MOCK测试引擎;The 3rd update unit is used to make Cartesian product with the MOCK rule in the described protocol update information and the MOCK test engine to update the MOCK test engine to obtain the updated MOCK test engine;
引擎组合单元,用于将所述更新的业务规则引擎、所述更新的基础字段引擎和所述更新的MOCK测试引擎组合获得目标测试引擎。An engine combining unit, configured to combine the updated business rule engine, the updated basic field engine and the updated MOCK test engine to obtain a target test engine.
在一实施例中,所述运行测试模块,包括:In one embodiment, the running test module includes:
引擎获取单元,用于获取所述目标测试引擎中的业务规则引擎、基础字段引擎和MOCK测试引擎;an engine acquisition unit, used to acquire the business rule engine, the basic field engine and the MOCK test engine in the target test engine;
规则抽取单元,用于从所述业务规则引擎中抽取业务引擎规则、从所述基础字段引擎中抽取字段引擎规则,和从所述MOCK测试引擎中抽取MOCK引擎规则;A rule extraction unit, for extracting business engine rules from the business rules engine, extracting field engine rules from the basic field engine, and extracting MOCK engine rules from the MOCK test engine;
用例生成单元,用于根据所述业务引擎规则、所述字段引擎规则和所述MOCK引擎规则生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。A use case generation unit, configured to generate a target test case according to the business engine rule, the field engine rule and the MOCK engine rule, and run the target test case to obtain the target test result of the target version protocol.
在一实施例中,所述用例生成单元,还用于:In an embodiment, the use case generation unit is further used for:
获取所述业务引擎规则的基础案例,调用预设自动化测试平台处理所述基础案例生成业务报文,拦截所述业务报文生成业务类型测试用例;Obtaining the basic case of the business engine rule, calling a preset automated test platform to process the basic case to generate a business message, and intercepting the business message to generate a business type test case;
获取所述字段引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述字段引擎规则修改所述基础报文,生成字段类型测试用例;Obtain the field engine rules, call the preset automated test platform to process the required business engine rules to generate basic packets, intercept the basic packets, modify the basic packets according to the field engine rules, and generate field type test cases ;
获取所述MOCK引擎规则,调用预设自动化测试平台处理必过的业务引擎规则生成基础报文,拦截所述基础报文,按照所述MOCK引擎规则处理所述基础报文,生成MOCK类型测试用例;Obtain the MOCK engine rules, call the preset automated test platform to process the necessary business engine rules to generate basic messages, intercept the basic messages, process the basic messages according to the MOCK engine rules, and generate MOCK type test cases ;
将所述业务类型测试用例、所述字段类型测试用例和所述MOCK类型测试用例做笛卡尔积生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果。The service type test case, the field type test case, and the MOCK type test case are performed a Cartesian product to generate a target test case, and the target test case is run to obtain the target test result of the target version protocol.
在一实施例中,所述接口自动化测试装置,包括:In one embodiment, the interface automated testing device includes:
获取保存模块,用于获取所述目标测试用例对应的预设业务流水号,将所述目标版本协议的目标测试结果与所述预设业务流水号关联保存;an obtaining and saving module, configured to obtain a preset service serial number corresponding to the target test case, and store the target test result of the target version protocol in association with the preset service serial number;
结果获取模块,用于在接收到测试结果比对请求时,以所述预设业务流水号为主键,获取所述目标版本协议对应的目标测试结果,和所述基线版本协议对应的基线测试结果;The result obtaining module is used to obtain the target test result corresponding to the target version protocol and the baseline test result corresponding to the baseline version protocol with the preset service serial number as the main key when receiving the test result comparison request ;
结果比对模块,用于比对所述目标测试结果和所述基线测试结果去除冗余数据,输出比对异常信息。The result comparison module is used for comparing the target test result and the baseline test result to remove redundant data, and output comparison abnormality information.
本发明实施例中在接收到接口协议测试请求时,获取所述接口协议测试请求对应待测试的目标版本协议;判断是否存在与所述目标版本协议关联的基线版本协议,若存在与所述目标版本协议关联的基线版本协议,则判定为回归测试,比对所述目标版本协议与所述基线版本协议,获得协议更新信息;获取所述基线版本协议对应的基线测试引擎,根据所述协议更新信息更新所述基线测试引擎,获得目标测试引擎;根据所述目标测试引擎生成目标测试用例,运行所述目标测试用例获得所述目标版本协议的目标测试结果,即,本实施例中通过更新测试引擎,并利用更新的测试引擎更新测试用例,与当前接口回归测试相比,当前的接口回归测试每次都是创建测试用例,由于每次的测试用例是一个新的用例,那么基于该测试用例获得的测试结果也是新的测试结果,而本申请的测试用例是根据目标协议版本进行更新,目标协议版本获得的测试结果,与基线版本协议获得的测试结果相近,这样测试人员可以快速定位问题,减少了测试人员人工审核的工作量,进一步地提高了接口自动化测试的效率。In the embodiment of the present invention, when an interface protocol test request is received, the target version protocol to be tested corresponding to the interface protocol test request is obtained; it is judged whether there is a baseline version protocol associated with the target version protocol, if there is a target version protocol associated with the target version protocol The baseline version protocol associated with the version protocol is determined as a regression test, and the target version protocol and the baseline version protocol are compared to obtain protocol update information; the baseline test engine corresponding to the baseline version protocol is obtained, and updated according to the protocol information to update the baseline test engine to obtain a target test engine; generate a target test case according to the target test engine, run the target test case to obtain the target test result of the target version protocol, that is, in this embodiment, pass the update test engine, and use the updated test engine to update test cases. Compared with the current interface regression test, the current interface regression test creates a test case every time. Since each test case is a new one, then based on the test case The obtained test result is also a new test result, and the test case of this application is updated according to the target protocol version. The test result obtained by the target protocol version is similar to the test result obtained by the baseline version protocol, so that the tester can quickly locate the problem. The workload of manual review by testers is reduced, and the efficiency of automatic interface testing is further improved.
上述各程序模块所执行的方法可参照本发明接口自动化测试方法各个实施例,此处不再赘述。For the methods executed by the above program modules, reference may be made to the various embodiments of the automatic interface testing method of the present invention, which will not be repeated here.
本发明还提供一种计算机可读存储介质。The present invention also provides a computer-readable storage medium.
本发明计算机可读存储介质上存储有接口自动化测试程序,所述接口自动化测试程序被处理器执行时实现如上所述的接口自动化测试方法的步骤。The computer-readable storage medium of the present invention stores an automated interface testing program, and when the automated interface testing program is executed by the processor, implements the steps of the above-described interface automated testing method.
其中,在所述处理器上运行的接口自动化测试程序被执行时所实现的方法可参照本发明接口自动化测试方法各个实施例,此处不再赘述。For the method implemented when the automatic interface testing program running on the processor is executed, reference may be made to the various embodiments of the automatic interface testing method of the present invention, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010597341.7A CN111737140B (en) | 2020-06-28 | 2020-06-28 | Interface automatic test method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010597341.7A CN111737140B (en) | 2020-06-28 | 2020-06-28 | Interface automatic test method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111737140A true CN111737140A (en) | 2020-10-02 |
CN111737140B CN111737140B (en) | 2024-08-27 |
Family
ID=72651364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010597341.7A Active CN111737140B (en) | 2020-06-28 | 2020-06-28 | Interface automatic test method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111737140B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112468358A (en) * | 2020-11-05 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Protocol detection method, system, equipment and computer readable storage medium |
CN112818307A (en) * | 2021-02-25 | 2021-05-18 | 深信服科技股份有限公司 | User operation processing method, system, device and computer readable storage medium |
CN113177003A (en) * | 2021-05-24 | 2021-07-27 | 深圳前海微众银行股份有限公司 | Method, device, medium and computer program product for generating Mock use case |
CN113342695A (en) * | 2021-07-13 | 2021-09-03 | 中国工商银行股份有限公司 | Software version testing method and device |
CN113342674A (en) * | 2021-06-28 | 2021-09-03 | 平安普惠企业管理有限公司 | Performance baseline regression testing method, device, equipment and medium based on learning |
CN114371866A (en) * | 2020-10-14 | 2022-04-19 | 腾讯科技(深圳)有限公司 | Version reconstruction testing method, device and equipment of business system |
CN115061916A (en) * | 2022-06-21 | 2022-09-16 | 中国平安财产保险股份有限公司 | Method for automatically generating interface test case and related equipment thereof |
CN115134397A (en) * | 2022-06-28 | 2022-09-30 | 中国银行股份有限公司 | Method, device and equipment for realizing self-adaptive transaction baffle platform |
CN115687161A (en) * | 2022-12-30 | 2023-02-03 | 云筑信息科技(成都)有限公司 | Method for automatically generating interface test case based on scanning maven warehouse |
CN118473939A (en) * | 2024-07-10 | 2024-08-09 | 国网思极网安科技(北京)有限公司 | Baseline detection method and device, system, and computer storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140245264A1 (en) * | 2013-02-28 | 2014-08-28 | International Business Machines Corporation | Identifying Test Cases Based on Changed Test Code |
CN105302710A (en) * | 2014-07-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Method and apparatus for determining test case in need of regression testing |
CN108694104A (en) * | 2017-04-12 | 2018-10-23 | 北京京东尚科信息技术有限公司 | A kind of interface function contrast test method, apparatus, electronic equipment and storage medium |
CN109446068A (en) * | 2018-09-26 | 2019-03-08 | 平安健康保险股份有限公司 | Interface test method, device, computer equipment and storage medium |
-
2020
- 2020-06-28 CN CN202010597341.7A patent/CN111737140B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140245264A1 (en) * | 2013-02-28 | 2014-08-28 | International Business Machines Corporation | Identifying Test Cases Based on Changed Test Code |
CN105302710A (en) * | 2014-07-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Method and apparatus for determining test case in need of regression testing |
CN108694104A (en) * | 2017-04-12 | 2018-10-23 | 北京京东尚科信息技术有限公司 | A kind of interface function contrast test method, apparatus, electronic equipment and storage medium |
CN109446068A (en) * | 2018-09-26 | 2019-03-08 | 平安健康保险股份有限公司 | Interface test method, device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
KANG, SS (KANG, SEONG-SEOK) ET AL.: "SITAT: Simulation-based Interface Testing Automation Tool for Robot Software Component", INTERNATIONAL CONFERENCE ON CONTROL, AUTOMATION AND SYSTEMS (ICCAS 2010), 30 October 2010 (2010-10-30), pages 1781 - 1784, XP031836914 * |
范典华;杨奇民;代蕊;: "在线计费接口自动化测试系统及应用", 电脑与电信, no. 12, 10 December 2015 (2015-12-10) * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114371866A (en) * | 2020-10-14 | 2022-04-19 | 腾讯科技(深圳)有限公司 | Version reconstruction testing method, device and equipment of business system |
CN112468358A (en) * | 2020-11-05 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Protocol detection method, system, equipment and computer readable storage medium |
CN112468358B (en) * | 2020-11-05 | 2022-07-22 | 苏州浪潮智能科技有限公司 | Protocol detection method, system, equipment and computer readable storage medium |
CN112818307B (en) * | 2021-02-25 | 2024-05-28 | 深信服科技股份有限公司 | User operation processing method, system, equipment and computer readable storage medium |
CN112818307A (en) * | 2021-02-25 | 2021-05-18 | 深信服科技股份有限公司 | User operation processing method, system, device and computer readable storage medium |
CN113177003A (en) * | 2021-05-24 | 2021-07-27 | 深圳前海微众银行股份有限公司 | Method, device, medium and computer program product for generating Mock use case |
CN113342674A (en) * | 2021-06-28 | 2021-09-03 | 平安普惠企业管理有限公司 | Performance baseline regression testing method, device, equipment and medium based on learning |
CN113342695A (en) * | 2021-07-13 | 2021-09-03 | 中国工商银行股份有限公司 | Software version testing method and device |
CN113342695B (en) * | 2021-07-13 | 2024-07-09 | 中国工商银行股份有限公司 | Software version testing method and device |
CN115061916A (en) * | 2022-06-21 | 2022-09-16 | 中国平安财产保险股份有限公司 | Method for automatically generating interface test case and related equipment thereof |
CN115061916B (en) * | 2022-06-21 | 2024-07-16 | 中国平安财产保险股份有限公司 | Method for automatically generating interface test case and related equipment thereof |
CN115134397A (en) * | 2022-06-28 | 2022-09-30 | 中国银行股份有限公司 | Method, device and equipment for realizing self-adaptive transaction baffle platform |
CN115687161A (en) * | 2022-12-30 | 2023-02-03 | 云筑信息科技(成都)有限公司 | Method for automatically generating interface test case based on scanning maven warehouse |
CN118473939A (en) * | 2024-07-10 | 2024-08-09 | 国网思极网安科技(北京)有限公司 | Baseline detection method and device, system, and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111737140B (en) | 2024-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111737140A (en) | Interface automated testing method, apparatus, device, and computer-readable storage medium | |
CN111030857B (en) | Network alarm method, device, system and computer readable storage medium | |
CN105389256B (en) | A kind of unit test method and system | |
US7953744B2 (en) | Database change verifier | |
WO2020029375A1 (en) | Interface testing method and system, and computer device and storage medium | |
US8661125B2 (en) | System comprising probe runner, monitor, and responder with associated databases for multi-level monitoring of a cloud service | |
WO2012034440A1 (en) | Method and device for generating database upgrading script | |
US20210191845A1 (en) | Unit testing of components of dataflow graphs | |
EP2616965A1 (en) | Support for a parameterized query/view in complex event processing | |
CN110674161A (en) | Method, system, storage medium and SQL operation platform for online SQL | |
CN111708771A (en) | Data duplicate checking method, device, equipment and computer storage medium | |
CN115033816A (en) | Rule engine-based business processing method, apparatus, computer equipment and medium | |
CN111611009A (en) | Database script management method and device, computer equipment and storage medium | |
WO2023185310A1 (en) | Data synchronization method and system, and computer readable storage medium | |
CN116881145B (en) | Interface testing method, device, equipment and storage medium based on flow playback | |
CN111897794A (en) | Database maintenance method, device, electronic device and storage medium | |
CN111695328A (en) | Method, device, equipment and storage medium for generating simulation test message | |
CN117851163A (en) | A service inspection tool based on the self-developed openstack platform | |
CN118963869B (en) | Large model task calling execution method and device based on knowledge graph | |
CN114546830A (en) | Regression testing method, regression testing device, electronic equipment and storage medium | |
WO2024098746A1 (en) | Test method, apparatus, and related device | |
CN113419738A (en) | Interface document generation method and device and interface management equipment | |
CN111506339A (en) | Method and device for processing change information of Software Development Kit (SDK) | |
CN116186777A (en) | A method and device for auditing an MPP database | |
CN115048307A (en) | Weak network testing method, device, equipment and storage medium of application software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |