Movatterモバイル変換


[0]ホーム

URL:


CN110347604A - Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing - Google Patents

Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing
Download PDF

Info

Publication number
CN110347604A
CN110347604ACN201910628102.0ACN201910628102ACN110347604ACN 110347604 ACN110347604 ACN 110347604ACN 201910628102 ACN201910628102 ACN 201910628102ACN 110347604 ACN110347604 ACN 110347604A
Authority
CN
China
Prior art keywords
test
tested
programming interface
application programming
interface
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.)
Pending
Application number
CN201910628102.0A
Other languages
Chinese (zh)
Inventor
孙建建
林瑶
刘思琦
康熙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBCfiledCriticalIndustrial and Commercial Bank of China Ltd ICBC
Priority to CN201910628102.0ApriorityCriticalpatent/CN110347604A/en
Publication of CN110347604ApublicationCriticalpatent/CN110347604A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开提供了一种应用程序编程接口测试设备,包括:测试指令生成装置,用于根据待测试程序编程接口的测试参数和与待测试程序编程接口对应的测试案例模板生成测试指令;应用程序编程接口管理装置,用于根据测试指令确定待测试程序编程接口是否满足测试条件;以及测试指令处理装置,用于在确定待测试程序编程接口满足测试条件的情况下,根据测试指令生成测试报告。本公开还提供了一种应用程序编程接口测试方法、一种电子设备和一种计算机可读存储介质。

The present disclosure provides an application programming interface testing device, including: a test instruction generating device, which is used to generate test instructions according to test parameters of the program programming interface to be tested and a test case template corresponding to the program programming interface to be tested; The interface management device is used to determine whether the programming interface of the program to be tested satisfies the test condition according to the test instruction; and the test instruction processing device is used to generate a test report according to the test instruction when it is determined that the programming interface of the program to be tested meets the test condition. The present disclosure also provides an application programming interface testing method, an electronic device and a computer-readable storage medium.

Description

Translated fromChinese
编程接口测试方法及设备、电子设备和可读存储介质Programming interface testing method and device, electronic device and readable storage medium

技术领域technical field

本公开涉及计算机技术领域,更具体地,涉及一种应用程序编程接口测试设备、一种应用程序编程接口测试方法、一种电子设备和一种计算机可读存储介质。The present disclosure relates to the field of computer technology, and more specifically, to an application programming interface testing device, an application programming interface testing method, an electronic device, and a computer-readable storage medium.

背景技术Background technique

随着互联网技术的不断发展,基于互联网的应用越来越普及。例如,越来越多的互联网企业将自身的软件生态系统(Software Ecosystem System,简称SES系统)以接口资源(Interface Resource,简称IR)的形式开放给第三方或者合作方调用。通过开放互联网企业的应用程序接口(Application Programming Interface,简称API接口),不仅提高了软件定制化程度,而且由于大量第三方开发者的加入,促进了互联网企业的SES系统的繁荣。With the continuous development of Internet technology, Internet-based applications are becoming more and more popular. For example, more and more Internet companies open their own software ecosystem (Software Ecosystem System, referred to as SES system) in the form of interface resources (Interface Resource, referred to as IR) to third parties or partners for calling. Opening the application programming interface (Application Programming Interface, API interface for short) of Internet enterprises not only improves the degree of software customization, but also promotes the prosperity of SES systems of Internet enterprises due to the participation of a large number of third-party developers.

在相关技术中,为了提升API接口服务规范化,提高API接口调用效率,目前一般通过API接口管理平台(API Platform,简称APIP)将不同软件生态系统的API接口进行统一管理。但是,针对新增API接口的测试,目前行业内普遍采用全流程测试,即每新增一个API接口,都需要API接口调用方(API Interface Cells)、API接口服务方(APIInterfaceServer)和API接口管理平台三方协同进行联调测试,例如,打车软件“滴滴”在进行接口测试时,作为API接口调用方需要请求API接口服务方“百度地图”提供地图应用的接口服务。In related technologies, in order to improve the standardization of API interface services and improve the efficiency of API interface calls, API interfaces of different software ecosystems are generally managed in a unified manner through an API interface management platform (API Platform, APIP for short). However, for the testing of new API interfaces, the industry generally adopts full-process testing at present, that is, each new API interface requires API interface callers (API Interface Cells), API interface server (APIInterfaceServer) and API interface management The three parties on the platform collaborate to conduct joint debugging tests. For example, when the taxi-hailing software "Didi" is conducting interface testing, as an API interface caller, it needs to request the API interface service provider "Baidu Maps" to provide interface services for map applications.

发明人在实现本公开的过程中发现,由于API接口调用方(API InterfaceCells)、API接口服务方(API Interface Server)和API接口管理平台分别属于不同的体系,依赖API接口调用方、API接口服务方和API接口管理平台三方协同对API接口进行联合测试,不仅沟通成本高,而且调用API接口服务方时,会消耗API接口服务方的资源,影响API接口服务方自身系统的稳定性。The inventor found in the process of realizing the present disclosure that since the API interface caller (API InterfaceCells), the API interface server (API Interface Server) and the API interface management platform belong to different systems respectively, relying on the API interface caller, API interface service The third party and the API interface management platform jointly test the API interface, not only the communication cost is high, but also when the API interface server is called, the resources of the API interface server will be consumed, and the stability of the API interface server's own system will be affected.

发明内容Contents of the invention

有鉴于此,本公开提供了一种应用程序编程接口测试设备、一种应用程序编程接口测试方法、一种电子设备和一种计算机可读存储介质。In view of this, the present disclosure provides an application programming interface testing device, an application programming interface testing method, an electronic device and a computer-readable storage medium.

本公开的一个方面提供了一种应用程序编程接口测试设备,包括测试指令生成装置,用于根据待测试程序编程接口的测试参数和与上述待测试程序编程接口对应的测试案例模板生成测试指令;应用程序编程接口管理装置,用于根据上述测试指令确定上述待测试程序编程接口是否满足测试条件;以及测试指令处理装置,用于在确定上述待测试程序编程接口满足测试条件的情况下,根据上述测试指令生成测试报告。One aspect of the present disclosure provides an application programming interface testing device, including a test instruction generating device for generating test instructions according to test parameters of the program programming interface to be tested and a test case template corresponding to the above-mentioned program programming interface to be tested; The application programming interface management device is used to determine whether the above-mentioned program programming interface to be tested satisfies the test condition according to the above-mentioned test instruction; and the test instruction processing device is used to determine whether the above-mentioned program programming interface to be tested meets the test condition. The test command generates a test report.

根据本公开的实施例,上述测试指令生成装置包括:模板匹配模块,用于根据上述待测试程序编程接口的接口信息,从多个测试模板中匹配出与上述待测试程序编程接口对应的测试案例模板;以及数据库,用于存储上述待测试程序编程接口的测试参数。According to an embodiment of the present disclosure, the above-mentioned test instruction generation device includes: a template matching module, configured to match a test case corresponding to the above-mentioned program programming interface to be tested from a plurality of test templates according to the interface information of the program programming interface to be tested a template; and a database for storing the test parameters of the programming interface of the program to be tested.

根据本公开的实施例,上述测试指令生成装置还包括:测试案例生成模块,用于根据上述测试参数和与上述上述测试案例模板生成测试指令;发报通信模块,用于根据上述测试指令生成请求报文,并向上述应用程序编程接口管理装置发送上述请求报文,以使得上述应用程序编程接口管理装置根据上述请求报文确定上述待测试程序编程接口是否满足测试条件。According to an embodiment of the present disclosure, the above-mentioned test instruction generation device further includes: a test case generation module for generating test instructions according to the above-mentioned test parameters and the above-mentioned test case template; a sending and communication module for generating a request according to the above-mentioned test instructions message, and send the above-mentioned request message to the above-mentioned application programming interface management device, so that the above-mentioned application programming interface management device determines whether the above-mentioned program programming interface to be tested meets the test conditions according to the above-mentioned request message.

根据本公开的实施例,上述应用程序编程接口管理装置包括:网关模块,用于根据上述发报通信模块发送的请求报文确定上述待测试程序编程接口是否满足测试条件。According to an embodiment of the present disclosure, the above-mentioned application programming interface management device includes: a gateway module, configured to determine whether the above-mentioned program programming interface to be tested satisfies a test condition according to the request message sent by the sending communication module.

根据本公开的实施例,上述网关模块根据上述请求报文确定上述待测试程序编程接口是否满足测试条件包括以下至少之一:根据上述请求报文对上述待测试程序编程接口的调用方身份进行验证;根据上述请求报文对上述待测试程序编程接口的调用方权限进行验证;根据上述请求报文确定上述待测试程序编程接口是否满足接口限流控制条件。According to an embodiment of the present disclosure, the gateway module determines whether the program programming interface to be tested meets the test conditions according to the request message, including at least one of the following: verifying the identity of the caller of the program programming interface to be tested according to the request message ; Verify the caller authority of the programming interface of the program to be tested according to the request message; determine whether the programming interface of the program to be tested satisfies the interface current limiting control condition according to the request message.

根据本公开的实施例,上述应用程序编程接口管理装置还包括应用程序编程接口注册模块,用于根据上述接口信息对上述待测试程序编程接口进行注册和/或对上述应用程序编程接口服务方进行注册。According to an embodiment of the present disclosure, the above-mentioned application programming interface management device further includes an application programming interface registration module, configured to register the above-mentioned program programming interface to be tested according to the above-mentioned interface information and/or register the above-mentioned application programming interface server register.

根据本公开的实施例,上述应用程序编程接口管理装置还包括数据存储模块,用于记录以下信息中的至少一个:应用程序编程接口调用方信息、应用程序编程接口服务方信息、应用程序编程接口调用方和应用程序编程接口服务方之间的关联信息、测试案例、测试记录信息。According to an embodiment of the present disclosure, the above-mentioned application programming interface management device further includes a data storage module for recording at least one of the following information: application programming interface caller information, application programming interface server information, application programming interface Correlation information, test cases, and test record information between the caller and the application programming interface server.

根据本公开的实施例,上述测试指令处理装置包括:收报通信模块,用于在确定上述待测试程序编程接口满足测试条件的情况下,接收基于上述请求报文生成的业务报文,并对上述业务报文进行解析得到业务参数信息;参数校验模块,用于对上述业务参数进行校验,验证上述业务参数的合法性;接口逻辑处理模块,用于在验证上述业务参数合法的情况下,按照业务逻辑对上述请求报文进行响应;以及生成报告模块,用于根据上述参数校验模块和上述接口逻辑处理模块的输出结果生成测试报告。According to an embodiment of the present disclosure, the above-mentioned test instruction processing device includes: a report receiving communication module, configured to receive a service message generated based on the above-mentioned request message when it is determined that the above-mentioned programming interface of the program to be tested satisfies the test conditions, and send the above-mentioned The business message is parsed to obtain business parameter information; the parameter verification module is used to verify the above business parameters and verify the legitimacy of the above business parameters; the interface logic processing module is used to verify that the above business parameters are legal, Respond to the above request message according to the business logic; and generate a report module for generating a test report according to the output results of the above parameter verification module and the above interface logic processing module.

本公开的另一个方面提供了一种应用程序编程接口测试方法,包括:测试指令生成装置根据待测试程序编程接口的测试参数和与上述待测试程序编程接口对应的测试案例模板生成测试指令;应用程序编程接口管理装置根据上述测试指令确定上述待测试程序编程接口是否满足测试条件;以及测试指令处理装置在确定上述待测试程序编程接口满足测试条件的情况下,根据上述测试指令生成测试报告。Another aspect of the present disclosure provides a method for testing an application programming interface, including: a test instruction generating device generates a test instruction according to test parameters of the programming interface to be tested and a test case template corresponding to the programming interface to be tested; The program programming interface management device determines whether the program programming interface to be tested meets the test condition according to the test instruction; and the test instruction processing device generates a test report according to the test command when determining that the program programming interface to be tested meets the test condition.

本公开的另一个方面提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个指令,其中,当上述一个或多个指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上所述的方法。Another aspect of the present disclosure provides an electronic device, including: one or more processors; a memory for storing one or more instructions, wherein, when the above one or more instructions are processed by the one or more When executed by a processor, the one or more processors implement the method as described above.

本公开的另一个方面提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器实现如上所述的方法。Another aspect of the present disclosure provides a computer-readable storage medium, on which executable instructions are stored, and the instructions, when executed by a processor, cause the processor to implement the method as described above.

本公开的另一方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer program comprising computer-executable instructions for implementing the method as described above when executed.

根据本公开的实施例,通过测试指令生成装置模拟API接口调用方,向应用程序编程接口管理装置发送用于请求API接口服务的测试指令,使用独立的测试指令处理装置模拟API接口服务方,提供API接口服务,无需依赖API接口调用方、API接口服务方和API接口管理平台三方协同对API接口进行联合测试,所以至少部分地克服了相关技术中接口测试沟通成本高,会消耗API接口服务方的资源,影响API接口服务方自身系统的稳定性的技术问题,进而达到了提高测试效率,提高API接口服务方的自身系统稳定性的技术效果。According to an embodiment of the present disclosure, the API interface caller is simulated by the test instruction generation device, and the test instruction for requesting the API interface service is sent to the application programming interface management device, and the API interface service party is simulated by an independent test instruction processing device, providing API interface service does not need to rely on the API interface caller, API interface server and API interface management platform to jointly test the API interface, so it at least partially overcomes the high communication cost of interface testing in related technologies, which will consume the API interface service provider Resources, technical issues that affect the stability of the API interface server's own system, and then achieve the technical effect of improving test efficiency and improving the API interface server's own system stability.

附图说明Description of drawings

通过以下参照附图对本公开实施例的描述,本公开的上述以及其他目的、特征和优点将更为清楚,在附图中:The above and other objects, features and advantages of the present disclosure will be more clearly described through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

图1示意性示出了根据本公开实施例的应用程序编程接口测试设备的示图;Fig. 1 schematically shows a diagram of an application programming interface testing device according to an embodiment of the present disclosure;

图2示意性示出了根据本公开实施例的应用程序编程接口测试设备的框图;Fig. 2 schematically shows a block diagram of an application programming interface testing device according to an embodiment of the present disclosure;

图3示意性示出了根据本公开另一实施例的应用程序编程接口测试设备的框图;Fig. 3 schematically shows a block diagram of an application programming interface testing device according to another embodiment of the present disclosure;

图4示意性示出了根据本公开实施例的应用程序编程接口测试方法的流程图;FIG. 4 schematically shows a flowchart of an application programming interface testing method according to an embodiment of the present disclosure;

图5示意性示出了根据本公开另一实施例的应用程序编程接口测试方法的流程图;FIG. 5 schematically shows a flowchart of an application programming interface testing method according to another embodiment of the present disclosure;

图6示意性示出了根据本公开实施例的应用程序编程接口测试方法的流程图;以及FIG. 6 schematically shows a flow chart of an application programming interface testing method according to an embodiment of the present disclosure; and

图7示意性示出了根据本公开实施例的适于实现上文描述的方法的计算机系统的框图。Fig. 7 schematically shows a block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present disclosure.

在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the present disclosure. The terms "comprising", "comprising", etc. used herein indicate the presence of stated features, steps, operations and/or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meaning commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted to have a meaning consistent with the context of this specification, and not be interpreted in an idealized or overly rigid manner.

在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。Where expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted as those skilled in the art would normally understand the expression (for example, "having A, B, and C A system of at least one of "shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ). Where expressions such as "at least one of A, B, or C, etc." are used, they should generally be interpreted as those skilled in the art would normally understand the expression (for example, "having A, B, or C A system of at least one of "shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ).

本公开的实施例提供了一种应用程序编程接口测试设备,包括测试指令生成装置,用于根据待测试程序编程接口的测试参数和与待测试程序编程接口对应的测试案例模板生成测试指令;应用程序编程接口管理装置,用于根据测试指令确定待测试程序编程接口是否满足测试条件;以及测试指令处理装置,用于在确定待测试程序编程接口满足测试条件的情况下,根据测试指令生成测试报告。An embodiment of the present disclosure provides an application programming interface testing device, including a test instruction generating device for generating test instructions according to test parameters of the program programming interface to be tested and a test case template corresponding to the program programming interface to be tested; application The program programming interface management device is used to determine whether the program programming interface to be tested satisfies the test condition according to the test instruction; and the test instruction processing device is used to generate a test report according to the test instruction when it is determined that the program programming interface to be tested meets the test condition .

图1示意性示出了根据本公开实施例的应用程序编程接口测试设备的示图。需要注意的是,图1所示仅为可以应用本公开实施例的应用程序编程接口测试设备的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以为其他设备。Fig. 1 schematically shows a diagram of an application programming interface testing device according to an embodiment of the present disclosure. It should be noted that FIG. 1 is only an example of an application programming interface testing device that can be applied to the embodiments of the present disclosure, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used. Thought other devices.

如图1所示,根据该实施例的应用程序编程接口测试设备100可以包括终端设备101、102、103。网络104用以在终端设备101、102、103之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线和/或无线通信链路等等。As shown in FIG. 1 , the API testing device 100 according to this embodiment may include terminal devices 101 , 102 , and 103 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 . Network 104 may include various connection types, such as wired and/or wireless communication links, among others.

根据本公开的实施例,测试指令生成装置可以设置于终端设备101中;应用程序编程接口管理装置可以设置于终端设备102中;测试指令处理装置可以设置于终端设备103中。According to an embodiment of the present disclosure, the test instruction generation device may be set in the terminal device 101 ; the API management device may be set in the terminal device 102 ; the test command processing device may be set in the terminal device 103 .

根据本公开的实施例,需要说明的是,本公开实施例所提供的测试指令生成装置、应用程序编程接口管理装置和测试指令处理装置中的任意两个或三个也可以设置在同一个终端设备中。According to the embodiments of the present disclosure, it should be noted that any two or three of the test instruction generating device, the application programming interface management device and the test instruction processing device provided in the embodiments of the present disclosure can also be set on the same terminal in the device.

例如,测试指令生成装置和应用程序编程接口管理装置可以设置于终端设备101中,测试指令处理装置可以设置于终端设备102中。或者,测试指令生成装置可以设置于终端设备101中,应用程序编程接口管理装置和测试指令处理装置可以设置于终端设备102中。再例如,测试指令生成装置、应用程序编程接口管理装置和测试指令处理装置设置于终端设备101、、102、103中的任意一个中。For example, the test instruction generation device and the application programming interface management device can be set in the terminal device 101 , and the test command processing device can be set in the terminal device 102 . Alternatively, the test instruction generation device may be set in the terminal device 101 , and the application programming interface management device and test command processing device may be set in the terminal device 102 . For another example, the test instruction generation device, the application programming interface management device and the test instruction processing device are set in any one of the terminal devices 101 , 102 , 103 .

本公开实施例所提供的应用程序编程接口测试方法可以由终端设备101、102、103中的一个或多个执行。也可以由不同于终端设备101、102、103且能够与终端设备101、102、103通信的其他设备执行。The application programming interface testing method provided by the embodiments of the present disclosure may be executed by one or more of the terminal devices 101 , 102 , and 103 . It may also be performed by other devices that are different from the terminal devices 101 , 102 , 103 and capable of communicating with the terminal devices 101 , 102 , 103 .

应该理解,图1中的终端设备和网络的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备和网络的数目。It should be understood that the numbers of terminal devices and networks in FIG. 1 are only illustrative. There can be any number of terminal devices and the number of networks according to implementation requirements.

图2示意性示出了根据本公开实施例的应用程序编程接口测试设备的框图。Fig. 2 schematically shows a block diagram of an application programming interface testing device according to an embodiment of the present disclosure.

如图2所示,应用程序编程接口测试设备200可以包括测试指令生成装置210、应用程序编程接口管理装置220和测试指令处理装置230。As shown in FIG. 2 , the application programming interface testing device 200 may include a test instruction generation unit 210 , an application programming interface management unit 220 and a test instruction processing unit 230 .

测试指令生成装置210用于根据待测试程序编程接口的测试参数和与待测试程序编程接口对应的测试案例模板生成测试指令。The test instruction generation device 210 is used for generating test instructions according to the test parameters of the programming interface of the program to be tested and the test case template corresponding to the programming interface of the program to be tested.

根据本公开的实施例,待测试程序编程接口也可以称之为待测试API接口。根据本公开的实施例,测试参数与待测试API接口相关。例如,待测试API接口为支付类应用接口,测试参数可以包括账号、密码和支付额度等参数。According to the embodiment of the present disclosure, the program programming interface to be tested may also be referred to as an API interface to be tested. According to an embodiment of the present disclosure, the test parameters are related to the API interface to be tested. For example, the API interface to be tested is a payment application interface, and the test parameters may include parameters such as account number, password, and payment amount.

根据本公开的实施例,测试指令生成装置210中可以包括模板库,模板库中预先存储有多个测试案例模板,可以从模板库中匹配出与待测试API接口相匹配的模板。According to an embodiment of the present disclosure, the test instruction generation device 210 may include a template library, in which a plurality of test case templates are pre-stored, and a template matching the API interface to be tested may be matched from the template library.

根据本公开的实施例,在模拟测试时,可以根据待测试API接口的接口分类等信息查询模板库,自动生成测试案例模板。According to the embodiment of the present disclosure, during the simulation test, the template library can be queried according to information such as the interface classification of the API interface to be tested, and the test case template can be automatically generated.

根据本公开的实施例,可以根据模板提示导入参数文件,例如,导入包括账号、密码、支付额度等测试参数,自动生成测试指令,可以单独测试一个案例,也可以批量测试多个案例。无需等待第三方,例如API接口调用方和API接口服务方。测试指令可以直接模拟发送调用请求,传入参数,降低沟通成本,提高测试效率。According to the embodiment of the present disclosure, parameter files can be imported according to template prompts, for example, test parameters including account number, password, payment amount, etc. are imported, and test instructions are automatically generated, and one case can be tested individually, or multiple cases can be tested in batches. There is no need to wait for third parties, such as API interface callers and API interface service parties. The test command can directly simulate sending call requests and passing in parameters, reducing communication costs and improving test efficiency.

应用程序编程接口管理装置220用于根据测试指令确定待测试程序编程接口是否满足测试条件。The application programming interface management device 220 is used for determining whether the program programming interface to be tested satisfies the test condition according to the test instruction.

根据本公开的实施例,应用程序编程接口管理装置220是所有的API接口调用方发送API请求报文的目的地,是所有的API接口调用方的下游。同时,也是所有API接口服务方的请求报文的发送上游。According to the embodiment of the present disclosure, the application programming interface management device 220 is the destination for all API interface callers to send API request messages, and is the downstream of all API interface callers. At the same time, it is also the upstream sending request message of all API interface service parties.

根据本公开的实施例,应用程序编程接口管理装置是提供API接口服务集中向外暴露的服务平台,内部的分支机构或合作方(包括个人开发者)可以通过服务平台调用注册在平台上的API接口,便捷地使用提供的API接口服务,实现API接口服务的快速创新。According to the embodiment of the present disclosure, the application programming interface management device is a service platform that provides centralized and external exposure of API interface services, and internal branches or partners (including individual developers) can call APIs registered on the platform through the service platform Interface, conveniently use the provided API interface services to realize rapid innovation of API interface services.

根据本公开的实施例,可以通过测试指令生成装置210模拟API接口调用方,向应用程序编程接口管理装置220发送用于请求API接口服务的测试指令,使用独立的测试指令处理装置230模拟API接口服务方,提供API接口服务。According to the embodiment of the present disclosure, the caller of the API interface can be simulated by the test command generation device 210, and the test command for requesting the API interface service can be sent to the application programming interface management device 220, and the API interface can be simulated by using the independent test command processing device 230 The service provider provides API interface services.

测试指令处理装置230用于在确定待测试程序编程接口满足测试条件的情况下,根据测试指令生成测试报告。The test instruction processing device 230 is configured to generate a test report according to the test instruction when it is determined that the programming interface of the program to be tested satisfies the test condition.

根据本公开的实施例,测试指令处理装置230在调用真正的服务化接口前,可以先进行参数合法性校验。如果发现参数不合法即返回结果,不会再调用到服务化接口,可以降低对软件系统资源的消耗,也能帮助第三方快速定位测试失败的问题,提高测试效率。According to the embodiment of the present disclosure, before the test instruction processing device 230 calls the real service-oriented interface, it may first check the validity of the parameters. If the parameter is found to be illegal, the result will be returned, and the service interface will not be called, which can reduce the consumption of software system resources, and can also help third parties quickly locate the problem of test failure and improve test efficiency.

根据本公开的实施例,通过测试指令生成装置210模拟API接口调用方,向应用程序编程接口管理装置220发送用于请求API接口服务的测试指令,使用独立的测试指令处理装置230模拟API接口服务方,提供API接口服务,无需依赖API接口调用方、API接口服务方和API接口管理平台三方协同对API接口进行联合测试,所以至少部分地克服了相关技术中接口测试沟通成本高,会消耗API接口服务方的资源,影响API接口服务方自身系统的稳定性的技术问题,进而达到了提高测试效率,提高API接口服务方的自身系统稳定性的技术效果。According to the embodiment of the present disclosure, the caller of the API interface is simulated by the test instruction generation device 210, and the test instruction for requesting the API interface service is sent to the application programming interface management device 220, and the API interface service is simulated by the independent test instruction processing device 230. Provide API interface services without relying on the API interface caller, API interface service provider and API interface management platform to jointly test the API interface, so at least partially overcome the high communication cost of interface testing in related technologies, which will consume API The resources of the interface service party affect the technical problems of the stability of the API interface service party's own system, and then achieve the technical effect of improving the test efficiency and improving the stability of the API interface service party's own system.

根据本公开的实施例,该设备适用于缺少API调用方或者缺少API服务方的测试场景,能有效地缩短API接口测试周期,节省API接口测试成本,快速提供API接入环境。According to the embodiments of the present disclosure, the device is applicable to test scenarios lacking API callers or API service parties, can effectively shorten the API interface test cycle, save API interface test costs, and quickly provide an API access environment.

下面参考图3,结合具体实施例对图2所示的应用程序编程接口测试设备做进一步说明。Referring to FIG. 3, the application programming interface testing device shown in FIG. 2 will be further described in conjunction with specific embodiments.

图3示意性示出了根据本公开另一实施例的应用程序编程接口测试设备的框图。Fig. 3 schematically shows a block diagram of an application programming interface testing device according to another embodiment of the present disclosure.

如图3所示,测试指令生成装置210包括模板匹配模块211和数据库212。As shown in FIG. 3 , the test instruction generating device 210 includes a template matching module 211 and a database 212 .

模板匹配模块211用于根据待测试程序编程接口的接口信息,从多个测试模板中匹配出与待测试程序编程接口对应的测试案例模板。The template matching module 211 is used to match a test case template corresponding to the programming interface of the program to be tested from multiple test templates according to the interface information of the programming interface of the program to be tested.

根据本公开的实施例,待测试程序编程接口的接口信息可以是接口分类等信息,根据接口分类等信息查询测试模板库,从多个测试模板中匹配出与待测试程序编程接口对应的测试案例模板。According to an embodiment of the present disclosure, the interface information of the program programming interface to be tested may be information such as interface classification, query the test template library according to the information such as interface classification, and match the test cases corresponding to the program programming interface to be tested from multiple test templates template.

数据库212用于存储待测试程序编程接口的测试参数。The database 212 is used to store test parameters of the program programming interface to be tested.

根据本公开的实施例,数据库212可以存储有多个测试模板的参数文件,在确定待测试程序编程接口对应的测试案例模板之后,可以从数据库212中导入待测试程序编程接口对应的测试案例模板的参数文件,参数文件包括测试参数,例如,包括账号、密码、支付额度等测试参数。According to an embodiment of the present disclosure, the database 212 may store parameter files of multiple test templates, and after determining the test case template corresponding to the program programming interface to be tested, the test case template corresponding to the program programming interface to be tested may be imported from the database 212 The parameter file includes test parameters, for example, account number, password, payment amount and other test parameters.

根据本公开的实施例,测试指令生成装置210还包括测试案例生成模块213和发报通信模块214。According to an embodiment of the present disclosure, the test instruction generating device 210 further includes a test case generating module 213 and a sending communication module 214 .

测试案例生成模块213用于根据测试参数和与测试案例模板生成测试指令。The test case generating module 213 is used for generating test instructions according to test parameters and test case templates.

发报通信模块214用于根据测试指令生成请求报文,并向应用程序编程接口管理装置220发送请求报文,以使得应用程序编程接口管理装置220根据请求报文确定待测试程序编程接口是否满足测试条件。The sending communication module 214 is used to generate a request message according to the test instruction, and send the request message to the application programming interface management device 220, so that the application programming interface management device 220 determines whether the program programming interface to be tested meets the requirements according to the request message. Test Conditions.

图4示意性示出了根据本公开实施例的应用程序编程接口测试方法的流程图。Fig. 4 schematically shows a flowchart of an application programming interface testing method according to an embodiment of the present disclosure.

如图4所示,该方法包括操作S401~S407。As shown in Fig. 4, the method includes operations S401-S407.

在操作S401,导入待测试API接口说明文档。平台管理员可以将待测试API接口说明文档中的API接口信息导入应用程序编程接口管理装置220中。具体地,例如,将API接口信息导入注册模块完成接口注册。In operation S401, the API interface description document to be tested is imported. The platform administrator can import the API interface information in the API interface description document to be tested into the application programming interface management device 220 . Specifically, for example, the API interface information is imported into the registration module to complete the interface registration.

根据本公开的实施例,可以设计参数解析模块,将API接口说明文档自动生成API接口测试案例,减少测试案例编写的工作量。According to the embodiments of the present disclosure, a parameter parsing module can be designed to automatically generate API interface test cases from API interface description documents, reducing the workload of test case writing.

在操作S402,通过模板匹配模块211匹配测试案例模板。通过将待测试API接口信息导入测试指令生成装置210中的测试案例模板库,在测试案例模板库中匹配出适当的测试案例模板。In operation S402 , the test case template is matched by the template matching module 211 . By importing the API interface information to be tested into the test case template library in the test instruction generating device 210, an appropriate test case template is matched in the test case template library.

在操作S403,在数据库中获取适当的测试参数数据,最后将测试案例模板和测试参数数据输入测试案例生成模块213。In operation S403 , obtain appropriate test parameter data in the database, and finally input the test case template and test parameter data into the test case generation module 213 .

在操作S404,测试案例生成模块213根据匹配到的测试案例模板和测试参数信息,自动组合成测试指令。In operation S404, the test case generating module 213 automatically composes test instructions according to the matched test case template and test parameter information.

在操作S405,通过发报通信模块214将API请求报文发送给应用程序编程接口管理装置220中的网关模块221。In operation S405 , the API request message is sent to the gateway module 221 in the application programming interface management device 220 through the sending communication module 214 .

根据本公开的实施例,应用程序编程接口管理装置220包括网关模块221。网关模块221用于根据发报通信模块214发送的请求报文确定待测试程序编程接口是否满足测试条件。According to an embodiment of the present disclosure, the application programming interface management device 220 includes a gateway module 221 . The gateway module 221 is used to determine whether the programming interface of the program to be tested satisfies the test condition according to the request message sent by the sending communication module 214 .

根据本公开的实施例,网关模块221可以是提供验签、加密、限流的集中安全管理平台。根据本公开的实施例,确定待测试程序编程接口是否满足测试条件实际上可以认为是确定调用待测试程序编程接口的请求是否满足测试条件,例如,可以是确定调用待测试程序编程接口的请求是否满足合法条件等等。According to an embodiment of the present disclosure, the gateway module 221 may be a centralized security management platform that provides signature verification, encryption, and current limiting. According to an embodiment of the present disclosure, determining whether the programming interface of the program to be tested satisfies the test conditions can actually be considered as determining whether the request for calling the programming interface of the program Satisfy the legal conditions and so on.

在操作S406,网关模块221可以通过非对称加密算法,或者也可以标识密码算法等等,验签和查看数据存储模块222中是否有相应的API接口调用方对API接口服务方的调用权限,以及是否满足API接口的限流控制。In operation S406, the gateway module 221 can use an asymmetric encryption algorithm, or can also identify a cryptographic algorithm, etc., to verify the signature and check whether there is a corresponding API interface caller's call authority to the API interface service party in the data storage module 222, and Whether it satisfies the current limit control of the API interface.

根据本公开的实施例,网关模块221根据请求报文确定待测试程序编程接口是否满足测试条件包括根据请求报文对待测试程序编程接口的调用方身份进行验证;或者,根据请求报文对待测试程序编程接口的调用方权限进行验证;或者,根据请求报文确定待测试程序编程接口是否满足接口限流控制条件。According to an embodiment of the present disclosure, the gateway module 221 determines whether the programming interface of the program to be tested satisfies the test condition according to the request message, including verifying the identity of the caller of the programming interface of the program to be tested according to the request message; or, according to the request message, the program to be tested Verify the caller authority of the programming interface; or, determine whether the programming interface of the program under test satisfies the interface current limiting control condition according to the request message.

根据本公开的实施例,网关模块221也根据请求报文确定待测试程序编程接口是否满足上述多个条件。According to an embodiment of the present disclosure, the gateway module 221 also determines whether the program programming interface to be tested satisfies the above multiple conditions according to the request message.

在操作S407,若判断满足条件,则将待测试API业务报文发送到测试指令处理装置230。若判断不满足条件,则返回报错信息。其中,待测试API业务报文可以根据待测试API请求报文生成,待测试API业务报文中的内容可以是待测试API请求报文中的部分。In operation S407, if it is judged that the condition is satisfied, the API service message to be tested is sent to the test instruction processing device 230 . If it is judged that the condition is not satisfied, an error message will be returned. Wherein, the API service message to be tested may be generated according to the API request message to be tested, and the content in the API service message to be tested may be a part of the API request message to be tested.

根据本公开的实施例,应用程序编程接口管理装置220还包括数据存储模块222和应用程序编程接口注册模块223。According to an embodiment of the present disclosure, the application programming interface management device 220 further includes a data storage module 222 and an application programming interface registration module 223 .

数据存储模块222用于记录以下信息中的至少一个:应用程序编程接口调用方信息、应用程序编程接口服务方信息、应用程序编程接口调用方和应用程序编程接口服务方之间的关联信息、测试案例、测试记录信息。The data storage module 222 is used to record at least one of the following information: application programming interface caller information, application programming interface server information, association information between the application programming interface caller and the application programming interface server, test Case, test record information.

应用程序编程接口注册模块223用于根据接口信息对待测试程序编程接口进行注册和/或对应用程序编程接口服务方进行注册。The application programming interface registration module 223 is used for registering the program programming interface to be tested and/or registering the application programming interface server according to the interface information.

根据本公开的实施例,测试指令处理装置230包括收报通信模块231、参数校验模块232、接口逻辑处理模块233和生成报告模块234。According to an embodiment of the present disclosure, the test instruction processing device 230 includes a report communication module 231 , a parameter verification module 232 , an interface logic processing module 233 and a report generation module 234 .

收报通信模块231用于在确定待测试程序编程接口满足测试条件的情况下,接收基于请求报文生成的业务报文,并对业务报文进行解析得到业务参数信息。The receiving communication module 231 is used to receive the service message generated based on the request message and analyze the service message to obtain service parameter information when it is determined that the programming interface of the program to be tested satisfies the test conditions.

参数校验模块232用于对业务参数进行校验,验证业务参数的合法性。The parameter checking module 232 is used to check the business parameters and verify the legitimacy of the business parameters.

接口逻辑处理模块233用于在验证业务参数合法的情况下,按照业务逻辑对请求报文进行响应。The interface logic processing module 233 is used to respond to the request message according to the business logic when verifying that the business parameters are legal.

生成报告模块234用于根据参数校验模块和接口逻辑处理模块的输出结果生成测试报告。The report generation module 234 is used to generate a test report according to the output results of the parameter verification module and the interface logic processing module.

图5示意性示出了根据本公开另一实施例的应用程序编程接口测试方法的流程图。Fig. 5 schematically shows a flowchart of an application programming interface testing method according to another embodiment of the present disclosure.

如图5所示,该方法包括操作S501~S505。As shown in Fig. 5, the method includes operations S501-S505.

在操作S501,收报通信模块231接收到业务报文。同时,可以解析出报文中的业务参数信息并发送给参数校验模块232。In operation S501, the receiving communication module 231 receives a service message. At the same time, the service parameter information in the message can be parsed out and sent to the parameter verification module 232 .

在操作S502,参数校验模块232在收到业务参数后,会自动判断业务参数的合法性。若未通过参数合法性检测,将返回响应报文,返回接口测试中某参数不合法;若通过参数合法性检测,则将业务报文发送给接口逻辑处理模块233。In operation S502, the parameter verification module 232 automatically judges the legality of the service parameters after receiving the service parameters. If the parameter validity check is not passed, a response message will be returned, indicating that a certain parameter in the interface test is invalid; if the parameter validity check is passed, the service message will be sent to the interface logic processing module 233 .

在操作S503,接口逻辑处理模块233获取业务报文后,可以根据处理逻辑进行处理,输出接口响应报文,发送测试结果信息。In operation S503, after the interface logic processing module 233 obtains the service message, it may process it according to the processing logic, output the interface response message, and send the test result information.

在操作S504,参数校验模块232输出的未通过参数合法性检测结果和接口逻辑处理模块233的输出结果,被生成报告模块234获取,自动生成测试报告。In operation S504, the failed parameter legality detection result output by the parameter verification module 232 and the output result of the interface logic processing module 233 are acquired by the report generating module 234, and a test report is automatically generated.

在操作S505,生成报告模块234将测试报告发送给测试结果数据库中。In operation S505, the generating report module 234 sends the test report to the test result database.

根据本公开的实施例,应用程序编程接口测试设备200还可以包括显示模块,例如,设置在测试指令生成装置210中,用于显示测试报告,达到了可视化展示的效果。生成报告模块234还可以将测试报告直接发送给显示模块显示。According to an embodiment of the present disclosure, the application programming interface testing device 200 may further include a display module, for example, set in the test instruction generating device 210 for displaying a test report to achieve the effect of visual display. The report generation module 234 can also directly send the test report to the display module for display.

根据本公开的实施例,通过模拟API接口调用方和API接口服务方进行操作,可以提高测试效率,缩短测试时间,可以在API接口调用方和API接口服务方不配合测试的情况下开始测试;同时,可以减少人力投入和资源投入,使用测试指令生成装置模拟API接口调用方发送请求API服务的报文,使用独立的测试指令处理装置模拟API接口服务方,提供API接口服务,可以在测试前期减少人力沟通成本减少资源的投入。通过本公开的实施例,应用程序编程接口测试设备可以适用所有在应用程序编程接口注册模块上注册的API接口测试。According to the embodiments of the present disclosure, by simulating the operation of the API interface caller and the API interface server, the test efficiency can be improved, the test time can be shortened, and the test can be started when the API interface caller and the API interface server do not cooperate with the test; At the same time, it can reduce manpower and resource investment, use the test command generation device to simulate the caller of the API interface to send a message requesting the API service, and use the independent test command processing device to simulate the API interface server and provide the API interface service, which can be used in the early stage of the test Reduce human communication costs and reduce resource input. Through the embodiments of the present disclosure, the application programming interface test device can be applicable to all API interface tests registered on the application programming interface registration module.

根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。Modules, sub-modules, units, any multiple of sub-units according to the embodiments of the present disclosure, or at least part of the functions of any multiple of them may be implemented in one module. Any one or more of modules, submodules, units, and subunits according to the embodiments of the present disclosure may be implemented by being divided into multiple modules. Any one or more of modules, submodules, units, and subunits according to embodiments of the present disclosure may be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or hardware or firmware that may be implemented by any other reasonable means of integrating or packaging circuits, or in a combination of software, hardware, and firmware Any one of these implementations or an appropriate combination of any of them. Alternatively, one or more of the modules, submodules, units, and subunits according to the embodiments of the present disclosure may be at least partially implemented as computer program modules, and when the computer program modules are executed, corresponding functions may be performed.

例如,模板匹配模块211、测试案例生成模块213、发报通信模块214中的任意多个可以合并在一个模块/单元/子单元中实现,或者其中的任意一个模块/单元/子单元可以被拆分成多个模块/单元/子单元。或者,这些模块/单元/子单元中的一个或多个模块/单元/子单元的至少部分功能可以与其他模块/单元/子单元的至少部分功能相结合,并在一个模块/单元/子单元中实现。根据本公开的实施例,模板匹配模块211、测试案例生成模块213、发报通信模块214中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,模板匹配模块211、测试案例生成模块213、发报通信模块214中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。For example, any number of the template matching module 211, the test case generation module 213, and the sending communication module 214 can be combined and implemented in one module/unit/subunit, or any one of the modules/units/subunits can be disassembled. Divided into modules/units/subunits. Alternatively, at least part of the functions of one or more modules/units/subunits of these modules/units/subunits can be combined with at least part of the functions of other modules/units/subunits, and combined in one module/unit/subunit realized in. According to an embodiment of the present disclosure, at least one of the template matching module 211, the test case generation module 213, and the sending communication module 214 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), programmable logic array (PLA), system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, or in software Any one of three implementations, hardware and firmware, or an appropriate combination of any of them. Alternatively, at least one of the template matching module 211 , the test case generation module 213 , and the sending communication module 214 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed.

图6示意性示出了根据本公开实施例的应用程序编程接口测试方法的流程图。Fig. 6 schematically shows a flow chart of an application programming interface testing method according to an embodiment of the present disclosure.

如图6所示,该方法包括操作S601~S603。As shown in FIG. 6, the method includes operations S601-S603.

在操作S601,测试指令生成装置根据待测试程序编程接口的测试参数和与待测试程序编程接口对应的测试案例模板生成测试指令。In operation S601, the test instruction generation device generates test instructions according to the test parameters of the programming interface of the program to be tested and the test case template corresponding to the programming interface of the program to be tested.

在操作S602,应用程序编程接口管理装置根据测试指令确定待测试程序编程接口是否满足测试条件。In operation S602, the application programming interface management device determines whether the program programming interface to be tested satisfies the test condition according to the test instruction.

在操作S603,测试指令处理装置在确定待测试程序编程接口满足测试条件的情况下,根据测试指令生成测试报告。In operation S603, the test instruction processing device generates a test report according to the test instruction when it is determined that the programming interface of the program to be tested satisfies the test condition.

根据本公开的实施例,通过测试指令生成装置模拟API接口调用方,向应用程序编程接口管理装置发送用于请求API接口服务的测试指令,使用独立的测试指令处理装置模拟API接口服务方,提供API接口服务,无需依赖API接口调用方、API接口服务方和API接口管理平台三方协同对API接口进行联合测试,所以至少部分地克服了相关技术中接口测试沟通成本高,会消耗API接口服务方的资源,影响API接口服务方自身系统的稳定性的技术问题,进而达到了提高测试效率,提高API接口服务方的自身系统稳定性的技术效果。According to an embodiment of the present disclosure, the API interface caller is simulated by the test instruction generation device, and the test instruction for requesting the API interface service is sent to the application programming interface management device, and the API interface service party is simulated by an independent test instruction processing device, providing API interface service does not need to rely on the API interface caller, API interface server and API interface management platform to jointly test the API interface, so it at least partially overcomes the high communication cost of interface testing in related technologies, which will consume the API interface service provider Resources, technical issues that affect the stability of the API interface server's own system, and then achieve the technical effect of improving test efficiency and improving the API interface server's own system stability.

根据本公开的实施例,需要说明的是,本公开所提供的应用程序编程接口测试方法不限于上述图6中所描述的内容。可以理解,在图1~图5中所描述的测试方法部分也可以作为本公开所提供的应用程序编程接口测试方法,可以作为图6中所描述的内容的进一步解释。According to the embodiment of the present disclosure, it should be noted that the application programming interface testing method provided in the present disclosure is not limited to the content described in FIG. 6 above. It can be understood that the test method part described in FIGS. 1 to 5 can also be used as the application programming interface test method provided in the present disclosure, and can be used as a further explanation of the content described in FIG. 6 .

根据本公开的实施例,还提供了了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个指令,其中,当所述一个或多个指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上所述的测试方法。According to an embodiment of the present disclosure, there is also provided an electronic device, including: one or more processors; a memory for storing one or more instructions, wherein, when the one or more instructions are executed by the one When executed by one or more processors, the one or more processors realize the testing method as described above.

根据本公开的实施例,以电子设备为计算机系统为例。According to the embodiments of the present disclosure, an electronic device is taken as a computer system as an example.

图7示意性示出了根据本公开实施例的适于实现上文描述的方法的计算机系统的框图。图7示出的计算机系统仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Fig. 7 schematically shows a block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure. The computer system shown in FIG. 7 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.

如图7所示,根据本公开实施例的计算机系统700包括处理器701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。处理器701例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器701还可以包括用于缓存用途的板载存储器。处理器701可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 7 , a computer system 700 according to an embodiment of the present disclosure includes a processor 701 that can be loaded into a random access memory (RAM) 703 according to a program stored in a read-only memory (ROM) 702 or loaded from a storage section 708 Various appropriate actions and processing are performed by the program. Processor 701 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or associated chipset and/or a special-purpose microprocessor (eg, an application-specific integrated circuit (ASIC)), and the like. Processor 701 may also include on-board memory for caching purposes. The processor 701 may include a single processing unit or a plurality of processing units for executing different actions of the method flow according to the embodiments of the present disclosure.

在RAM 703中,存储有系统700操作所需的各种程序和数据。处理器701、ROM 702以及RAM 703通过总线704彼此相连。处理器701通过执行ROM 702和/或RAM 703中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 702和RAM 703以外的一个或多个存储器中。处理器701也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701 , ROM 702 , and RAM 703 are connected to each other via a bus 704 . The processor 701 executes the programs in the ROM 702 and/or the RAM 703 to perform various operations according to the method flow of the embodiment of the present disclosure. It should be noted that the program may also be stored in one or more memories other than the ROM 702 and the RAM 703 . The processor 701 may also perform various operations according to the method flow of the embodiments of the present disclosure by executing programs stored in the one or more memories.

根据本公开的实施例,系统700还可以包括输入/输出(I/O)接口705,输入/输出(I/O)接口705也连接至总线704。系统700还可以包括连接至I/O接口705的以下部件中的一项或多项:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705 that is also connected to the bus 704 . System 700 may also include one or more of the following components connected to I/O interface 705: an input section 706 including a keyboard, mouse, etc.; etc.; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 710 as necessary so that a computer program read therefrom is installed into the storage section 708 as necessary.

根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读存储介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被处理器701执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。According to the embodiments of the present disclosure, the method flow according to the embodiments of the present disclosure can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable storage medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 709 and/or installed from removable media 711 . When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiments of the present disclosure, the above-described systems, devices, devices, modules, units, etc. may be implemented by computer program modules.

本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist independently without being assembled into the device/system device/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is realized.

根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质。例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD- ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 702和/或RAM 703和/或ROM 702和RAM 703以外的一个或多个存储器。For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include one or more memories other than the above-described ROM 702 and/or RAM 703 and/or ROM 702 and RAM 703 .

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions. Those skilled in the art can understand that various combinations and/or combinations can be made in the various embodiments of the present disclosure and/or the features described in the claims, even if such combinations or combinations are not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the various embodiments of the present disclosure and/or the features described in the claims can be combined and/or combined in various ways. All such combinations and/or combinations fall within the scope of the present disclosure.

以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the various embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims (11)

CN201910628102.0A2019-07-112019-07-11Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executingPendingCN110347604A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910628102.0ACN110347604A (en)2019-07-112019-07-11Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910628102.0ACN110347604A (en)2019-07-112019-07-11Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing

Publications (1)

Publication NumberPublication Date
CN110347604Atrue CN110347604A (en)2019-10-18

Family

ID=68175039

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910628102.0APendingCN110347604A (en)2019-07-112019-07-11Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing

Country Status (1)

CountryLink
CN (1)CN110347604A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111221739A (en)*2020-01-102020-06-02中国建设银行股份有限公司Service testing method, device and system
CN111597020A (en)*2020-04-242020-08-28五八有限公司Application Programming Interface (API) debugging method and debugging terminal
CN111625459A (en)*2020-05-272020-09-04平安普惠企业管理有限公司Application program testing method and device, computer equipment and storage medium
CN112000579A (en)*2020-08-262020-11-27上海移远通信技术股份有限公司Software interface testing method, system, equipment and medium
CN112699017A (en)*2019-10-232021-04-23拉扎斯网络科技(上海)有限公司Sound testing method and device, electronic equipment and computer readable storage medium
CN113567797A (en)*2021-09-272021-10-29北京全路通信信号研究设计院集团有限公司Design method and system suitable for track circuit product performance test case
CN115695092A (en)*2022-10-312023-02-03重庆长安汽车股份有限公司Internet vehicle data processing method and device and electronic equipment
CN116089199A (en)*2023-03-302023-05-09湖南华自信息技术有限公司IO port testing method and server

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9411569B1 (en)*2015-05-122016-08-09The United States Of America As Represented By The Administrator Of The National Aeronautics And Space AdministrationSystem and method for providing a climate data analytic services application programming interface distribution package
CN108446221A (en)*2018-03-052018-08-24平安普惠企业管理有限公司System detection method, device, computer equipment and storage medium
CN109240924A (en)*2018-09-032019-01-18中国平安人寿保险股份有限公司A kind of test method and equipment of application program
CN109446071A (en)*2018-09-262019-03-08深圳壹账通智能科技有限公司Interface test method, interface test device, electronic equipment and storage medium
CN109522218A (en)*2018-10-192019-03-26平安科技(深圳)有限公司Interface test method, device, computer equipment and storage medium
CN109582560A (en)*2018-10-092019-04-05中国平安人寿保险股份有限公司Test file edit methods, device, equipment and computer readable storage medium
CN109828924A (en)*2019-01-252019-05-31网联清算有限公司Test method, device and calculating equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9411569B1 (en)*2015-05-122016-08-09The United States Of America As Represented By The Administrator Of The National Aeronautics And Space AdministrationSystem and method for providing a climate data analytic services application programming interface distribution package
CN108446221A (en)*2018-03-052018-08-24平安普惠企业管理有限公司System detection method, device, computer equipment and storage medium
CN109240924A (en)*2018-09-032019-01-18中国平安人寿保险股份有限公司A kind of test method and equipment of application program
CN109446071A (en)*2018-09-262019-03-08深圳壹账通智能科技有限公司Interface test method, interface test device, electronic equipment and storage medium
CN109582560A (en)*2018-10-092019-04-05中国平安人寿保险股份有限公司Test file edit methods, device, equipment and computer readable storage medium
CN109522218A (en)*2018-10-192019-03-26平安科技(深圳)有限公司Interface test method, device, computer equipment and storage medium
CN109828924A (en)*2019-01-252019-05-31网联清算有限公司Test method, device and calculating equipment and medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112699017B (en)*2019-10-232024-08-23拉扎斯网络科技(上海)有限公司Sound testing method, device, electronic equipment and computer readable storage medium
CN112699017A (en)*2019-10-232021-04-23拉扎斯网络科技(上海)有限公司Sound testing method and device, electronic equipment and computer readable storage medium
CN111221739A (en)*2020-01-102020-06-02中国建设银行股份有限公司Service testing method, device and system
CN111597020A (en)*2020-04-242020-08-28五八有限公司Application Programming Interface (API) debugging method and debugging terminal
CN111597020B (en)*2020-04-242024-03-22五八有限公司Application programming interface API debugging method and debugging terminal
CN111625459A (en)*2020-05-272020-09-04平安普惠企业管理有限公司Application program testing method and device, computer equipment and storage medium
CN112000579B (en)*2020-08-262024-03-19上海移远通信技术股份有限公司Software interface testing method, system, equipment and medium
CN112000579A (en)*2020-08-262020-11-27上海移远通信技术股份有限公司Software interface testing method, system, equipment and medium
CN113567797B (en)*2021-09-272022-02-22北京全路通信信号研究设计院集团有限公司Design method and system suitable for track circuit product performance test case
CN113567797A (en)*2021-09-272021-10-29北京全路通信信号研究设计院集团有限公司Design method and system suitable for track circuit product performance test case
CN115695092A (en)*2022-10-312023-02-03重庆长安汽车股份有限公司Internet vehicle data processing method and device and electronic equipment
CN115695092B (en)*2022-10-312024-05-03重庆长安汽车股份有限公司Internet-of-things data processing method and device and electronic equipment
CN116089199A (en)*2023-03-302023-05-09湖南华自信息技术有限公司IO port testing method and server

Similar Documents

PublicationPublication DateTitle
CN110347604A (en)Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing
CN108595126B (en)Data storage system, query method, query device, server, and storage medium
CN103905461B (en)Cloud service behavior trustworthiness attestation method and system based on trusted third party
WO2019223142A1 (en)Application program testing method, apparatus, computer device and storage medium
CN113472883B (en)Method, device, equipment and storage medium for storing data based on block chain
CN111367821B (en) A software testing method and system
CN110580225A (en) Business system simulation method and device
CN109902493B (en)Script issuing method and server
CN113221163B (en) A method and system for training a model
CN113938886A (en)Identity authentication platform test method, device, equipment and storage medium
CN114185808A (en)Automatic testing method and device, electronic equipment and computer readable storage medium
CN113015973B (en)Data processing method, storage medium, electronic device and data transaction system
CN112015715A (en)Industrial Internet data management service testing method and system
CN114189553B (en)Flow playback method, system and computing device
CN105391714B (en)Mobile application software automation signature and verification method and device
CN108073699B (en) Big data aggregation analysis method and device
CN111190824A (en)Monitoring method, monitoring device, terminal equipment and storage medium
CN117972717A (en)Trusted security multiparty computing method and device based on blockchain
CN114036068B (en) Update detection method, device, equipment and storage medium based on privacy security
CN110362493A (en)Electronic equipment response method and device, electronic equipment and readable storage medium storing program for executing
CN107466035B (en) A method and device for automated testing of simulated wireless nodes
CN113505397B (en) Authorization method, server, system and storage medium
CN113761503B (en)Interface call processing method and device
CN114282987A (en)Electronic report content verification method, system and storage medium based on block chain
Ferro et al.Standard-Based Remote Attestation: The Veraison Project

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20191018


[8]ページ先頭

©2009-2025 Movatter.jp