WO2020029375A1 - Interface testing method and system, and computer device and storage medium - Google Patents
Interface testing method and system, and computer device and storage medium Download PDFInfo
- Publication number
- WO2020029375A1 WO2020029375A1 PCT/CN2018/106403 CN2018106403W WO2020029375A1 WO 2020029375 A1 WO2020029375 A1 WO 2020029375A1 CN 2018106403 W CN2018106403 W CN 2018106403W WO 2020029375 A1 WO2020029375 A1 WO 2020029375A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- interface
- data
- origin
- call
- test
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Definitions
- the present application relates to the field of testing technology, and in particular, to an interface testing method, system, computer equipment, and storage medium.
- Web crawler tests usually only test normal scenarios.
- the returned table data is the boundary value, and the returned data has abnormal scenarios such as special characters and cannot be overwritten.
- Database class test Generally, the data configuration scenarios of the database are limited and cannot meet the requirements of normal data and abnormal data. API interface class tests. Generally, the return of the interface requires the cooperation of the server, and some rely on the return of the network, which cannot be achieved through real scenarios.
- Scenario method is a method to improve the test effect by describing the function points or business processes of the system by using scenarios.
- the scenario method generally includes elementary streams and backup streams. Starting from a process, the process is determined by describing the path passed, and the entire scene is completed by traversing all the basic streams and backup streams.
- An interface testing method includes: generating request data for an interface to be tested; sending the request data to a server where the interface to be tested is located; receiving response data for the request data returned by the server; and when testing When a task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database, and the origin log file records
- the interface description database includes the interface name and its corresponding response data description; calling business logic to verify the received response data and returning the verification result to generate an interface test report.
- An interface test system includes:
- a generating module configured to generate request data for an interface to be tested
- a sending module configured to send the request data to a server where the interface to be tested is located
- a receiving module configured to receive response data for the request data returned by the server
- the calling module is set to generate and output the origin log file according to the combination of the obtained dynamic invocation dependencies and each identified task when the test task occurs, and after the origin log file is processed, it is stored in the interface description database
- the origin log file records the process of sending and receiving all data, and the interface description database includes an interface name and a corresponding response data description;
- the verification module is configured to call business logic to verify the received response data and return a verification result to generate an interface test report.
- a computer device includes a memory and a processor.
- the memory stores computer-readable instructions.
- the processor causes the processor to perform the steps of the interface test method.
- a storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, cause the one or more processors to execute the steps of the foregoing interface test method.
- the above interface test method, system, computer equipment and storage medium generate request data for the interface to be tested, send the request data to the server where the interface to be tested is located, and receive the request data returned by the server
- the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database.
- the interface description database includes an interface name and a corresponding response data description, generates an interface test report for the interface to be tested according to the verification result, and establishes an association between the interface test report and the interface name of the interface to be tested Relationship, the interface test report includes one or more of request data, verification result, verification result status, and verification failure reason analysis of the interface to be tested, the verification result status includes success and failure, and an exception is added Test coverage, reducing manual testing Trial investment to improve testing efficiency.
- FIG. 1 is a flowchart of an interface test method in an embodiment
- FIG. 2 is a flowchart of calling an interceptor to generate and output an origin log file in an embodiment
- FIG. 3 is a structural block diagram of an interface test system in an embodiment
- FIG. 4 is a structural block diagram of a calling module in an embodiment.
- an interface test method includes:
- Step S101 generating request data for an interface to be tested
- Step S102 sending the request data to a server where the interface to be tested is located;
- This technical solution provides a method for testing abnormal scenarios.
- the simulation of message return in abnormal scenarios is realized, and the coverage of abnormal process branches can be achieved through automated testing.
- the coverage and regression of abnormal scenarios can be automated. No manual intervention is required during the test.
- the data generation tool modifies the normal data source file in the excel file format based on the abnormal data generation rules, modifies it according to the rules entered by the client user, and finally generates the modified excel file and saves it to the specified Directory.
- the CASE name corresponding to the modified file is saved in the mapping folder, and the modified excel file is saved in the files folder.
- the data generation tool can be Quest Data Factory, which is a fast and easy to generate test data tool. It can model complex data relationships and has a GUI interface. As a powerful data generator, it allows Developers effortlessly generate millions of rows of meaningful test data.
- the abnormal data generation rule has three operations, the three operations are: the first update command: the value of a certain row and a column can be updated, or it can be replaced with the boundary value, 0 value, and abnormal format value of this field ;
- the second is the delete command: you can delete discrete multiple lines, represented by x1, x2 ... xn, or you can delete consecutive multiple lines, represented by xy;
- the third is the copy increase command: multiple rows can be copied, x1, x2 ... xn means copy the discrete rows to the end of the table, while xy means copy the consecutive rows to the end of the table.
- the operations that can be performed on the converted format are Update: Row-Column-Value, Delete: ⁇ x1, x2 ...
- the normal data source file is a data source file that passes the code normal flow test. For some legal data, it has been saved in an excel file format in the previous period.
- the acquisition process is as follows: first crawl the corresponding web page address, or request the API interface address, or SQL query the corresponding table structure, convert the returned message into the data frame format through the python pandas package and save it into an excel file.
- Step S103 Receive response data for the request data returned by the server
- the server After sending the request data to the server, the server receives the request data through the interface to be tested, performs operation processing according to the request parameter values in the request data, and returns the processing result, that is, the response data, to the server.
- the request data sender is described.
- step S104 when a test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependency and each identified task, and after the origin log file is processed, it is stored in the interface description database.
- the origin log file records the process of sending and receiving all data, and the interface description database includes the interface name and its corresponding response data description;
- the service call interceptor When a test task occurs, the service call interceptor generates and outputs the origin log file according to the service origin data specification, according to the obtained service dynamic invocation dependencies and the identified service combination of each task;
- the service origin data specification is a nine yuan Group, BasicProv (Token, InvokingService, ServiceInvoked, Location, Elapsedtime, Timestamp, Input, Output, Status);
- the data specification parameters of the service origin have the following meanings: Token: a 32-bit string used to identify a dynamic combined task , InvokingService: service caller, also known as service consumer.
- the data format is a 32-bit string.
- Servicelnvoked The service callee, which can also be called a service provider.
- the data format is a 32-bit string.
- Elapsed time The time taken for the service call. This time is the time required to complete a service call from the perspective of the service caller, including the nested execution time of the called service.
- the data format is an eight-bit integer type in milliseconds. Timestamp: Timestamp of the service call event, the format is year / month / day hour / minute / second / millisecond, Input: input parameters of the service call, the data storage format is a 32-bit string. Output: The output data file of the service call, usually an XML object or a json data object. Status: The status of the service execution.
- the data format is a Boolean value.
- the origin log file is generated and output based on the obtained dynamic call dependencies and each identified task, and the origin log file is output. After data processing, it is stored in the interface description database.
- the origin log file records the process of sending and receiving all data, which is convenient for analyzing the origin of the test exception or fault.
- the interface description database includes the interface name and its corresponding response data description. The scalability of acquisition. In the process of collecting interceptor information, in order to provide support for heterogeneous systems, the interceptor and interceptor management are separated.
- the management module is responsible for all interception registration, log collection, and processing.
- the interceptor is responsible for capturing the origin of the service and Standard output log. Different interceptors can be designed according to different service protocols.
- the interceptor and management module are loosely coupled.
- the strategy and method of interceptor operation is achieved by reading an XML configuration file, which is managed and managed by the management module. Maintenance. By updating and modifying this file, the interceptor implements different sampling strategies and execution methods. All interceptors use common standard data specifications and transmission protocols.
- the interception frequency of the service call interceptor is determined according to different service call frequencies.
- step S105 the business logic is invoked to verify the received response data and return the verification result to generate an interface test report.
- the abnormal data generated by the abnormal data generating tool is used as the input of the business code, and the business code is normally called for execution and the result is returned.
- the business code is normally called for execution and the result is returned.
- the returned results are matched with the relevant records. If the match is successful, the test is successful. The test is verified as a pass. If the match fails, the test is failed and the verification is a fail. . There are different judgments on what the matching result is success and failure, and the specific business logic shall prevail.
- the business code refers to the business logic to be executed in the test case. For example, the test crawler returns null, and the test crawler returns a user name error. The return after executing the business code is the return result.
- the source log file is generated and output according to the combination of the obtained dynamic invocation dependency and each identified task, and the origin log file is processed. After the data is processed, it is stored in the interface description database including:
- Step S201 design a call interceptor according to the service framework and the call protocol
- the design of the call interceptor includes creating a file for storing the origin information of the service.
- the caller generates a unique token value, which is used to identify the dynamic dependency of the service. It also creates parameters for reading and storing the call start time. Read and store the parameters of the current IP address, create a parameter to store the called task name, and create a parameter to store the entry parameters of the called task.
- the above parameters, file, and token value together constitute the call interceptor.
- the unique token value is generated based on time and network card.
- Step S202 the call interceptor is built into the call protocol
- the service call interceptor is built into the service call protocol. When a service call occurs, the service call interceptor intercepts the service call request, obtains the dynamic call dependency, and identifies the combination of each task.
- Step S203 When the call occurs, the call interceptor intercepts the call request, obtains the dynamic call dependency, and identifies the combination of each task;
- the service call interceptor generates and outputs the origin log file according to the service origin data specification, according to the obtained dynamic invocation dependency and each identified task;
- the service origin data specification is a nine-tuple, BasicProv (Token, InvokingService, ServiceInvoked, Location, Elapsed time, Timestamp, Input, Output, where Token is a 32-bit string used to identify a dynamic combined task,
- Invoking Service is a service caller, also known as a service consumer, and its data format Is a 32-bit string
- Service Invoked is the service callee, also known as the service provider, its data format is a 32-bit string
- Location is the location where the service call occurs, and in the cloud service environment, it is the IP address
- Elapsed time is the time taken by the service call, which is the time required to complete a service call from the perspective of the service caller, including the nested execution time of the called service, and its data format is an 8-bit Integer; [00
- step S204 the call interceptor generates and outputs the origin log file according to the combination of the originating data specification and the obtained dynamic invocation dependency and each identified task;
- the call interceptor will generate and output the origin log file according to the origin data specification, according to the combination of the obtained dynamic invocation dependencies and each identified task.
- Read the service origin log records and check whether it conforms to the current service origin data specifications. Users can set the service origin data specifications as required. For example, when distributed debugging is not required, the service input and output may not be intercepted. The related information is not checked when the format check is performed.
- Step S205 After the origin log file is processed, it is stored in the interface description database.
- the origin log file After the origin log file is processed, it is stored in the interface description database, and the service origin log is stored on the local server where the service is located. Through the log collection tool, data is read, transmitted, and inserted into the database.
- the invoking business logic verifies the received response data and returns a verification result
- generating an interface test report includes:
- the verification result status includes success and failure.
- performing data processing on the origin log file includes: checking the integrity of the origin data information in the origin log file, discarding the data that does not meet the requirements, and then normalizing the origin data information that meets the requirements, then inserting it into the database,
- the origin log files are aggregated and stored in the interface description database.
- the interface test method further includes: using the received response data as test data of an interface to be tested, and establishing an association relationship between the interface test data and an interface name of the interface to be tested.
- the received response data is used as the test data of the interface to be tested, and the association relationship between the interface test data and the interface name of the interface to be tested is established.
- Interface refers to the communication rules between different functional layers of the same system, and provides an interface as a service. In an end-to-end interface system, it is particularly important to ensure the quality and stability of the interface that the front and back interact with, and the quality of the interface is particularly important. And stability is verified through interface testing during interface development.
- an interface test system includes:
- a generating module configured to generate request data for an interface to be tested
- a sending module configured to send the request data to a server where the interface to be tested is located
- a receiving module configured to receive response data for the request data returned by the server
- the calling module is set to generate and output the origin log file according to the combination of the obtained dynamic invocation dependencies and each identified task when the test task occurs, and after the origin log file is processed, it is stored in the interface description database
- the origin log file records the process of sending and receiving all data, and the interface description database includes an interface name and a corresponding response data description;
- the verification module is configured to call business logic to verify the received response data and return a verification result to generate an interface test report.
- the generating module includes a normal data source file modification unit configured to call a data generation tool to modify the normal data source file based on the abnormal data generation rule, wherein the abnormal data generation rule has three operations: first One is the update command; the second is the delete command; the third is the copy add command.
- the calling module further includes:
- Design unit set to design the call interceptor according to the service framework and the call protocol
- the interception unit is set to call the interceptor to intercept the call request when the call occurs, obtain the dynamic call dependency, and identify the combination of each task;
- the calling unit is set to make the call interceptor generate and output the origin log file according to the combination of the dynamic invocation dependency and each identified task according to the origin data specification;
- the storage unit is configured to store the origin log file in the interface description database after data processing.
- the verification module is further configured to generate an interface test report for the interface to be tested according to the verification result, and establish an association relationship between the interface test report and the interface name of the interface to be tested.
- the interface test report includes one or more of the requested data of the verified interface to be tested, the verification result, the status of the verification result, and the analysis of the cause of the failure of the verification result.
- the status of the verification result includes success and failure.
- the calling module includes: a source log processing unit configured to check the integrity of the source data information in the source log file, discard the data that does not meet the requirements, and then normalize the source data information that meets the requirements, and then insert Database, which aggregates and stores the origin log files in the interface description database.
- the verification module includes: an abnormal data input unit configured to take the abnormal data generated by the abnormal data generating tool as input of a business code, and normally call the business code to execute and return the result; and the query matching unit is set to Query the database records and match the returned results with the related records. If the match is successful, the test is successful and the test is passed. If the match fails, the test is failed and the verification is Fail.
- the calling module includes a call interceptor design unit
- the call interceptor design unit includes: an origin information file creation unit configured to create a file for storing service origin information; a Token value generation unit, set To generate a unique token value based on time and network card, as a sign to identify the dynamic dependency of the service;
- Call start time parameter creation unit set to create a parameter to read and store the call start time
- current IP address parameter creation unit set to create a parameter to read and store the current IP address
- task name parameter creation unit Set to create a parameter for storing the called task name
- task entry parameter parameter creation unit set to create a parameter for storing the entry parameter of the called task
- the call interceptor constituting unit is set to a file created according to the origin information file creation unit, a Token value generated by the Token value generation unit, a call start time created by the call start time parameter creation unit, and the current IP address
- the current IP address created by the parameter creation unit, the task name created by the task name parameter creation unit, and the entry parameters of the called task created by the task entry parameter parameter creation unit together constitute a call interceptor.
- the calling unit includes:
- Origin data specification checking unit which is set to read service origin log records and check whether it conforms to the current service origin data specification
- the origin data specification setting unit is set to set the specification requirements of the service origin data so that when distributed debugging is not required, the input and output of the service are not intercepted, and the relevant information is not checked when the format is checked.
- the interface test system further includes an association establishing module.
- the association relationship establishing module is configured to use the received response data as test data of an interface to be tested, and establish an association relationship between the interface test data and an interface name of the interface to be tested.
- a computer device in one embodiment, includes a memory and a processor.
- the memory stores computer-readable instructions.
- the processor is caused to execute the foregoing embodiments. Steps in the interface test method.
- a storage medium storing computer-readable instructions.
- the one or more processors execute the interfaces in the foregoing embodiments. Steps of the test method.
- the storage medium may be a non-volatile storage medium.
- the program may be stored in a computer-readable storage medium.
- the storage medium may include: Read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks, etc.
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
An interface testing method and system, and a computer device and a storage medium. The method comprises: generating request data for an interface to be tested (S101); sending the request data to a server of the interface to be tested (S102); receiving response data for the request data returned by the server (S103); when a test task occurs, generating and outputting an origin log file according to an obtained dynamic invocation dependency relationship and a combination of each identified task, and storing the origin log file in an interface description database after performing data processing (S104); and invoking a service logic to verify received response data, returning a verification result, and generating an interface test report (S105). The method increases the coverage of abnormal test, reduces the investment of manual test and improves the test efficiency.
Description
本申请要求于2018年08月08日提交中国专利局、申请号为201810893803.2、发明名称为“接口测试方法、系统、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed with the Chinese Patent Office on August 08, 2018 with an application number of 201810893803.2 and an invention name of "Interface Test Method, System, Computer Equipment and Storage Medium", the entire contents of which are incorporated by reference In this application.
本申请涉及测试技术领域,尤其涉及一种接口测试方法、系统、计算机设备和存储介质。The present application relates to the field of testing technology, and in particular, to an interface testing method, system, computer equipment, and storage medium.
网络爬虫类测试,通常只能测试到正常场景。对于账户过期,返回表格数据为边界值,返回数据带有特殊字符等异常场景,无法覆盖。Web crawler tests usually only test normal scenarios. For account expiration, the returned table data is the boundary value, and the returned data has abnormal scenarios such as special characters and cannot be overwritten.
数据库类测试,通常数据库的数据配置场景有限,无法满足正常数据和异常数据的需要。API接口类测试,通常接口返回需要服务器方合作返回,有些则依赖于网络的返回,无法通过真实场景实现。Database class test. Generally, the data configuration scenarios of the database are limited and cannot meet the requirements of normal data and abnormal data. API interface class tests. Generally, the return of the interface requires the cooperation of the server, and some rely on the return of the network, which cannot be achieved through real scenarios.
场景法是通过运用场景来对系统的功能点或业务流程的描述,从而提高测试效果的一种方法。场景法一般包含基本流和备用流,从一个流程开始,通过描述经过的路径来确定的过程,经过遍历所有的基本流和备用流来完成整个场景。Scenario method is a method to improve the test effect by describing the function points or business processes of the system by using scenarios. The scenario method generally includes elementary streams and backup streams. Starting from a process, the process is determined by describing the path passed, and the entire scene is completed by traversing all the basic streams and backup streams.
发明内容Summary of the invention
基于此,有必要针对现行接口测试方法的弊端,提供一种接口测试方法、系统、计算机设备和存储介质。Based on this, it is necessary to provide an interface test method, a system, a computer device, and a storage medium for the disadvantages of the current interface test method.
一种接口测试方法,包括:生成针对待测试接口的请求数据;将所述请求数据发送给所述待测试接口所在的服务器;接收所述服务器返回的针对所述请求数据的响应数据;当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据 处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。An interface testing method includes: generating request data for an interface to be tested; sending the request data to a server where the interface to be tested is located; receiving response data for the request data returned by the server; and when testing When a task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database, and the origin log file records For all data sending and receiving processes, the interface description database includes the interface name and its corresponding response data description; calling business logic to verify the received response data and returning the verification result to generate an interface test report.
一种接口测试系统,包括:An interface test system includes:
生成模块,设置为生成针对待测试接口的请求数据;A generating module configured to generate request data for an interface to be tested;
发送模块,设置为将所述请求数据发送给所述待测试接口所在的服务器;A sending module configured to send the request data to a server where the interface to be tested is located;
接收模块,设置为接收所述服务器返回的针对所述请求数据的响应数据;A receiving module configured to receive response data for the request data returned by the server;
调用模块,设置为当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;The calling module is set to generate and output the origin log file according to the combination of the obtained dynamic invocation dependencies and each identified task when the test task occurs, and after the origin log file is processed, it is stored in the interface description database The origin log file records the process of sending and receiving all data, and the interface description database includes an interface name and a corresponding response data description;
验证模块,设置为调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。The verification module is configured to call business logic to verify the received response data and return a verification result to generate an interface test report.
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述接口测试方法的步骤。A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor causes the processor to perform the steps of the interface test method.
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述接口测试方法的步骤。A storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, cause the one or more processors to execute the steps of the foregoing interface test method.
上述接口测试方法、系统、计算机设备和存储介质,通过生成针对待测试接口的请求数据,将所述请求数据发送给所述待测试接口所在的服务器,接收所述服务器返回的针对所述请求数据的响应数据,当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述接口描述数据库中包括接口名称及其对应的响应数据描述,根据所述验证结果生成 针对所述待测试接口的接口测试报告,并建立该接口测试报告与该待测试接口的接口名称的关联关系,所述接口测试报告包括已验证的待测试接口的请求数据、验证结果、验证结果状态和验证结果失败原因分析中的一种或多种,所述验证结果状态包括成功和失败,增加异常测试的覆盖率,减少人工测试投入,提高测试效率。The above interface test method, system, computer equipment and storage medium generate request data for the interface to be tested, send the request data to the server where the interface to be tested is located, and receive the request data returned by the server When the test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database. The interface description database includes an interface name and a corresponding response data description, generates an interface test report for the interface to be tested according to the verification result, and establishes an association between the interface test report and the interface name of the interface to be tested Relationship, the interface test report includes one or more of request data, verification result, verification result status, and verification failure reason analysis of the interface to be tested, the verification result status includes success and failure, and an exception is added Test coverage, reducing manual testing Trial investment to improve testing efficiency.
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the detailed description of the preferred embodiments below. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present application.
图1为一个实施例中接口测试方法的流程图;FIG. 1 is a flowchart of an interface test method in an embodiment; FIG.
图2为一个实施例中调用拦截器生成并输出起源日志文件的流程图;2 is a flowchart of calling an interceptor to generate and output an origin log file in an embodiment;
图3为一个实施例中接口测试系统的结构框图;3 is a structural block diagram of an interface test system in an embodiment;
图4为一个实施例中调用模块的结构框图。FIG. 4 is a structural block diagram of a calling module in an embodiment.
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution, and advantages of the present application clearer, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "the" may include plural forms. It should be further understood that the word "comprising" used in the specification of the present application refers to the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and / or groups thereof.
作为一个较好的实施例,如图1所示,一种接口测试方法,包括:As a better embodiment, as shown in FIG. 1, an interface test method includes:
步骤S101,生成针对待测试接口的请求数据;Step S101, generating request data for an interface to be tested;
步骤S102,将所述请求数据发送给所述待测试接口所在的服务器;Step S102, sending the request data to a server where the interface to be tested is located;
本技术方案提供一种异常场景的测试方法,通过对返回消息拦截,实现了异常场景下的消息返回的模拟以及可通过自动化测试实现对异常流程分支的覆盖,可以自动化完成异常场景的覆盖,回归测试时无需人工介入。启动客户端,调用数据生成工具,数据生成工具基于异常数据生成规则修改excel文件格式的正常数据源文件,根据客户端用户输入的规则进行修改,最终生成修改后的excel文件并将其保存到指定目录中。mapping文件夹中保存和修改文件对应的CASE名称,files文件夹中保存修改后的excel文件。所述数据生成工具可以是Quest Data Factory,它是一种快速的、易于产生测试数据工具,它能建模复杂数据关系,且有带有GUI界面,作为一个功能强大的数据产生器,它允许开发人员毫不费力地产生百万行有意义的测试数据。This technical solution provides a method for testing abnormal scenarios. By intercepting the returned messages, the simulation of message return in abnormal scenarios is realized, and the coverage of abnormal process branches can be achieved through automated testing. The coverage and regression of abnormal scenarios can be automated. No manual intervention is required during the test. Start the client and invoke the data generation tool. The data generation tool modifies the normal data source file in the excel file format based on the abnormal data generation rules, modifies it according to the rules entered by the client user, and finally generates the modified excel file and saves it to the specified Directory. The CASE name corresponding to the modified file is saved in the mapping folder, and the modified excel file is saved in the files folder. The data generation tool can be Quest Data Factory, which is a fast and easy to generate test data tool. It can model complex data relationships and has a GUI interface. As a powerful data generator, it allows Developers effortlessly generate millions of rows of meaningful test data.
所述的异常数据生成规则有三种操作,这三种操作分别为:第一种更新命令:可更新某一行某一列的值,也可替换成此字段的边界值、0值、异常格式的值;第二种为删除命令:可删除离散的多行,以x1,x2…xn表示,也可以删除连续的多行,以x-y表示;第三种为复制增加命令:可复制多行,x1,x2…xn表示复制离散的这些行到表格最后,而x-y则表示复制连续的这些行到表格最后。比如:转换后的格式可进行的操作有Update:行-列-值,Delete:{x1,x2…xn/x-y行},Copy:{x1,x2…xn/x-y行}。所述的正常数据源文件为代码正常流程测试通过的数据源文件,为是一些合法数据,前期已经将其以excel文件格式进行保存。其获取过程为:首先爬取对应的网页地址,或者请求API接口地址,或者SQL查询对应的表结构,把返回消息通过python pandas包转换成data frame格式并保存成excel文件。The abnormal data generation rule has three operations, the three operations are: the first update command: the value of a certain row and a column can be updated, or it can be replaced with the boundary value, 0 value, and abnormal format value of this field ; The second is the delete command: you can delete discrete multiple lines, represented by x1, x2 ... xn, or you can delete consecutive multiple lines, represented by xy; the third is the copy increase command: multiple rows can be copied, x1, x2 ... xn means copy the discrete rows to the end of the table, while xy means copy the consecutive rows to the end of the table. For example, the operations that can be performed on the converted format are Update: Row-Column-Value, Delete: {x1, x2 ... xn / x-y rows}, Copy: {x1, x2 ... xn / x-y rows}. The normal data source file is a data source file that passes the code normal flow test. For some legal data, it has been saved in an excel file format in the previous period. The acquisition process is as follows: first crawl the corresponding web page address, or request the API interface address, or SQL query the corresponding table structure, convert the returned message into the data frame format through the python pandas package and save it into an excel file.
步骤S103,接收所述服务器返回的针对所述请求数据的响应数据;Step S103: Receive response data for the request data returned by the server;
将请求数据发送给所述服务器后,所述服务器通过所述待测试接口接收所述请求数据,根据所述请求数据中的请求参数值进行运算处理,并将处理结果也 即响应数据返回给所述请求数据发送方。After sending the request data to the server, the server receives the request data through the interface to be tested, performs operation processing according to the request parameter values in the request data, and returns the processing result, that is, the response data, to the server. The request data sender is described.
步骤S104,当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;In step S104, when a test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependency and each identified task, and after the origin log file is processed, it is stored in the interface description database. The origin log file records the process of sending and receiving all data, and the interface description database includes the interface name and its corresponding response data description;
当测试任务发生时,服务调用拦截器按照服务起源数据规范,根据获得的服务动态调用依赖关系和经过标识的每个任务的服务组合生成并输出起源日志文件;其中服务起源数据规范为一个九元组,BasicProv(Token,InvokingService,ServiceInvoked,Location,Elapsedtime,Timestamp,Input,Output,Status);服务起源的数据规范参数含义如下:Token:—个32位的字符串,用于标识一个动态的组合任务,InvokingService:服务调用者,也可以称为服务消费者。数据格式为一个32位的字符串,Servicelnvoked:服务被调用者,也可以称为服务提供者。数据格式为一个32位的字符串。Location:服务调用发生的位置,在云服务环境,主要是IP地址。Elapsed time:服务调用的耗时,该耗时为从服务调用者的视角看,完成一次服务调用所需要的时间,包含了被调用服务的嵌套执行时间。数据格式为一个八位的整型,单位为毫秒。Timestamp:服务调用事件发生的时间戳,格式为年/月/日小时/分钟/秒/毫秒,Input:服务调用的输入参数,数据存储格式为32位的字符串。Output:服务调用的输出数据文件,一般为一个XML对象,或者一个json数据对象。Status:服务执行的状态,数据格式为一个布尔值,1表示成功,0表示失败,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,便于分析测试异常或者故障起源,接口描述数据库中包括接口名称及其对应的响应数据描述,实现了采集的可扩展性。在收集拦截器的信息过程中,为了提供对异构系统的支持,采用拦截器和拦截器管理分离的方式,管理模块负责所有拦截的注册、日志收集和处理,拦截器 负责捕获服务起源并按照规范输出日志,可以根据不同的服务协议设计不同的拦截器,拦截器和管理模块是松耦合关系,拦截器运行的策略和方式通过读取一个XML配置文件实现,该文件由管理模块进行管理和维护,通过更新和修改该文件,拦截器实施不同的抽样策略和执行方式。所有拦截器采用公共标准的数据规范和传输协议。服务调用拦截器拦截服务调用请求时,根据不同的服务调用频率,确定服务调用拦截器的拦截频率。When a test task occurs, the service call interceptor generates and outputs the origin log file according to the service origin data specification, according to the obtained service dynamic invocation dependencies and the identified service combination of each task; the service origin data specification is a nine yuan Group, BasicProv (Token, InvokingService, ServiceInvoked, Location, Elapsedtime, Timestamp, Input, Output, Status); The data specification parameters of the service origin have the following meanings: Token: a 32-bit string used to identify a dynamic combined task , InvokingService: service caller, also known as service consumer. The data format is a 32-bit string. Servicelnvoked: The service callee, which can also be called a service provider. The data format is a 32-bit string. Location: The location where the service call occurred. In the cloud service environment, it is mainly the IP address. Elapsed time: The time taken for the service call. This time is the time required to complete a service call from the perspective of the service caller, including the nested execution time of the called service. The data format is an eight-bit integer type in milliseconds. Timestamp: Timestamp of the service call event, the format is year / month / day hour / minute / second / millisecond, Input: input parameters of the service call, the data storage format is a 32-bit string. Output: The output data file of the service call, usually an XML object or a json data object. Status: The status of the service execution. The data format is a Boolean value. 1 indicates success and 0 indicates failure. The origin log file is generated and output based on the obtained dynamic call dependencies and each identified task, and the origin log file is output. After data processing, it is stored in the interface description database. The origin log file records the process of sending and receiving all data, which is convenient for analyzing the origin of the test exception or fault. The interface description database includes the interface name and its corresponding response data description. The scalability of acquisition. In the process of collecting interceptor information, in order to provide support for heterogeneous systems, the interceptor and interceptor management are separated. The management module is responsible for all interception registration, log collection, and processing. The interceptor is responsible for capturing the origin of the service and Standard output log. Different interceptors can be designed according to different service protocols. The interceptor and management module are loosely coupled. The strategy and method of interceptor operation is achieved by reading an XML configuration file, which is managed and managed by the management module. Maintenance. By updating and modifying this file, the interceptor implements different sampling strategies and execution methods. All interceptors use common standard data specifications and transmission protocols. When a service call interceptor intercepts a service call request, the interception frequency of the service call interceptor is determined according to different service call frequencies.
步骤S105,调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。In step S105, the business logic is invoked to verify the received response data and return the verification result to generate an interface test report.
将异常数据生成工具生成的异常数据作为业务代码的输入,正常调用业务代码执行并返回结果。通过查询数据库记录,将返回结果与有关记录进行匹配,若匹配成功,则此次测试成功,本次测试验证为通过(pass),若匹配失败,则此次测试失败,验证为失败(fail)。对于匹配结果何为成功,何为失败,根据每个业务不同,有不同的判断,以具体的业务逻辑为准。业务代码是指测试用例中要执行的业务逻辑,比如测试爬虫返回为空,测试爬虫返回用户名错误。执行完业务代码后的返回即为返回结果。The abnormal data generated by the abnormal data generating tool is used as the input of the business code, and the business code is normally called for execution and the result is returned. By querying the database records, the returned results are matched with the relevant records. If the match is successful, the test is successful. The test is verified as a pass. If the match fails, the test is failed and the verification is a fail. . There are different judgments on what the matching result is success and failure, and the specific business logic shall prevail. The business code refers to the business logic to be executed in the test case. For example, the test crawler returns null, and the test crawler returns a user name error. The return after executing the business code is the return result.
如图2所示,在其中一个实施例中,所述当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中包括:As shown in FIG. 2, in one embodiment, when a test task occurs, the source log file is generated and output according to the combination of the obtained dynamic invocation dependency and each identified task, and the origin log file is processed. After the data is processed, it is stored in the interface description database including:
步骤S201,根据服务框架和调用协议设计调用拦截器;Step S201: design a call interceptor according to the service framework and the call protocol;
调用拦截器的设计包括,创建用于存储服务起源信息的文件,调用者产生一个唯一的Token值,作为识别服务动态依赖的标志,创建用于读取并存储调用开始时间的参量,创建用于读取和存储当前的IP地址的参量,创建用于存储所调用的任务名称的参量,创建用于存储所调用的任务的入口参数的参量,上述参量、文件和Token值共同构成调用拦截器。唯一Token值根据时间和网卡产生。The design of the call interceptor includes creating a file for storing the origin information of the service. The caller generates a unique token value, which is used to identify the dynamic dependency of the service. It also creates parameters for reading and storing the call start time. Read and store the parameters of the current IP address, create a parameter to store the called task name, and create a parameter to store the entry parameters of the called task. The above parameters, file, and token value together constitute the call interceptor. The unique token value is generated based on time and network card.
步骤S202,将调用拦截器内置在调用协议中;Step S202, the call interceptor is built into the call protocol;
将服务调用拦截器内置在服务调用协议中,当服务调用发生时,服务调用拦截器拦截服务调用请求,获得动态调用依赖关系,并标识每个任务的组合。The service call interceptor is built into the service call protocol. When a service call occurs, the service call interceptor intercepts the service call request, obtains the dynamic call dependency, and identifies the combination of each task.
步骤S203,当调用发生时,调用拦截器拦截调用请求,获得动态调用依赖关系,并标识每个任务的组合;Step S203: When the call occurs, the call interceptor intercepts the call request, obtains the dynamic call dependency, and identifies the combination of each task;
服务调用拦截器按照服务起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件;其中服务起源数据规范为一个九元组,BasicProv(Token,InvokingService,ServiceInvoked,Location,Elapsed time,Timestamp,Input,Output,,其中Token为一个32位的字符串,用于标识一个动态的组合任务,Invoking Service为服务调用者,也称为服务消费者,其数据格式为一个32位的字符串,Service Invoked为服务被调用者,也称为服务提供者,其数据格式为一个32位的字符串,Location为服务调用发生的位置,在云服务环境,为IP地址。Elapsed time为服务调用的耗时,该耗时为从服务调用者的视角看,完成一次服务调用所需要的时间,包含了被调用服务的嵌套执行时间,其数据格式为一个8位的整型;[0022]Timestamp为服务调用事件发生的时间戳,Input为服务调用的输入参数,数据存储格式为32位的字符串,Output为服务调用的输出数据文件,为一个XML对象,或者一个json数据对象,Status为服务执行的状态,数据格式为一个布尔值,1表示成功,0表示失败。The service call interceptor generates and outputs the origin log file according to the service origin data specification, according to the obtained dynamic invocation dependency and each identified task; the service origin data specification is a nine-tuple, BasicProv (Token, InvokingService, ServiceInvoked, Location, Elapsed time, Timestamp, Input, Output, where Token is a 32-bit string used to identify a dynamic combined task, Invoking Service is a service caller, also known as a service consumer, and its data format Is a 32-bit string, Service Invoked is the service callee, also known as the service provider, its data format is a 32-bit string, Location is the location where the service call occurs, and in the cloud service environment, it is the IP address Elapsed time is the time taken by the service call, which is the time required to complete a service call from the perspective of the service caller, including the nested execution time of the called service, and its data format is an 8-bit Integer; [0022] Timestamp is the timestamp of the service call event, Input is the input of the service call Input parameters, the data storage format is a 32-bit string, Output is the output data file of the service call, an XML object, or a json data object, Status is the status of the service execution, the data format is a Boolean value, 1 means success , 0 means failure.
步骤S204,调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件;In step S204, the call interceptor generates and outputs the origin log file according to the combination of the originating data specification and the obtained dynamic invocation dependency and each identified task;
将调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件。读取服务起源日志记录,检查是否符合当前的服务起源数据规范,用户可以根据需要设置服务起源数据的规范要求,例如,当不需要分布式debug的时候,可以不拦截服务的输入和输出,在进行格式检查的时候不检查相关信息。The call interceptor will generate and output the origin log file according to the origin data specification, according to the combination of the obtained dynamic invocation dependencies and each identified task. Read the service origin log records and check whether it conforms to the current service origin data specifications. Users can set the service origin data specifications as required. For example, when distributed debugging is not required, the service input and output may not be intercepted. The related information is not checked when the format check is performed.
步骤S205,将起源日志文件进行数据处理后,存储在接口描述数据库中。Step S205: After the origin log file is processed, it is stored in the interface description database.
将起源日志文件进行数据处理后,存储在接口描述数据库中,服务起源日志存储到服务所在的本地服务器上,通过日志采集工具,实现数据的读取、传输和插入数据库。After the origin log file is processed, it is stored in the interface description database, and the service origin log is stored on the local server where the service is located. Through the log collection tool, data is read, transmitted, and inserted into the database.
在其中一个实施例中,所述调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告包括:In one embodiment, the invoking business logic verifies the received response data and returns a verification result, and generating an interface test report includes:
根据所述验证结果生成针对所述待测试接口的接口测试报告,并建立该接口测试报告与该待测试接口的接口名称的关联关系,所述接口测试报告包括已验证的待测试接口的请求数据、验证结果、验证结果状态和验证结果失败原因分析中的一种或多种,所述验证结果状态包括成功和失败。Generating an interface test report for the interface to be tested according to the verification result, and establishing an association relationship between the interface test report and the interface name of the interface to be tested, the interface test report including request data of the verified interface to be tested One or more of verification result, verification result status, and verification result failure cause analysis, the verification result status includes success and failure.
在其中一个实施例中,对起源日志文件进行数据处理包括:检查起源日志文件中起源数据信息的完整性,丢弃不符合要求的数据,然后把符合要求的起源数据信息规范化,然后插入数据库,将起源日志文件汇聚和存储于接口描述数据库。In one embodiment, performing data processing on the origin log file includes: checking the integrity of the origin data information in the origin log file, discarding the data that does not meet the requirements, and then normalizing the origin data information that meets the requirements, then inserting it into the database, The origin log files are aggregated and stored in the interface description database.
检查起源日志文件中起源数据信息的完整性,丢弃不符合要求的数据,然后把符合要求的起源数据信息规范化,然后插入数据库,将起源日志文件汇聚和存储于数据库,这种结构实现了采集的可扩展性。Check the integrity of the origin data information in the origin log file, discard the data that does not meet the requirements, then normalize the origin data information that meets the requirements, and then insert it into the database to aggregate and store the origin log files in the database. This structure realizes the collection of Scalability.
在其中一个实施例中,所述接口测试方法还包括:将接收的所述响应数据作为待测试接口的测试数据,建立该接口测试数据与该待测试接口的接口名称的关联关系。In one embodiment, the interface test method further includes: using the received response data as test data of an interface to be tested, and establishing an association relationship between the interface test data and an interface name of the interface to be tested.
将接收的响应数据作为待测试接口的测试数据,建立该接口测试数据与该待测试接口的接口名称的关联关系。接口是指同一系统不同功能层之间的通信规则,以服务的方式对外提供一个接口,在端到端的接口系统中,保证前后端进行交互的接口的质量和稳定显得尤为重要,而接口的质量和稳定性在接口开发过程中是通过接口测试来验证的。The received response data is used as the test data of the interface to be tested, and the association relationship between the interface test data and the interface name of the interface to be tested is established. Interface refers to the communication rules between different functional layers of the same system, and provides an interface as a service. In an end-to-end interface system, it is particularly important to ensure the quality and stability of the interface that the front and back interact with, and the quality of the interface is particularly important. And stability is verified through interface testing during interface development.
如图3所示,在一个实施例中,一种接口测试系统,所述接口测试系统包括:As shown in FIG. 3, in one embodiment, an interface test system includes:
生成模块,设置为生成针对待测试接口的请求数据;A generating module configured to generate request data for an interface to be tested;
发送模块,设置为将所述请求数据发送给所述待测试接口所在的服务器;A sending module configured to send the request data to a server where the interface to be tested is located;
接收模块,设置为接收所述服务器返回的针对所述请求数据的响应数据;A receiving module configured to receive response data for the request data returned by the server;
调用模块,设置为当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;The calling module is set to generate and output the origin log file according to the combination of the obtained dynamic invocation dependencies and each identified task when the test task occurs, and after the origin log file is processed, it is stored in the interface description database The origin log file records the process of sending and receiving all data, and the interface description database includes an interface name and a corresponding response data description;
验证模块,设置为调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。The verification module is configured to call business logic to verify the received response data and return a verification result to generate an interface test report.
在一个实施例中,所述生成模块包括:正常数据源文件修改单元,设置为调用数据生成工具基于异常数据生成规则修改正常数据源文件,其中,所述异常数据生成规则有三种操作:第一种为更新命令;第二种为删除命令;第三种为复制增加命令。In one embodiment, the generating module includes a normal data source file modification unit configured to call a data generation tool to modify the normal data source file based on the abnormal data generation rule, wherein the abnormal data generation rule has three operations: first One is the update command; the second is the delete command; the third is the copy add command.
如图4所示,在一个实施例中,所述调用模块还包括:As shown in FIG. 4, in an embodiment, the calling module further includes:
设计单元,设置为根据服务框架和调用协议设计调用拦截器;Design unit, set to design the call interceptor according to the service framework and the call protocol;
内置单元,设置为将调用拦截器内置在调用协议中;Built-in unit, set to embed the call interceptor in the calling protocol;
拦截单元,设置为当调用发生时,调用拦截器拦截调用请求,获得动态调用依赖关系,并标识每个任务的组合;The interception unit is set to call the interceptor to intercept the call request when the call occurs, obtain the dynamic call dependency, and identify the combination of each task;
调用单元,设置为使调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件;The calling unit is set to make the call interceptor generate and output the origin log file according to the combination of the dynamic invocation dependency and each identified task according to the origin data specification;
存储单元,设置为将起源日志文件进行数据处理后,存储在接口描述数据库中。The storage unit is configured to store the origin log file in the interface description database after data processing.
在一个实施例中,所述验证模块还设置为根据所述验证结果生成针对所述待测试接口的接口测试报告,并建立该接口测试报告与该待测试接口的接口名称的关联关系,所述接口测试报告包括已验证的待测试接口的请求数据、验证结果、验证结果状态和验证结果失败原因分析中的一种或多种,所述验证结果 状态包括成功和失败。In one embodiment, the verification module is further configured to generate an interface test report for the interface to be tested according to the verification result, and establish an association relationship between the interface test report and the interface name of the interface to be tested. The interface test report includes one or more of the requested data of the verified interface to be tested, the verification result, the status of the verification result, and the analysis of the cause of the failure of the verification result. The status of the verification result includes success and failure.
在一个实施例中,所述调用模块包括:起源日志处理单元,设置为检查起源日志文件中起源数据信息的完整性,丢弃不符合要求的数据,然后把符合要求的起源数据信息规范化,然后插入数据库,将起源日志文件汇聚和存储于接口描述数据库。In one embodiment, the calling module includes: a source log processing unit configured to check the integrity of the source data information in the source log file, discard the data that does not meet the requirements, and then normalize the source data information that meets the requirements, and then insert Database, which aggregates and stores the origin log files in the interface description database.
在一个实施例中,所述验证模块包括:异常数据输入单元,设置为将异常数据生成工具生成的异常数据作为业务代码的输入,正常调用业务代码执行并返回结果;查询匹配单元,设置为通过查询数据库记录,将所述返回结果与查询到的有关记录进行匹配,若匹配成功,则此次测试成功,本次测试验证为通过(pass),若匹配失败,则此次测试失败,验证为失败(fail)。In one embodiment, the verification module includes: an abnormal data input unit configured to take the abnormal data generated by the abnormal data generating tool as input of a business code, and normally call the business code to execute and return the result; and the query matching unit is set to Query the database records and match the returned results with the related records. If the match is successful, the test is successful and the test is passed. If the match fails, the test is failed and the verification is Fail.
在一个实施例中,所述调用模块包括调用拦截器设计单元,所述调用拦截器设计单元包括:起源信息文件创建单元,设置为创建用于存储服务起源信息的文件;Token值生成单元,设置为根据时间和网卡产生一个唯一的Token值,作为识别服务动态依赖的标志;In one embodiment, the calling module includes a call interceptor design unit, and the call interceptor design unit includes: an origin information file creation unit configured to create a file for storing service origin information; a Token value generation unit, set To generate a unique token value based on time and network card, as a sign to identify the dynamic dependency of the service;
调用开始时间参量创建单元,设置为创建用于读取并存储调用开始时间的参量;当前IP地址参量创建单元,设置为创建用于读取和存储当前的IP地址的参量;任务名称参量创建单元,设置为创建用于存储所调用的任务名称的参量;任务入口参数参量创建单元,设置为创建用于存储所调用的任务的入口参数的参量;Call start time parameter creation unit, set to create a parameter to read and store the call start time; current IP address parameter creation unit, set to create a parameter to read and store the current IP address; task name parameter creation unit , Set to create a parameter for storing the called task name; task entry parameter parameter creation unit, set to create a parameter for storing the entry parameter of the called task;
调用拦截器构成单元,设置为根据所述起源信息文件创建单元创建的文件、所述Token值生成单元生成的Token值、所述调用开始时间参量创建单元创建的调用开始时间、所述当前IP地址参量创建单元创建的当前IP地址、所述任务名称参量创建单元创建的任务名称和所述任务入口参数参量创建单元创建的所调用的任务的入口参数,共同构成调用拦截器。The call interceptor constituting unit is set to a file created according to the origin information file creation unit, a Token value generated by the Token value generation unit, a call start time created by the call start time parameter creation unit, and the current IP address The current IP address created by the parameter creation unit, the task name created by the task name parameter creation unit, and the entry parameters of the called task created by the task entry parameter parameter creation unit together constitute a call interceptor.
在一个实施例中,所述调用单元包括:In one embodiment, the calling unit includes:
起源数据规范检查单元,设置为读取服务起源日志记录,检查是否符合当 前的服务起源数据规范;Origin data specification checking unit, which is set to read service origin log records and check whether it conforms to the current service origin data specification;
起源数据规范设置单元,设置为设置服务起源数据的规范要求为当不需要分布式debug的时候,不拦截服务的输入和输出,在进行格式检查的时候不检查相关信息。The origin data specification setting unit is set to set the specification requirements of the service origin data so that when distributed debugging is not required, the input and output of the service are not intercepted, and the relevant information is not checked when the format is checked.
在一个实施例中,所述接口测试系统还包括关联关系建立模块。所述关联关系建立模块设置为将接收的所述响应数据作为待测试接口的测试数据,建立该接口测试数据与该待测试接口的接口名称的关联关系。In one embodiment, the interface test system further includes an association establishing module. The association relationship establishing module is configured to use the received response data as test data of an interface to be tested, and establish an association relationship between the interface test data and an interface name of the interface to be tested.
在一个实施例中,提出了一种计算机设备,所述计算机设备包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述各实施例中的接口测试方法的步骤。In one embodiment, a computer device is provided. The computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor is caused to execute the foregoing embodiments. Steps in the interface test method.
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例中的接口测试方法的步骤。其中,所述存储介质可以为非易失性存储介质。In one embodiment, a storage medium storing computer-readable instructions is provided. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the interfaces in the foregoing embodiments. Steps of the test method. The storage medium may be a non-volatile storage medium.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps in the various methods of the foregoing embodiments may be implemented by a program instructing related hardware. The program may be stored in a computer-readable storage medium. The storage medium may include: Read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks, etc.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the embodiments described above can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments have not been described. However, as long as there is no contradiction in the combination of these technical features, It should be considered as the scope described in this specification.
以上所述实施例仅表达了本申请一些示例性实施例,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express some exemplary embodiments of the present application, and their descriptions are more specific and detailed, but cannot be understood as a limitation on the scope of the patent of the present application. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of this application patent shall be subject to the appended claims.
Claims (20)
- 一种接口测试方法,其中,包括:An interface test method, including:生成针对待测试接口的请求数据;Generate request data for the interface to be tested;将所述请求数据发送给所述待测试接口所在的服务器;Sending the request data to a server where the interface to be tested is located;接收所述服务器返回的针对所述请求数据的响应数据;Receiving response data for the request data returned by the server;当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;When a test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database. The origin log The file records the process of sending and receiving all data. The interface description database includes the interface name and its corresponding response data description.调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。Call the business logic to verify the received response data and return the verification result to generate an interface test report.
- 根据权利要求1所述的接口测试方法,其中,所述生成针对待测试接口的请求数据,包括调用数据生成工具基于异常数据生成规则修改正常数据源文件,其中,所述异常数据生成规则有三种操作:第一种为更新命令;第二种为删除命令;第三种为复制增加命令。The interface test method according to claim 1, wherein the generating request data for an interface to be tested comprises calling a data generation tool to modify a normal data source file based on abnormal data generation rules, wherein there are three types of abnormal data generation rules Operation: the first is the update command; the second is the delete command; the third is the copy increase command.
- 根据权利要求1所述的接口测试方法,其中,所述当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中包括:The interface test method according to claim 1, wherein, when a test task occurs, generating and outputting an origin log file according to a combination of the obtained dynamic invocation dependency and each identified task, and performing the origin log file After the data is processed, it is stored in the interface description database including:根据服务框架和调用协议设计调用拦截器;Design the call interceptor according to the service framework and call protocol;将调用拦截器内置在调用协议中;The call interceptor is built into the call protocol;当调用发生时,调用拦截器拦截调用请求,获得动态调用依赖关系,并标识每个任务的组合;When the call occurs, the call interceptor intercepts the call request, obtains the dynamic call dependencies, and identifies the combination of each task;调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件;The call interceptor generates and outputs the origin log file according to the origin data specification, according to the combination of the obtained dynamic invocation dependencies and each identified task;将起源日志文件进行数据处理后,存储在接口描述数据库中。After the origin log file is processed, it is stored in the interface description database.
- 根据权利要求1所述的接口测试方法,其中,所述调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告包括:The interface test method according to claim 1, wherein the invoking business logic verifies the received response data and returns a verification result, and generating the interface test report comprises:根据所述验证结果生成针对所述待测试接口的接口测试报告,并建立该接口测试报告与该待测试接口的接口名称的关联关系,所述接口测试报告包括已验证的待测试接口的请求数据、验证结果、验证结果状态和验证结果失败原因分析中的一种或多种,所述验证结果状态包括成功和失败。Generating an interface test report for the interface to be tested according to the verification result, and establishing an association relationship between the interface test report and the interface name of the interface to be tested, the interface test report including request data of the verified interface to be tested One or more of verification result, verification result status, and verification result failure cause analysis, the verification result status includes success and failure.
- 根据权利要求1所述的接口测试方法,其中,对起源日志文件进行数据处理包括:检查起源日志文件中起源数据信息的完整性,丢弃不符合要求的数据,然后把符合要求的起源数据信息规范化,然后插入数据库,将起源日志文件汇聚和存储于接口描述数据库。The interface testing method according to claim 1, wherein the data processing on the origin log file comprises: checking the integrity of the origin data information in the origin log file, discarding the data that does not meet the requirements, and then normalizing the origin data information that meets the requirements , Then insert it into the database, aggregate and store the origin log files in the interface description database.
- 根据权利要求1所述的接口测试方法,其中,所述调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告包括:The interface test method according to claim 1, wherein the invoking business logic verifies the received response data and returns a verification result, and generating the interface test report comprises:将异常数据生成工具生成的异常数据作为业务代码的输入,正常调用业务代码执行并返回结果;Use the exception data generated by the exception data generation tool as the input of the business code, call the business code for execution normally and return the result;通过查询数据库记录,将所述返回结果与查询到的有关记录进行匹配,若匹配成功,则此次测试成功,本次测试验证为通过(pass),若匹配失败,则此次测试失败,验证为失败(fail)。By querying the database records, the returned results are matched with the related query records. If the matching is successful, the test is successful, and the test is verified as a pass. If the matching fails, the test is failed and the verification is performed. As fail.
- 根据权利要求1所述的接口测试方法,其中,所述根据服务框架和调用协议设计调用拦截器包括对所述调用拦截器的设计,具体包括:The interface test method according to claim 1, wherein the designing a call interceptor according to a service framework and a call protocol includes designing the call interceptor, and specifically includes:创建用于存储服务起源信息的文件;Create files for storing service origin information;根据时间和网卡产生一个唯一的Token值,作为识别服务动态依赖的标志;Generate a unique Token value based on time and network card, as a sign to identify the dynamic dependency of the service;创建用于读取并存储调用开始时间的参量;Create a parameter to read and store the start time of the call;创建用于读取和存储当前的IP地址的参量;Create parameters for reading and storing the current IP address;创建用于存储所调用的任务名称的参量;Create a parameter to store the name of the called task;创建用于存储所调用的任务的入口参数的参量;Create parameters for storing the entry parameters of the called task;上述参量、文件和Token值共同构成所述调用拦截器。The above parameters, files, and token values together constitute the call interceptor.
- 根据权利要求1所述的接口测试方法,其中,所述调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并 输出起源日志文件,包括:The interface test method according to claim 1, wherein the call interceptor generates and outputs an origin log file according to the origin data specification, according to a combination of the obtained dynamic invocation dependency and each identified task, comprising:读取服务起源日志记录,检查是否符合当前的服务起源数据规范;Read service origin log records and check if they conform to current service origin data specifications;设置服务起源数据的规范要求为当不需要分布式debug的时候,不拦截服务的输入和输出,在进行格式检查的时候不检查相关信息。The specification of setting the service origin data requires that when distributed debugging is not needed, the input and output of the service is not intercepted, and the related information is not checked when the format is checked.
- 根据权利要求1所述的接口测试方法,还包括:将接收的所述响应数据作为待测试接口的测试数据,建立该接口测试数据与该待测试接口的接口名称的关联关系。The interface test method according to claim 1, further comprising: using the received response data as test data of an interface to be tested, and establishing an association relationship between the interface test data and an interface name of the interface to be tested.
- 一种接口测试系统,其中,所述接口测试系统包括:An interface test system, wherein the interface test system includes:生成模块,设置为生成针对待测试接口的请求数据;A generating module configured to generate request data for an interface to be tested;发送模块,设置为将所述请求数据发送给所述待测试接口所在的服务器;A sending module configured to send the request data to a server where the interface to be tested is located;接收模块,设置为接收所述服务器返回的针对所述请求数据的响应数据;A receiving module configured to receive response data for the request data returned by the server;调用模块,设置为当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;The calling module is set to generate and output the origin log file according to the combination of the obtained dynamic invocation dependencies and each identified task when the test task occurs, and after the origin log file is processed, it is stored in the interface description database The origin log file records the process of sending and receiving all data, and the interface description database includes an interface name and a corresponding response data description;验证模块,设置为调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。The verification module is configured to call business logic to verify the received response data and return a verification result to generate an interface test report.
- 根据权利要求10所述的接口测试系统,其中,所述生成模块包括:The interface test system according to claim 10, wherein the generating module comprises:正常数据源文件修改单元,设置为调用数据生成工具基于异常数据生成规则修改正常数据源文件,其中,所述异常数据生成规则有三种操作:第一种为更新命令;第二种为删除命令;第三种为复制增加命令。The normal data source file modification unit is set to call a data generation tool to modify a normal data source file based on abnormal data generation rules, wherein the abnormal data generation rule has three operations: the first is an update command; the second is a delete command; The third is to add commands for replication.
- 根据权利要求10所述的接口测试系统,其中,所述调用模块还包括:The interface test system according to claim 10, wherein the calling module further comprises:设计单元,设置为根据服务框架和调用协议设计调用拦截器;Design unit, set to design the call interceptor according to the service framework and the call protocol;内置单元,设置为将调用拦截器内置在调用协议中;Built-in unit, set to embed the call interceptor in the calling protocol;拦截单元,设置为当调用发生时,调用拦截器拦截调用请求,获得动态调用依赖关系,并标识每个任务的组合;The interception unit is set to call the interceptor to intercept the call request when the call occurs, obtain the dynamic call dependency, and identify the combination of each task;调用单元,设置为使调用拦截器按照起源数据规范,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件;The calling unit is set to make the call interceptor generate and output the origin log file according to the combination of the dynamic invocation dependency and each identified task according to the origin data specification;存储单元,设置为将起源日志文件进行数据处理后,存储在接口描述数据库中。The storage unit is configured to store the origin log file in the interface description database after data processing.
- 根据权利要求10所述的接口测试系统,其中,所述验证模块还设置为根据所述验证结果生成针对所述待测试接口的接口测试报告,并建立该接口测试报告与该待测试接口的接口名称的关联关系,所述接口测试报告包括已验证的待测试接口的请求数据、验证结果、验证结果状态和验证结果失败原因分析中的一种或多种,所述验证结果状态包括成功和失败。The interface test system according to claim 10, wherein the verification module is further configured to generate an interface test report for the interface to be tested according to the verification result, and establish an interface between the interface test report and the interface to be tested Association relationship of names, the interface test report includes one or more of request data, verification results, verification result status, and verification failure cause analysis of the interface to be tested, the verification result status includes success and failure .
- 根据权利要求10所述的接口测试系统,其中,所述调用模块包括:The interface test system according to claim 10, wherein the calling module comprises:起源日志处理单元,设置为检查起源日志文件中起源数据信息的完整性,丢弃不符合要求的数据,然后把符合要求的起源数据信息规范化,然后插入数据库,将起源日志文件汇聚和存储于接口描述数据库。The origin log processing unit is configured to check the integrity of the origin data information in the origin log file, discard the data that does not meet the requirements, then normalize the origin data information that meets the requirements, and then insert it into the database to aggregate and store the origin log files in the interface description database.
- 根据权利要求10所述的接口测试系统,其中,所述验证模块包括:The interface test system according to claim 10, wherein the verification module comprises:异常数据输入单元,设置为将异常数据生成工具生成的异常数据作为业务代码的输入,正常调用业务代码执行并返回结果;The abnormal data input unit is set to use the abnormal data generated by the abnormal data generating tool as input of the business code, and normally call the business code to execute and return the result;查询匹配单元,设置为通过查询数据库记录,将所述返回结果与查询到的有关记录进行匹配,若匹配成功,则此次测试成功,本次测试验证为通过(pass),若匹配失败,则此次测试失败,验证为失败(fail)。The query matching unit is configured to query the database records and match the returned result with the related query records. If the matching is successful, the test is successful, and the test is verified to pass. If the matching fails, then This test failed, and the verification was failed.
- 根据权利要求10所述的接口测试系统,其中,所述调用模块包括调用拦截器设计单元,所述调用拦截器设计单元包括:The interface test system according to claim 10, wherein the calling module comprises a call interceptor design unit, and the call interceptor design unit comprises:起源信息文件创建单元,设置为创建用于存储服务起源信息的文件;Origin information file creation unit, set to create a file for storing service origin information;Token值生成单元,设置为根据时间和网卡产生一个唯一的Token值,作为识别服务动态依赖的标志;Token value generation unit, set to generate a unique Token value according to time and network card, as a sign to identify the dynamic dependency of the service;调用开始时间参量创建单元,设置为创建用于读取并存储调用开始时间的参量;Call start time parameter creation unit, set to create a parameter for reading and storing the call start time;当前IP地址参量创建单元,设置为创建用于读取和存储当前的IP地址的参量;The current IP address parameter creation unit is set to create parameters for reading and storing the current IP address;任务名称参量创建单元,设置为创建用于存储所调用的任务名称的参量;Task name parameter creation unit, set to create a parameter for storing the called task name;任务入口参数参量创建单元,设置为创建用于存储所调用的任务的入口参数的参量;Task entry parameter parameter creation unit, which is set to create a parameter for storing entry parameters of the called task;调用拦截器构成单元,设置为根据所述起源信息文件创建单元创建的文件、所述Token值生成单元生成的Token值、所述调用开始时间参量创建单元创建的调用开始时间、所述当前IP地址参量创建单元创建的当前IP地址、所述任务名称参量创建单元创建的任务名称和所述任务入口参数参量创建单元创建的所调用的任务的入口参数,共同构成调用拦截器。The call interceptor constituting unit is set to a file created according to the origin information file creation unit, a Token value generated by the Token value generation unit, a call start time created by the call start time parameter creation unit, and the current IP address The current IP address created by the parameter creation unit, the task name created by the task name parameter creation unit, and the entry parameters of the called task created by the task entry parameter parameter creation unit together constitute a call interceptor.
- 根据权利要求10所述的接口测试系统,其中,所述调用单元包括:The interface test system according to claim 10, wherein the calling unit comprises:起源数据规范检查单元,设置为读取服务起源日志记录,检查是否符合当前的服务起源数据规范;Origin data specification checking unit, which is set to read service origin log records and check whether it conforms to the current service origin data specification;起源数据规范设置单元,设置为设置服务起源数据的规范要求为当不需要分布式debug的时候,不拦截服务的输入和输出,在进行格式检查的时候不检查相关信息。The origin data specification setting unit is set to set the specification requirements of the service origin data so that when distributed debugging is not required, the input and output of the service are not intercepted, and the relevant information is not checked when the format is checked.
- 根据权利要求10所述的接口测试系统,其中,还包括关联关系建立模块,设置为将接收的所述响应数据作为待测试接口的测试数据,建立该接口测试数据与该待测试接口的接口名称的关联关系。The interface test system according to claim 10, further comprising an association establishing module configured to use the received response data as test data of an interface to be tested, and establish an interface name of the interface test data and the interface to be tested Relationship.
- 一种计算机设备,其中,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor causes the processor to perform the following steps:生成针对待测试接口的请求数据;Generate request data for the interface to be tested;将所述请求数据发送给所述待测试接口所在的服务器;Sending the request data to a server where the interface to be tested is located;接收所述服务器返回的针对所述请求数据的响应数据;Receiving response data for the request data returned by the server;当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务 的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;When a test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database. The origin log The file records the process of sending and receiving all data. The interface description database includes the interface name and its corresponding response data description.调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。Call the business logic to verify the received response data and return the verification result to generate an interface test report.
- 一种存储有计算机可读指令的存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:生成针对待测试接口的请求数据;Generate request data for the interface to be tested;将所述请求数据发送给所述待测试接口所在的服务器;Sending the request data to a server where the interface to be tested is located;接收所述服务器返回的针对所述请求数据的响应数据;Receiving response data for the request data returned by the server;当测试任务发生时,根据获得的动态调用依赖关系和经过标识的每个任务的组合生成并输出起源日志文件,并将起源日志文件进行数据处理后,存储在接口描述数据库中,所述起源日志文件记录所有数据发送、接收的过程,所述接口描述数据库中包括接口名称及其对应的响应数据描述;When a test task occurs, the origin log file is generated and output according to the combination of the obtained dynamic invocation dependencies and each identified task, and after the origin log file is processed, it is stored in the interface description database. The origin log The file records the process of sending and receiving all data. The interface description database includes the interface name and its corresponding response data description.调用业务逻辑对接收的所述响应数据进行验证并返回验证结果,生成接口测试报告。Call the business logic to verify the received response data and return the verification result to generate an interface test report.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810893803.2 | 2018-08-08 | ||
CN201810893803.2A CN109298997A (en) | 2018-08-08 | 2018-08-08 | Interface test method, system, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020029375A1 true WO2020029375A1 (en) | 2020-02-13 |
Family
ID=65172802
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/106403 WO2020029375A1 (en) | 2018-08-08 | 2018-09-19 | Interface testing method and system, and computer device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109298997A (en) |
WO (1) | WO2020029375A1 (en) |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110096395A (en) * | 2019-03-12 | 2019-08-06 | 深圳壹账通智能科技有限公司 | Interface joint debugging test method, device, computer equipment and storage medium |
CN110096437A (en) * | 2019-04-12 | 2019-08-06 | 平安普惠企业管理有限公司 | The test method and Related product of micro services framework |
CN110609781A (en) * | 2019-08-29 | 2019-12-24 | 凡普数字技术有限公司 | Interface test method, device and storage medium |
CN110704218B (en) * | 2019-08-30 | 2023-03-10 | 深圳壹账通智能科技有限公司 | Data processing method, data processing device, computer equipment and storage medium |
CN110730107B (en) * | 2019-09-02 | 2022-07-12 | 深圳壹账通智能科技有限公司 | Test data generation method and device, computer equipment and storage medium |
CN110888805A (en) * | 2019-11-11 | 2020-03-17 | 北京仁科互动网络技术有限公司 | RESTful API playback test method and system |
CN111858296B (en) * | 2019-12-31 | 2024-06-25 | 北京嘀嘀无限科技发展有限公司 | Interface testing method, device, equipment and storage medium |
CN111209202A (en) * | 2020-01-06 | 2020-05-29 | 北京字节跳动网络技术有限公司 | Terminal application testing method and device |
CN113297157B (en) * | 2020-02-24 | 2024-06-07 | 长鑫存储技术有限公司 | Machine file processing method and processing system |
CN111556080A (en) * | 2020-05-18 | 2020-08-18 | 网易(杭州)网络有限公司 | Network node monitoring method, device, medium and electronic equipment |
CN111796978B (en) * | 2020-06-29 | 2021-06-29 | 苏州好玩友网络科技有限公司 | Interface detection method, device, system, equipment and storage medium |
CN111881020B (en) * | 2020-07-07 | 2024-04-09 | 上海中通吉网络技术有限公司 | Payment center interface testing method, device and system |
CN112286797B (en) * | 2020-09-29 | 2024-05-03 | 长沙市到家悠享网络科技有限公司 | Service monitoring method and device, electronic equipment and storage medium |
CN113760719A (en) * | 2020-11-25 | 2021-12-07 | 北京京东振世信息技术有限公司 | Interface testing method and tool |
CN112506807B (en) * | 2021-02-07 | 2021-05-11 | 上海洋漪信息技术有限公司 | Automatic test system for interface serving multiple systems |
CN113268421A (en) * | 2021-05-21 | 2021-08-17 | 中国联合网络通信集团有限公司 | Service call processing method, device, server and storage medium |
CN113392004A (en) * | 2021-06-15 | 2021-09-14 | 中国工商银行股份有限公司 | Interface verification method, device, equipment, medium and program product |
CN114253788B (en) * | 2021-11-03 | 2023-04-28 | 北京云宽志业网络技术有限公司 | Interface verification method and device, storage medium and electronic equipment |
CN113835419B (en) * | 2021-11-29 | 2022-02-25 | 湖南中车时代通信信号有限公司 | Test method and system of train control equipment and storage medium |
CN114328195A (en) * | 2021-12-15 | 2022-04-12 | 深圳前海环融联易信息科技服务有限公司 | Method for rapidly counting interface defect rate and estimating development quality |
CN114666258B (en) * | 2022-03-22 | 2023-11-07 | 阿波罗智联(北京)科技有限公司 | Interface testing method, device, electronic equipment and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050234680A1 (en) * | 2004-04-14 | 2005-10-20 | International Business Machines Corporation | Simplified and optimized process for application user interface testing and validation |
CN102957553A (en) * | 2011-08-25 | 2013-03-06 | 中兴通讯股份有限公司 | Method and device for automatic generation of excitation codes |
CN102981947A (en) * | 2011-09-07 | 2013-03-20 | 阿里巴巴集团控股有限公司 | Data preparation method in test and system provided with the same |
CN106155891A (en) * | 2015-04-02 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Interface test method, interface description data library generating method and device |
CN107171897A (en) * | 2017-07-14 | 2017-09-15 | 上海瀚银信息技术有限公司 | A kind of interface test method and data-interface test system |
CN107301122A (en) * | 2017-05-10 | 2017-10-27 | 深圳市小牛在线互联网信息咨询有限公司 | interface test method, device, storage medium and computer equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090156198A1 (en) * | 2007-12-14 | 2009-06-18 | Ching-Hao Lee | Method for evaluating mobile communication device utilizing field test logs and system thereof |
CN104092755B (en) * | 2014-07-07 | 2017-06-13 | 武汉科技大学 | A kind of method and device for capturing of cloud service origination data |
CN107276842B (en) * | 2017-05-10 | 2020-10-09 | 北京金山安全软件有限公司 | Interface test method and device and electronic equipment |
-
2018
- 2018-08-08 CN CN201810893803.2A patent/CN109298997A/en active Pending
- 2018-09-19 WO PCT/CN2018/106403 patent/WO2020029375A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050234680A1 (en) * | 2004-04-14 | 2005-10-20 | International Business Machines Corporation | Simplified and optimized process for application user interface testing and validation |
CN102957553A (en) * | 2011-08-25 | 2013-03-06 | 中兴通讯股份有限公司 | Method and device for automatic generation of excitation codes |
CN102981947A (en) * | 2011-09-07 | 2013-03-20 | 阿里巴巴集团控股有限公司 | Data preparation method in test and system provided with the same |
CN106155891A (en) * | 2015-04-02 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Interface test method, interface description data library generating method and device |
CN107301122A (en) * | 2017-05-10 | 2017-10-27 | 深圳市小牛在线互联网信息咨询有限公司 | interface test method, device, storage medium and computer equipment |
CN107171897A (en) * | 2017-07-14 | 2017-09-15 | 上海瀚银信息技术有限公司 | A kind of interface test method and data-interface test system |
Also Published As
Publication number | Publication date |
---|---|
CN109298997A (en) | 2019-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020029375A1 (en) | Interface testing method and system, and computer device and storage medium | |
CN108427631B (en) | Application test system, method, electronic equipment and readable storage medium | |
US9632906B2 (en) | Automated software system validity testing | |
US9836388B1 (en) | Software testing environment that includes a duplicating proxy service | |
CN107241315B (en) | Access method and device of bank gateway interface and computer readable storage medium | |
CN108509392B (en) | Multi-mechanism account checking method, system, computer equipment and storage medium | |
US10824549B1 (en) | System and method for regression testing of an application programming interface | |
CN111737140A (en) | Interface automation test method, device, equipment and computer readable storage medium | |
WO2021133603A1 (en) | Unit testing of components of dataflow graphs | |
US8079017B2 (en) | Automated QS interface testing framework | |
CN113315750B (en) | Kafka message issuing method, device and storage medium | |
CN114168190A (en) | Interface document generation method and device, computer equipment and storage medium | |
CN114979103A (en) | Open API integration and management method and computer equipment | |
CN113391935B (en) | Method and device for realizing dynamic configuration type WebService interface service | |
US10873628B2 (en) | System and method for non-intrusive context correlation across cloud services | |
US9374437B2 (en) | Schema validation proxy | |
CN113553250A (en) | Code testing method and device | |
WO2023125755A1 (en) | Service request processing method and apparatus based on large-scale cluster, and device and medium | |
US11582345B2 (en) | Context data management interface for contact center | |
CN115858466A (en) | Operation log generation method, device, equipment and medium | |
CN110727475B (en) | Intelligent service calling method based on configuration | |
CN113965489B (en) | Link timeout detection method, device, computer equipment and storage medium | |
US20240256435A1 (en) | Method and system for testing compatibility of api specifications | |
CN111367867B (en) | Log information processing method and device, electronic equipment and storage medium | |
Widmer et al. | Byzantine-fault tolerant algorithms in DistAlgo |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18929742 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18929742 Country of ref document: EP Kind code of ref document: A1 |