WO2018014580A1 - Data interface test method and apparatus, and server and storage medium - Google Patents

Data interface test method and apparatus, and server and storage medium Download PDF

Info

Publication number
WO2018014580A1
WO2018014580A1 PCT/CN2017/078351 CN2017078351W WO2018014580A1 WO 2018014580 A1 WO2018014580 A1 WO 2018014580A1 CN 2017078351 W CN2017078351 W CN 2017078351W WO 2018014580 A1 WO2018014580 A1 WO 2018014580A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
interface
test case
execution machine
case
Prior art date
Application number
PCT/CN2017/078351
Other languages
French (fr)
Chinese (zh)
Inventor
曹静
岑海菊
张博文
毛皓
邹文涛
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018014580A1 publication Critical patent/WO2018014580A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present invention relates to the field of testing technologies, and in particular, to a data interface testing method, apparatus, server, and storage medium.
  • a data interface testing method, apparatus, server, and storage medium are provided.
  • a data interface test method including:
  • a data interface testing device comprising:
  • the instruction acquisition module is configured to obtain a test case selection instruction input by the terminal in the interface test webpage;
  • test case selection module configured to select an interface test case in the test case set according to the test case selection instruction
  • test case sending module configured to send the selected interface test case to the test execution machine
  • test result storage module configured to receive the test result generated by the test execution machine after running the selected interface test case and store the test result
  • test result sending module configured to return the test result to the terminal.
  • a server comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, such that the processor performs the following steps:
  • One or more non-volatile storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • FIG. 1 is an application environment diagram of a data interface test system in an embodiment
  • FIG. 2 is a functional block diagram of a server in a data interface test system in an embodiment
  • FIG. 3 is a schematic flow chart of a data interface test method in an embodiment
  • FIG. 4 is a schematic flow chart of steps of collecting an interface test case in an embodiment
  • FIG. 5 is a schematic flow chart of a data interface testing method in another embodiment
  • FIG. 6 is a schematic flow chart of steps of searching for a test execution machine in an embodiment
  • FIG. 7 is a flow chart showing the steps of generating a test result in one embodiment
  • FIG. 8 is a functional block diagram of a data interface test apparatus in an embodiment
  • FIG. 9 is a functional block diagram of a data interface testing device in another embodiment.
  • FIG. 10 is a functional block diagram of a data interface testing device in still another embodiment
  • test case sending module 11 is a functional block diagram of a test case sending module in an embodiment
  • Figure 12 is a functional block diagram of a test result storage module in one embodiment.
  • FIG. 1 is an application environment diagram of a data interface test system in an embodiment.
  • the data interface test system includes a terminal 110, a server 120, and a test executive 130.
  • the terminal 110 and the test execution machine 130 are connected to the server 120 through a network.
  • the terminal 110, the server 120, and the test executive 130 may each be one or more.
  • the server 120 includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire server 120.
  • the non-volatile storage medium of the server 120 stores an operating system and computer executable instructions.
  • the computer executable instructions are executable by a processor to implement a data interface testing method as provided by the following embodiments.
  • the internal memory in server 120 provides a cached operating environment for operating systems and computer executable instructions in a non-volatile storage medium.
  • the network interface is used for network communication with the terminal 110 or the test executive machine 130. It can be understood that the server 120 can be implemented by a separate server or a server cluster composed of multiple servers.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
  • the specific server may include a ratio. More or fewer components are shown in Figure 2, or some components are combined, or have different component arrangements.
  • a data interface test method is provided. This embodiment is applied to the server 120 in the data interface test system of FIG. 1 as an example.
  • the server 120 runs a data interface.
  • the test program implements the data interface test method through the data interface test program. The method specifically includes the following steps:
  • Step 302 Acquire a test case selection instruction input by the terminal in the interface test webpage.
  • the terminal 110 sends an acquisition request of the interface test webpage to the server 120.
  • the server 120 receives the acquisition request of the interface test webpage
  • the server 120 returns the data of the interface test webpage to the terminal 110.
  • the terminal 110 tests the webpage according to the data display interface of the interface test webpage returned by the server 120, and controls the data interface test system by using the interface test webpage displayed in the terminal.
  • the tester inputs a test case selection instruction in the interface test webpage displayed by the terminal, and the terminal 110 sends the selection instruction of the test case to the server 120.
  • the test case selection instruction may include a test case identifier, and the test case identifier is used to uniquely identify the test case, and may specifically be at least one of a test case name, a code, a keyword, and a data interface identifier.
  • Test case also known as a test case, is a set of test inputs, execution conditions, and expected results for a test target to test the data interface of the test target or verify that the data interface meets a particular requirement.
  • Step 304 Select an interface test case in the test case set according to the test case selection instruction.
  • the server 120 extracts the test case identifier in the test case selection instruction, and selects a test that matches the test case identifier in the test case set according to the test case identifier.
  • the test case identifier in the test case selection instruction may be one or more.
  • Step 306 the selected interface test case is sent to the test execution machine.
  • the server 120 searches the test execution machine 130 and sends the interface test case to the found test execution machine 130.
  • the server 120 extracts the tags of the test execution machine from the selected interface test cases, and searches for the corresponding test execution machine 130 based on the extracted tags.
  • Step 308 Receive test results generated by the test execution machine running the selected interface test case and store the test results.
  • the test execution machine 130 extracts the interface information from the test case, generates a test data request according to the interface information, and the test execution machine 130 sends the test data request to the server 120.
  • the server 120 extracts the interface information in the test request data, searches for the test data corresponding to the extracted interface information, and returns the found test data to the test execution machine 130.
  • the test execution machine 130 tests the test data returned by the server 120 according to the interface test case to generate test results.
  • the test execution machine 130 sends the test result back to the server 120, and the server 120 stores the test result corresponding to the interface test case. Specifically, the test result is stored corresponding to the identifier of the interface test case.
  • step 310 the test result is returned to the terminal.
  • the server 130 stores the test result returned by the test execution machine
  • the server sends the test result to the terminal 110, and the terminal 110 displays the test result in the interface test page.
  • the terminal may input a test case selection instruction, obtain a test case selection instruction input by the terminal, select an interface test case in the test case set according to the test case selection instruction, and do not need to rewrite the interface test.
  • Example. The selected interface test case is sent to the configured test execution machine, and the test execution machine is not required to be reconfigured, and the test result of the interface test case selected by the test execution machine is obtained and stored, and the test result is returned to the terminal.
  • it is not necessary to rewrite the interface test case and the terminal can directly input the test case selection instruction in the interface test webpage, so that the interface test case that has been edited can be selected in the test case set, and the interface test case is not needed.
  • Reconfigure the test execution machine directly send the selected interface test case to the configured test execution machine, so that the test execution machine uses the selected interface test case to test the data interface, saving the rewriting interface test case and configuring the test execution machine. Time, improve the efficiency of the test of the data interface.
  • step 302 further includes the step of collecting an interface test case, the step specifically including the following:
  • Step 402 Collect interface test cases written by each terminal in the interface test webpage.
  • the tester can write an interface test case in the interface test webpage displayed by the terminal 110.
  • the save command is triggered, and the terminal sends the interface test case written in the interface test webpage to the server 120.
  • the different terminals 110 are different from each other, and the server 120 collects different interface test cases sent by different terminals 110.
  • the tester can upload a locally saved interface test case through the interface test web page displayed by the terminal 110.
  • step 404 the collected interface test cases are stored in the test case set.
  • the server 120 stores the collected interface test cases sent by the terminals 110 in the test case set, extracts the identifier of the interface test case, sends the identifier of the interface test case to each terminal 110, and tests the interface according to the terminal 110.
  • the identity of the use case is displayed on the interface test web page.
  • the interface test cases written by the terminals in the interface test webpage are collected, and the collected interface test cases are stored in the test case set, and the interface test cases in the test case set can be uniformly managed and can be The interface test cases stored in the test case set are used multiple times to improve the utilization of the interface test cases.
  • a data interface test method is provided, and the method specifically includes the following steps:
  • Step 502 Acquire a test case selection instruction input by the terminal in the interface test webpage.
  • Step 504 Select an interface test case in the test case set according to the test case selection instruction.
  • step 506 it is detected whether there is a test result corresponding to the selected interface test case; if it is detected, step 508 is performed; if not, step 510 is performed.
  • the server 120 After selecting the interface test case, the server 120 obtains the identifier of the interface test case, and detects whether there is a test result corresponding to the identifier of the interface test case in the database.
  • Step 508 Delete the test result corresponding to the selected interface test case.
  • the server 120 when the server 120 detects that there is a test result corresponding to the interface test case, the server 120 deletes the test result and proceeds to step 510.
  • step 510 the selected interface test case is sent to the test execution machine.
  • Step 512 Receive test results generated by the test execution machine running the selected interface test case and store the test results.
  • step 514 the test result is returned to the terminal.
  • the selected interface test case is detected to have a corresponding test result.
  • the detected test result is deleted, and the detected test result is deleted.
  • step 306 further includes the step of searching for a test execution machine, the step specifically including the following:
  • Step 602 Obtain a resource occupancy rate of each test execution machine according to the selected interface test case.
  • the server 120 obtains the resource occupancy rate of each test execution machine in the selected interface test case, and the resource occupancy rate may be at least one of the memory usage rate of the test execution machine 130, the occupancy rate of the central processing unit, and the thread occupancy rate.
  • the resource occupancy rate may be at least one of the memory usage rate of the test execution machine 130, the occupancy rate of the central processing unit, and the thread occupancy rate.
  • the server 120 extracts the label of the test execution machine in the selected interface test case.
  • the label of the test execution machine corresponds to multiple test execution machines, and the server 120 acquires the resource occupancy rate of each test execution machine 130.
  • Step 604 Find a test execution machine with the smallest resource occupancy rate.
  • the server 120 compares the resource occupancy rate of each test execution machine 130, and selects the test execution machine 130 with the smallest resource occupancy rate.
  • Step 606 Transfer the selected interface test case to the found test execution machine.
  • the server 130 transmits the selected interface test case to the test execution machine 130 with the smallest resource occupancy, and the test execution machine 130 performs the test according to the received interface test case.
  • the test execution machine with the smallest resource occupancy rate is searched, and the selected interface test case is transmitted to the found test execution machine, so that the test execution machine with the smallest resource occupancy rate tests the data interface according to the interface test case.
  • the execution interface test case waits due to the busy test execution machine is avoided, the time spent waiting for the execution of the interface test case is saved, and the test speed of the data interface is accelerated.
  • step 308 specifically includes the step of generating a test result, the step specifically including the following:
  • Step 702 Receive a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case.
  • the test execution machine 130 receives the interface test case sent by the server 120, and the test execution machine 130 parses the received interface test case, and extracts the interface identifier of the interface to be tested from the interface test case, and the interface identifier is an interface.
  • the unique identifier, the interface identifier may specifically be the path of the access interface.
  • the test execution device 130 extracts the interface identifier
  • the test data acquisition request is generated according to the interface identifier, and the test data acquisition request is used to obtain the test data from the interface corresponding to the interface identifier.
  • the test execution machine 130 transmits a test data acquisition request to the server 120.
  • Step 704 returning test data to the test execution machine according to the test data acquisition request.
  • the server 120 parses the test data acquisition request, extracts the interface identifier from the test data acquisition request, searches for an interface corresponding to the interface identifier, and obtains corresponding test data from the found interface.
  • the server 120 returns the acquired test data to the test execution machine 130.
  • Step 706 Receive test results generated by the test execution machine based on the test data and the expected data in the interface test case.
  • the test execution machine 130 After receiving the test data returned by the server 120, the test execution machine 130 extracts the expected data from the interface test case, compares the test data with the expected data, and generates a test result according to the comparison result, and the test execution machine 130 generates the generated test result.
  • the test result is returned to the server 120.
  • the test execution machine 130 may obtain expected data and test data from the server 120, compare the test data with the expected data to generate a test result; or, the test execution machine 130 performs an operation on the test data to obtain an operation result, and the operation is performed. The results are compared to the expected data to generate test results.
  • the test result may specifically be a test report, and the test report includes at least one of a test time, an interface identifier of the test interface, and a test error existing in the test data.
  • the test data is returned to the test execution according to the test data acquisition request, and the test execution machine generates the test according to the test data and the expected data in the interface test case.
  • a data interface testing apparatus 800 is provided.
  • the apparatus specifically includes: a selection instruction acquisition module 802, a test case selection module 804, a test case sending module 806, a test result storage module 808, and The test result is sent to the module 810.
  • the instruction acquisition module 802 is configured to obtain a test case selection instruction input by the terminal in the interface test webpage.
  • the test case selection module 804 is configured to select an interface test case in the test case set according to the test case selection instruction.
  • the test case sending module 806 is configured to send the selected interface test case to the test execution machine.
  • the test result storage module 808 is configured to receive and store the test result generated after the interface test case selected by the test execution machine is run.
  • the test result sending module 810 is configured to return the test result to the terminal.
  • the terminal may input a test case selection instruction, obtain a test case selection instruction input by the terminal, select an interface test case in the test case set according to the test case selection instruction, and do not need to rewrite the interface test.
  • Example. The selected interface test case is sent to the configured test execution machine, and the test execution machine is not required to be reconfigured, and the test result of the interface test case selected by the test execution machine is obtained and stored, and the test result is returned to the terminal.
  • it is not necessary to rewrite the interface test case and the terminal can directly input the test case selection instruction in the interface test webpage, so that the interface test case that has been edited can be selected in the test case set, and the interface test case is not needed.
  • Reconfigure the test execution machine directly send the selected interface test case to the configured test execution machine, so that the test execution machine uses the selected interface test case to test the data interface, saving the rewriting interface test case and configuring the test execution machine. Time, improve the efficiency of the test of the data interface.
  • the data interface testing apparatus 800 specifically includes: a test case collection module 812 and a test case storage module 814.
  • the test case collection module 812 is configured to collect interface test cases written by each terminal in the interface test webpage.
  • the test case storage module 814 is configured to store the collected interface test cases into the test case set.
  • the interface test cases written by the terminals in the interface test webpage are collected, and the collected interface test cases are stored in the test case set, and the interface test cases in the test case set can be uniformly managed and can be The interface test cases stored in the test case set are used multiple times to improve the utilization of the interface test cases.
  • the data interface testing apparatus 800 specifically includes a test result detecting module 816 and a test result deleting module 818.
  • the test result detecting module 816 is configured to detect whether there is a test result corresponding to the selected interface test case.
  • the test result deletion module 818 is configured to delete the test result corresponding to the selected interface test case when detecting the test result corresponding to the selected interface test case.
  • the test case sending module 806 is further configured to send the selected interface test case to the test execution machine when detecting that the test result corresponding to the selected interface test case does not exist.
  • the selected interface test case is detected to have a corresponding test result.
  • the detected test result is deleted, and the detected test result is deleted.
  • test case sending module 806 specifically includes:
  • the occupancy acquisition module 806a is configured to obtain the resource occupancy rate of each test execution machine according to the selected interface test case.
  • the execution machine search module 806b is configured to find a test execution machine with the smallest resource occupancy rate.
  • the test case transmission module 806c is configured to transmit the selected interface test case to the found test execution machine.
  • the test execution machine with the smallest resource occupancy rate is searched, and the selected interface test case is transmitted to the found test execution machine, so that the test execution machine with the smallest resource occupancy rate tests the data interface according to the interface test case.
  • the execution interface test case waits due to the busy test execution machine is avoided, the time spent waiting for the execution of the interface test case is saved, and the test speed of the data interface is accelerated.
  • test result storage module 808 specifically includes:
  • the acquisition request receiving module 808a is configured to receive a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case.
  • the test data return module 808b is configured to return test data to the test execution machine according to the test data acquisition request.
  • the test result receiving module 808c is configured to receive test results generated by the test execution machine according to the test data and the expected data in the interface test case.
  • the test data is returned to the test execution according to the test data acquisition request, and the test execution machine generates the test according to the test data and the expected data in the interface test case.
  • the various modules in the above data interface test apparatus may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the network interface may be an Ethernet or a wireless network card.
  • the above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the storage medium may be a magnetic disk, an optical disk, or a read-only storage memory (Read-Only) Memory, ROM) or Random Access Memory (RAM).

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

A data interface test method, comprising: acquiring a test case selection instruction input, by a terminal, into an interface test web page; according to the test case selection instruction, selecting an interface test case from a test case set; sending the selected interface test case to a test execution machine; receiving a test result generated after the test execution machine runs the selected interface test case, and storing same; and returning the test result to the terminal.

Description

数据接口测试方法、装置、服务器和存储介质Data interface test method, device, server and storage medium
本申请要求于2016年7月20日提交中国专利局、申请号为201610581627.X、发明名称为“数据接口测试方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201610581627.X filed on Jul. 20, 2016, the entire disclosure of which is incorporated herein by reference. in.
【技术领域】[Technical Field]
本发明涉及测试技术领域,特别是涉及一种数据接口测试方法、装置、服务器和存储介质。 The present invention relates to the field of testing technologies, and in particular, to a data interface testing method, apparatus, server, and storage medium.
【背景技术】【Background technique】
目前在数据接口测试技术领域中,编写接口测试用例的方案非常多,对于同一个接口进行测试时,不同的测试人员编写的接口测试用例可能都不相同。当一个数据接口需要进行多次测试时,没有对编写的接口测试用例进行良好的管理,导致每次测试需要重新编写接口测试用例,未能够充分利用之前编写的接口测试用例。At present, in the field of data interface testing technology, there are many schemes for writing interface test cases. When testing the same interface, interface test cases written by different testers may be different. When a data interface needs to be tested multiple times, there is no good management of the written interface test cases, which leads to the need to rewrite the interface test cases for each test, and fails to make full use of the previously written interface test cases.
然而,在对同一数据接口多次测试时,每次测试时可能需要重新编写该数据接口的接口测试用例,导致之前编写的接口测试用例未被充分利用,造成了资源的浪费,同时在重新编写该数据接口的接口测试用例时,需要耗费大量的时间,严重降低了数据接口的测试效率。However, when testing the same data interface multiple times, it may be necessary to rewrite the interface test case of the data interface for each test, resulting in the unused interface test cases being underutilized, resulting in waste of resources and rewriting. When the interface test case of the data interface takes a lot of time, the test efficiency of the data interface is seriously reduced.
【发明内容】[Summary of the Invention]
根据本申请公开的各种实施例,提供一种数据接口测试方法、装置、服务器和存储介质。In accordance with various embodiments disclosed herein, a data interface testing method, apparatus, server, and storage medium are provided.
一种数据接口测试方法,包括:A data interface test method, including:
获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
将所述测试结果返回至所述终端。Returning the test result to the terminal.
一种数据接口测试装置,所述装置包括:A data interface testing device, the device comprising:
选取指令获取模块,用于获取终端在接口测试网页中输入的测试用例选取指令;The instruction acquisition module is configured to obtain a test case selection instruction input by the terminal in the interface test webpage;
测试用例选取模块,用于根据所述测试用例选取指令在测试用例集合中选取接口测试用例;a test case selection module, configured to select an interface test case in the test case set according to the test case selection instruction;
测试用例发送模块,用于将选取的接口测试用例发送至测试执行机;a test case sending module, configured to send the selected interface test case to the test execution machine;
测试结果存储模块,用于接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及a test result storage module, configured to receive the test result generated by the test execution machine after running the selected interface test case and store the test result; and
测试结果发送模块,用于将所述测试结果返回至所述终端。a test result sending module, configured to return the test result to the terminal.
一种服务器,包括存储器和处理器,所述存储器中存储有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, such that the processor performs the following steps:
获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
将所述测试结果返回至所述终端。Returning the test result to the terminal.
一个或多个存储有计算机可执行指令的非易失性存储介质,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
将所述测试结果返回至所述终端。Returning the test result to the terminal.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
【附图说明】[Description of the Drawings]
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中数据接口测试系统的应用环境图;1 is an application environment diagram of a data interface test system in an embodiment;
图2为一个实施例中数据接口测试系统中服务器的功能模块图;2 is a functional block diagram of a server in a data interface test system in an embodiment;
图3为一个实施例中数据接口测试方法的流程示意图;3 is a schematic flow chart of a data interface test method in an embodiment;
图4为一个实施例中收集接口测试用例的步骤的流程示意图;4 is a schematic flow chart of steps of collecting an interface test case in an embodiment;
图5为另一个实施例中数据接口测试方法的流程示意图;5 is a schematic flow chart of a data interface testing method in another embodiment;
图6为一个实施例中查找测试执行机的步骤的流程示意图;6 is a schematic flow chart of steps of searching for a test execution machine in an embodiment;
图7为一个实施例中生成测试结果的步骤的流程示意图;7 is a flow chart showing the steps of generating a test result in one embodiment;
图8为一个实施例中数据接口测试装置的功能模块图;8 is a functional block diagram of a data interface test apparatus in an embodiment;
图9为另一个实施例中数据接口测试装置的功能模块图;9 is a functional block diagram of a data interface testing device in another embodiment;
图10为再一个实施例中数据接口测试装置的功能模块图;10 is a functional block diagram of a data interface testing device in still another embodiment;
图11为一个实施例中测试用例发送模块的功能模块图;11 is a functional block diagram of a test case sending module in an embodiment;
图12为一个实施例中测试结果存储模块的功能模块图。Figure 12 is a functional block diagram of a test result storage module in one embodiment.
【具体实施方式】 【detailed description】
体现本申请特征与优点的典型实施方式将在以下的说明中详细叙述。应理解的是本申请能够在不同的实施方式上具有各种的变化,其皆不脱离本申请的范围,且其中的说明及图示在本质上是当作说明之用,而非用以限制本申请。Exemplary embodiments embodying the features and advantages of the present application will be described in detail in the following description. It should be understood that the present invention is capable of various modifications in the various embodiments, and This application.
图1是一个实施例中数据接口测试系统的应用环境图。数据接口测试系统包括终端110、服务器120和测试执行机130。其中终端110和测试执行机130通过网络与服务器120相连接。其中终端110、服务器120和测试执行机130都可以是一个或多个。FIG. 1 is an application environment diagram of a data interface test system in an embodiment. The data interface test system includes a terminal 110, a server 120, and a test executive 130. The terminal 110 and the test execution machine 130 are connected to the server 120 through a network. The terminal 110, the server 120, and the test executive 130 may each be one or more.
图2为一个实施例中图1数据接口测试系统中的服务器120的功能模块图。如图2所示,该服务器120包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口。该处理器用于提供计算和控制能力,支撑整个服务器120的运行。该服务器120的非易失性存储介质存储有操作系统和计算机可执行指令。该计算机可执行指令可被处理器执行以实现以下各实施例所提供的一种数据接口测试方法。服务器120中的内存储器为非易失性存储介质中的操作系统和计算机可执行指令提供高速缓存的运行环境。网络接口用于与终端110或测试执行机130进行网络通信。可以理解,服务器120可以用独立的服务器或者多个服务器组成的服务器集群来实现。2 is a functional block diagram of the server 120 in the data interface test system of FIG. 1 in one embodiment. As shown in FIG. 2, the server 120 includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected by a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire server 120. The non-volatile storage medium of the server 120 stores an operating system and computer executable instructions. The computer executable instructions are executable by a processor to implement a data interface testing method as provided by the following embodiments. The internal memory in server 120 provides a cached operating environment for operating systems and computer executable instructions in a non-volatile storage medium. The network interface is used for network communication with the terminal 110 or the test executive machine 130. It can be understood that the server 120 can be implemented by a separate server or a server cluster composed of multiple servers.
本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图2中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include a ratio. More or fewer components are shown in Figure 2, or some components are combined, or have different component arrangements.
如图3所示,在一个实施例中,提供一种数据接口测试方法,本实施例以该方法应用于图1数据接口测试系统中的服务器120来举例说明,该服务器120上运行有数据接口测试程序,通过数据接口测试程序来实施数据接口测试方法。该方法具体包括以下步骤:As shown in FIG. 3, in one embodiment, a data interface test method is provided. This embodiment is applied to the server 120 in the data interface test system of FIG. 1 as an example. The server 120 runs a data interface. The test program implements the data interface test method through the data interface test program. The method specifically includes the following steps:
步骤302,获取终端在接口测试网页中输入的测试用例选取指令。Step 302: Acquire a test case selection instruction input by the terminal in the interface test webpage.
具体地,终端110向服务器120发送接口测试网页的获取请求,服务器120接收到接口测试网页的获取请求后,服务器120将接口测试网页的数据返回至终端110。终端110根据服务器120返回的接口测试网页的数据显示接口测试网页,通过终端中显示的接口测试网页可以对数据接口测试系统进行控制。测试人员在终端显示的接口测试网页中输入测试用例选取指令,终端110将测试用例的选取指令发送至服务器120。测试用例选取指令中可以包括测试用例标识,测试用例标识用于唯一标识测试用例,具体可以是测试用例的名称、编码、关键字和数据接口标识中的至少一种。测试用例(Test Case)也可以称为测试案例,是为测试目标而编制的一组测试输入、执行条件以及预期结果的文档,以便测试该测试目标的数据接口或核实数据接口是否满足某个特定需求。Specifically, the terminal 110 sends an acquisition request of the interface test webpage to the server 120. After the server 120 receives the acquisition request of the interface test webpage, the server 120 returns the data of the interface test webpage to the terminal 110. The terminal 110 tests the webpage according to the data display interface of the interface test webpage returned by the server 120, and controls the data interface test system by using the interface test webpage displayed in the terminal. The tester inputs a test case selection instruction in the interface test webpage displayed by the terminal, and the terminal 110 sends the selection instruction of the test case to the server 120. The test case selection instruction may include a test case identifier, and the test case identifier is used to uniquely identify the test case, and may specifically be at least one of a test case name, a code, a keyword, and a data interface identifier. Test case (Test Case), also known as a test case, is a set of test inputs, execution conditions, and expected results for a test target to test the data interface of the test target or verify that the data interface meets a particular requirement.
步骤304,根据测试用例选取指令在测试用例集合中选取接口测试用例。Step 304: Select an interface test case in the test case set according to the test case selection instruction.
具体地,服务器120在获取到终端在接口测试网页中输入的测试用例选取指令后,提取测试用例选取指令中的测试用例标识,根据测试用例标识在测试用例集合中选取与测试用例标识匹配的测试用例。其中测试用例选取指令中的测试用例标识具体可以是一个或多个。Specifically, after obtaining the test case selection instruction input by the terminal in the interface test webpage, the server 120 extracts the test case identifier in the test case selection instruction, and selects a test that matches the test case identifier in the test case set according to the test case identifier. Example. The test case identifier in the test case selection instruction may be one or more.
步骤306,将选取的接口测试用例发送至测试执行机。Step 306, the selected interface test case is sent to the test execution machine.
具体地,服务器120从测试用例集合中选取接口测试用例后,查找测试执行机130,将接口测试用例发送给查找到的测试执行机130。Specifically, after selecting the interface test case from the test case set, the server 120 searches the test execution machine 130 and sends the interface test case to the found test execution machine 130.
在一个实施例中,服务器120从选取的接口测试用例中提取测试执行机的标签,根据提取到的标签查找对应的测试执行机130。In one embodiment, the server 120 extracts the tags of the test execution machine from the selected interface test cases, and searches for the corresponding test execution machine 130 based on the extracted tags.
步骤308,接收测试执行机运行选取的接口测试用例后生成的测试结果并存储。Step 308: Receive test results generated by the test execution machine running the selected interface test case and store the test results.
具体地,服务器120将测试用例发送至测试执行机130后,测试执行机130从测试用例中提取接口信息,根据接口信息生成测试数据请求,测试执行机130将测试数据请求发送至服务器120。服务器120接收到测试数据请求后,提取测试请求数据中的接口信息,查找与提取到的接口信息对应的测试数据,将查找到的测试数据返回至测试执行机130。测试执行机130根据接口测试案例对服务器120返回的测试数据进行测试生成测试结果,测试执行机130将测试结果发返回至服务器120,服务器120将测试结果与接口测试用例对应存储。具体可以是测试结果与接口测试用例的标识对应存储。Specifically, after the server 120 sends the test case to the test execution machine 130, the test execution machine 130 extracts the interface information from the test case, generates a test data request according to the interface information, and the test execution machine 130 sends the test data request to the server 120. After receiving the test data request, the server 120 extracts the interface information in the test request data, searches for the test data corresponding to the extracted interface information, and returns the found test data to the test execution machine 130. The test execution machine 130 tests the test data returned by the server 120 according to the interface test case to generate test results. The test execution machine 130 sends the test result back to the server 120, and the server 120 stores the test result corresponding to the interface test case. Specifically, the test result is stored corresponding to the identifier of the interface test case.
步骤310,将测试结果返回至终端。In step 310, the test result is returned to the terminal.
具体地,服务器130在将测试执行机返回的测试结果存储之后,服务器将测试结果发送到终端110上,终端110将测试结果显示在接口测试页面中。Specifically, after the server 130 stores the test result returned by the test execution machine, the server sends the test result to the terminal 110, and the terminal 110 displays the test result in the interface test page.
本实施例中,在接口测试网页中,终端可以输入测试用例选取指令,在获取到终端输入的测试用例选取指令,根据测试用例选取指令在测试用例集合中选取接口测试用例,无需重新编写接口测试用例。将选取的接口测试用例发送至配置好的测试执行机,也无需重新配置测试执行机,获取测试执行机运行选取的接口测试用例后的测试结果并存储,将测试结果返回至终端。在对数据接口进行测试的过程中,无需重新编写接口测试用例,利用终端直接在接口测试网页中输入测试用例选取指令,即可在测试用例集合中选取已经编辑好的接口测试用例,也不需要重新配置测试执行机,直接将选取的接口测试用例发送至配置好的测试执行机,使测试执行机利用选取的接口测试用例对数据接口进行测试,节省了重新编写接口测试用例和配置测试执行机的时间,提高了数据接口的测试效率。In this embodiment, in the interface test webpage, the terminal may input a test case selection instruction, obtain a test case selection instruction input by the terminal, select an interface test case in the test case set according to the test case selection instruction, and do not need to rewrite the interface test. Example. The selected interface test case is sent to the configured test execution machine, and the test execution machine is not required to be reconfigured, and the test result of the interface test case selected by the test execution machine is obtained and stored, and the test result is returned to the terminal. In the process of testing the data interface, it is not necessary to rewrite the interface test case, and the terminal can directly input the test case selection instruction in the interface test webpage, so that the interface test case that has been edited can be selected in the test case set, and the interface test case is not needed. Reconfigure the test execution machine, directly send the selected interface test case to the configured test execution machine, so that the test execution machine uses the selected interface test case to test the data interface, saving the rewriting interface test case and configuring the test execution machine. Time, improve the efficiency of the test of the data interface.
如图4所示,在一个实施例中,步骤302之前还包括收集接口测试用例的步骤,该步骤具体包括以下内容:As shown in FIG. 4, in an embodiment, step 302 further includes the step of collecting an interface test case, the step specifically including the following:
步骤402,收集各终端在接口测试网页中编写的接口测试用例。Step 402: Collect interface test cases written by each terminal in the interface test webpage.
具体地,测试人员可以在终端110显示的接口测试网页中编写接口测试用例,在接口测试用例编写完成后,触发保存指令,终端将接口测试网页中编写完成的接口测试用例发送至服务器120。其中,不同的测试人员对应的终端110不同,服务器120会收集不同的终端110发送的不同接口测试案例。Specifically, the tester can write an interface test case in the interface test webpage displayed by the terminal 110. After the interface test case is written, the save command is triggered, and the terminal sends the interface test case written in the interface test webpage to the server 120. The different terminals 110 are different from each other, and the server 120 collects different interface test cases sent by different terminals 110.
在一个实施例中,测试人员通过终端110显示的接口测试网页可以上传本地保存的接口测试案例。In one embodiment, the tester can upload a locally saved interface test case through the interface test web page displayed by the terminal 110.
步骤404,将收集到的接口测试用例存储到测试用例集合中。In step 404, the collected interface test cases are stored in the test case set.
具体地,服务器120将收集到的各终端110发送的接口测试用例存储到测试用例集合中,并提取接口测试用例的标识,将接口测试用例的标识发送给各终端110,根据终端110将接口测试用例的标识显示在接口测试网页中。Specifically, the server 120 stores the collected interface test cases sent by the terminals 110 in the test case set, extracts the identifier of the interface test case, sends the identifier of the interface test case to each terminal 110, and tests the interface according to the terminal 110. The identity of the use case is displayed on the interface test web page.
本实施例中,收集各终端在接口测试网页中编写的接口测试用例,将收集到的接口测试用例存储到测试用例集合中,可以对测试用例集合中的接口测试案例进行统一的管理,并且能够对测试用例集合中存储的接口测试案例进行多次利用,提高了接口测试案例的利用率。In this embodiment, the interface test cases written by the terminals in the interface test webpage are collected, and the collected interface test cases are stored in the test case set, and the interface test cases in the test case set can be uniformly managed and can be The interface test cases stored in the test case set are used multiple times to improve the utilization of the interface test cases.
如图5所示,在一个实施例中,提供一个数据接口测试方法,该方法具体包括以下步骤:As shown in FIG. 5, in an embodiment, a data interface test method is provided, and the method specifically includes the following steps:
步骤502,获取终端在接口测试网页中输入的测试用例选取指令。Step 502: Acquire a test case selection instruction input by the terminal in the interface test webpage.
步骤504,根据测试用例选取指令在测试用例集合中选取接口测试用例。Step 504: Select an interface test case in the test case set according to the test case selection instruction.
步骤506,检测是否存在选取的接口测试用例所对应的测试结果;若检测到,则执行步骤508;若未检测到,则执行步骤510。In step 506, it is detected whether there is a test result corresponding to the selected interface test case; if it is detected, step 508 is performed; if not, step 510 is performed.
具体地,服务器120在选取接口测试用例后,获取接口测试用例的标识,在数据库中检测是否存在与接口测试用例的标识对应的测试结果。Specifically, after selecting the interface test case, the server 120 obtains the identifier of the interface test case, and detects whether there is a test result corresponding to the identifier of the interface test case in the database.
步骤508,删除选取的接口测试用例对应的测试结果。Step 508: Delete the test result corresponding to the selected interface test case.
具体地,服务器120在检测到存在与接口测试用例对应的测试结果,则将测试结果删除,并继续执行步骤510。Specifically, when the server 120 detects that there is a test result corresponding to the interface test case, the server 120 deletes the test result and proceeds to step 510.
步骤510,将选取的接口测试用例发送至测试执行机。In step 510, the selected interface test case is sent to the test execution machine.
步骤512,接收测试执行机运行选取的接口测试用例后生成的测试结果并存储。Step 512: Receive test results generated by the test execution machine running the selected interface test case and store the test results.
步骤514,将测试结果返回至终端。In step 514, the test result is returned to the terminal.
本实施例中,在选取接口测试用例之后,会检测选取的接口测试用例是否存在对应的测试结果,在检测到选取的接口测试用例存在对应的测试结果时,将检测到的测试结果删除,避免再次利用接口测试用例进行测试时,避免已经存在的测试结果对应再次测试生成的测试结果造成影响,提高了测试的准确性。In this embodiment, after the interface test case is selected, the selected interface test case is detected to have a corresponding test result. When the test result of the selected interface test case is detected, the detected test result is deleted, and the detected test result is deleted. When the interface test case is used again for testing, the test result that is already existing is prevented from being affected by the test result generated by the retest, and the accuracy of the test is improved.
如图6所示,在一个实施例中,步骤306还包括查找测试执行机的步骤,该步骤具体包括如下内容:As shown in FIG. 6, in an embodiment, step 306 further includes the step of searching for a test execution machine, the step specifically including the following:
步骤602,根据选取的接口测试用例获取各测试执行机的资源占用率。Step 602: Obtain a resource occupancy rate of each test execution machine according to the selected interface test case.
具体地,服务器120在选取的接口测试用例获取各测试执行机的资源占用率,资源占用率具体可以是测试执行机130的内存占用率、中央处理器的占用率和线程占用率中的至少一种。Specifically, the server 120 obtains the resource occupancy rate of each test execution machine in the selected interface test case, and the resource occupancy rate may be at least one of the memory usage rate of the test execution machine 130, the occupancy rate of the central processing unit, and the thread occupancy rate. Kind.
在一个实施例中,服务器120在选取的接口测试用例中提取测试执行机的标签,测试执行机的标签对应多台测试执行机,服务器120获取每台测试执行机130的资源占用率。In one embodiment, the server 120 extracts the label of the test execution machine in the selected interface test case. The label of the test execution machine corresponds to multiple test execution machines, and the server 120 acquires the resource occupancy rate of each test execution machine 130.
步骤604,查找资源占用率最小的测试执行机。Step 604: Find a test execution machine with the smallest resource occupancy rate.
具体地,服务器120在获取到每台测试执行机的资源占用率时,比较每台测试执行机130的资源占用率,选取资源占用率最小的测试执行机130。Specifically, when the resource occupancy rate of each test execution machine is obtained, the server 120 compares the resource occupancy rate of each test execution machine 130, and selects the test execution machine 130 with the smallest resource occupancy rate.
步骤606,将选取的接口测试用例传输至查找到的测试执行机。Step 606: Transfer the selected interface test case to the found test execution machine.
具体地,服务器130将选取的接口测试用例传输至资源占用率最小的测试执行机130,该测试执行机130根据接收到的接口测试用例进行测试。Specifically, the server 130 transmits the selected interface test case to the test execution machine 130 with the smallest resource occupancy, and the test execution machine 130 performs the test according to the received interface test case.
本实施例中,查找资源占用率最小的测试执行机,将选取的接口测试用例传输至查找到的测试执行机,使资源占用率最小的测试执行机根据接口测试用例对数据接口进行测试。这样,避免由于测试执行机繁忙而造成执行接口测试用例等待的情况,节省了执行接口测试用例等待所耗费的时间,加快了数据接口的测试速度。In this embodiment, the test execution machine with the smallest resource occupancy rate is searched, and the selected interface test case is transmitted to the found test execution machine, so that the test execution machine with the smallest resource occupancy rate tests the data interface according to the interface test case. In this way, the execution interface test case waits due to the busy test execution machine is avoided, the time spent waiting for the execution of the interface test case is saved, and the test speed of the data interface is accelerated.
如图7所示,在一个实施例中,步骤308具体还包括生成测试结果的步骤,该步骤具体包括以下内容:As shown in FIG. 7, in an embodiment, step 308 specifically includes the step of generating a test result, the step specifically including the following:
步骤702,接收测试执行机根据接口标识生成的测试数据获取请求,接口标识为测试执行机从选取的接口测试用例中提取的。Step 702: Receive a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case.
具体地,在测试执行机130接收到服务器120发送的接口测试用例,测试执行机130对接收到的接口测试用例进行解析,从接口测试用例中提取所要测试接口的接口标识,接口标识为接口的唯一标识,接口标识具体可以是访问接口的路径。测试执行机130在提取到接口标识后,根据接口标识生成测试数据获取请求,测试数据获取请求用于从接口标识对应的接口获取测试数据。测试执行机130将测试数据获取请求发送至服务器120。Specifically, the test execution machine 130 receives the interface test case sent by the server 120, and the test execution machine 130 parses the received interface test case, and extracts the interface identifier of the interface to be tested from the interface test case, and the interface identifier is an interface. The unique identifier, the interface identifier may specifically be the path of the access interface. After the test execution device 130 extracts the interface identifier, the test data acquisition request is generated according to the interface identifier, and the test data acquisition request is used to obtain the test data from the interface corresponding to the interface identifier. The test execution machine 130 transmits a test data acquisition request to the server 120.
步骤704,根据测试数据获取请求向测试执行机返回测试数据。Step 704, returning test data to the test execution machine according to the test data acquisition request.
具体地,服务器120在接收到测试数据获取请求后,对测试数据获取请求进行解析,从测试数据获取请求中提取接口标识,查找接口标识对应的接口,从查找到的接口获取相应地测试数据,服务器120将获取的测试数据返回测试执行机130。Specifically, after receiving the test data acquisition request, the server 120 parses the test data acquisition request, extracts the interface identifier from the test data acquisition request, searches for an interface corresponding to the interface identifier, and obtains corresponding test data from the found interface. The server 120 returns the acquired test data to the test execution machine 130.
步骤706,接收测试执行机根据测试数据和接口测试用例中的预期数据生成的测试结果。Step 706: Receive test results generated by the test execution machine based on the test data and the expected data in the interface test case.
具体地,测试执行机130在接收到服务器120返回的测试数据后,从接口测试用例中提取预期数据,将测试数据与预期数据进行比较,根据比较结果生成测试结果,测试执行机130将生成的测试结果返回至服务器120。Specifically, after receiving the test data returned by the server 120, the test execution machine 130 extracts the expected data from the interface test case, compares the test data with the expected data, and generates a test result according to the comparison result, and the test execution machine 130 generates the generated test result. The test result is returned to the server 120.
在一个实施例中,测试执行机130可以从服务器120获取预期数据和测试数据,将测试数据和预期数据进行比较生成测试结果;或者,测试执行机130对测试数据进行运算得到运算结果,将运算结果与预期数据进行比较生成测试结果。测试结果具体可以是测试报告,测试报告中包括测试时间、测试接口的接口标识和测试数据存在的测试错误中的至少一种。In one embodiment, the test execution machine 130 may obtain expected data and test data from the server 120, compare the test data with the expected data to generate a test result; or, the test execution machine 130 performs an operation on the test data to obtain an operation result, and the operation is performed. The results are compared to the expected data to generate test results. The test result may specifically be a test report, and the test report includes at least one of a test time, an interface identifier of the test interface, and a test error existing in the test data.
本实施例中,在接收到测试执行机根据接口标识生成的测试数据获取请求后,根据测试数据获取请求向测试执行返回测试数据,测试执行机根据测试数据和接口测试用例中的预期数据生成测试结果,通过预期数据和测试数据的比对,可以准确确定测试过程中接口存在的错误,并提高了测试结果的准确性。In this embodiment, after receiving the test data acquisition request generated by the test execution machine according to the interface identifier, the test data is returned to the test execution according to the test data acquisition request, and the test execution machine generates the test according to the test data and the expected data in the interface test case. As a result, by comparing the expected data with the test data, it is possible to accurately determine the error of the interface during the test and improve the accuracy of the test result.
如图8所示,在一个实施例中,提供一种数据接口测试装置800,该装置具体包括:选取指令获取模块802、测试用例选取模块804、测试用例发送模块806、测试结果存储模块808和测试结果发送模块810。As shown in FIG. 8 , in one embodiment, a data interface testing apparatus 800 is provided. The apparatus specifically includes: a selection instruction acquisition module 802, a test case selection module 804, a test case sending module 806, a test result storage module 808, and The test result is sent to the module 810.
选取指令获取模块802,用于获取终端在接口测试网页中输入的测试用例选取指令。The instruction acquisition module 802 is configured to obtain a test case selection instruction input by the terminal in the interface test webpage.
测试用例选取模块804,用于根据测试用例选取指令在测试用例集合中选取接口测试用例。The test case selection module 804 is configured to select an interface test case in the test case set according to the test case selection instruction.
测试用例发送模块806,用于将选取的接口测试用例发送至测试执行机。The test case sending module 806 is configured to send the selected interface test case to the test execution machine.
测试结果存储模块808,用于接收测试执行机运行选取的接口测试用例后生成的测试结果并存储。The test result storage module 808 is configured to receive and store the test result generated after the interface test case selected by the test execution machine is run.
测试结果发送模块810,用于将测试结果返回至终端。The test result sending module 810 is configured to return the test result to the terminal.
本实施例中,在接口测试网页中,终端可以输入测试用例选取指令,在获取到终端输入的测试用例选取指令,根据测试用例选取指令在测试用例集合中选取接口测试用例,无需重新编写接口测试用例。将选取的接口测试用例发送至配置好的测试执行机,也无需重新配置测试执行机,获取测试执行机运行选取的接口测试用例后的测试结果并存储,将测试结果返回至终端。在对数据接口进行测试的过程中,无需重新编写接口测试用例,利用终端直接在接口测试网页中输入测试用例选取指令,即可在测试用例集合中选取已经编辑好的接口测试用例,也不需要重新配置测试执行机,直接将选取的接口测试用例发送至配置好的测试执行机,使测试执行机利用选取的接口测试用例对数据接口进行测试,节省了重新编写接口测试用例和配置测试执行机的时间,提高了数据接口的测试效率。In this embodiment, in the interface test webpage, the terminal may input a test case selection instruction, obtain a test case selection instruction input by the terminal, select an interface test case in the test case set according to the test case selection instruction, and do not need to rewrite the interface test. Example. The selected interface test case is sent to the configured test execution machine, and the test execution machine is not required to be reconfigured, and the test result of the interface test case selected by the test execution machine is obtained and stored, and the test result is returned to the terminal. In the process of testing the data interface, it is not necessary to rewrite the interface test case, and the terminal can directly input the test case selection instruction in the interface test webpage, so that the interface test case that has been edited can be selected in the test case set, and the interface test case is not needed. Reconfigure the test execution machine, directly send the selected interface test case to the configured test execution machine, so that the test execution machine uses the selected interface test case to test the data interface, saving the rewriting interface test case and configuring the test execution machine. Time, improve the efficiency of the test of the data interface.
如图9所示,在一个实施例中,该数据接口测试装置800具体还包括:测试用例收集模块812和测试用例存储模块814。As shown in FIG. 9 , in one embodiment, the data interface testing apparatus 800 specifically includes: a test case collection module 812 and a test case storage module 814.
测试用例收集模块812,用于收集各终端在接口测试网页中编写的接口测试用例。The test case collection module 812 is configured to collect interface test cases written by each terminal in the interface test webpage.
测试用例存储模块814,用于将收集到的接口测试用例存储到测试用例集合中。The test case storage module 814 is configured to store the collected interface test cases into the test case set.
本实施例中,收集各终端在接口测试网页中编写的接口测试用例,将收集到的接口测试用例存储到测试用例集合中,可以对测试用例集合中的接口测试案例进行统一的管理,并且能够对测试用例集合中存储的接口测试案例进行多次利用,提高了接口测试案例的利用率。In this embodiment, the interface test cases written by the terminals in the interface test webpage are collected, and the collected interface test cases are stored in the test case set, and the interface test cases in the test case set can be uniformly managed and can be The interface test cases stored in the test case set are used multiple times to improve the utilization of the interface test cases.
如图10所示,在一个实施例中,该数据接口测试装置800具体还包括:测试结果检测模块816和测试结果删除模块818。As shown in FIG. 10, in one embodiment, the data interface testing apparatus 800 specifically includes a test result detecting module 816 and a test result deleting module 818.
测试结果检测模块816,用于检测是否存在选取的接口测试用例所对应的测试结果。The test result detecting module 816 is configured to detect whether there is a test result corresponding to the selected interface test case.
测试结果删除模块818,用于在检测到存在选取的接口测试用例所对应的测试结果时,删除选取的接口测试用例对应的测试结果。The test result deletion module 818 is configured to delete the test result corresponding to the selected interface test case when detecting the test result corresponding to the selected interface test case.
测试用例发送模块806还用于在检测到不存在选取的接口测试用例所对应的测试结果时,将选取的接口测试用例发送至测试执行机。The test case sending module 806 is further configured to send the selected interface test case to the test execution machine when detecting that the test result corresponding to the selected interface test case does not exist.
本实施例中,在选取接口测试用例之后,会检测选取的接口测试用例是否存在对应的测试结果,在检测到选取的接口测试用例存在对应的测试结果时,将检测到的测试结果删除,避免再次利用接口测试用例进行测试时,避免已经存在的测试结果对应再次测试生成的测试结果造成影响,提高了测试的准确性。In this embodiment, after the interface test case is selected, the selected interface test case is detected to have a corresponding test result. When the test result of the selected interface test case is detected, the detected test result is deleted, and the detected test result is deleted. When the interface test case is used again for testing, the test result that is already existing is prevented from being affected by the test result generated by the retest, and the accuracy of the test is improved.
如图11所示,在一个实施例中,测试用例发送模块806具体包括:As shown in FIG. 11, in one embodiment, the test case sending module 806 specifically includes:
占用率获取模块806a,用于根据选取的接口测试用例获取各测试执行机的资源占用率。The occupancy acquisition module 806a is configured to obtain the resource occupancy rate of each test execution machine according to the selected interface test case.
执行机查找模块806b,用于查找资源占用率最小的测试执行机。The execution machine search module 806b is configured to find a test execution machine with the smallest resource occupancy rate.
测试用例传输模块806c,用于将选取的接口测试用例传输至查找到的测试执行机。The test case transmission module 806c is configured to transmit the selected interface test case to the found test execution machine.
本实施例中,查找资源占用率最小的测试执行机,将选取的接口测试用例传输至查找到的测试执行机,使资源占用率最小的测试执行机根据接口测试用例对数据接口进行测试。这样,避免由于测试执行机繁忙而造成执行接口测试用例等待的情况,节省了执行接口测试用例等待所耗费的时间,加快了数据接口的测试速度。In this embodiment, the test execution machine with the smallest resource occupancy rate is searched, and the selected interface test case is transmitted to the found test execution machine, so that the test execution machine with the smallest resource occupancy rate tests the data interface according to the interface test case. In this way, the execution interface test case waits due to the busy test execution machine is avoided, the time spent waiting for the execution of the interface test case is saved, and the test speed of the data interface is accelerated.
如图12所示,在一个实施例中,测试结果存储模块808具体包括:As shown in FIG. 12, in one embodiment, the test result storage module 808 specifically includes:
获取请求接收模块808a,用于接收测试执行机根据接口标识生成的测试数据获取请求,接口标识为测试执行机从选取的接口测试用例中提取的。The acquisition request receiving module 808a is configured to receive a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case.
测试数据返回模块808b,用于根据测试数据获取请求向测试执行机返回测试数据。The test data return module 808b is configured to return test data to the test execution machine according to the test data acquisition request.
测试结果接收模块808c,用于接收测试执行机根据测试数据和接口测试用例中的预期数据生成的测试结果。The test result receiving module 808c is configured to receive test results generated by the test execution machine according to the test data and the expected data in the interface test case.
本实施例中,在接收到测试执行机根据接口标识生成的测试数据获取请求后,根据测试数据获取请求向测试执行返回测试数据,测试执行机根据测试数据和接口测试用例中的预期数据生成测试结果,通过预期数据和测试数据的比对,可以准确确定测试过程中接口存在的错误,并提高了测试结果的准确性。In this embodiment, after receiving the test data acquisition request generated by the test execution machine according to the interface identifier, the test data is returned to the test execution according to the test data acquisition request, and the test execution machine generates the test according to the test data and the expected data in the interface test case. As a result, by comparing the expected data with the test data, it is possible to accurately determine the error of the interface during the test and improve the accuracy of the test result.
上述数据接口测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。其中,网络接口可以是以太网或无线网卡等。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务器中的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。The various modules in the above data interface test apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The network interface may be an Ethernet or a wireless network card. The above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, or a read-only storage memory (Read-Only) Memory, ROM) or Random Access Memory (RAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-described embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种数据接口测试方法,包括:A data interface test method, including:
    获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
    根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
    将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
    接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
    将所述测试结果返回至所述终端。Returning the test result to the terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述获取终端在接口测试网页中输入的测试用例选取指令之前,所述方法还包括:The method according to claim 1, wherein the method further comprises: before the obtaining the test case selection instruction input by the terminal in the interface test webpage, the method further comprises:
    收集各终端在所述接口测试网页中编写的接口测试用例;及Collecting interface test cases written by each terminal in the interface test webpage; and
    将收集到的接口测试用例存储到测试用例集合中。Store the collected interface test cases into the test case collection.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述测试用例选取指令在测试用例集合中选取接口测试用例之后,所述方法还包括:The method according to claim 1, wherein after the selecting the interface test case in the test case set according to the test case selection instruction, the method further comprises:
    检测是否存在选取的接口测试用例所对应的测试结果;Detect whether there is a test result corresponding to the selected interface test case;
    若检测到,则删除所述选取的接口测试用例对应的测试结果;及If detected, deleting the test result corresponding to the selected interface test case; and
    若未检测到,则执行所述将选取的接口测试用例发送至测试执行机的步骤。If not detected, the step of transmitting the selected interface test case to the test execution machine is performed.
  4. 根据权利要求1所述的方法,其特征在于,所述将选取的接口测试用例发送至测试执行机,包括:The method according to claim 1, wherein the sending the selected interface test case to the test execution machine comprises:
    根据选取的接口测试用例获取各测试执行机的资源占用率;Obtaining the resource occupancy rate of each test execution machine according to the selected interface test case;
    查找所述资源占用率最小的测试执行机;及Finding the test execution machine with the smallest resource occupancy rate; and
    将所述选取的接口测试用例传输至查找到的测试执行机。The selected interface test case is transmitted to the found test execution machine.
  5. 根据权利要求1所述的方法,其特征在于,所述接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储,包括:The method according to claim 1, wherein the receiving the test result generated by the test execution machine after running the selected interface test case and storing comprises:
    接收所述测试执行机根据接口标识生成的测试数据获取请求,所述接口标识为所述测试执行机从所述选取的接口测试用例中提取的;Receiving a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case;
    根据所述测试数据获取请求向所述测试执行机返回测试数据;及Returning test data to the test execution machine according to the test data acquisition request; and
    接收所述测试执行机根据所述测试数据和所述接口测试用例中的预期数据生成的测试结果。Receiving test results generated by the test execution machine based on the test data and expected data in the interface test case.
  6. 一种数据接口测试装置,包括:A data interface testing device includes:
    选取指令获取模块,用于获取终端在接口测试网页中输入的测试用例选取指令;The instruction acquisition module is configured to obtain a test case selection instruction input by the terminal in the interface test webpage;
    测试用例选取模块,用于根据所述测试用例选取指令在测试用例集合中选取接口测试用例;a test case selection module, configured to select an interface test case in the test case set according to the test case selection instruction;
    测试用例发送模块,用于将选取的接口测试用例发送至测试执行机;a test case sending module, configured to send the selected interface test case to the test execution machine;
    测试结果存储模块,用于接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及a test result storage module, configured to receive the test result generated by the test execution machine after running the selected interface test case and store the test result; and
    测试结果发送模块,用于将所述测试结果返回至所述终端。a test result sending module, configured to return the test result to the terminal.
  7. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising:
    测试用例收集模块,用于收集各终端在所述接口测试网页中编写的接口测试用例;及a test case collection module, configured to collect an interface test case written by each terminal in the interface test webpage; and
    测试用例存储模块,用于将收集到的接口测试用例存储到测试用例集合中。A test case storage module for storing the collected interface test cases into a test case set.
  8. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising:
    测试结果检测模块,用于检测是否存在选取的接口测试用例所对应的测试结果;a test result detecting module, configured to detect whether there is a test result corresponding to the selected interface test case;
    测试结果删除模块,用于在检测到存在选取的接口测试用例所对应的测试结果时,删除所述选取的接口测试用例对应的测试结果;及The test result deleting module is configured to delete the test result corresponding to the selected interface test case when detecting the test result corresponding to the selected interface test case; and
    所述测试用例发送模块还用于在检测到不存在选取的接口测试用例所对应的测试结果时,将选取的接口测试用例发送至测试执行机。The test case sending module is further configured to send the selected interface test case to the test execution machine when detecting that the test result corresponding to the selected interface test case does not exist.
  9. 根据权利要求6所述的装置,其特征在于,所述测试用例发送模块包括:The device according to claim 6, wherein the test case sending module comprises:
    占用率获取模块,用于根据选取的接口测试用例获取各测试执行机的资源占用率;An occupancy acquisition module, configured to obtain a resource occupancy rate of each test execution machine according to the selected interface test case;
    执行机查找模块,用于查找所述资源占用率最小的测试执行机;及Executing a machine search module for finding a test execution machine with the smallest resource occupancy rate; and
    测试用例传输模块,用于将所述选取的接口测试用例传输至查找到的测试执行机。A test case transmission module is configured to transmit the selected interface test case to the found test execution machine.
  10. 根据权利要求6所述的装置,其特征在于,所述测试结果存储模块包括:The device according to claim 6, wherein the test result storage module comprises:
    获取请求接收模块,用于接收所述测试执行机根据接口标识生成的测试数据获取请求,所述接口标识为所述测试执行机从所述选取的接口测试用例中提取的;a request receiving module, configured to receive a test data acquisition request generated by the test execution device according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case;
    测试数据返回模块,用于根据所述测试数据获取请求向所述测试执行机返回测试数据;及a test data returning module, configured to return test data to the test execution machine according to the test data acquisition request; and
    测试结果接收模块,用于接收所述测试执行机根据所述测试数据和所述接口测试用例中的预期数据生成的测试结果。And a test result receiving module, configured to receive a test result generated by the test execution machine according to the test data and expected data in the interface test case.
  11. 一种服务器,包括存储器和处理器,所述存储器中存储有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, such that the processor performs the following steps:
    获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
    根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
    将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
    接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
    将所述测试结果返回至所述终端。Returning the test result to the terminal.
  12. 根据权利要求11所述的服务器,其特征在于,所述获取终端在接口测试网页中输入的测试用例选取指令之前,所述计算机可执行指令被所述处理器执行时,还使得所述处理器执行以下步骤:The server according to claim 11, wherein said acquiring terminal causes said processor to be executed by said processor before said test case selection instruction input in said interface test webpage Perform the following steps:
    收集各终端在所述接口测试网页中编写的接口测试用例;及Collecting interface test cases written by each terminal in the interface test webpage; and
    将收集到的接口测试用例存储到测试用例集合中。Store the collected interface test cases into the test case collection.
  13. 根据权利要求11所述的服务器,其特征在于,所述根据所述测试用例选取指令在测试用例集合中选取接口测试用例之后,所述计算机可执行指令被所述处理器执行时,还使得所述处理器执行以下步骤:The server according to claim 11, wherein said computer executable instructions are executed by said processor after said test case selection instruction selects an interface test case in said test case set The processor performs the following steps:
    检测是否存在选取的接口测试用例所对应的测试结果;Detect whether there is a test result corresponding to the selected interface test case;
    若检测到,则删除所述选取的接口测试用例对应的测试结果;及If detected, deleting the test result corresponding to the selected interface test case; and
    若未检测到,则执行所述将选取的接口测试用例发送至测试执行机的步骤。If not detected, the step of transmitting the selected interface test case to the test execution machine is performed.
  14. 根据权利要求11所述的服务器,其特征在于,所述将选取的接口测试用例发送至测试执行机,包括:The server according to claim 11, wherein the sending the selected interface test case to the test execution machine comprises:
    根据选取的接口测试用例获取各测试执行机的资源占用率;Obtaining the resource occupancy rate of each test execution machine according to the selected interface test case;
    查找所述资源占用率最小的测试执行机;及Finding the test execution machine with the smallest resource occupancy rate; and
    将所述选取的接口测试用例传输至查找到的测试执行机。The selected interface test case is transmitted to the found test execution machine.
  15. 根据权利要求11所述的服务器,其特征在于,所述接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储,包括:The server according to claim 11, wherein the receiving the test result generated by the test execution machine after running the selected interface test case and storing comprises:
    接收所述测试执行机根据接口标识生成的测试数据获取请求,所述接口标识为所述测试执行机从所述选取的接口测试用例中提取的;Receiving a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case;
    根据所述测试数据获取请求向所述测试执行机返回测试数据;及Returning test data to the test execution machine according to the test data acquisition request; and
    接收所述测试执行机根据所述测试数据和所述接口测试用例中的预期数据生成的测试结果。Receiving test results generated by the test execution machine based on the test data and expected data in the interface test case.
  16. 一个或多个存储有计算机可执行指令的非易失性存储介质,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
    获取终端在接口测试网页中输入的测试用例选取指令;Obtaining a test case selection instruction input by the terminal in the interface test webpage;
    根据所述测试用例选取指令在测试用例集合中选取接口测试用例;Selecting an interface test case from the test case set according to the test case selection instruction;
    将选取的接口测试用例发送至测试执行机;Send the selected interface test case to the test execution machine;
    接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储;及Receiving the test result generated by the test execution machine running the selected interface test case and storing the test result; and
    将所述测试结果返回至所述终端。Returning the test result to the terminal.
  17. 根据权利要求16所述的非易失性存储介质,其特征在于,所述获取终端在接口测试网页中输入的测试用例选取指令之前,所述计算机可执行指令被一个或多个处理器执行时,还使得所述一个或多个处理器执行以下步骤:The non-volatile storage medium according to claim 16, wherein said computer-executable instruction is executed by one or more processors before said acquisition terminal selects an instruction input in said interface test web page And causing the one or more processors to perform the following steps:
    收集各终端在所述接口测试网页中编写的接口测试用例;及Collecting interface test cases written by each terminal in the interface test webpage; and
    将收集到的接口测试用例存储到测试用例集合中。Store the collected interface test cases into the test case collection.
  18. 根据权利要求16所述的非易失性存储介质,其特征在于,所述根据所述测试用例选取指令在测试用例集合中选取接口测试用例之后,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:The non-volatile storage medium according to claim 16, wherein said computer executable instructions are processed by one or more after said interface test case is selected in said test case set according to said test case selection instruction When executed, the one or more processors are caused to perform the following steps:
    检测是否存在选取的接口测试用例所对应的测试结果;Detect whether there is a test result corresponding to the selected interface test case;
    若检测到,则删除所述选取的接口测试用例对应的测试结果;及If detected, deleting the test result corresponding to the selected interface test case; and
    若未检测到,则执行所述将选取的接口测试用例发送至测试执行机的步骤。If not detected, the step of transmitting the selected interface test case to the test execution machine is performed.
  19. 根据权利要求16所述的非易失性存储介质,其特征在于,所述将选取的接口测试用例发送至测试执行机,包括:The non-volatile storage medium according to claim 16, wherein the sending the selected interface test case to the test execution machine comprises:
    根据选取的接口测试用例获取各测试执行机的资源占用率;Obtaining the resource occupancy rate of each test execution machine according to the selected interface test case;
    查找所述资源占用率最小的测试执行机;及Finding the test execution machine with the smallest resource occupancy rate; and
    将所述选取的接口测试用例传输至查找到的测试执行机。The selected interface test case is transmitted to the found test execution machine.
  20. 根据权利要求16所述的非易失性存储介质,其特征在于,所述接收所述测试执行机运行所述选取的接口测试用例后生成的测试结果并存储,包括:The non-volatile storage medium according to claim 16, wherein the receiving the test result generated by the test execution machine after running the selected interface test case and storing comprises:
    接收所述测试执行机根据接口标识生成的测试数据获取请求,所述接口标识为所述测试执行机从所述选取的接口测试用例中提取的;Receiving a test data acquisition request generated by the test execution machine according to the interface identifier, where the interface identifier is extracted by the test execution machine from the selected interface test case;
    根据所述测试数据获取请求向所述测试执行机返回测试数据;及Returning test data to the test execution machine according to the test data acquisition request; and
    接收所述测试执行机根据所述测试数据和所述接口测试用例中的预期数据生成的测试结果。Receiving test results generated by the test execution machine based on the test data and expected data in the interface test case.
PCT/CN2017/078351 2016-07-20 2017-03-28 Data interface test method and apparatus, and server and storage medium WO2018014580A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610581627.X 2016-07-20
CN201610581627.XA CN106991040B (en) 2016-07-20 2016-07-20 Data interface testing method and device

Publications (1)

Publication Number Publication Date
WO2018014580A1 true WO2018014580A1 (en) 2018-01-25

Family

ID=59413563

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/078351 WO2018014580A1 (en) 2016-07-20 2017-03-28 Data interface test method and apparatus, and server and storage medium

Country Status (2)

Country Link
CN (1) CN106991040B (en)
WO (1) WO2018014580A1 (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165127A (en) * 2018-08-29 2019-01-08 北京奇艺世纪科技有限公司 Localization method, device and the electronic equipment of problem interface
CN109165165A (en) * 2018-09-04 2019-01-08 中国平安人寿保险股份有限公司 Interface test method, device, computer equipment and storage medium
CN109446071A (en) * 2018-09-26 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, interface test device, electronic equipment and storage medium
CN109597753A (en) * 2018-10-22 2019-04-09 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of interface testing
CN109710532A (en) * 2018-12-28 2019-05-03 北京金山安全软件有限公司 Test case management method and device and electronic equipment
CN110083540A (en) * 2019-04-29 2019-08-02 北京口袋时尚科技有限公司 Interface test method and device
CN110134584A (en) * 2019-04-12 2019-08-16 深圳壹账通智能科技有限公司 A kind of generation method, device, storage medium and the server of interface testing use-case
CN110413507A (en) * 2019-06-21 2019-11-05 平安科技(深圳)有限公司 System detection method, device, computer equipment and storage medium
CN110515834A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Interface test method, device, mobile terminal and storage medium
CN110597704A (en) * 2018-06-13 2019-12-20 百度在线网络技术(北京)有限公司 Application program pressure testing method, device, server and medium
CN110609791A (en) * 2019-09-03 2019-12-24 深圳证券交易所 Interface test method, interface test device and storage medium for bidding system
CN110633208A (en) * 2019-08-22 2019-12-31 浙江大搜车软件技术有限公司 Incremental code coverage rate testing method and system
CN110647462A (en) * 2019-08-29 2020-01-03 凡普数字技术有限公司 Interface test method, device and storage medium
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN110737549A (en) * 2018-07-20 2020-01-31 北京奇虎科技有限公司 Application testing method, device, server and system
CN111181800A (en) * 2019-11-27 2020-05-19 腾讯科技(深圳)有限公司 Test data processing method and device, electronic equipment and storage medium
CN111352825A (en) * 2018-12-21 2020-06-30 北京金山云网络技术有限公司 Data interface test method and device and server
CN111427784A (en) * 2020-03-24 2020-07-17 中国建设银行股份有限公司 Data acquisition method, device, equipment and storage medium
CN111459794A (en) * 2020-02-25 2020-07-28 西安广和通无线软件有限公司 Communication network testing method, device, computer equipment and storage medium
CN112596972A (en) * 2020-12-23 2021-04-02 文思海辉智科科技有限公司 Vehicle-mounted equipment testing method, device and system and computer equipment
CN112882922A (en) * 2019-11-29 2021-06-01 深圳云天励飞技术有限公司 Test method and related device
CN113094251A (en) * 2019-12-23 2021-07-09 深圳奇迹智慧网络有限公司 Embedded system testing method and device, computer equipment and storage medium
CN113220595A (en) * 2021-06-11 2021-08-06 中国农业银行股份有限公司 Test method and device
CN111427770B (en) * 2020-02-29 2024-04-09 中国平安人寿保险股份有限公司 Resource testing method and related equipment

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766190B (en) * 2017-10-31 2020-06-12 平安科技(深圳)有限公司 Interface testing method and device, computer equipment and storage medium
CN107861870B (en) * 2017-11-02 2020-07-24 平安科技(深圳)有限公司 Interface test and test data generation method, device, terminal and storage medium
CN108268348A (en) * 2017-12-08 2018-07-10 广州视源电子科技股份有限公司 Interface test method, device, mobile terminal and storage medium
CN108563569B (en) * 2018-04-11 2021-04-16 中国电子科技集团公司第十四研究所 Automatic interface testing method for early warning detection system
CN108959081A (en) * 2018-06-27 2018-12-07 郑州云海信息技术有限公司 One kind driving automated testing method based on text
CN108984400B (en) * 2018-07-03 2021-05-14 中国电子科技集团公司第十四研究所 Automatic interface testing method based on early warning detection system
CN109120473B (en) * 2018-07-27 2020-11-03 广州市百果园信息技术有限公司 Interface request frame implementation method, interface test method and corresponding device
CN109408304A (en) * 2018-09-27 2019-03-01 深圳壹账通智能科技有限公司 Block chain introduces test method, device, equipment and readable storage medium storing program for executing
CN109766262B (en) * 2018-12-15 2022-05-06 深圳壹账通智能科技有限公司 Interface data processing method, automatic testing method, device, equipment and medium
CN110362492B (en) * 2019-07-18 2024-06-11 腾讯科技(深圳)有限公司 Artificial intelligence algorithm testing method, device, server, terminal and storage medium
CN114401040A (en) * 2021-12-30 2022-04-26 中国电信股份有限公司 Transmission channel test system and test method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212357A (en) * 2006-12-31 2008-07-02 亿阳信通股份有限公司 Interface testing method and device
CN102096631A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Interface testing method and device
CN103970614A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Service testing method and device
CN104298604A (en) * 2014-11-06 2015-01-21 哈尔滨工业大学 Testing system and testing method for robustness of cloud service

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8423962B2 (en) * 2009-10-08 2013-04-16 International Business Machines Corporation Automated test execution plan generation
CN103761189B (en) * 2014-02-17 2017-02-01 广东欧珀移动通信有限公司 Test case management method and system
CN105260299A (en) * 2015-09-17 2016-01-20 安一恒通(北京)科技有限公司 Method, device, and system for software test

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212357A (en) * 2006-12-31 2008-07-02 亿阳信通股份有限公司 Interface testing method and device
CN102096631A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Interface testing method and device
CN103970614A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Service testing method and device
CN104298604A (en) * 2014-11-06 2015-01-21 哈尔滨工业大学 Testing system and testing method for robustness of cloud service

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597704A (en) * 2018-06-13 2019-12-20 百度在线网络技术(北京)有限公司 Application program pressure testing method, device, server and medium
CN110597704B (en) * 2018-06-13 2023-09-26 百度在线网络技术(北京)有限公司 Pressure test method, device, server and medium for application program
CN110737549A (en) * 2018-07-20 2020-01-31 北京奇虎科技有限公司 Application testing method, device, server and system
CN109165127A (en) * 2018-08-29 2019-01-08 北京奇艺世纪科技有限公司 Localization method, device and the electronic equipment of problem interface
CN109165165A (en) * 2018-09-04 2019-01-08 中国平安人寿保险股份有限公司 Interface test method, device, computer equipment and storage medium
CN109446071A (en) * 2018-09-26 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, interface test device, electronic equipment and storage medium
CN109597753A (en) * 2018-10-22 2019-04-09 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of interface testing
CN111352825B (en) * 2018-12-21 2023-06-02 北京金山云网络技术有限公司 Data interface testing method and device and server
CN111352825A (en) * 2018-12-21 2020-06-30 北京金山云网络技术有限公司 Data interface test method and device and server
CN109710532A (en) * 2018-12-28 2019-05-03 北京金山安全软件有限公司 Test case management method and device and electronic equipment
CN110134584A (en) * 2019-04-12 2019-08-16 深圳壹账通智能科技有限公司 A kind of generation method, device, storage medium and the server of interface testing use-case
CN110083540A (en) * 2019-04-29 2019-08-02 北京口袋时尚科技有限公司 Interface test method and device
CN110083540B (en) * 2019-04-29 2023-04-28 北京口袋时尚科技有限公司 Interface testing method and device
CN110413507B (en) * 2019-06-21 2024-05-03 平安科技(深圳)有限公司 System test method, device, computer equipment and storage medium
CN110413507A (en) * 2019-06-21 2019-11-05 平安科技(深圳)有限公司 System detection method, device, computer equipment and storage medium
CN110515834A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Interface test method, device, mobile terminal and storage medium
CN110515834B (en) * 2019-07-26 2023-11-10 Oppo广东移动通信有限公司 Interface testing method and device, mobile terminal and storage medium
CN110633208A (en) * 2019-08-22 2019-12-31 浙江大搜车软件技术有限公司 Incremental code coverage rate testing method and system
CN110647462A (en) * 2019-08-29 2020-01-03 凡普数字技术有限公司 Interface test method, device and storage medium
CN110609791A (en) * 2019-09-03 2019-12-24 深圳证券交易所 Interface test method, interface test device and storage medium for bidding system
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN111181800A (en) * 2019-11-27 2020-05-19 腾讯科技(深圳)有限公司 Test data processing method and device, electronic equipment and storage medium
CN111181800B (en) * 2019-11-27 2023-09-19 腾讯科技(深圳)有限公司 Test data processing method and device, electronic equipment and storage medium
CN112882922A (en) * 2019-11-29 2021-06-01 深圳云天励飞技术有限公司 Test method and related device
CN112882922B (en) * 2019-11-29 2023-11-17 深圳云天励飞技术有限公司 Test method and related device
CN113094251A (en) * 2019-12-23 2021-07-09 深圳奇迹智慧网络有限公司 Embedded system testing method and device, computer equipment and storage medium
CN113094251B (en) * 2019-12-23 2024-02-23 深圳奇迹智慧网络有限公司 Method and device for testing embedded system, computer equipment and storage medium
CN111459794A (en) * 2020-02-25 2020-07-28 西安广和通无线软件有限公司 Communication network testing method, device, computer equipment and storage medium
CN111459794B (en) * 2020-02-25 2024-03-15 西安广和通无线软件有限公司 Communication network testing method, device, computer equipment and storage medium
CN111427770B (en) * 2020-02-29 2024-04-09 中国平安人寿保险股份有限公司 Resource testing method and related equipment
CN111427784A (en) * 2020-03-24 2020-07-17 中国建设银行股份有限公司 Data acquisition method, device, equipment and storage medium
CN112596972A (en) * 2020-12-23 2021-04-02 文思海辉智科科技有限公司 Vehicle-mounted equipment testing method, device and system and computer equipment
CN112596972B (en) * 2020-12-23 2024-05-03 文思海辉智科科技有限公司 Test method, device and system of vehicle-mounted equipment and computer equipment
CN113220595B (en) * 2021-06-11 2023-10-03 中国农业银行股份有限公司 Test method and test equipment
CN113220595A (en) * 2021-06-11 2021-08-06 中国农业银行股份有限公司 Test method and device

Also Published As

Publication number Publication date
CN106991040A (en) 2017-07-28
CN106991040B (en) 2020-05-05

Similar Documents

Publication Publication Date Title
WO2018014580A1 (en) Data interface test method and apparatus, and server and storage medium
WO2018036167A1 (en) Test task executor assignment method, device, server and storage medium
WO2018103315A1 (en) Monitoring data processing method, apparatus, server and storage equipment
WO2018058959A1 (en) Sql auditing method and apparatus, server and storage device
WO2018014582A1 (en) Insurance policy data processing method, device, servicer and storage medium
WO2020233077A1 (en) System service monitoring method, device, and apparatus, and storage medium
WO2015144012A1 (en) Method for achieving software development transaction and electronic device
WO2018233037A1 (en) Database integration testing method, device, server, and storage medium
WO2018036168A1 (en) Method and device for executing data processing task, execution server, and storage medium
WO2010123168A1 (en) Database management method and system
WO2020186773A1 (en) Call request monitoring method, device, apparatus, and storage medium
CN110912776B (en) Automatic fuzzy test method and device for entity router management protocol
WO2014044136A1 (en) Distributed data-based concurrent processing method and system, and computer storage medium
WO2017177769A1 (en) Ogg version deployment method and system, server, and storage medium
WO2020119369A1 (en) Intelligent it operation and maintenance fault positioning method, apparatus and device, and readable storage medium
WO2013174172A1 (en) File information previewing method and system
WO2014189190A1 (en) System and method for retrieving information on basis of data member tagging
WO2021051492A1 (en) Database service node switching method, apparatus and device, and computer storage medium
WO2018227772A1 (en) Automatic teller machine control updating method and apparatus, computer device and storage medium
WO2013180476A1 (en) Apparatus and method for m2m communications
WO2020233073A1 (en) Blockchain environment test method, device and apparatus, and storage medium
WO2020077832A1 (en) Cloud desktop access method, apparatus and device, and storage medium
WO2020233057A1 (en) File packaging method, apparatus and device, and storage medium
WO2020062640A1 (en) Method, server and storage medium for switching dynamic copywriting language of terminal application
WO2014044130A1 (en) Service polling method and system, and computer storage medium

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: 17830222

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.05.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17830222

Country of ref document: EP

Kind code of ref document: A1