WO2019174375A1 - 接口测试方法、装置、设备及计算机可读存储介质 - Google Patents
接口测试方法、装置、设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2019174375A1 WO2019174375A1 PCT/CN2019/070486 CN2019070486W WO2019174375A1 WO 2019174375 A1 WO2019174375 A1 WO 2019174375A1 CN 2019070486 W CN2019070486 W CN 2019070486W WO 2019174375 A1 WO2019174375 A1 WO 2019174375A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- interface
- tested
- url
- test
- data
- Prior art date
Links
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
Definitions
- the present application relates to the field of testing technologies, and in particular, to an interface testing method, an interface testing device, an interface testing device, and a computer readable storage medium.
- the test process of the interface is often affected by various factors such as the quality, stability and timeliness of the external interface provided by the third-party software, which easily leads to the time lag of the interface test, and the requirements of the project software. There is a risk in going online.
- the subsequent regression test of the project software if the external interface provided by the third-party software is unstable, the regression test of the software cannot be performed, and the project software version cannot be released on time.
- the main purpose of the present application is to provide an interface test method, an interface test device, an interface test device, and a computer readable storage medium, which are intended to solve the technical problem that the interface test relies on an external interface in the prior art, and the interface cannot be tested in time. .
- the present application provides a method for interface testing, where the interface testing method includes the following steps:
- the interface to be tested is invoked during the operation of the interface test case, and the interaction data and the URL of the analog interface corresponding to the interface to be tested are obtained;
- the present application further provides an interface testing device, where the interface testing device includes:
- a running module configured to determine an interface test case corresponding to the interface to be tested, and execute a script corresponding to the interface test case to run the interface test case;
- the URL first obtaining module is configured to invoke the interface to be tested during the running of the interface test case, and obtain the interaction data and the URL of the analog interface corresponding to the interface to be tested;
- a URL requesting module configured to generate an interaction request according to the interaction data and the URL, and send the interaction request to a server, where the test server calls the analog interface to process the received according to the URL in the interaction request.
- a processing module for processing the received response data.
- the present application further provides the interface testing device, the device comprising: a memory, a processor, and interface test readable instructions stored on the memory and operable on the processor, The steps of the interface test method as described above are implemented when the interface test readable instructions are executed by the processor.
- the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores interface test readable instructions, and the interface test readable instructions are executed by a processor.
- the steps of the interface test method as described above are implemented.
- An interface test method, an interface test device, an interface test device, and a computer readable storage medium which are provided by the embodiments of the present application, determine an interface test case corresponding to the interface to be tested, and execute a script corresponding to the interface test case to run The interface test case; calling the interface to be tested during the running of the test case, and acquiring the interaction data and the URL of the simulation interface corresponding to the interface to be tested; generating an interaction request according to the interaction data and the URL, and The interaction request is sent to the server, for the test server to process the received interaction data according to the invoked analog interface according to the URL in the interaction request and feed back the response data; and process the received response data.
- the application sends an interaction request to the test server through the test machine with the URL of the analog interface corresponding to the interface to be tested, and the test server invokes the analog interface corresponding to the URL to process the received interaction data and feed back the response data for interface testing, thereby achieving project software development.
- the interface can be tested independently without relying on the external interface.
- FIG. 1 is a schematic structural diagram of a terminal in a hardware operating environment involved in a solution according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of a first embodiment of an interface testing method according to the present application
- FIG. 3 is a schematic flowchart of a second embodiment of an interface testing method according to the present application.
- FIG. 4 is a schematic flowchart of a third embodiment of an interface testing method according to the present application.
- FIG. 5 is a schematic flowchart diagram of a fourth embodiment of an interface testing method according to the present application.
- FIG. 6 is a schematic flowchart of a fifth embodiment of an interface testing method according to the present application.
- FIG. 7 is a schematic flowchart diagram of a sixth embodiment of an interface testing method according to the present application.
- the main solution of the embodiment of the present application is: determining an interface test case corresponding to the interface to be tested, and executing a script corresponding to the interface test case to run the interface test case; and calling the test to be tested during the test case running process And obtaining an interaction data and a URL of the analog interface corresponding to the interface to be tested; generating an interaction request according to the interaction data and the URL, and sending the interaction request to the server, where the test server is configured according to the The URL in the interaction request invokes the analog interface to process the received interaction data and feed back the response data; and processes the received response data.
- the interaction between the interface and the external interface is often affected by various factors such as the quality, stability, and timeliness of the external interface provided by the third-party software, which may easily lead to interface testing time. Lagging behind, the demand for project software is on the line.
- the present application provides a solution for the test server to send an interaction request to the test server by using the URL corresponding to the interface to be tested, and the test interface corresponding to the URL of the test server processes the received interaction data and feeds back the response data for interface testing.
- the interface test can be performed independently without relying on the external interface.
- FIG. 1 is a schematic structural diagram of a terminal in a hardware operating environment involved in an embodiment of the present application.
- the terminal in this embodiment is an interface test device.
- the interface test device may include a processor 1001, such as a CPU, a communication bus 1002, and a memory 1003.
- the communication bus 1002 is used to implement connection communication between these components.
- the memory 1003 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
- the memory 1003 can also optionally be a storage device independent of the aforementioned processor 1001.
- terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
- an operating system and interface test application readable instructions may be included in memory 1003 as a computer storage medium.
- the processor 1001 can be used to invoke interface test readable instructions stored in the memory 1003 and perform the operations in the methods of the following embodiments relating to interface testing.
- a first embodiment of the present application provides a method for interface testing, where the method includes:
- Step S10 Determine an interface test case corresponding to the interface to be tested, and execute a script corresponding to the interface test case to run the interface test case.
- the corresponding interface test cases are classified according to the type of the interface to be tested, and the corresponding test scripts are configured for each type of interface test case. Run the interface test case by calling and executing the test script for the interface test case.
- step S20 the interface to be tested is invoked during the operation of the interface test case, and the interaction data and the URL of the analog interface corresponding to the interface to be tested are obtained.
- test machine After entering the test phase after the software code development is completed, for the interface test, multiple sets of interface test cases are designed according to the functions implemented by the software code and the performance to be achieved.
- the test machine calls the external interface, that is, the interface to be tested, during the running of the interface test case.
- the test server In order to make the interface test case run independently in the complete test environment, build the test server and build the analog interface corresponding to the interface to be tested for testing.
- the test server saves the URL of the analog interface for the test machine to obtain.
- Step S30 generating an interaction request according to the interaction data and the URL, and sending the interaction request to a server, where the test server processes the received according to the call of the analog interface according to the URL in the interaction request. Interact data and feed back response data.
- the test machine issues an interactive request with the external interface, that is, the URL of the analog interface corresponding to the interface to be tested, instead of the interactive request made to the actual external interface.
- Step S40 processing the received response data.
- test machine When the test machine obtains the response data fed back by the test server, the test machine processes the response data, and extracts key information for the judgment of the interface test case code branch, the input of the next function or the record of the state information to support the interface test. The use case continues to run.
- the newly developed software code implements the function of cooperating with KFC to issue third-party coupons.
- the software code calls the KFC interface to get the coupon, but KFC has no test environment for the call test, and the test server builds the analog interface to simulate the KFC return coupon code.
- test machine runs the interface test case, and sends a coupon information query request to the test server with the URL of the analog interface corresponding to the KFC coupon link address.
- the test server invokes the corresponding analog interface according to the received coupon information query request, simulates the interface parsing request, and obtains the information data from the coupon database according to the request indication, including reading the use category of the coupon, the use time limit, and the use activity. A variety of information such as restrictions.
- the analog interface encapsulates the read coupon information data into a response format and returns it to the test machine.
- the test machine obtains the coupon information from the corresponding data received, and continues to run the code to provide the coupon download function.
- the functions implemented by the software code in this example also include the trading, modification, deletion, and coupon downloading statistics of the coupons. In the test cases corresponding to these functions, the same steps are used to call the analog interface for testing.
- the interface test can be performed efficiently in an independent, complete, and highly automated test environment. It avoids problems such as waiting for the external interface to develop for too long, frequently adapting the external interface changes, and calling the external interface due to the dependence on the external interface.
- the second embodiment of the present application provides a method for interface testing based on the first embodiment.
- the embodiment includes:
- step S50 the interface name to be tested and the URL of the analog interface corresponding to the interface name to be tested are obtained.
- the test server first obtains an interface test parameter set, and each interface test parameter set corresponds to an interface to be tested.
- the parameter set includes the interface name to be tested, the preset interface return data type, the preset interface return data, and the interface test expected result.
- the test server establishes a corresponding analog interface according to the interface test parameter set, associates the URL of the analog interface with the interface test parameter set, and stores it in the database.
- the test machine obtains the interface test parameter set by accessing the database of the test server, obtains the interface name to be tested from the interface test parameter set, and obtains the URL of the corresponding analog interface.
- Step S60 Find the interface to be tested in the interface test case code by using the interface name to be tested.
- the tester looks up the code that calls the interface to be tested in the test case code according to the interface name to be tested in the interface test parameter set.
- the name of the test case code used to identify the interface to be tested must be consistent with the test interface name; or if you do not want to impose too many restrictions on the name of the test interface to be tested, you can indicate the test interface in the comment. Name, easy to find.
- step S70 the URL of the interface to be tested is configured as the URL of the analog interface corresponding to the interface name to be tested.
- the URL of the interface to be tested When the URL of the interface to be tested is found in the form of a string, it is directly replaced with a string corresponding to the URL of the analog interface; when the URL of the interface to be tested is found, it is stored in a specific data table as a variable. , the URL replacement of the analog interface is stored in the storage location in its corresponding data table.
- the URL of the interface to be tested is configured as the URL of the corresponding analog interface, thereby ensuring accurate and accurate generation of the interface test case, and improving the test. Use case development efficiency.
- the third embodiment of the present application provides a method for interface testing based on the first embodiment or the second embodiment.
- the embodiment includes:
- Step S80 obtaining a data type of the response data.
- the interaction process with the external interface is different, and the test machine that runs the test case of the software code expects different types of data to respond.
- the software to be tested belongs to an e-commerce website, and a third-party payment platform interface is generally called for the user to implement the transaction payment function.
- the XML file returned by the third-party payment platform interface includes the buyer information, the seller information, the transaction number, the transaction time, and the like. Pay for relevant information.
- the software to be tested belongs to the life entertainment application, and will access various third-party software interfaces such as a movie theater, a shopping mall, a traffic map, and weather information.
- the third-party software interface extracts the data it needs from the database according to the access request, assembles it into an XML file or a JSON file and sends it to the data.
- Both the XML file and the JSON file can be displayed in a variety of styles on the test machine in a pre-agreed format.
- the server can also return HTML files.
- Step S90 determining whether the data type of the response data is a preset data type.
- the corresponding response data is generated according to the preset return data type in the interface test parameter set and sent to the test machine.
- the test machine receives the feedback data sent by the test server, it determines whether the data type of the received feedback data is correct, so as to find the error of the test case code itself or the error of the analog interface in advance, to avoid obtaining an incorrect test result.
- Step S100 Perform the step of processing the received response data if the data type of the response data is the preset data type.
- the default data type indicates that the analog interface invoked by the test machine through the URL is correct, and the analog interface on the test server runs correctly, and can continue to execute based on the response data. Test case.
- the fourth embodiment of the present application provides a method for interface testing according to any one of the first to third embodiments.
- the embodiment includes:
- Step S110 determining whether the value of the response data exceeds a preset range.
- the response data of the interface to be tested contains numerical information
- Some of the interface parameters to be tested set the specific values returned when the analog interface is called, and some specify the range of values of the data returned when the analog interface is called.
- the tester needs to detect the correctness of the value in the received response data according to the value or range of values of the returned data preset in the interface parameter set to be tested.
- Step S120 if the value of the response data does not exceed the preset range, the step of processing the response data is performed.
- the tester determines that the value in the received response data does not exceed the preset range, it indicates that the response data has passed the abnormality detection, and the subsequent processing can be continued.
- the response data is processed and the test case code is continued if the preset range is not exceeded, thereby ensuring that the test case is correctly operated and the reliability of the test result is improved.
- the fifth embodiment of the present application provides a method for interface testing, and the steps of this embodiment include:
- step S130 the test server receives an interaction request carrying data.
- Step S140 the test server acquires interaction data and a URL in the request.
- Step S150 The test server invokes an analog interface corresponding to the URL to process the interaction data to generate response data.
- Step S160 the test server feeds back the response data.
- the test server assists the test machine to complete the test case of the software code by calling the analog interface to process the interactive request for carrying the data sent by the test machine.
- the following describes the process of setting up the test server with the test function.
- the Restful framework implements a variety of web application services, of which Jersey is the mainstream software framework for implementing Restful-style web services in accordance with the JAX-RS specification.
- Tomcat Configure Tomcat in Eclipse to publish the web application server of the test server in parallel, and implement the web server application service including the analog interface function.
- Tomcat is an open source, lightweight web application server.
- the test server obtains the information of the interface to be tested, and generates a corresponding analog interface according to the interface information to be tested.
- the test server obtains the interface test parameter set through the interface document, and generates an analog interface corresponding to the interface to be tested according to the interface test parameter set.
- the interface document is written in a pre-agreed format, or in a uniform file format, such as JSON format.
- JSON JavaScript Object Notation
- JSON is a lightweight data exchange format that is well readable and easy to write.
- the calling function automatically processes the JSON format interface document, and parses out the name of the interface to be tested, the type of data that needs to be returned, the specific returned data, or the range of data that needs to be returned.
- the test server After obtaining the relevant information of the interface to be tested, the test server generates an analog interface by defining corresponding classes and methods.
- the test server determines a URL corresponding to the analog interface, and associates the URL with the interface to be tested.
- the hierarchical structure of the URL address can be designed as: project name/function module/analog interface number.
- the test server saves the name of the interface to be tested and the URL of the analog interface corresponding to the interface name to be tested, for the interface tester to obtain.
- the test server associates the interface test parameter set with the URL of the analog interface and saves it in an interface test database for acquisition by the interface tester.
- the test server processes the interactive request carrying the data by calling the analog interface, and feeds the response data to the test machine, providing an independent, complete, and stable test environment for functional testing of the software code involving the external interface.
- the sixth embodiment of the present application provides a method for interface testing based on the fifth embodiment.
- the method includes:
- Step S170 Select a pre-stored analog interface template according to the preset interface return data type.
- analog interface template is established.
- the analog interface is implemented by function code, so the corresponding analog interface template is actually a function code template.
- the analog interface template of the corresponding type is selected according to the interface return data type preset by the analog interface. For example, the analog interface that returns the data type to XML data selects the analog interface template that returns the XML data, and returns the analog interface template that returns the JSON data to the analog interface whose data type is JSON data.
- analog interface templates that handle different data types and HTTP behavior types based on the data type returned by the analog interface and the HTTP behavior type handled by the analog interface. For example, define processing HTTP GET request and return the mock interface template of the XML data, define the analog interface template that processes the HTTP GET request and return the JSON data, and define the processing HTTP POST requests and returns an analog interface template for XML data, defining an analog interface template that processes HTTP POST requests and returns JSON data.
- Step S180 Generate an analog interface corresponding to the interface to be tested according to the analog interface template.
- the pre-stored analog interface template is selected according to the preset interface return data type, and the analog interface template corresponding to the interface to be tested is generated by the selected analog interface template, thereby reducing the development workload of the analog interface and improving the development efficiency of the analog interface. , save interface test time of software code.
- the application also provides an interface testing device, the interface testing device comprising:
- a running module configured to determine an interface test case corresponding to the interface to be tested, and execute a script corresponding to the interface test case to run the interface test case;
- the URL first obtaining module is configured to invoke the interface to be tested during the running of the interface test case, and obtain the interaction data and the URL of the analog interface corresponding to the interface to be tested;
- a URL requesting module configured to generate an interaction request according to the interaction data and the URL, and send the interaction request to a server, where the test server calls the analog interface to process the received according to the URL in the interaction request.
- a processing module for processing the received response data.
- the application also provides an interface testing device, the device comprising: a memory, a processor, and interface test readable instructions stored on the memory and executable on the processor, the interface test readable instructions being The steps of the interface testing method involved in the above embodiments are implemented when the processor is executed.
- the embodiment of the present application further provides a computer readable storage medium, which may be a non-volatile readable storage medium, where the computer readable storage medium stores interface test readable instructions, The steps of the interface test method involved in the above embodiments are implemented when the interface test readable instructions are executed by the processor.
- the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
- a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, 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
一种接口测试的方法、接口测试装置、接口测试设备和计算机可读存储介质,所述方法包括:确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例(S10);在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL(S20);根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据(S30);处理接收到的响应数据(S40)。该方法通过以模拟接口的URL发出交互请求,获取模拟接口响应的交互数据进行接口测试,实现了无需依赖外部接口的独立的接口测试。
Description
本申请要求于2018年3月16日提交中国专利局、申请号为201810217336.1、发明名称为“接口测试方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及测试技术领域,尤其涉及一种接口测试方法、接口测试装置、接口测试设备和计算机可读存储介质。
背景技术
随着计算机网络技术的不断发展,一些大型的应用服务项目软件开发中会涉及和多个第三方软件的外部接口。为了在项目开发结束时提供高质量的软件版本,在项目软件开发的过程中需要提前对外部接口进行完善的测试。
在现有技术中,对接口的测试过程中往往会受到第三方软件提供的外部接口的质量、稳定性与及时性等多种因素的影响,容易导致接口测试的时间滞后,使得项目软件的需求上线存在风险。同时在项目软件的后续回归测试过程中,若第三方软件提供的外部接口不稳定,则无法进行软件的回归测试,使项目软件版本无法按时发布。
上述内容仅用于辅助理解本申请的技术方案,并不代表承认上述内容是现有技术。
发明内容
本申请的主要目的在于提供一种接口测试的方法、接口测试装置、接口测试设备和计算机可读存储介质,旨在解决现有技术中接口测试依赖外部接口,无法及时对接口进行测试的技术问题。
为实现上述目的,本申请提供一种接口测试的方法,所述接口测试方法包括如下步骤:
确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;
在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;
根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;
处理接收到的响应数据。
此外,为实现上述目的,本申请还提供一种接口测试装置,该接口测试装置包括:
运行模块,用于确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;
URL第一获取模块,用于在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;
URL请求模块,用于根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;
处理模块,用于处理接收到的响应数据。
此外,为实现上述目的,本申请还提供所述接口测试设备,该设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的接口测试可读指令,所述接口测试可读指令被所述处理器执行时实现如上所述的接口测试方法的步骤。
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有接口测试可读指令,所述接口测试可读指令被处理器执行时实现如上所述的接口测试方法的步骤。
本申请实施例提出的一种接口测试的方法、接口测试装置、接口测试设备和计算机可读存储介质,确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;在所述测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理接收到的响应数据。
本申请通过测试机以待测试接口对应的模拟接口的URL向测试服务器发出交互请求,测试服务器调用URL对应的模拟接口处理收到的交互数据并反馈响应数据以供接口测试,达到了项目软件开发过程中可以独立进行接口测试、无需依赖外部接口的效果。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的终端结构示意图;
图2为本申请接口测试方法第一实施例的流程示意图;
图3为本申请接口测试方法第二实施例的流程示意图;
图4为本申请接口测试方法第三实施例的流程示意图;
图5为本申请接口测试方法第四实施例的流程示意图;
图6为本申请接口测试方法第五实施例的流程示意图;
图7为本申请接口测试方法第六实施例的流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的主要解决方案是:确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;在所述测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理接收到的响应数据。
由于现有技术中,对接口的测试过程中依赖和外部接口的交互,往往会受到第三方软件提供的外部接口的质量、稳定性与及时性等多种因素的影响,容易导致接口测试的时间滞后,使得项目软件的需求上线存在风险。
本申请提供一种解决方案,通过测试机以待测试接口对应的URL向测试服务器发出交互请求,测试服务器调用URL对应的模拟接口处理收到的交互数据并反馈响应数据以供接口测试,达到了项目软件开发过程中可以独立进行接口测试、无需依赖外部接口的效果。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的终端结构示意图。
本申请实施例终端为接口测试设备。
如图1所示,该接口测试设备可以包括:处理器1001,例如CPU,通信总线1002,存储器1003。其中,通信总线1002用于实现这些组件之间的连接通信。存储器1003可以是高速RAM存储器,也可以是稳定的存储器(non-volatile
memory),例如磁盘存储器。存储器1003可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1003中可以包括操作***和接口测试应用可读指令。
在图1所示的装置中,处理器1001可以用于调用存储器1003中存储的接口测试可读指令,并执行以下各实施例涉及接口测试的方法中的操作。
参照图2,本申请第一实施例提供一种接口测试的方法,所述方法包括:
步骤S10,确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例。
根据待测试接口的类型将其对应的接口测试用例进行分类,为每类接口测试用例配置对应的测试脚本。通过调用并执行接口测试用例对应的测试脚本,运行接口测试用例。
步骤S20,在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL。
在软件代码开发完成后进入到测试阶段时,对于接口的测试,根据软件代码所实现的功能以及要达到的性能设计多组接口测试用例。测试机在运行接口测试用例过程中会调用到外部接口即待测试接口,为了使接口测试用例可以在完整的测试环境中独立运行,搭建测试服务器并构建待测试接口对应的模拟接口以供测试。测试服务器保存模拟接口的URL以供测试机获取。
步骤S30,根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据。
在测试机上运行测试用例运行过程中,由测试机以外部接口即待测试接口对应的模拟接口的URL发出交互请求,以代替对实际的外部接口提出的交互请求。
步骤S40,处理接收到的响应数据。
当测试机获取到测试服务器反馈的响应数据,测试机对响应数据进行处理,从中提取关键的信息以供接口测试用例代码分支的判断、下一个函数的输入或者状态信息的记录,以支持接口测试用例的继续运行。
以下通过举例说明本实施例中模拟接口代替待测试接口即真实的外部接口协助接口测试的具体过程。
例如刚开发完毕的软件代码实现的功能为与肯德基合作发放第三方优惠券。软件代码调用肯德基接口获取优惠券,但是肯德基无测试环境供调用测试,测试服务器构建模拟接口来模拟肯德基返回优惠券码。
假设测试机上开始运行该软件代码的一个接口测试用例,其测试的功能为提供肯德基电子优惠券的下载。测试机运行该接口测试用例,以肯德基优惠券链接地址对应的模拟接口的URL发送优惠券信息查询请求给测试服务器。测试服务器根据收到的优惠券信息查询请求调用对应的模拟接口,模拟接口解析请求,根据请求的指示从优惠券数据库中获取信息数据,包括读取优惠券的使用类别、使用时间限制和使用活动的限制等多种信息。模拟接口将读取到的优惠券信息数据按照预定格式封装成响应数据返回给测试机。测试机从收到的相应数据中获取到优惠券信息,继续运行代码以提供优惠券下载的功能。本例中的软件代码实现的功能中还包括优惠券的买卖、修改、删除、优惠券下载人数统计等,在这些功能对应的测试用例中都遵循同样的步骤调用模拟接口进行测试。
在本实施例中,通过在测试用例运行过程中,以待测试接口对应的模拟接口的URL发出接口测试请求,使接口测试得以在一个独立、完整、自动化程度高的测试环境中高效率的进行,避免了因为依赖外部接口而可能出现的等待外部接口开发时间过长、频繁适配外部接口变更以及调用外部接口出错等问题。
进一步的,参照图3,本申请第二实施例基于第一实施例提供一种接口测试的方法,本实施例在步骤S10之前包括:
步骤S50,获取待测试接口名以及所述待测试接口名对应的模拟接口的URL。
测试服务器首先获得接口测试参数集,每一个接口测试参数集对应一个待测试接口,该参数集中包括待测试接口名、预设的接口返回数据类型、预设的接口返回数据和接口测试期望结果。测试服务器根据接口测试参数集建立对应的模拟接口,将模拟接口的URL和接口测试参数集相关联,存入数据库。测试机通过访问测试服务器的数据库,获取到接口测试参数集,从接口测试参数集中获取待测试的接口名并获取其对应的模拟接口的URL。
步骤S60, 以所述待测试接口名在接口测试用例代码中查找待测试接口。
测试机根据接口测试参数集中的待测试接口名在测试用例代码中查找调用待测试接口的代码。为了提高查找的效率,测试用例代码中用于标识待测试接口的命名要和测试接口名保持一致;或者若不希望对待测试接口的标识命名做过多的限制,可以在注释中注明测试接口名,方便查找。
步骤S70,将查找到的待测试接口的URL配置成所述待测试接口名对应的模拟接口的URL。
当查找到的待测试接口的URL为字符串的形式,直接将其替换为模拟接口的URL对应的字符串;当查找到的待测试接口的URL是以变量的形式存储在特定的数据表中,将模拟接口的URL替换存储到其对应的数据表中的存储位置中。
在本实施例中,通过根据待测试接口名在测试用例代码中查找测试接口,将查找到的待测试接口的URL配置成对应的模拟接口的URL,保证准确无误的生成接口测试用例,提高测试用例开发效率。
进一步的,参照图4,本申请第三实施例基于第一实施例或第二实施例提供一种接口测试的方法,本实施例在步骤S40之前包括:
步骤S80,获取响应数据的数据类型。
当待测试的软件代码调用不同类型的外部接口时,和外部接口的交互流程不同,运行该软件代码的测试用例的测试机所期待响应的数据类型也不同。例如待测试软件属于电子商务网站,一般都会调用第三方支付平台接口供用户实现交易支付功能,第三方支付平台接口返回的XML文件中有买家信息、卖家信息、交易单号、交易时间等交易支付相关的信息。例如待测试软件属于生活娱乐类应用,会访问到电影院、商场、交通地图、气象信息等多种第三方软件接口。该第三方软件接口按照访问请求将其所需要的数据从数据库中提取出来,组装成XML文件或者JSON文件发送给数据。无论是XML文件还是JSON文件,都可以按照事先约定的格式在测试机以丰富多样的样式进行显示。此外,服务器还可以返回HTML文件。
步骤S90,判断所述响应数据的数据类型是否是预设的数据类型。
测试服务器构建的模拟接口在被调用时,按照接口测试参数集中预设的返回数据类型生成对应的响应数据并发送给测试机。当测试机接收到测试服务器发送的反馈数据时,判断接收到的反馈数据的数据类型是否正确,以提前发现测试用例代码本身的错误或者模拟接口的错误,避免得到不正确的测试结果。
步骤S100,若所述响应数据的数据类型是所述预设的数据类型则执行所述处理接收到的响应数据的步骤。
当测试机接收到的测试服务器响应数据的数据类型时预设的数据类型时,表明测试机通过URL调用的模拟接口方式正确,并且测试服务器上的模拟接口运行正确,可以基于该响应数据继续执行测试用例。
在本实施例中,通过判断接口返回数据类型是否正确,若正确时才处理返回数据并继续运行接口测试用例代码,有效保证了测试结果的准确性。
进一步的,参照图5,本申请第四实施例基于第一至第三任一实施例提供一种接口测试的方法,本实施例在步骤S40之前包括:
步骤S110,判断所述响应数据的数值是否超出预设范围。
当待测试接口的响应数据中包含数值信息时,为了避免错误的数据导致处理异常,需要对响应数据中的数值信息进行异常检测。有些待测试接口参数集中设置了模拟接口被调用时返回的具体数值,有些则规定了模拟接口被调用时返回的数据的数值范围。
在上述两种情况下,测试机都需要按照待测试接口参数集中预设的返回数据的数值或者数值范围检测接收到的响应数据中的数值的正确性。
步骤S120,若所述响应数据的数值未超出预设范围,则执行所述处理所述响应数据的步骤。
当测试机判断出接收到的响应数据中的数值未超出预设范围时,表明响应数据通过了异常检测,可以继续后续的处理。
在本实施例中,通过判断响应数据的数值是否超过预设范围,若没有超过预设范围才处理响应数据并继续运行测试用例代码,保证了测试用例得以正确运行,提高测试结果的可信度。
进一步的,参照图6,本申请第五实施例提供一种接口测试的方法,本实施例步骤包括:
步骤S130,测试服务器收到携带数据的交互请求。
步骤S140,所述测试服务器获取所述请求中的交互数据以及URL。
步骤S150,所述测试服务器调用所述URL对应的模拟接口对所述交互数据进行处理,以生成响应数据。
步骤S160,所述测试服务器反馈所述响应数据。
在本实施例中测试服务器通过调用模拟接口处理测试机发送的携带数据的交互请求来协助测试机完成软件代码的测试用例,下面具体介绍搭建具备测试功能的测试服务器的过程。
1)以Jersey、Tomcat搭建测试服务器框架
a.在Java的开发环境Eclipese中新建网页服务器工程作为测试服务器工程。
b.在搭建的测试服务器工程中加入Jersey的jar包,以使测试服务器之后创建的模拟接口可以应用Jersey
Restful框架实现多样化的网页应用服务,其中Jersey是按照JAX-RS规范标准实现Restful风格的网页服务的主流软件框架。
c.修改并保存测试服务器的配置代码,以支持Jersy Restful服务。
d.在Eclipse中配置Tomcat为测试服务器的网页应用服务器进行并行发布,实现包含模拟接口功能的网页服务器应用服务。其中,Tomcat是开源的轻量级的网页应用服务器,
支持 Servlet 和 JSP 运行的容器。Servlet 和 JSP 能根据实时需要,产生动态网页内容。
2)测试服务器获取待测试接口信息,根据待测试接口信息生成对应的模拟接口。
测试服务器通过接口文档获取接口测试参数集,并根据接口测试参数集生成和待测试接口对应的模拟接口。接口文档按照预先约定好的格式写好,或者采用统一的文件格式,比如JSON格式。JSON(JavaScript
Object Notation)是一种轻量级的数据交换格式,具有良好的可读和便于快速编写的特性。
例如测试服务器获取到接口JSON文件后,调用函数对JSON格式的接口文档进行自动化处理,解析出待测试接口名、需要返回的数据类型、具体的返回数据或需要返回的数据范围。测试服务器根据获取待测试接口的相关信息之后,通过定义对应的类和方法来生成模拟接口。
3)测试服务器确定模拟接口对应的URL,并将所述URL和所述待测试接口相关联。
由于测试服务器可能需要同时为不同项目生成和维护众多的模拟接口,如何设计好的URL地址结构是一个关键,可以将URL地址的层次结构设计为:项目名称/功能模块/模拟接口编号。
4)测试服务器保存待测试接口名以及所述待测试接口名对应的模拟接口的URL,以供接口测试机获取。
测试服务器把所述接口测试参数集和所述模拟接口的URL相关联并保存在接口测试数据库,以供接口测试机获取。
在本实施例中,测试服务器通过调用模拟接口处理携带数据的交互请求,并把响应数据反馈给测试机,为涉及外部接口的软件代码的功能测试提供了独立、完整和稳定的测试环境。
进一步的,参照图7,本申请第六实施例基于第五实施例提供一种接口测试的方法,步骤S130之前包括:
步骤S170,根据预设的接口返回数据类型选择预存的模拟接口模板。
为了使构建模拟接口的代码框架可被重用,减少人工重复生成代码的工作量,建立模拟接口模板。模拟接口是函数代码实现的,所以对应的模拟接口模板实际上是函数代码模板。
确定了待构建的模拟接口后,根据模拟接口预设的接口返回数据类型选择对应类型的模拟接口模板。例如,返回数据类型为XML数据的模拟接口选择返回XML数据的模拟接口模板,返回数据类型为JSON数据的模拟接口选择返回JSON数据的模拟接口模板。
还可以根据模拟接口返回的数据类型和模拟接口处理的HTTP行为类型联合定义处理不同数据类型和HTTP行为类型的模拟接口模板。例如定义处理HTTP
GET请求并返回XML数据的模拟接口模板,定义处理HTTP GET请求并返回JSON数据的模拟接口模板,定义处理HTTP
POST请求并返回XML数据的模拟接口模板,定义处理HTTP POST请求并返回JSON数据的模拟接口模板。
步骤S180,根据所述模拟接口模板生成所述待测试接口对应的模拟接口。
调用模拟接口模板生成模拟接口代码的基本框架代码后,根据模拟接口实现的具体功能,更改类、方法的命名和属性,添加相应的处理代码,以生成和待测试接口对应的模拟接口代码。
在本实施例中,通过根据预设的接口返回数据类型选择预存的模拟接口模板,以选择的模拟接口模板生成待测试接口对应的模拟接口代码,减少模拟接口开发工作量,提高模拟接口开发效率,节约软件代码的接口测试时间。
本申请还提供一种接口测试装置,该接口测试装置包括:
运行模块,用于确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;
URL第一获取模块,用于在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;
URL请求模块,用于根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;
处理模块,用于处理接收到的响应数据。
本申请还提供一种接口测试设备,该设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的接口测试可读指令,所述接口测试可读指令被所述处理器执行时实现上述各实施例涉及的接口测试方法的步骤。
此外,本申请实施例还提出一种计算机可读存储介质,计算机可读存储介质可以为非易失性可读存储介质,所述计算机可读存储介质上存储有接口测试可读指令,所述接口测试可读指令被处理器执行时实现上述各实施例涉及的接口测试方法的步骤。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种接口测试的方法,其特征在于,所述接口测试方法的步骤包括:确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理接收到的响应数据。
- 如权利要求1所述的接口测试的方法,其特征在于,所述确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例步骤之前包括:获取待测试接口名以及所述待测试接口名对应的模拟接口的URL;以所述待测试接口名在接口测试用例代码中查找待测试接口;将查找到的待测试接口的URL配置成所述待测试接口名对应的模拟接口的URL。
- 如权利要求1所述的一种接口测试的方法,其特征在于,处理接收到的响应数据步骤之前包括:获取响应数据的数据类型;判断所述响应数据的数据类型是否是预设的数据类型;若所述响应数据的数据类型是所述预设的数据类型则执行所述处理接收到的响应数据的步骤。
- 如权利要求1所述的一种接口测试的方法,其特征在于,所述处理响应数据步骤之前包括:判断所述响应数据的数值是否超出预设范围;若所述响应数据的数值未超出预设范围,则执行所述处理所述响应数据的步骤。
- 一种接口测试的方法,其特征在于,所述接口测试的方法包括以下步骤:测试服务器收到携带数据的交互请求;所述测试服务器获取所述请求中的交互数据以及URL;所述测试服务器调用所述URL对应的模拟接口对所述交互数据进行处理,以生成响应数据;所述测试服务器反馈所述响应数据。
- 如权利要求5所述的接口测试的方法,其特征在于,所述测试服务器收到交互请求的步骤之前包括:所述测试服务器获取待测试接口信息,根据所述待测试接口信息生成对应的模拟接口;所述测试服务器确定模拟接口对应的URL,并将所述URL和所述待测试接口相关联。
- 如权利要求6所述的接口测试的方法,其特征在于,所述根据所述接口测试参数集生成和待测试接口对应的模拟接口步骤包括:根据预设的接口返回数据类型选择预存的模拟接口模板;根据所述模拟接口模板生成所述待测试接口对应的模拟接口。
- 如权利要求6所述的接口测试的方法,其特征在于,所述测试服务器确定模拟接口对应的URL步骤之后包括:测试服务器保存待测试接口名以及所述待测试接口名对应的模拟接口的URL,以供接口测试机获取。
- 一种接口测试装置,其特征在于,所述接口测试装置包括:运行模块,用于确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;URL第一获取模块,用于在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;URL请求模块,用于根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理模块,用于处理接收到的响应数据。
- 如权利要求9所述的接口测试装置,其特征在于,所述接口测试装置还包括:URL第二获取模块,用于获取待测试接口名以及所述待测试接口名对应的模拟接口的URL;查找模块,用于以所述待测试接口名在接口测试用例代码中查找待测试接口;配置模块,用于将查找到的待测试接口的URL配置成所述待测试接口名对应的模拟接口的URL。
- 一种接口测试装置,其特征在于,所述接口测试装置包括:接收模块,用于测试服务器收到携带数据的交互请求;URL获取模块,用于所述测试服务器获取所述请求中的交互数据以及URL;处理模块,用于所述测试服务器调用所述URL对应的模拟接口对所述交互数据进行处理,以生成响应数据;发送模块,用于所述测试服务器反馈所述响应数据。
- 如权利要求11所述的接口测试装置,其特征在于,所述接口测试装置还包括:接口生成模块,用于所述测试服务器获取待测试接口信息,根据所述待测试接口信息生成对应的模拟接口;URL生成模块,用于所述测试服务器确定模拟接口对应的URL,并将所述URL和所述待测试接口相关联。
- 一种接口测试设备,其特征在于,所述设备包括:存储器、处理器、及存储在所述存储器上并可在所述处理器上运行的接口测试可读指令,所述接口测试可读指令被所述处理器执行时实现以下步骤:确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理接收到的响应数据。
- 如权利要13所述的接口测试设备,其特征在于,所述确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例步骤之前包括:获取待测试接口名以及所述待测试接口名对应的模拟接口的URL;以所述待测试接口名在接口测试用例代码中查找待测试接口;将查找到的待测试接口的URL配置成所述待测试接口名对应的模拟接口的URL。
- 一种接口测试设备,其特征在于,所述设备包括:存储器、处理器、及存储在所述存储器上并可在所述处理器上运行的接口测试可读指令,所述接口测试可读指令被所述处理器执行时实现以下步骤:测试服务器收到携带数据的交互请求;所述测试服务器获取所述请求中的交互数据以及URL;所述测试服务器调用所述URL对应的模拟接口对所述交互数据进行处理,以生成响应数据;所述测试服务器反馈所述响应数据。
- 如权利要求15所述的接口测试设备,其特征在于,所述测试服务器收到交互请求的步骤之前包括:所述测试服务器获取待测试接口信息,根据所述待测试接口信息生成对应的模拟接口;所述测试服务器确定模拟接口对应的URL,并将所述URL和所述待测试接口相关联。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有接口测试可读指令,所述接口测试可读指令被处理器执行时实现以下步骤:确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例;在所述接口测试用例运行过程中调用待测试接口,并获取交互数据以及待测试接口对应的模拟接口的URL;根据所述交互数据以及所述URL生成交互请求,并将所述交互请求发送至服务器,以供所述测试服务器根据所述交互请求中的URL调用模拟接口处理接收到的所述交互数据并反馈响应数据;处理接收到的响应数据。
- 如权利要17所述的计算机可读存储介质,其特征在于,所述确定待测试接口对应的接口测试用例,并执行所述接口测试用例对应的脚本,以运行所述接口测试用例步骤之前包括:获取待测试接口名以及所述待测试接口名对应的模拟接口的URL;以所述待测试接口名在接口测试用例代码中查找待测试接口;将查找到的待测试接口的URL配置成所述待测试接口名对应的模拟接口的URL。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有接口测试可读指令,所述接口测试可读指令被处理器执行时实现以下步骤:测试服务器收到携带数据的交互请求;所述测试服务器获取所述请求中的交互数据以及URL;所述测试服务器调用所述URL对应的模拟接口对所述交互数据进行处理,以生成响应数据;所述测试服务器反馈所述响应数据。
- 如权利要求19所述的计算机可读存储介质,其特征在于,所述测试服务器收到交互请求的步骤之前包括:所述测试服务器获取待测试接口信息,根据所述待测试接口信息生成对应的模拟接口;所述测试服务器确定模拟接口对应的URL,并将所述URL和所述待测试接口相关联。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810217336.1A CN109726098A (zh) | 2018-03-16 | 2018-03-16 | 接口测试方法、装置及计算机可读存储介质 |
CN201810217336.1 | 2018-03-16 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019174375A1 true WO2019174375A1 (zh) | 2019-09-19 |
Family
ID=66293771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/070486 WO2019174375A1 (zh) | 2018-03-16 | 2019-01-04 | 接口测试方法、装置、设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109726098A (zh) |
WO (1) | WO2019174375A1 (zh) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347597B (zh) * | 2019-07-04 | 2023-09-26 | Oppo广东移动通信有限公司 | 图片服务器的接口测试方法、装置、存储介质与移动终端 |
CN110609786B (zh) * | 2019-08-16 | 2024-07-12 | 平安科技(深圳)有限公司 | 软件测试方法、装置、计算机设备和存储介质 |
CN110515599A (zh) * | 2019-08-30 | 2019-11-29 | 北京浪潮数据技术有限公司 | 一种基于配置的数据开放接口实现方法和*** |
CN111159039A (zh) * | 2019-12-30 | 2020-05-15 | 中信百信银行股份有限公司 | 一种服务模拟方法、***、设备和存储介质 |
CN111459814A (zh) * | 2020-03-30 | 2020-07-28 | 上海依图网络科技有限公司 | 自动化测试用例生成方法、装置及电子设备 |
CN111752644A (zh) * | 2020-06-18 | 2020-10-09 | 北京字节跳动网络技术有限公司 | 接口模拟方法、装置、设备及存储介质 |
CN111813668B (zh) * | 2020-06-30 | 2023-03-24 | 烽火通信科技股份有限公司 | 复盘软件程序执行过程的方法、存储介质、设备及*** |
CN111782533A (zh) * | 2020-07-01 | 2020-10-16 | 江苏云柜网络技术有限公司 | 测试方法、装置、电子设备及存储介质 |
CN112783776A (zh) * | 2021-01-27 | 2021-05-11 | 上海淇玥信息技术有限公司 | 一种基于接口路由的测试方法、装置和电子设备 |
CN112783779B (zh) * | 2021-01-28 | 2024-06-04 | 北京达佳互联信息技术有限公司 | 测试用例的生成方法、装置、电子设备和存储介质 |
CN113742250B (zh) * | 2021-11-05 | 2022-03-29 | 广州易方信息科技股份有限公司 | 接口自动测试方法及装置 |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107741911A (zh) * | 2017-11-01 | 2018-02-27 | 广州爱九游信息技术有限公司 | 接口测试方法、装置、客户端及计算机可读存储介质 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9792203B2 (en) * | 2013-11-14 | 2017-10-17 | Sap Se | Isolated testing of distributed development projects |
CN104881343B (zh) * | 2014-02-27 | 2017-03-15 | 北京京东尚科信息技术有限公司 | 一种测试方法和测试*** |
CN106155891B (zh) * | 2015-04-02 | 2019-07-05 | 阿里巴巴集团控股有限公司 | 接口测试方法、接口描述数据库生成方法及装置 |
CN106528400A (zh) * | 2016-09-22 | 2017-03-22 | 深圳峰创智诚科技有限公司 | Mock测试方法和装置 |
-
2018
- 2018-03-16 CN CN201810217336.1A patent/CN109726098A/zh active Pending
-
2019
- 2019-01-04 WO PCT/CN2019/070486 patent/WO2019174375A1/zh active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107741911A (zh) * | 2017-11-01 | 2018-02-27 | 广州爱九游信息技术有限公司 | 接口测试方法、装置、客户端及计算机可读存储介质 |
Non-Patent Citations (4)
Title |
---|
"Mockjs. No longer have to chase the backend partner for an interface", JUEJIN.IM, 22 August 2017 (2017-08-22), pages 1 - 6, Retrieved from the Internet <URL:https://juejin.im/post/599clbfaf265da248d0cc6b6> * |
ANNONYMOUS: "Correct open posture of the interface test platform", THREE MUSKETEERS TEAM, 9 February 2018 (2018-02-09), pages 1 - 5, Retrieved from the Internet <URL:http://www.10tiao.com/html/212/201802/2247484644/1.html.> * |
ANONYMOUS: "Mock server", OUT OF MEMORY, 26 February 2015 (2015-02-26), pages 1 - 5, XP055635584, Retrieved from the Internet <URL:http://ju.outofmemory.cn/entry/131671> * |
YU ZHAOHUI: "Mock server- Building a universal mock server system for functional testing", INFOQ, 18 May 2013 (2013-05-18), pages 1 - 4, XP55635578, Retrieved from the Internet <URL:https://infoq.cn/article/auto-test-mock-server> * |
Also Published As
Publication number | Publication date |
---|---|
CN109726098A (zh) | 2019-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019174375A1 (zh) | 接口测试方法、装置、设备及计算机可读存储介质 | |
WO2019165691A1 (zh) | 自动生成测试案例的方法、装置、设备及可读存储介质 | |
WO2019192085A1 (zh) | 银企直联通信方法、装置、设备及计算机可读存储介质 | |
WO2019075973A1 (zh) | 应用程序的测试方法及装置 | |
WO2018107610A1 (zh) | 业务数据处理方法、***、设备及计算机可读存储介质 | |
WO2017041538A1 (zh) | 终端用户界面的受控显示方法及装置 | |
WO2019127837A1 (zh) | 建表脚本生成方法、装置、设备及计算机可读存储介质 | |
WO2019104876A1 (zh) | 保险产品的推送方法、***、终端、客户终端及存储介质 | |
WO2019223070A1 (zh) | 应用测试方法、装置、设备及可读存储介质 | |
WO2019169814A1 (zh) | 自动生成中文注释的方法、装置、设备及存储介质 | |
WO2018205545A1 (zh) | 数据生成方法、装置、终端及计算机可读存储介质 | |
WO2019205280A1 (zh) | 服务器的测试方法、装置、设备及计算机可读存储介质 | |
WO2019100638A1 (zh) | 数据同步方法、装置、设备及存储介质 | |
WO2019037396A1 (zh) | 账户清结算方法、装置、设备及存储介质 | |
WO2018227880A1 (zh) | 数据比对方法、装置、设备及可读存储介质 | |
WO2019061613A1 (zh) | 贷款资质筛选方法、装置及计算机可读存储介质 | |
WO2018205376A1 (zh) | 一种关联信息查询方法、终端、服务器管理***及计算机可读存储介质 | |
WO2018098880A1 (zh) | 网站信息下载方法及装置 | |
WO2020224247A1 (zh) | 基于区块链的数据溯源方法、装置、设备及可读存储介质 | |
WO2015144089A1 (en) | Application recommending method and apparatus | |
WO2014000635A1 (zh) | 阅读器提供服务的方法、阅读器、终端及计算机存储介质 | |
WO2019041832A1 (zh) | 修改源数据库表结构的方法、服务器、***及存储介质 | |
WO2018149190A1 (zh) | 组件调试方法、装置、设备和计算机可读存储介质 | |
WO2018120430A1 (zh) | 一种页面构建方法、终端、计算机可读存储介质及页面构建设备 | |
WO2019024219A1 (zh) | 文档自动生成方法、装置、文档自动生成器及介质 |
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: 19767945 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: 19767945 Country of ref document: EP Kind code of ref document: A1 |