Nothing Special   »   [go: up one dir, main page]

WO2020155778A1 - Interface automation test method, test apparatus, test device and storage medium - Google Patents

Interface automation test method, test apparatus, test device and storage medium Download PDF

Info

Publication number
WO2020155778A1
WO2020155778A1 PCT/CN2019/118701 CN2019118701W WO2020155778A1 WO 2020155778 A1 WO2020155778 A1 WO 2020155778A1 CN 2019118701 W CN2019118701 W CN 2019118701W WO 2020155778 A1 WO2020155778 A1 WO 2020155778A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
test
node
interface node
code
Prior art date
Application number
PCT/CN2019/118701
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 WO2020155778A1 publication Critical patent/WO2020155778A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the invention relates to the technical field of computer testing, in particular to an interface automatic testing method, testing device, testing equipment and storage medium.
  • Interfaces are pre-defined functions. The purpose is to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism. Interface testing is a test that submits input data to the interface, obtains the returned results, and analyzes whether the results meet expectations.
  • the interface testing method in the prior art is as follows: the tester pre-writes the test case corresponding to the interface to be tested, sends the interface request message corresponding to the test case to the interface to be tested, and receives the response message fed back by the interface to be tested, according to the test case corresponding
  • the interface request message and response message determine the test result.
  • each interface corresponds to a parameter
  • each parameter may have multiple values
  • each test case includes the values of all parameters.
  • testers need to write multiple test cases so that the multiple test cases can cover all combinations of parameter values.
  • testers need to manually write test cases in the prior art, when there are many interface parameters, testers need to manually write dozens or even hundreds of test cases, which makes the efficiency of test case writing low and leads to interface testing The efficiency is low, and test cases are easily missed, and the interface test process cannot be effectively traced.
  • the present invention provides an interface automatic test method, test device, test equipment and storage medium, which use the interface process and configured parameters to automatically generate test code for testing the interface of the software to be tested. And generate a clear test report, the technical solution is as follows:
  • the present invention provides a method for automatic interface testing, which includes the following steps:
  • the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
  • the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back.
  • the code includes programs to call each interface node;
  • the method further includes obtaining an assertion setting result before or after obtaining the interface flowchart, where the assertion setting result is an expected value set for the output parameter output after calling the corresponding interface node;
  • Generating the test code includes: quoting the program of the assertion judgment operation after calling the interface node corresponding to the set expected value.
  • the method further includes obtaining an initialization parameter configuration result after obtaining the interface flow chart, the initialization parameter configuration result includes a test start interface node, and the initialization parameter configuration result is used to realize parameter initialization when the test code is generated, It includes: initializing the traversal start node as the test start interface node, and the test start interface node may be any interface node in the interface flowchart.
  • the initialization parameter configuration result further includes a test depth value, and the configuration value of the test depth value is greater than or equal to the longest depth value of the flow chart starting from the configured test start interface node.
  • the method further includes obtaining an input parameter configuration result before or after obtaining the interface flowchart, where the input parameter configuration result includes the input parameters required to implement the calling interface node;
  • Generating the test code includes: assigning the above-mentioned input parameter configuration result to the program of the input parameter at the corresponding calling interface node.
  • the different interface nodes are set in different branch paths, and/or
  • the first interface node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node Set in the same branch path.
  • part or all of the interface flowchart can be moved, copied, cut and/or pasted.
  • the step of running the test code in the test run environment includes a local run mode and/or a cloud run mode
  • the local run mode includes: downloading the test code from the cloud to a local computer, and Run the test code in the test software in the computer to obtain the test result;
  • the cloud operation mode includes: sending an operation request to the cloud, the operation request including the object to be tested information; according to the operation request, obtaining the corresponding test code; receiving based on the operation request to run the test software in the cloud Describe the test results obtained by the test code.
  • test report of the test result includes a test failure case description
  • test failure case includes an interface call error and/or an assertion judgment error.
  • process information and data information in each test case obtained by running the test code in the test running environment are associated and stored separately.
  • the present invention provides an interface automatic test device, including the following modules:
  • the target module to be tested is used to obtain interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, and the interface description includes input parameters and output parameters;
  • the flow chart module is used to arrange the related interface nodes in order according to the functions to be tested, and to associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart;
  • the code generation module is used to combine preset parameter types and parameter values of the input parameters of the interface node to perform a deep traversal of the interface flowchart, and generate the corresponding branch path according to each complete branch path from the traversal start node backward Test code, the test code includes a program to call each interface node;
  • the running module is used to run the test code in the test running environment to obtain the test result.
  • the present invention provides an interface automation test equipment, including a processor and a memory, the memory stores a program, and when the processor executes the program, the following operations are performed:
  • the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
  • the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back.
  • the code includes programs to call each interface node;
  • the present invention provides a storage medium for storing a program, and the program performs the following operations when executed:
  • the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
  • the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back.
  • the code includes programs to call each interface node;
  • the interface flowchart strengthens the semantic support of the test software
  • test report is comprehensive and accurate, the test process is traceable, and the test results are clear at a glance.
  • FIG. 1 is a flowchart of an interface automated testing method provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an interface flowchart provided by an embodiment of the present invention.
  • FIG. 3 is a flowchart of an interface automatic test method with parameter configuration and assertion added according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of modules of an interface automatic test device provided by an embodiment of the present invention.
  • Fig. 5 is a schematic diagram of modules of the interface automatic test device after the assertion setting and input parameter configuration of Fig. 4 are placed after the flow chart is established.
  • an automatic interface testing method is provided, as shown in Figure 1, including the following processes:
  • the present invention applies to protect the technology related to interface testing.
  • the interface generally refers to the way of interaction between the front-end and the back-end.
  • the front-end needs to input parameters such as destination (such as Shanghai) and check-in time, and the back-end returns to this purpose List of hotels in the place.
  • the test objects involved in the interface include mobile APP, webpage, WeChat applet, WeChat official account, PC application, industrial control software and other interfaces, which are hereinafter referred to as interfaces or interface nodes.
  • the interface set information includes each interface node and the interface description corresponding to each interface node.
  • the interface description includes input parameters and output parameters.
  • the interfaces involved include hotel query interface, hotel list interface, hotel order interface, and order payment interface.
  • the related interface nodes are arranged in order, and the output parameters of the previous interface node among the two adjacent interface nodes are associated with the input parameters of the next interface node.
  • the specific establishment process is as follows:
  • the different interface nodes are set in different branch paths.
  • the Ctrip homepage interface corresponds to multiple sub-interfaces: hotel query interface, air ticket query interface, train ticket query Interface, scenic spot ticket query interface, etc.;
  • the first interface node, the second interface node, and the third interface node Set in the same branch path take the interface of the above hotel reservation function as an example: for the hotel query interface, the input parameters are query conditions (destination, time, additional conditions, etc.), and the output parameters are obtained under the specific query conditions Hotel list; use the hotel list parameter output by the hotel query interface as the input parameter of the hotel list interface, and the user selects a piece of hotel information in the hotel list, and the hotel list interface outputs the hotel information as an output parameter; Use this piece of hotel information (including hotel name, check-in date, price, etc.) as input parameters of the hotel order interface, and the user selects the payment method on the hotel order interface, and the hotel order interface outputs the payment method and payment amount as output parameters ; Use the output parameters of the above payment method and payment amount as the input parameters of the order payment interface, and finally
  • the process of using the code engine to generate the test code is actually the process of the code engine traversing the interface flow chart.
  • the test code includes a program that calls each interface node: during the traversal process, when an interface node is detected, Get the parameter type and parameter value of the input parameter of the preset interface node to call the interface node.
  • test code in the test running environment in the form of a template that meets the running conditions, run the test code, and obtain the test result.
  • operation methods include but are not limited to the following two methods:
  • Cloud operation mode send a running request to the cloud, the running request includes the information of the object to be tested; the cloud server obtains the test code corresponding to the information of the object to be tested according to the operation request, and puts the test code in Project template to make it meet the operating requirements of the cloud test environment. For example, copy the test code to a folder at a specified address, call the source configuration file of the object to be tested, and use the source configuration file to The parameters in the project template are automatically filled, and the filled project template including the test code can be put into the cloud test software to run, and the test code is received by running the test code in the cloud test software based on the run request Test Results;
  • Local running mode Download the corresponding test code from the cloud to the local computer, and run the test code in the test software in the computer. Before running the test code, it is also necessary to configure the project. The method is the same as the operation of putting the test code into the project template in the cloud operation mode. The difference is that the cloud operation mode is automatically completed by the cloud server, while the local operation mode is completed by the operating user. While downloading the test code, it also downloads the project template, source configuration file and operating instructions. The project configuration can be completed according to the operating instructions, put into the local test environment for operation, and the test results are obtained. It should be noted that if the carrier of the object information to be tested is a mobile terminal, the mobile terminal needs to be connected to the local computer first.
  • test software includes but is not limited to JMeter and Postman, both of which can be applied to test Android, iOS system, Web or PC interface.
  • the initialization parameter configuration result includes the test start interface node.
  • the initialization parameter configuration result is used to initialize the parameters when the test code is generated, including: traversing the start node Initialized as the test start interface node, the test start interface node can be any interface node in the interface flow chart, it can be seen that the traversal start node can be the root interface node of the interface flow chart, It can also be a certain (not the last) interface node in the middle of the interface flowchart, and each complete branch path from the traversal start node to the last interface node.
  • the interface flowchart is a process tree structure (one-way), or in a preferred embodiment of the present invention, two interface nodes in the interface flowchart can be called in both directions.
  • the user selects in the hotel list After a certain piece of hotel information, call the hotel order interface. After calling the hotel order interface, you can call the hotel order interface again by entering the parameter back. After reselecting a piece of hotel information, call the hotel order interface again. In this case, use the hotel
  • the query interface is the interface node process under the complete traversal path of the traversal starting node: hotel query interface ⁇ hotel list interface ⁇ hotel order interface ⁇ hotel list interface ⁇ hotel order interface ⁇ order payment interface.
  • the traversal start node can select any node in the middle of the process, so that when a new function needs to be tested, there is no need to retest from the beginning, but only the interface node with the new function added as the traversal start node , Effectively improve test efficiency.
  • the automated test system in the prior art cannot achieve partial testing of only added new functions, resulting in low automated testing efficiency and lengthy testing process.
  • the initialization parameter configuration result also includes a test depth value, and the configuration value of the test depth value is greater than or equal to the longest depth value of the flow chart starting from the configured test start interface node, where:
  • the depth configuration value is equal to the longest depth value of the flow chart starting from the configured test start interface node, which can ensure that each branch path flow from the test start interface node can be completely traversed; if there are multiple branch paths There are interactions between them.
  • the loan app there is both a loan business process interface and a repayment business process interface. There is interaction between the loan business and the repayment business. For example, it should be the loan first and then the repayment, so if you want to test For the interactive function between the two branch paths, you need to set the page depth to the sum of the depth values of the two branch processes.
  • step S3 The following describes the input parameter configuration before generating the corresponding test code in step S3:
  • the input parameter configuration result includes the parameters required to call the interface node, such as the input parameters that need to be configured in the hotel query interface Including the hotel name, target city, check-in date and price, as well as filtering conditions, such as room type, area size, rental type, etc., for example, in the hotel order interface, you need to set the selection item information, such as selecting the second hotel After clicking the information, enter the hotel order interface.
  • the code engine puts the user's input parameter settings in a suitable position, that is, assigns the above-mentioned input parameter configuration results to the input parameter elements at the corresponding called interface nodes In order to complete the matching of the input parameters to the next interface node.
  • step S3 The following describes the assertion configuration before generating the corresponding test code in step S3:
  • the assertion setting result is the expected value set for a field in the output parameter output after calling the corresponding interface node; in the code generation process
  • the assertion operation to make assertion judgment.
  • the list table of the hotel list interface will be retrieved from the background. According to the list table configuration, the first column of the list is check-in time information, and the second column is check-out time information. The third column is the hotel address information, and the fourth column is the hotel name information.
  • the assertion judgment inserted in the test code can be to judge whether the value in the first column of the list table is equal to "02-14" and whether the value in the second column is Equal to "02-15", or judge whether the value in the fourth column is equal to "Four Seasons Hotel", if not, the assertion fails, which is a case of failed test cases.
  • the test result includes a test report in text form
  • the test report includes a test failure case description, such as interface call errors and/or assertion judgment errors, corresponding to the fail mark, click the fail mark, and the specific For details of failure, fields that do not meet expectations in the text report are preferably displayed in a highlighted form.
  • the test report can also include performance index test results, such as the start time of the test for each interface, the return time of the interface, the time difference between the two is the total time spent by the interface, and this time can be used to detect it. Whether it is the bottleneck of the entire system.
  • part or all of the interface flow chart can be moved, copied, cut and/or pasted, which provides greater convenience when establishing the interface flow chart and reduces repetitive work .
  • process information and data information in each test case obtained by running the test code in the test running environment are associated and stored separately, and effectively displayed on the product. Because the process and data are stored in different folders, the organization is clear, and the tester is clear at a glance. Whether it involves viewing or modifying the process or data, the work efficiency of the tester can be significantly improved.
  • the embodiment of the present invention provides an interface automatic testing method, which includes the following steps:
  • the interface set information includes each interface node and the interface description corresponding to each interface node, the interface node is a way for front-end and back-end interaction, and the interface description includes input parameters and output parameters ;
  • the related interface nodes arrange the related interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart, including: Get the entire website After the collection of interfaces and the corresponding interface description for each interface, the related interfaces are arranged in order according to the functional requirements, and then for every two interfaces, a field in the output of the previous interface corresponds to the next one.
  • the initialization parameter configuration result includes a test start interface node and a test depth value.
  • the initialization parameter configuration result is used to realize parameter initialization when the test code is generated, including: initializing the traversal start node to For the test start interface node, the traversal start node can be any node in the middle of the process, and each complete branch path from the traversal start node to the last interface node, the interface flow chart The two interface nodes can be called in both directions; the configuration value of the test depth value is greater than or equal to the longest depth value of the flowchart starting from the configured test start interface node, where the depth configuration value is equal to the configured test start The longest depth value of the flow chart with the interface node as the starting point, if there is interaction between multiple branch paths, the page depth is set to the sum of the depth values of the two branch processes;
  • the code engine is used to deeply traverse the interface flow chart, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back,
  • the test code includes a program to call each interface node.
  • the parameter type and parameter value of the input parameter of the preset interface node are obtained to call the interface node, This interface is triggered to obtain the parameter value of the output parameter, and the matching field from the output parameter is used as the input parameter of the next interface node, so as to traverse each complete branch path from the traversal starting node backward in the path Interface node on
  • test code in the test run environment in the form of a template that meets the operating conditions, run the test code to obtain the test result, and run the test code in the following two ways:
  • Cloud operation mode send a running request to the cloud, the running request includes the information of the object to be tested; the cloud server obtains the test code corresponding to the information of the object to be tested according to the operation request, and puts the test code in Project template to make it meet the operating requirements of the cloud test environment. For example, copy the test code to a folder at a specified address, call the source configuration file of the object to be tested, and use the source configuration file to The parameters in the project template are automatically filled, and the filled-in project template including the test code can be put into the cloud test software to run, and the test code is received based on the run request and the test code is run in the cloud test software. Test Results;
  • Local running mode download the corresponding test code from the cloud to the local computer, and run the test code in the test software in the computer.
  • the operating user completes putting the test code into For the operation of the project template, while downloading the test code in the cloud, it also downloads the project template, source configuration file and operating instructions.
  • the project configuration can be completed according to the operating instructions, put into the local test environment for operation, and the test results are obtained;
  • the carrier of the interface is a mobile terminal, and the mobile terminal needs to be connected to the local computer first.
  • an automatic interface test device is provided. Referring to Fig. 4, the device includes the following modules:
  • the target module to be tested is used to obtain interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, and the interface description includes input parameters and output parameters;
  • the flow chart module is used to arrange the related interface nodes in order according to the functions to be tested, and to associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart;
  • the code generation module is used to combine preset parameter types and parameter values of the input parameters of the interface node to perform a deep traversal of the interface flowchart, and generate the corresponding branch path according to each complete branch path from the traversal start node backward Test code, the test code includes a program to call each interface node;
  • the running module is used to run the test code in the test running environment to obtain the test result.
  • the testing process of the interface automation test module is as follows: the target module to be tested obtains the interface set information of the object to be tested, and the interface set information includes each interface node and the input parameters and output parameters corresponding to each interface node.
  • the information that needs to be filled on the interface node is preset as input parameters, and the assertion setting is set on the interface node; an interface flow chart is established according to the interface information, and then a node is selected in the interface flow chart as Test the starting interface node and initialize its test depth value; then traverse the flowchart and automatically generate code.
  • the essence of automatic code generation is to use the code engine to traverse to the interface node.
  • the interface automation test device provided in the above embodiment performs the interface automation test
  • only the division of the above functional modules is used as an example for illustration.
  • the above functions can be allocated to different functional modules according to needs.
  • Complete that is, divide the internal structure of the interface automated test device into different functional modules to complete all or part of the functions described above.
  • the embodiment of the interface automatic test device provided in this embodiment belongs to the same concept as the interface automatic test method provided in the above-mentioned embodiment.
  • the specific implementation process please refer to the method embodiment, which will not be repeated here.
  • an interface automated test equipment including a processor and a memory, the memory stores a program, and when the processor executes the program, the following operations are performed:
  • the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
  • the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back.
  • the code includes programs to call each interface node;
  • a storage medium for storing a program, and the program performs the following operations when executed:
  • the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
  • the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back.
  • the code includes programs to call each interface node;

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An interface automation test method, a test apparatus, a test device and a storage medium, the test method comprising: acquiring interface set information of an object to be tested (S1), comprising various interface nodes and interface descriptions thereof; sorting related interface nodes in sequence according to a function to be tested, and establishing an association between output parameters of the previous interface node and input parameters of the next interface node among two adjacent interface nodes to obtain an interface flowchart; performing depth traversal on the interface flowchart in view of input parameters of a preset interface node, and generating a corresponding test code according to each complete branch path from a traversal start node backwards (S3), the test code comprising a program that calls interface nodes; and running the test code in a test running environment to obtain a test result (S4). The described method uses an interface endpoint process and configured parameters to automatically generate a test code used for testing an interface, thus an automation test may be completed by running the code in a test environment.

Description

接口自动化测试方法、测试装置、测试设备及存储介质Interface automatic test method, test device, test equipment and storage medium 技术领域Technical field
本发明涉及计算机测试技术领域,特别涉及一种接口自动化测试方法、测试装置、测试设备及存储介质。The invention relates to the technical field of computer testing, in particular to an interface automatic testing method, testing device, testing equipment and storage medium.
背景技术Background technique
随着软件技术发展,越来越多软件通过平台化为用户提供服务,第三方可以根据平台提供接口定制自己需要服务,因此如今软件经常涉及接口测试。接口是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问源码,或理解内部工作机制的细节。接口测试是向接口提交输入数据,获取返回结果并分析结果是否符合预期的测试。With the development of software technology, more and more software provides services to users through platformization. Third parties can customize their own services according to the interfaces provided by the platform. Therefore, software nowadays often involves interface testing. Interfaces are pre-defined functions. The purpose is to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism. Interface testing is a test that submits input data to the interface, obtains the returned results, and analyzes whether the results meet expectations.
现有技术中接口测试方法如下:测试人员预先编写待测试接口对应的测试用例,向待测试接口发送该测试用例对应的接口请求消息,并接收待测试接口反馈的响应消息,根据测试用例对应的接口请求消息与响应消息确定测试结果。在实际应用中,每一个接口都对应有参数,每一个参数可能有多个取值,每一个测试用例中包括所有参数的取值。为了保证对接口测试的全面性,测试人员需要编写多个测试用例,以使该多个测试用例可以覆盖所有参数取值的组合。The interface testing method in the prior art is as follows: the tester pre-writes the test case corresponding to the interface to be tested, sends the interface request message corresponding to the test case to the interface to be tested, and receives the response message fed back by the interface to be tested, according to the test case corresponding The interface request message and response message determine the test result. In practical applications, each interface corresponds to a parameter, each parameter may have multiple values, and each test case includes the values of all parameters. In order to ensure the comprehensiveness of interface testing, testers need to write multiple test cases so that the multiple test cases can cover all combinations of parameter values.
由于在现有技术中需要由测试人员手动编写测试用例,当接口的参数较多时,测试人员需要手动编写数十个甚至上百个测试用例,使得测试用例编写的效率较低,进而导致接口测试的效率较低,并且容易遗漏测试用例,且无法对接口测试过程进行有效追溯。Since testers need to manually write test cases in the prior art, when there are many interface parameters, testers need to manually write dozens or even hundreds of test cases, which makes the efficiency of test case writing low and leads to interface testing The efficiency is low, and test cases are easily missed, and the interface test process cannot be effectively traced.
发明内容Summary of the invention
为了解决现有技术的问题,本发明提供了一种接口自动化测试方法、测试装置、测试设备及存储介质,利用接口流程及配置的参数自动生成用于测试待 测软件的的接口的测试代码,并生成一目了然的测试报告,所述技术方案如下:In order to solve the problems of the prior art, the present invention provides an interface automatic test method, test device, test equipment and storage medium, which use the interface process and configured parameters to automatically generate test code for testing the interface of the software to be tested. And generate a clear test report, the technical solution is as follows:
一方面,本发明提供了一种接口自动化测试方法,包括以下步骤:In one aspect, the present invention provides a method for automatic interface testing, which includes the following steps:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
进一步地,所述方法还包括在获取接口流程图之前或之后获取断言设置结果,所述断言设置结果为对调用相应接口节点后输出的输出参数设置的预期值;Further, the method further includes obtaining an assertion setting result before or after obtaining the interface flowchart, where the assertion setting result is an expected value set for the output parameter output after calling the corresponding interface node;
生成测试代码包括:在调用对应于设置有预期值的接口节点后引用断言判断操作的程序。Generating the test code includes: quoting the program of the assertion judgment operation after calling the interface node corresponding to the set expected value.
进一步地,所述方法还包括在得到接口流程图之后获取初始化参数配置结果,所述初始化参数配置结果包括测试起始接口节点,所述初始化参数配置结果用于在生成测试代码时实现参数初始化,包括:将所述遍历起始节点初始化为所述测试起始接口节点,所述测试起始接口节点可以为所述接口流程图中任意一个接口节点。Further, the method further includes obtaining an initialization parameter configuration result after obtaining the interface flow chart, the initialization parameter configuration result includes a test start interface node, and the initialization parameter configuration result is used to realize parameter initialization when the test code is generated, It includes: initializing the traversal start node as the test start interface node, and the test start interface node may be any interface node in the interface flowchart.
进一步地,所述初始化参数配置结果还包括测试深度值,所述测试深度值的配置值大于或等于以配置的测试起始接口节点为起点的流程图最长深度值。Further, the initialization parameter configuration result further includes a test depth value, and the configuration value of the test depth value is greater than or equal to the longest depth value of the flow chart starting from the configured test start interface node.
进一步地,所述方法还包括在获取接口流程图之前或之后获取输入参数配置结果,所述输入参数配置结果包括为实现调用接口节点所需输入的参数;Further, the method further includes obtaining an input parameter configuration result before or after obtaining the interface flowchart, where the input parameter configuration result includes the input parameters required to implement the calling interface node;
生成测试代码包括:将上述输入参数配置结果赋值给相应调用接口节点处的输入参数的程序。Generating the test code includes: assigning the above-mentioned input parameter configuration result to the program of the input parameter at the corresponding calling interface node.
进一步地,所述接口流程图的建立步骤包括以下操作:Further, the steps of establishing the interface flowchart include the following operations:
基于不同接口节点对应于同一个前一接口节点的情况,将所述不同接口节点设置在不同的分支路径中,和/或Based on the situation that different interface nodes correspond to the same previous interface node, the different interface nodes are set in different branch paths, and/or
基于第一接口节点为第二接口节点的前一接口节点且第二接口节点为第三接口节点的前一接口节点的情况,将所述第一接口节点、第二接口节点、第三接口节点设置在同一分支路径中。Based on the situation that the first interface node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node Set in the same branch path.
进一步地,所述接口流程图的局部或全部能够进行移动、复制、剪切和/或粘贴操作。Further, part or all of the interface flowchart can be moved, copied, cut and/or pasted.
可选地,所述在测试运行环境中运行所述测试代码的步骤包括本地运行方式和/或云端运行方式,所述本地运行方式包括:从云端下载所述测试代码到本地计算机中,并在所述计算机中的测试软件中运行所述测试代码,得到测试结果;Optionally, the step of running the test code in the test run environment includes a local run mode and/or a cloud run mode, and the local run mode includes: downloading the test code from the cloud to a local computer, and Run the test code in the test software in the computer to obtain the test result;
所述云端运行方式包括:向云端发送运行请求,所述运行请求中包括待测试对象信息;根据所述运行请求,获取对应的测试代码;接收基于所述运行请求在云端的测试软件中运行所述测试代码得到的测试结果。The cloud operation mode includes: sending an operation request to the cloud, the operation request including the object to be tested information; according to the operation request, obtaining the corresponding test code; receiving based on the operation request to run the test software in the cloud Describe the test results obtained by the test code.
进一步地,所述测试结果的测试报告中包括测试失败例情况说明,所述测试失败例包括接口调用错误和/或断言判断错误的情况。Further, the test report of the test result includes a test failure case description, and the test failure case includes an interface call error and/or an assertion judgment error.
进一步地,将所述在测试运行环境中运行所述测试代码得到的每一条测试用例中的流程信息与数据信息关联并分离存储。Further, the process information and data information in each test case obtained by running the test code in the test running environment are associated and stored separately.
另一方面,本发明提供了一种接口自动化测试装置,包括以下模块:On the other hand, the present invention provides an interface automatic test device, including the following modules:
待测目标模块,用于获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;The target module to be tested is used to obtain interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, and the interface description includes input parameters and output parameters;
流程图模块,用于按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;The flow chart module is used to arrange the related interface nodes in order according to the functions to be tested, and to associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart;
代码生成模块,用于结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;The code generation module is used to combine preset parameter types and parameter values of the input parameters of the interface node to perform a deep traversal of the interface flowchart, and generate the corresponding branch path according to each complete branch path from the traversal start node backward Test code, the test code includes a program to call each interface node;
运行模块,用于在测试运行环境中运行所述测试代码,得到测试结果。The running module is used to run the test code in the test running environment to obtain the test result.
再一方面,本发明提供了一种接口自动化测试设备,包括处理器以及存储 器,所述存储器中存储有程序,在所述处理器执行所述程序时,进行以下操作:In another aspect, the present invention provides an interface automation test equipment, including a processor and a memory, the memory stores a program, and when the processor executes the program, the following operations are performed:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
再一方面,本发明提供了一种存储介质,用于存储程序,所述程序在被执行时进行以下操作:In another aspect, the present invention provides a storage medium for storing a program, and the program performs the following operations when executed:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
本发明提供的技术方案带来的有益效果如下:The beneficial effects brought by the technical solution provided by the present invention are as follows:
a.接口流程图加强了对测试软件的语义支持;a. The interface flowchart strengthens the semantic support of the test software;
b.利用代码自动生成引擎自动生成测试代码;b. Use automatic code generation engine to automatically generate test code;
c.将测试用例中的流程和数据分离存储,并在产品上有效展示出来,提高测试人员的使用便捷性;c. Separate and store the process and data in the test case, and effectively display it on the product to improve the convenience of testers;
d.能够对计算机网页、移动终端网页、移动终端App、微信小程序、微信公众号,PC应用程序,工控软件内的接口进行自动化测试,应用范围广泛;d. Able to automate testing of interfaces in computer web pages, mobile terminal web pages, mobile terminal App, WeChat applet, WeChat official account, PC application, and industrial control software, with a wide range of applications;
e.测试报告全面准确,测试过程可追溯性强,测试结果一目了然。e. The test report is comprehensive and accurate, the test process is traceable, and the test results are clear at a glance.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative work.
图1是本发明实施例提供的接口自动化测试方法的流程图;FIG. 1 is a flowchart of an interface automated testing method provided by an embodiment of the present invention;
图2是本发明实施例提供的接口流程图的示意图;Figure 2 is a schematic diagram of an interface flowchart provided by an embodiment of the present invention;
图3是本发明实施例提供的加入参数配置和断言的接口自动化测试方法流程图;FIG. 3 is a flowchart of an interface automatic test method with parameter configuration and assertion added according to an embodiment of the present invention;
图4是本发明实施例提供的接口自动化测试装置的模块示意图;4 is a schematic diagram of modules of an interface automatic test device provided by an embodiment of the present invention;
图5是将图4中断言设置及输入参数配置放置在流程图建立之后的接口自动化测试装置的模块示意图。Fig. 5 is a schematic diagram of modules of the interface automatic test device after the assertion setting and input parameter configuration of Fig. 4 are placed after the flow chart is established.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、装置、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or device that includes a series of steps or units is not necessarily limited to the clearly listed Those steps or units may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
在本发明的一个实施例中,提供了一种接口自动化测试方法,参见图1,包 括以下流程:In an embodiment of the present invention, an automatic interface testing method is provided, as shown in Figure 1, including the following processes:
S1、获取待测试对象的接口集合信息。S1. Obtain the interface collection information of the object to be tested.
本发明申请保护关于接口测试的技术,接口泛指前端和后台交互的途径,比如以携程订酒店为例,前端需要输入目的地(比如上海),入住时间等参数,而后台就返回在此目的地的酒店列表。接口所涉及的待测试对象包含移动APP、网页、微信小程序、微信公众号、PC应用程序、工控软件等其中的接口,以下简称接口或接口节点。The present invention applies to protect the technology related to interface testing. The interface generally refers to the way of interaction between the front-end and the back-end. For example, in the case of Ctrip booking a hotel, the front-end needs to input parameters such as destination (such as Shanghai) and check-in time, and the back-end returns to this purpose List of hotels in the place. The test objects involved in the interface include mobile APP, webpage, WeChat applet, WeChat official account, PC application, industrial control software and other interfaces, which are hereinafter referred to as interfaces or interface nodes.
具体地,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数,比如:以携程网应用为例,当测试其订酒店功能时,其涉及的接口包括酒店查询接口、酒店列表接口、酒店订单接口、订单支付接口。Specifically, the interface set information includes each interface node and the interface description corresponding to each interface node. The interface description includes input parameters and output parameters. For example, taking the Ctrip application as an example, when testing its hotel reservation function, The interfaces involved include hotel query interface, hotel list interface, hotel order interface, and order payment interface.
S2、建立接口流程图。S2, the flow chart of establishing the interface.
具体地,按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,其具体的建立过程如下:Specifically, according to the function to be tested, the related interface nodes are arranged in order, and the output parameters of the previous interface node among the two adjacent interface nodes are associated with the input parameters of the next interface node. The specific establishment process is as follows:
拿到软件(比如携程网站)的整个接口的集合以及对每个接口拿到接口描述(输入参数,输出参数)之后,根据软件需求,针对某个功能(比如携程订酒店功能)把相关接口按次序排列组织起来,然后对于每两两接口在其线上描述上一个接口的输出中某个字段对应下一个接口的输入中的某个参数。当把所有功能都画完后,接口流程图就完成了。After getting the set of the entire interface of the software (such as Ctrip website) and the interface description (input parameters, output parameters) for each interface, according to the software requirements, press the relevant interface for a certain function (such as the Ctrip hotel reservation function) The order is arranged and organized, and then for every two interfaces, a certain field in the output of the previous interface corresponds to a certain parameter in the input of the next interface on its line. When all the functions are drawn, the interface flowchart is complete.
基于不同接口节点对应于同一个前一接口节点的情况,将所述不同接口节点设置在不同的分支路径中,比如,携程首页接口对应好多个子接口:酒店查询接口、机票查询接口、火车票查询接口、景点门票查询接口等等;Based on the situation that different interface nodes correspond to the same previous interface node, the different interface nodes are set in different branch paths. For example, the Ctrip homepage interface corresponds to multiple sub-interfaces: hotel query interface, air ticket query interface, train ticket query Interface, scenic spot ticket query interface, etc.;
基于第一接口节点为第二接口节点的前一接口节点且第二接口节点为第三接口节点的前一接口节点的情况,将所述第一接口节点、第二接口节点、第三接口节点设置在同一分支路径中以上述订酒店功能的接口为例:对于酒店查询接口,其输入参数为查询条件(目的地、时间、附加条件等),输出参数为在此特定查询条件下查询得到的酒店列表;将所述酒店查询接口输出的酒店列表参数作为酒店列表接口的输入参数,用户在所述酒店列表中选择某一条酒店信 息,则所述酒店列表接口输出该条酒店信息作为输出参数;将该条酒店信息(包括酒店名称、入住日期、价格等)作为酒店订单接口的输入参数,用户在所述酒店订单接口选择支付方式,则所述酒店订单接口输出支付方式和支付金额作为输出参数;将上述支付方式和支付金额的输出参数作为订单支付接口的输入参数,最终得到如图2所示的接口流程图,图中接口名称和输入/输出参数的命名仅为示意,实际以底层接口脚本中命名名称为准。Based on the situation that the first interface node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node Set in the same branch path, take the interface of the above hotel reservation function as an example: for the hotel query interface, the input parameters are query conditions (destination, time, additional conditions, etc.), and the output parameters are obtained under the specific query conditions Hotel list; use the hotel list parameter output by the hotel query interface as the input parameter of the hotel list interface, and the user selects a piece of hotel information in the hotel list, and the hotel list interface outputs the hotel information as an output parameter; Use this piece of hotel information (including hotel name, check-in date, price, etc.) as input parameters of the hotel order interface, and the user selects the payment method on the hotel order interface, and the hotel order interface outputs the payment method and payment amount as output parameters ; Use the output parameters of the above payment method and payment amount as the input parameters of the order payment interface, and finally get the interface flow chart as shown in Figure 2. The interface name and input/output parameter naming in the figure is only for illustration, and the actual bottom interface is The name in the script shall prevail.
S3、对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码。S3. Perform an in-depth traversal of the interface flowchart, and generate corresponding test codes according to each complete branch path from the traversal start node backward.
具体地,利用代码引擎生成测试代码的过程实际上是代码引擎遍历接口流程图的过程,所述测试代码包括对各个接口节点进行调用的程序:在遍历的过程中,当检测到接口节点时,获取预设的接口节点的输入参数的参数类型和参数值,以调用所述接口节点,直接call接口能够调用接口,比如接口getHotelList(String destination),然后根据输入数据destination=上海,这样运行的时候就把数据传给getHotelList(),从而触发此接口,得到输出参数的参数值,然后从所述输出参数中匹配字段以作为下一接口节点的输入参数,以此遍历完路径中自遍历起始节点向后的每一条完整分支路径上的接口节点。Specifically, the process of using the code engine to generate the test code is actually the process of the code engine traversing the interface flow chart. The test code includes a program that calls each interface node: during the traversal process, when an interface node is detected, Get the parameter type and parameter value of the input parameter of the preset interface node to call the interface node. The interface can be called directly by calling the interface, such as the interface getHotelList(String destination), and then according to the input data destination=Shanghai, when running like this Just pass the data to getHotelList() to trigger this interface, get the parameter value of the output parameter, and then match the field from the output parameter as the input parameter of the next interface node, so as to complete the traversal path and start the traversal The interface node on each complete branch path behind the node.
S4、在测试运行环境中运行所述测试代码,得到测试结果。S4. Run the test code in the test operation environment to obtain the test result.
将测试代码以符合运行条件的模板形式放入测试运行环境中,运行所述测试代码,得到测试结果。运行的方式包括但不限于以下两种方式:Put the test code in the test running environment in the form of a template that meets the running conditions, run the test code, and obtain the test result. The operation methods include but are not limited to the following two methods:
云端运行方式:向云端发送运行请求,所述运行请求中包括待测试对象信息;云端服务器根据所述运行请求,获取与所述待测试对象信息对应的测试代码,并将所述测试代码放入项目模版,使其符合云端测试环境的运行要求,比如,将所述测试代码拷贝到指定地址的文件夹下,并调用所述待测试对象的源配置文件,根据所述源配置文件,将所述项目模板中的参数进行自动填充,完成填充后的包括有测试代码的项目模版可以放入云端的测试软件中运行,接收基于所述运行请求在云端的测试软件中运行所述测试代码得到的测试结果;Cloud operation mode: send a running request to the cloud, the running request includes the information of the object to be tested; the cloud server obtains the test code corresponding to the information of the object to be tested according to the operation request, and puts the test code in Project template to make it meet the operating requirements of the cloud test environment. For example, copy the test code to a folder at a specified address, call the source configuration file of the object to be tested, and use the source configuration file to The parameters in the project template are automatically filled, and the filled project template including the test code can be put into the cloud test software to run, and the test code is received by running the test code in the cloud test software based on the run request Test Results;
本地运行方式:从云端下载相应测试代码到本地计算机中,并在所述计算机中的测试软件中运行所述测试代码,在运行所述测试代码之前,同样需要对其进行项目配置,其配置的方式与云端运行方式中将所述测试代码放入项目模 版的操作一致,不同之处在于,云端运行方式中是由云端服务器自动完成,而本地运行方式由操作用户完成,为了方便完成,在云端下载测试代码的同时,还一并下载项目模板、源配置文件及操作说明,可根据所述操作说明完成项目配置,放入本地测试环境进行运行,得到测试结果。需要说明的是,若所述待测试对象信息的载体为移动终端,则需要先将所述移动终端与本地计算机连接。Local running mode: Download the corresponding test code from the cloud to the local computer, and run the test code in the test software in the computer. Before running the test code, it is also necessary to configure the project. The method is the same as the operation of putting the test code into the project template in the cloud operation mode. The difference is that the cloud operation mode is automatically completed by the cloud server, while the local operation mode is completed by the operating user. While downloading the test code, it also downloads the project template, source configuration file and operating instructions. The project configuration can be completed according to the operating instructions, put into the local test environment for operation, and the test results are obtained. It should be noted that if the carrier of the object information to be tested is a mobile terminal, the mobile terminal needs to be connected to the local computer first.
其中,所述测试软件包括但不限于JMeter,Postman,这两个软件都可以应用于测试安卓、iOS系统、Web或PC接口。Wherein, the test software includes but is not limited to JMeter and Postman, both of which can be applied to test Android, iOS system, Web or PC interface.
对于大部分需要测试的对象来说,在自动生成代码之前还需要配置好初始化参数、输入参数及断言条件,方法流程如图3所示,下面对步骤S3中生成对应的测试代码之前的参数初始化进行说明:For most objects that need to be tested, the initialization parameters, input parameters and assertion conditions need to be configured before the code is automatically generated. The method flow is shown in Figure 3. The following is the parameters before the corresponding test code is generated in step S3 Initialization is explained:
在获取接口流程图之后进行初始化参数配置,所述初始化参数配置结果包括测试起始接口节点,所述初始化参数配置结果用于在生成测试代码时实现参数初始化,包括:将所述遍历起始节点初始化为所述测试起始接口节点,所述测试起始接口节点可以为所述接口流程图中任意一个接口节点,可以看出,所述遍历起始节点可以为接口流程图的根接口节点,也可以是接口流程图中中间某一个(不是最后一个)接口节点,自遍历起始节点向后的每一条完整分支路径,包括遍历到最后一个接口节点,在本发明的一个实施例中,所述接口流程图为流程树结构(单向),或在本发明的一个优选实施例中,所述接口流程图中两个接口节点可以双向调用,比如图2中用户在所述酒店列表中选择某一条酒店信息后调用酒店订单接口,调用所述酒店订单接口后可以通过输入参数back再次调用所述酒店订单接口,重新选择一条酒店信息后再次调用酒店订单接口,在这种情况下,以酒店查询接口为遍历起始节点的完整遍历路径下的接口节点流程为酒店查询接口→酒店列表接口→酒店订单接口→酒店列表接口→酒店订单接口→订单支付接口。所述遍历起始节点可以选择流程中间的任意一个节点,这样使得当增加了一种新功能需要测试的时候,无需从头开始重新测,而仅需从增加新功能的接口节点作为遍历起始节点,有效提高测试效率。现有技术中的自动化测试系统无法实现仅针对增加的新功能进行局部测试,导致自动化测试效率低下,测试过程冗长。After obtaining the interface flowchart, the initialization parameter configuration is performed. The initialization parameter configuration result includes the test start interface node. The initialization parameter configuration result is used to initialize the parameters when the test code is generated, including: traversing the start node Initialized as the test start interface node, the test start interface node can be any interface node in the interface flow chart, it can be seen that the traversal start node can be the root interface node of the interface flow chart, It can also be a certain (not the last) interface node in the middle of the interface flowchart, and each complete branch path from the traversal start node to the last interface node. In an embodiment of the present invention, The interface flowchart is a process tree structure (one-way), or in a preferred embodiment of the present invention, two interface nodes in the interface flowchart can be called in both directions. For example, in Figure 2, the user selects in the hotel list After a certain piece of hotel information, call the hotel order interface. After calling the hotel order interface, you can call the hotel order interface again by entering the parameter back. After reselecting a piece of hotel information, call the hotel order interface again. In this case, use the hotel The query interface is the interface node process under the complete traversal path of the traversal starting node: hotel query interface→hotel list interface→hotel order interface→hotel list interface→hotel order interface→order payment interface. The traversal start node can select any node in the middle of the process, so that when a new function needs to be tested, there is no need to retest from the beginning, but only the interface node with the new function added as the traversal start node , Effectively improve test efficiency. The automated test system in the prior art cannot achieve partial testing of only added new functions, resulting in low automated testing efficiency and lengthy testing process.
除了测试起始接口节点,所述初始化参数配置结果还包括测试深度值,所 述测试深度值的配置值大于或等于以配置的测试起始接口节点为起点的流程图最长深度值,其中,深度配置值等于以配置的测试起始接口节点为起点的流程图最长深度值,可以确保能够完整地遍历以测试起始接口节点起起点的每一个分支路径流程;若多个所述分支路径之间具有交互,比如贷款App中,既有贷款业务流程接口,又有还款业务流程接口,贷款业务和还款业务之间有交互,比如应当是先贷款后还款,因此,若要测试两条分支路径之间的交互功能,则需要设置页面深度为两条分支流程的深度值之和。In addition to the test start interface node, the initialization parameter configuration result also includes a test depth value, and the configuration value of the test depth value is greater than or equal to the longest depth value of the flow chart starting from the configured test start interface node, where: The depth configuration value is equal to the longest depth value of the flow chart starting from the configured test start interface node, which can ensure that each branch path flow from the test start interface node can be completely traversed; if there are multiple branch paths There are interactions between them. For example, in the loan app, there is both a loan business process interface and a repayment business process interface. There is interaction between the loan business and the repayment business. For example, it should be the loan first and then the repayment, so if you want to test For the interactive function between the two branch paths, you need to set the page depth to the sum of the depth values of the two branch processes.
下面对步骤S3中生成对应的测试代码之前的输入参数配置进行说明:The following describes the input parameter configuration before generating the corresponding test code in step S3:
在获取接口流程图之前或之后获取输入参数配置结果(参见图4和图5),所述输入参数配置结果包括为调用接口节点所需输入的参数,比如在酒店查询接口,需要配置的输入参数包括酒店名称、目标城市、入住日期和价格,还可以包括筛选条件,比如,房型、面积大小、租住类型等等,再比如在酒店订单接口,需要设置选择条目信息,比如选择第二条酒店信息点击后进入酒店订单接口。通过预先设置的各个接口对应的输入参数,在生成测试代码过程中,代码引擎将用户的输入参数设置放在合适的位置,即将上述输入参数配置结果赋值给相应调用的接口节点处的输入参数元素以便于完成到下一接口节点的输入参数的匹配。Obtain the input parameter configuration result before or after obtaining the interface flowchart (see Figure 4 and Figure 5). The input parameter configuration result includes the parameters required to call the interface node, such as the input parameters that need to be configured in the hotel query interface Including the hotel name, target city, check-in date and price, as well as filtering conditions, such as room type, area size, rental type, etc., for example, in the hotel order interface, you need to set the selection item information, such as selecting the second hotel After clicking the information, enter the hotel order interface. Through pre-set input parameters corresponding to each interface, in the process of generating test code, the code engine puts the user's input parameter settings in a suitable position, that is, assigns the above-mentioned input parameter configuration results to the input parameter elements at the corresponding called interface nodes In order to complete the matching of the input parameters to the next interface node.
下面对步骤S3中生成对应的测试代码之前的断言配置进行说明:The following describes the assertion configuration before generating the corresponding test code in step S3:
在获取接口流程图之前或之后进行断言设置(参见图4和图5),所述断言设置结果为对调用相应接口节点后输出的输出参数中某个字段所设置的预期值;在生成代码过程中,对于预设有断言配置的某一接口节点,在调用到该接口节点后,引用断言操作进行断言判断,比如对于酒店查询接口,如果其输入参数为2月14日-2月15日、北京、四季酒店,那么在自动生成测试代码过程中,会从后台调取酒店列表接口的list表,根据list表配置可知,列表第一列为入住时间信息,第二列为离店时间信息,第三列为酒店地址信息,第四列为酒店名称信息,则所述测试代码中插入的断言判断则可以为判断list表的第一列值是否等于“02-14”,第二列值是否等于“02-15”,或判断第四列值是否等于“四季酒店”,如果不是,则断言失败,作为一种失败测试例的情况。Perform assertion settings before or after obtaining the interface flowchart (see Figure 4 and Figure 5), the assertion setting result is the expected value set for a field in the output parameter output after calling the corresponding interface node; in the code generation process For a certain interface node with preset assertion configuration, after calling the interface node, refer to the assertion operation to make assertion judgment. For example, for the hotel query interface, if its input parameter is from February 14th to February 15th, For Beijing and Four Seasons Hotels, in the process of automatically generating test codes, the list table of the hotel list interface will be retrieved from the background. According to the list table configuration, the first column of the list is check-in time information, and the second column is check-out time information. The third column is the hotel address information, and the fourth column is the hotel name information. The assertion judgment inserted in the test code can be to judge whether the value in the first column of the list table is equal to "02-14" and whether the value in the second column is Equal to "02-15", or judge whether the value in the fourth column is equal to "Four Seasons Hotel", if not, the assertion fails, which is a case of failed test cases.
所述测试结果包括文字形式的测试报告,所述测试报告中包括测试失败例 情况说明,比如接口调用错误和/或断言判断错误的情况,对应fail标记,点击所述fail标记,则出现具体的失败细节,文字报告中将不符合期望值的字段优选以高亮形式显示。除此,所述测试报告还可以包括性能指标测试结果,比如测试每个接口发起的起始时间,接口的返回时间,两者时间差即为此接口共花费的时间,这个时间可以用来检测其是否为整个系统的bottleneck。The test result includes a test report in text form, and the test report includes a test failure case description, such as interface call errors and/or assertion judgment errors, corresponding to the fail mark, click the fail mark, and the specific For details of failure, fields that do not meet expectations in the text report are preferably displayed in a highlighted form. In addition, the test report can also include performance index test results, such as the start time of the test for each interface, the return time of the interface, the time difference between the two is the total time spent by the interface, and this time can be used to detect it. Whether it is the bottleneck of the entire system.
在本发明的一个优选实施例中,所述接口流程图的局部或全部能够进行移动、复制、剪切和/或粘贴操作,这在建立接口流程图时提供了较大的便利,减少重复工作。In a preferred embodiment of the present invention, part or all of the interface flow chart can be moved, copied, cut and/or pasted, which provides greater convenience when establishing the interface flow chart and reduces repetitive work .
进一步地,将所述在测试运行环境中运行所述测试代码得到的每一条测试用例中的流程信息与数据信息关联并分离存储,并在产品上有效展示出来。由于流程与数据分不同的文件夹进行存放,条理清晰,测试人员一目了然,无论是涉及流程还是数据的查看或者修改,都能显著提高测试人员的工作效率。Further, the process information and data information in each test case obtained by running the test code in the test running environment are associated and stored separately, and effectively displayed on the product. Because the process and data are stored in different folders, the organization is clear, and the tester is clear at a glance. Whether it involves viewing or modifying the process or data, the work efficiency of the tester can be significantly improved.
本发明实施例提供了一种接口自动化测试方法,包括以下步骤:The embodiment of the present invention provides an interface automatic testing method, which includes the following steps:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口节点为前端和后台交互的途径,所述接口描述包括输入参数和输出参数;Obtain the interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, the interface node is a way for front-end and back-end interaction, and the interface description includes input parameters and output parameters ;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图,包括:获取网站的整个接口的集合以及对每个接口获取相应的接口描述之后,针对功能需求把相关接口按次序排列组织起来,然后对于每两两接口在其线上描述上一个接口的输出中某个字段对应下一个接口的输入中的某个参数,直至完成所有功能的接口流程;基于不同接口节点对应于同一个前一接口节点的情况,将所述不同接口节点设置在不同的分支路径中;基于第一接口节点为第二接口节点的前一接口节点且第二接口节点为第三接口节点的前一接口节点的情况,将所述第一接口节点、第二接口节点、第三接口节点设置在同一分支路径中,接口名称和输入/输出参数的命名以底层接口脚本中命名名称为准;According to the function to be tested, arrange the related interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart, including: Get the entire website After the collection of interfaces and the corresponding interface description for each interface, the related interfaces are arranged in order according to the functional requirements, and then for every two interfaces, a field in the output of the previous interface corresponds to the next one. A certain parameter in the input of the interface until the interface process of all functions is completed; based on the situation that different interface nodes correspond to the same previous interface node, the different interface nodes are set in different branch paths; based on the first interface When the node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node are set in the same branch In the path, the name of the interface and input/output parameters shall be based on the name in the underlying interface script;
进行初始化参数配置,所述初始化参数配置结果包括测试起始接口节点和测试深度值,所述初始化参数配置结果用于在生成测试代码时实现参数初始化,包括:将所述遍历起始节点初始化为所述测试起始接口节点,所述遍历起始节 点可以为流程中间的任意一个节点,自遍历起始节点向后的每一条完整分支路径,包括遍历到最后一个接口节点,所述接口流程图中两个接口节点能够双向调用;所述测试深度值的配置值大于或等于以配置的测试起始接口节点为起点的流程图最长深度值,其中,深度配置值等于以配置的测试起始接口节点为起点的流程图最长深度值,若多个所述分支路径之间具有交互,则设置页面深度为两条分支流程的深度值之和;Perform initialization parameter configuration. The initialization parameter configuration result includes a test start interface node and a test depth value. The initialization parameter configuration result is used to realize parameter initialization when the test code is generated, including: initializing the traversal start node to For the test start interface node, the traversal start node can be any node in the middle of the process, and each complete branch path from the traversal start node to the last interface node, the interface flow chart The two interface nodes can be called in both directions; the configuration value of the test depth value is greater than or equal to the longest depth value of the flowchart starting from the configured test start interface node, where the depth configuration value is equal to the configured test start The longest depth value of the flow chart with the interface node as the starting point, if there is interaction between multiple branch paths, the page depth is set to the sum of the depth values of the two branch processes;
结合预设的接口节点的输入参数的参数类型和参数值,利用代码引擎对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序,在遍历的过程中,当检测到接口节点时,获取预设的接口节点的输入参数的参数类型和参数值,以调用所述接口节点,从而触发此接口,得到输出参数的参数值,并从所述输出参数中匹配字段以作为下一接口节点的输入参数,以此遍历完路径中自遍历起始节点向后的每一条完整分支路径上的接口节点;Combining the preset parameter types and parameter values of the input parameters of the interface node, the code engine is used to deeply traverse the interface flow chart, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back, The test code includes a program to call each interface node. In the process of traversal, when an interface node is detected, the parameter type and parameter value of the input parameter of the preset interface node are obtained to call the interface node, This interface is triggered to obtain the parameter value of the output parameter, and the matching field from the output parameter is used as the input parameter of the next interface node, so as to traverse each complete branch path from the traversal starting node backward in the path Interface node on
将测试代码以符合运行条件的模板形式放入测试运行环境中,运行所述测试代码,得到测试结果,运行所述测试代码的方式包括以下两种:Put the test code in the test run environment in the form of a template that meets the operating conditions, run the test code to obtain the test result, and run the test code in the following two ways:
云端运行方式:向云端发送运行请求,所述运行请求中包括待测试对象信息;云端服务器根据所述运行请求,获取与所述待测试对象信息对应的测试代码,并将所述测试代码放入项目模版,使其符合云端测试环境的运行要求,比如,将所述测试代码拷贝到指定地址的文件夹下,并调用所述待测试对象的源配置文件,根据所述源配置文件,将所述项目模板中的参数进行自动填充,完成填充后的包括有测试代码的项目模版可以放入云端的测试软件中运行,接收基于所述运行请求在云端的测试软件中运行所述测试代码得到的测试结果;Cloud operation mode: send a running request to the cloud, the running request includes the information of the object to be tested; the cloud server obtains the test code corresponding to the information of the object to be tested according to the operation request, and puts the test code in Project template to make it meet the operating requirements of the cloud test environment. For example, copy the test code to a folder at a specified address, call the source configuration file of the object to be tested, and use the source configuration file to The parameters in the project template are automatically filled, and the filled-in project template including the test code can be put into the cloud test software to run, and the test code is received based on the run request and the test code is run in the cloud test software. Test Results;
本地运行方式:从云端下载相应测试代码到本地计算机中,并在所述计算机中的测试软件中运行所述测试代码,在运行所述测试代码之前,由操作用户完成将所述测试代码放入项目模版的操作,在云端下载测试代码的同时,还一并下载项目模板、源配置文件及操作说明,可根据所述操作说明完成项目配置,放入本地测试环境进行运行,得到测试结果;若界面的载体为移动终端,则需要先将所述移动终端与本地计算机连接。Local running mode: download the corresponding test code from the cloud to the local computer, and run the test code in the test software in the computer. Before running the test code, the operating user completes putting the test code into For the operation of the project template, while downloading the test code in the cloud, it also downloads the project template, source configuration file and operating instructions. The project configuration can be completed according to the operating instructions, put into the local test environment for operation, and the test results are obtained; The carrier of the interface is a mobile terminal, and the mobile terminal needs to be connected to the local computer first.
在本发明的一个实施例中,提供了一种接口自动化测试装置,参见图4,所 述装置包括以下模块:In an embodiment of the present invention, an automatic interface test device is provided. Referring to Fig. 4, the device includes the following modules:
待测目标模块,用于获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;The target module to be tested is used to obtain interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, and the interface description includes input parameters and output parameters;
流程图模块,用于按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;The flow chart module is used to arrange the related interface nodes in order according to the functions to be tested, and to associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart;
代码生成模块,用于结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;The code generation module is used to combine preset parameter types and parameter values of the input parameters of the interface node to perform a deep traversal of the interface flowchart, and generate the corresponding branch path according to each complete branch path from the traversal start node backward Test code, the test code includes a program to call each interface node;
运行模块,用于在测试运行环境中运行所述测试代码,得到测试结果。The running module is used to run the test code in the test running environment to obtain the test result.
总的来说,接口自动化测试模块的测试工作过程如下:待测目标模块获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的输入参数和输出参数,所述接口节点上需要填的信息被预设为输入参数,并在所述接口节点上设置断言设置;再根据所述接口信息建立接口流程图,然后在所述接口流程图中选择一个节点为测试起始接口节点,初始化其测试深度值;接下来遍历流程图并自动生成代码,自动生成代码的实质为利用代码引擎遍历到接口节点,若有断言设置,则进行断言判断,若无断言设置,则代码中加入当前接口节点的输入参数,完成输入参数后,调用此接口并收到返回值,然后将预先设置好的返回值中某字段的值匹配到下一接口节点所需的输入参数,并调用所述下一接口节点,直至调用分支路径上的最后一个接口节点(完成相应的断言判断,如果该接口有断言设置的话)。In general, the testing process of the interface automation test module is as follows: the target module to be tested obtains the interface set information of the object to be tested, and the interface set information includes each interface node and the input parameters and output parameters corresponding to each interface node. The information that needs to be filled on the interface node is preset as input parameters, and the assertion setting is set on the interface node; an interface flow chart is established according to the interface information, and then a node is selected in the interface flow chart as Test the starting interface node and initialize its test depth value; then traverse the flowchart and automatically generate code. The essence of automatic code generation is to use the code engine to traverse to the interface node. If there is an assertion setting, then an assertion judgment will be performed, if there is no assertion setting , The input parameters of the current interface node are added to the code. After completing the input parameters, call this interface and receive the return value, and then match the value of a field in the preset return value to the input parameters required by the next interface node , And call the next interface node until the last interface node on the branch path is called (complete the corresponding assertion judgment, if the interface has an assertion setting).
需要说明的是:上述实施例提供的接口自动化测试装置在进行接口自动化测试时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将接口自动化测试装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,本实施例提供的接口自动化测试装置实施例与上述实施例提供的接口自动化测试方法属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the interface automation test device provided in the above embodiment performs the interface automation test, only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs. Complete, that is, divide the internal structure of the interface automated test device into different functional modules to complete all or part of the functions described above. In addition, the embodiment of the interface automatic test device provided in this embodiment belongs to the same concept as the interface automatic test method provided in the above-mentioned embodiment. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
在本本发明的一个实施例中,提供了一种接口自动化测试设备,包括处理器以及存储器,所述存储器中存储有程序,在所述处理器执行所述程序时,进行以下操作:In an embodiment of the present invention, there is provided an interface automated test equipment, including a processor and a memory, the memory stores a program, and when the processor executes the program, the following operations are performed:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
在本发明的一个实施例中,提供了一种存储介质,用于存储程序,所述程序在被执行时进行以下操作:In an embodiment of the present invention, a storage medium is provided for storing a program, and the program performs the following operations when executed:
获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
以上关于接口自动化测试设备及相应存储介质的实施例与上述实施例提供的接口自动化测试方法属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。The above embodiments of the interface automatic test equipment and the corresponding storage medium belong to the same concept as the interface automatic test method provided in the above embodiments. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection of the present invention. Within range.

Claims (14)

  1. 一种接口自动化测试方法,其特征在于,包括以下步骤:An automatic interface testing method, characterized in that it comprises the following steps:
    获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口节点为前端和后台交互的途径,所述接口描述包括输入参数和输出参数;Obtain the interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, the interface node is a way for front-end and back-end interaction, and the interface description includes input parameters and output parameters ;
    按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图,包括:获取网站的整个接口的集合以及对每个接口获取相应的接口描述之后,针对功能需求把相关接口按次序排列组织起来,然后对于每两两接口在其线上描述上一个接口的输出中某个字段对应下一个接口的输入中的某个参数,直至完成所有功能的接口流程;基于不同接口节点对应于同一个前一接口节点的情况,将所述不同接口节点设置在不同的分支路径中;基于第一接口节点为第二接口节点的前一接口节点且第二接口节点为第三接口节点的前一接口节点的情况,将所述第一接口节点、第二接口节点、第三接口节点设置在同一分支路径中,接口名称和输入/输出参数的命名以底层接口脚本中命名名称为准;According to the function to be tested, arrange the related interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart, including: Get the entire website After the collection of interfaces and the corresponding interface description for each interface, the related interfaces are arranged in order according to the functional requirements, and then for every two interfaces, a field in the output of the previous interface corresponds to the next one. A certain parameter in the input of the interface until the interface process of all functions is completed; based on the situation that different interface nodes correspond to the same previous interface node, the different interface nodes are set in different branch paths; based on the first interface When the node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node are set in the same branch In the path, the name of the interface and input/output parameters shall be based on the name in the underlying interface script;
    进行初始化参数配置,所述初始化参数配置结果包括测试起始接口节点和测试深度值,所述初始化参数配置结果用于在生成测试代码时实现参数初始化,包括:将所述遍历起始节点初始化为所述测试起始接口节点,所述遍历起始节点可以为流程中间的任意一个节点,自遍历起始节点向后的每一条完整分支路径,包括遍历到最后一个接口节点,所述接口流程图中两个接口节点能够双向调用;所述测试深度值的配置值大于或等于以配置的测试起始接口节点为起点的流程图最长深度值,其中,深度配置值等于以配置的测试起始接口节点为起点的流程图最长深度值,若多个所述分支路径之间具有交互,则设置页面深度为两条分支流程的深度值之和;Perform initialization parameter configuration. The initialization parameter configuration result includes a test start interface node and a test depth value. The initialization parameter configuration result is used to realize parameter initialization when the test code is generated, including: initializing the traversal start node to For the test start interface node, the traversal start node can be any node in the middle of the process, and each complete branch path from the traversal start node to the last interface node, the interface flow chart The two interface nodes can be called in both directions; the configuration value of the test depth value is greater than or equal to the longest depth value of the flowchart starting from the configured test start interface node, where the depth configuration value is equal to the configured test start The longest depth value of the flow chart with the interface node as the starting point, if there is interaction between multiple branch paths, the page depth is set to the sum of the depth values of the two branch processes;
    结合预设的接口节点的输入参数的参数类型和参数值,利用代码引擎对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序,在遍历的过程中,当检测到接口节点时,获取预设的接口节点的输入参数的参 数类型和参数值,以调用所述接口节点,从而触发此接口,得到输出参数的参数值,并从所述输出参数中匹配字段以作为下一接口节点的输入参数,以此遍历完路径中自遍历起始节点向后的每一条完整分支路径上的接口节点;Combining the preset parameter types and parameter values of the input parameters of the interface node, the code engine is used to deeply traverse the interface flowchart, and the corresponding test code is generated according to each complete branch path from the traversing start node to the back, The test code includes a program to call each interface node. In the process of traversal, when an interface node is detected, the parameter type and parameter value of the input parameter of the preset interface node are obtained to call the interface node, This interface is triggered to obtain the parameter value of the output parameter, and the matching field from the output parameter is used as the input parameter of the next interface node, so as to traverse each complete branch path from the traversal starting node backward in the path Interface node on
    将测试代码以符合运行条件的模板形式放入测试运行环境中,运行所述测试代码,得到测试结果,运行所述测试代码的方式包括以下两种:Put the test code in the test run environment in the form of a template that meets the operating conditions, run the test code to obtain the test result, and run the test code in the following two ways:
    云端运行方式:向云端发送运行请求,所述运行请求中包括待测试对象信息;云端服务器根据所述运行请求,获取与所述待测试对象信息对应的测试代码,并将所述测试代码放入项目模版,使其符合云端测试环境的运行要求,比如,将所述测试代码拷贝到指定地址的文件夹下,并调用所述待测试对象的源配置文件,根据所述源配置文件,将所述项目模板中的参数进行自动填充,完成填充后的包括有测试代码的项目模版可以放入云端的测试软件中运行,接收基于所述运行请求在云端的测试软件中运行所述测试代码得到的测试结果;Cloud operation mode: send a running request to the cloud, the running request includes the information of the object to be tested; the cloud server obtains the test code corresponding to the information of the object to be tested according to the operation request, and puts the test code in Project template to make it meet the operating requirements of the cloud test environment. For example, copy the test code to a folder at a specified address, call the source configuration file of the object to be tested, and use the source configuration file to The parameters in the project template are automatically filled, and the filled project template including the test code can be put into the cloud test software to run, and the test code is received by running the test code in the cloud test software based on the run request Test Results;
    本地运行方式:从云端下载相应测试代码到本地计算机中,并在所述计算机中的测试软件中运行所述测试代码,在运行所述测试代码之前,由操作用户完成将所述测试代码放入项目模版的操作,在云端下载测试代码的同时,还一并下载项目模板、源配置文件及操作说明,可根据所述操作说明完成项目配置,放入本地测试环境进行运行,得到测试结果;若界面的载体为移动终端,则需要先将所述移动终端与本地计算机连接。Local running mode: download the corresponding test code from the cloud to the local computer, and run the test code in the test software in the computer. Before running the test code, the operating user completes putting the test code into For the operation of the project template, while downloading the test code in the cloud, it also downloads the project template, source configuration file and operating instructions. The project configuration can be completed according to the operating instructions, put into the local test environment for operation, and the test results are obtained; The carrier of the interface is a mobile terminal, and the mobile terminal needs to be connected to the local computer first.
  2. 一种接口自动化测试方法,其特征在于,包括以下步骤:An automatic interface testing method, characterized in that it comprises the following steps:
    获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
    按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
    结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
    在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
  3. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述方法还包括在获取接口流程图之前或之后获取断言设置结果,所述断言设置结果为对调用相应接口节点后输出的输出参数设置的预期值;The interface automation test method according to claim 2, wherein the method further comprises obtaining an assertion setting result before or after obtaining the interface flowchart, and the assertion setting result is an output parameter output after calling the corresponding interface node Set expected value;
    生成测试代码包括:在调用对应于设置有预期值的接口节点后引用断言判断操作的程序。Generating the test code includes: quoting the program of the assertion judgment operation after calling the interface node corresponding to the set expected value.
  4. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述方法还包括在得到接口流程图之后获取初始化参数配置结果,所述初始化参数配置结果包括测试起始接口节点,所述初始化参数配置结果用于在生成测试代码时实现参数初始化,包括:将所述遍历起始节点初始化为所述测试起始接口节点,所述测试起始接口节点可以为所述接口流程图中任意一个接口节点。The interface automation test method according to claim 2, wherein the method further comprises obtaining an initialization parameter configuration result after obtaining the interface flowchart, the initialization parameter configuration result including a test start interface node, the initialization parameter The configuration result is used to implement parameter initialization when generating the test code, including: initializing the traversal start node as the test start interface node, and the test start interface node may be any interface in the interface flowchart node.
  5. 根据权利要求4所述的接口自动化测试方法,其特征在于,所述初始化参数配置结果还包括测试深度值,所述测试深度值的配置值大于或等于以配置的测试起始接口节点为起点的流程图最长深度值。The interface automation test method according to claim 4, wherein the initialization parameter configuration result further includes a test depth value, and the configuration value of the test depth value is greater than or equal to the test starting interface node configured as a starting point. The longest depth value of the flowchart.
  6. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述方法还包括在获取接口流程图之前或之后获取输入参数配置结果,所述输入参数配置结果包括为实现调用接口节点所需输入的参数;The interface automation test method according to claim 2, wherein the method further comprises obtaining an input parameter configuration result before or after obtaining the interface flowchart, and the input parameter configuration result includes the input required to implement the calling interface node The parameters;
    生成测试代码包括:将上述输入参数配置结果赋值给相应调用接口节点处的输入参数的程序。Generating the test code includes: assigning the above-mentioned input parameter configuration result to the program of the input parameter at the corresponding calling interface node.
  7. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述接口流程图的建立步骤包括以下操作:The interface automation test method according to claim 2, wherein the establishing step of the interface flowchart includes the following operations:
    基于不同接口节点对应于同一个前一接口节点的情况,将所述不同接口节点设置在不同的分支路径中,和/或Based on the situation that different interface nodes correspond to the same previous interface node, the different interface nodes are set in different branch paths, and/or
    基于第一接口节点为第二接口节点的前一接口节点且第二接口节点为第三接口节点的前一接口节点的情况,将所述第一接口节点、第二接口节点、第三 接口节点设置在同一分支路径中。Based on the situation that the first interface node is the previous interface node of the second interface node and the second interface node is the previous interface node of the third interface node, the first interface node, the second interface node, and the third interface node Set in the same branch path.
  8. 根据权利要求7所述的接口自动化测试方法,其特征在于,所述接口流程图的局部或全部能够进行移动、复制、剪切和/或粘贴操作。The interface automation test method according to claim 7, wherein part or all of the interface flow chart can be moved, copied, cut and/or pasted.
  9. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述在测试运行环境中运行所述测试代码的步骤包括本地运行方式和/或云端运行方式,所述本地运行方式包括:从云端下载所述测试代码到本地计算机中,并在所述计算机中的测试软件中运行所述测试代码,得到测试结果;The interface automation test method according to claim 2, wherein the step of running the test code in a test operation environment includes a local operation mode and/or a cloud operation mode, and the local operation mode includes: from the cloud Download the test code to a local computer, and run the test code in the test software in the computer to obtain a test result;
    所述云端运行方式包括:向云端发送运行请求,所述运行请求中包括待测试对象信息;根据所述运行请求,获取对应的测试代码;接收基于所述运行请求在云端的测试软件中运行所述测试代码得到的测试结果。The cloud operation mode includes: sending an operation request to the cloud, the operation request including the object to be tested information; according to the operation request, obtaining the corresponding test code; receiving based on the operation request to run the test software in the cloud Describe the test results obtained by the test code.
  10. 根据权利要求2所述的接口自动化测试方法,其特征在于,所述测试结果的测试报告中包括测试失败例情况说明,所述测试失败例包括接口调用错误和/或断言判断错误的情况。The interface automation test method according to claim 2, wherein the test report of the test result includes a test failure case description, and the test failure case includes an interface call error and/or an assertion judgment error.
  11. 根据权利要求2所述的接口自动化测试方法,其特征在于,将所述在测试运行环境中运行所述测试代码得到的每一条测试用例中的流程信息与数据信息关联并分离存储。The interface automation test method according to claim 2, wherein the process information and data information in each test case obtained by running the test code in the test operation environment are associated and stored separately.
  12. 一种接口自动化测试装置,其特征在于,包括以下模块:An automatic interface test device, which is characterized by comprising the following modules:
    待测目标模块,用于获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;The target module to be tested is used to obtain interface set information of the object to be tested, the interface set information includes each interface node and the interface description corresponding to each interface node, and the interface description includes input parameters and output parameters;
    流程图模块,用于按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;The flow chart module is used to arrange the related interface nodes in order according to the functions to be tested, and to associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flow chart;
    代码生成模块,用于结合预设的接口节点的输入参数的参数类型和参数值, 对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;The code generation module is used to combine preset parameter types and parameter values of the input parameters of the interface node to perform a deep traversal of the interface flowchart, and generate the corresponding branch path according to each complete branch path from the traversal start node backward Test code, the test code includes a program to call each interface node;
    运行模块,用于在测试运行环境中运行所述测试代码,得到测试结果。The running module is used to run the test code in the test running environment to obtain the test result.
  13. 一种接口自动化测试设备,包括处理器以及存储器,所述存储器中存储有程序,其特征在于,在所述处理器执行所述程序时,进行以下操作:An automatic interface test equipment includes a processor and a memory, the memory stores a program, and is characterized in that when the processor executes the program, the following operations are performed:
    获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
    按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
    结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
    在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
  14. 一种存储介质,用于存储程序,其特征在于,所述程序在被执行时进行以下操作:A storage medium used to store a program, wherein the program performs the following operations when being executed:
    获取待测试对象的接口集合信息,所述接口集合信息包括各个接口节点及每个接口节点对应的接口描述,所述接口描述包括输入参数和输出参数;Acquiring interface set information of the object to be tested, the interface set information including each interface node and an interface description corresponding to each interface node, the interface description including input parameters and output parameters;
    按照待测试功能,将相关接口节点按次序排列,并对相邻两接口节点中前一接口节点的输出参数与后一个接口节点的输入参数建立关联,得到接口流程图;According to the function to be tested, arrange the relevant interface nodes in order, and associate the output parameters of the previous interface node with the input parameters of the next interface node among the two adjacent interface nodes to obtain the interface flowchart;
    结合预设的接口节点的输入参数的参数类型和参数值,对所述接口流程图进行深度遍历,根据自遍历起始节点向后的每一条完整分支路径生成与其对应的测试代码,所述测试代码包括对各个接口节点进行调用的程序;Combining the preset parameter types and parameter values of the input parameters of the interface node, the interface flowchart is deeply traversed, and the corresponding test code is generated according to each complete branch path from the traversal start node to the back. The test The code includes programs to call each interface node;
    在测试运行环境中运行所述测试代码,得到测试结果。Run the test code in the test run environment to obtain the test result.
PCT/CN2019/118701 2019-02-03 2019-11-15 Interface automation test method, test apparatus, test device and storage medium WO2020155778A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910108589.XA CN109857667B (en) 2019-02-03 2019-02-03 Interface automation test method, test device, test equipment and storage medium
CN201910108589.X 2019-02-03

Publications (1)

Publication Number Publication Date
WO2020155778A1 true WO2020155778A1 (en) 2020-08-06

Family

ID=66897663

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118701 WO2020155778A1 (en) 2019-02-03 2019-11-15 Interface automation test method, test apparatus, test device and storage medium

Country Status (2)

Country Link
CN (1) CN109857667B (en)
WO (1) WO2020155778A1 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897739A (en) * 2020-08-21 2020-11-06 四川长虹电器股份有限公司 Test case generation method based on optimized depth-first algorithm
CN112052182A (en) * 2020-09-27 2020-12-08 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112131127A (en) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 Interface testing method, device and system and electronic equipment
CN112148601A (en) * 2020-09-16 2020-12-29 京东数字科技控股股份有限公司 Interface testing method and device, electronic equipment and storage medium
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium
CN112561245A (en) * 2020-11-27 2021-03-26 中广核工程有限公司 Collaborative management method and device, computer equipment and storage medium
CN112559356A (en) * 2020-12-18 2021-03-26 杭州兑吧网络科技有限公司 Automatic software testing method and system
CN112650683A (en) * 2020-12-28 2021-04-13 京东数字科技控股股份有限公司 Program test method, program test apparatus, and storage medium
CN112882930A (en) * 2021-02-04 2021-06-01 网易(杭州)网络有限公司 Automatic testing method and device, storage medium and electronic equipment
CN112948271A (en) * 2021-04-09 2021-06-11 腾讯科技(深圳)有限公司 Code testing method, device, equipment and storage medium
CN113392026A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Interface automation test method, system, electronic equipment and storage medium
CN113641747A (en) * 2021-10-15 2021-11-12 北京新氧科技有限公司 Method, device and system for accessing postman tool to database
CN113760716A (en) * 2020-11-23 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method and tool, service arrangement flow engine and storage medium
CN113836045A (en) * 2021-11-29 2021-12-24 深圳市明源云链互联网科技有限公司 Logic generation method and device for interface automation assertion and storage medium
CN114253833A (en) * 2021-11-03 2022-03-29 北京思特奇信息技术股份有限公司 Method and system for verifying consistency of program design based on dynamic data
CN114817071A (en) * 2022-05-31 2022-07-29 苏州浪潮智能科技有限公司 Online automatic test system, method and device and readable storage medium
CN115391231A (en) * 2022-10-26 2022-11-25 江苏北弓智能科技有限公司 Automatic interface testing method
WO2023123943A1 (en) * 2021-12-27 2023-07-06 深圳前海微众银行股份有限公司 Interface automation testing method and apparatus, and medium, device and program
CN117130946A (en) * 2023-10-27 2023-11-28 北京世冠金洋科技发展有限公司 Test scene generation method and device, electronic equipment and readable storage medium

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857667B (en) * 2019-02-03 2021-10-08 苏州市龙测智能科技有限公司 Interface automation test method, test device, test equipment and storage medium
CN110297632A (en) * 2019-06-12 2019-10-01 百度在线网络技术(北京)有限公司 Code generating method and device
CN110347590A (en) * 2019-06-18 2019-10-18 平安普惠企业管理有限公司 The interface testing control method and device of operation system
CN110224870B (en) * 2019-06-19 2023-03-24 腾讯云计算(北京)有限责任公司 Interface monitoring method and device, computing equipment and storage medium
CN110502429B (en) * 2019-07-10 2023-04-25 平安普惠企业管理有限公司 Management method, device, equipment and storage medium of test system
CN110489106A (en) * 2019-07-22 2019-11-22 北京字节跳动网络技术有限公司 A kind of generation method, device, medium and the electronic equipment of project initial code
CN110532175A (en) * 2019-07-29 2019-12-03 深圳中兴网信科技有限公司 Interface test method, interface test device, server and storage medium
CN110597730B (en) * 2019-09-20 2023-08-22 中国工商银行股份有限公司 Automatic test case generation method and system based on scene method
CN110879781B (en) * 2019-11-06 2023-10-03 北京奇艺世纪科技有限公司 Program debugging method, device, electronic equipment and computer readable storage medium
CN110908920A (en) * 2019-12-03 2020-03-24 浪潮商用机器有限公司 Interface function testing method and device and related components
CN112905441A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, test method, device and equipment
CN111176992B (en) * 2019-12-24 2023-06-06 平安国际智慧城市科技股份有限公司 Flow engine testing method and device, computer equipment and storage medium
CN111797152B (en) * 2020-06-23 2024-03-19 北京自如信息科技有限公司 Data scene generation method and device and computer equipment
CN111881025B (en) * 2020-07-20 2023-08-04 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN112015661B (en) * 2020-09-08 2023-10-03 南京云柜网络科技有限公司 Software testing method and device
CN112416763A (en) * 2020-11-17 2021-02-26 杭州安恒信息技术股份有限公司 Method, device and equipment for automatically testing interface and storage medium
CN112559368A (en) * 2020-12-23 2021-03-26 马上消费金融股份有限公司 Interface automation test method and its use case generation method, equipment and storage medium
CN112685297B (en) * 2020-12-25 2022-11-29 科讯嘉联信息技术有限公司 Automatic testing method for telephone service robot dialect process
CN112988132B (en) * 2021-02-25 2021-12-21 平安科技(深圳)有限公司 Automatic generation method and device of data interface, computer equipment and storage medium
CN113326184B (en) * 2021-05-11 2022-05-17 前海飞算云智软件科技(深圳)有限公司 Interface testing method and device, storage medium and electronic equipment
CN113360300B (en) * 2021-06-29 2023-10-24 北京思普艾斯科技有限公司 Interface call link generation method, device, equipment and readable storage medium
CN113626326B (en) * 2021-08-09 2022-02-11 三峡高科信息技术有限责任公司 Dragging type zero code front end automatic test system based on image recognition
CN113609021A (en) * 2021-08-10 2021-11-05 未鲲(上海)科技服务有限公司 Regression testing method, device, equipment and storage medium
CN113760759A (en) * 2021-09-02 2021-12-07 广东睿住智能科技有限公司 Debugging method, debugging device, electronic device, and storage medium
CN113791984B (en) * 2021-10-28 2023-06-09 建信金融科技有限责任公司 Automatic interface testing method and device
CN115629990B (en) * 2022-11-15 2023-04-07 四川无限智达科技有限公司 Service testing method and device, electronic equipment and storage medium
CN117421253B (en) * 2023-12-19 2024-04-02 深圳市智慧城市科技发展集团有限公司 Interface security test method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5414836A (en) * 1993-09-29 1995-05-09 International Business Machines Corporation Software testing system that employs a graphical interface to generate test cases configured as hybrid tree structures
CN101471826A (en) * 2007-12-27 2009-07-01 华为技术有限公司 Test method and device for command line interface
US20150286555A1 (en) * 2014-04-08 2015-10-08 M/S. Cigniti Technologies Limited System and method for converting the business processes to test-centric activity diagrams
CN106021111A (en) * 2016-05-30 2016-10-12 上海携程商务有限公司 Interface testing method and system
CN107066382A (en) * 2017-03-09 2017-08-18 北京航空航天大学 A kind of Space Vehicle System automated testing method based on model
CN107741911A (en) * 2017-11-01 2018-02-27 广州爱九游信息技术有限公司 Interface test method, device, client and computer-readable recording medium
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915242B (en) * 2012-09-26 2016-01-13 北京广利核系统工程有限公司 A kind of method utilizing graphical operation code to programme
CN103235759B (en) * 2013-05-15 2018-03-09 百度在线网络技术(北京)有限公司 Method for generating test case and device
CN106528418B (en) * 2016-10-28 2019-01-22 广东浪潮大数据研究有限公司 A kind of test method and device
CN106776349B (en) * 2017-02-07 2020-01-03 武汉斗鱼网络科技有限公司 Method and system for setting interface detection flow
CN107608882A (en) * 2017-09-08 2018-01-19 天津津航计算技术研究所 A kind of software test case automatic generating method
US10162740B1 (en) * 2017-11-07 2018-12-25 Fmr Llc Automated intelligent execution of computer software test cases
CN108549605B (en) * 2018-04-13 2021-06-29 郑州云海信息技术有限公司 Automatic testing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5414836A (en) * 1993-09-29 1995-05-09 International Business Machines Corporation Software testing system that employs a graphical interface to generate test cases configured as hybrid tree structures
CN101471826A (en) * 2007-12-27 2009-07-01 华为技术有限公司 Test method and device for command line interface
US20150286555A1 (en) * 2014-04-08 2015-10-08 M/S. Cigniti Technologies Limited System and method for converting the business processes to test-centric activity diagrams
CN106021111A (en) * 2016-05-30 2016-10-12 上海携程商务有限公司 Interface testing method and system
CN107066382A (en) * 2017-03-09 2017-08-18 北京航空航天大学 A kind of Space Vehicle System automated testing method based on model
CN107741911A (en) * 2017-11-01 2018-02-27 广州爱九游信息技术有限公司 Interface test method, device, client and computer-readable recording medium
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897739A (en) * 2020-08-21 2020-11-06 四川长虹电器股份有限公司 Test case generation method based on optimized depth-first algorithm
CN111897739B (en) * 2020-08-21 2022-04-05 四川长虹电器股份有限公司 Test case generation method based on optimized depth-first algorithm
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium
CN112148601A (en) * 2020-09-16 2020-12-29 京东数字科技控股股份有限公司 Interface testing method and device, electronic equipment and storage medium
CN112052182A (en) * 2020-09-27 2020-12-08 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112131127A (en) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 Interface testing method, device and system and electronic equipment
CN112131127B (en) * 2020-09-28 2024-04-16 北京同邦卓益科技有限公司 Interface testing method, device and system and electronic equipment
CN113760716A (en) * 2020-11-23 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method and tool, service arrangement flow engine and storage medium
CN112561245A (en) * 2020-11-27 2021-03-26 中广核工程有限公司 Collaborative management method and device, computer equipment and storage medium
CN112559356A (en) * 2020-12-18 2021-03-26 杭州兑吧网络科技有限公司 Automatic software testing method and system
CN112650683A (en) * 2020-12-28 2021-04-13 京东数字科技控股股份有限公司 Program test method, program test apparatus, and storage medium
CN112882930A (en) * 2021-02-04 2021-06-01 网易(杭州)网络有限公司 Automatic testing method and device, storage medium and electronic equipment
CN112882930B (en) * 2021-02-04 2023-09-26 网易(杭州)网络有限公司 Automatic test method and device, storage medium and electronic equipment
CN112948271A (en) * 2021-04-09 2021-06-11 腾讯科技(深圳)有限公司 Code testing method, device, equipment and storage medium
CN113392026B (en) * 2021-07-07 2023-12-19 北京智慧星光信息技术有限公司 Interface automatic test method, system, electronic equipment and storage medium
CN113392026A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Interface automation test method, system, electronic equipment and storage medium
CN113641747A (en) * 2021-10-15 2021-11-12 北京新氧科技有限公司 Method, device and system for accessing postman tool to database
CN113641747B (en) * 2021-10-15 2022-03-18 北京新氧科技有限公司 Method, device and system for accessing postman tool to database
CN114253833A (en) * 2021-11-03 2022-03-29 北京思特奇信息技术股份有限公司 Method and system for verifying consistency of program design based on dynamic data
CN113836045A (en) * 2021-11-29 2021-12-24 深圳市明源云链互联网科技有限公司 Logic generation method and device for interface automation assertion and storage medium
WO2023123943A1 (en) * 2021-12-27 2023-07-06 深圳前海微众银行股份有限公司 Interface automation testing method and apparatus, and medium, device and program
CN114817071A (en) * 2022-05-31 2022-07-29 苏州浪潮智能科技有限公司 Online automatic test system, method and device and readable storage medium
CN115391231A (en) * 2022-10-26 2022-11-25 江苏北弓智能科技有限公司 Automatic interface testing method
CN115391231B (en) * 2022-10-26 2023-02-07 江苏北弓智能科技有限公司 Automatic interface testing method
CN117130946A (en) * 2023-10-27 2023-11-28 北京世冠金洋科技发展有限公司 Test scene generation method and device, electronic equipment and readable storage medium
CN117130946B (en) * 2023-10-27 2024-01-26 北京世冠金洋科技发展有限公司 Test scene generation method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN109857667B (en) 2021-10-08
CN109857667A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2020155778A1 (en) Interface automation test method, test apparatus, test device and storage medium
WO2020155777A1 (en) Ui automated function testing method, testing device, testing apparatus, and storage medium
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
US8141043B2 (en) Automated business process testing that spans multiple platforms or applications
CN107015804B (en) Method and system for rapidly developing project by configuring API
US8839107B2 (en) Context based script generation
CN107102947B (en) ATM transaction flow testing device and method
US10275266B1 (en) Language acceptance testing
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN111881042B (en) Automatic test script generation method and device and electronic equipment
CN107301130A (en) A kind of VR all-in-ones testing tool and its method
US10713070B2 (en) Systems and methods for capturing and visualizing user interactions across devices
CN109634607A (en) A kind of method and device of Code automatic build
CN107368420A (en) API method of testings, device and electronic equipment
CN112581018A (en) Process task management method, system, device and storage medium
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
CN115291856B (en) Flow establishing method and device and electronic equipment
US8185455B2 (en) Auditing system with interactive rule construction user interface
CN112905441A (en) Test case generation method, test method, device and equipment
CN109753437B (en) Test program generation method and device, storage medium and electronic equipment
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN113672222A (en) Application program interface management device and construction method thereof
CN111724143A (en) RPA-based flow element positioning method and device, computing equipment and storage medium
CN111124936B (en) Building block type software testing method, testing device, testing equipment and storage medium
CN109522217A (en) The internal storage testing method and terminal device of application program

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19912426

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19912426

Country of ref document: EP

Kind code of ref document: A1

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 280222)

122 Ep: pct application non-entry in european phase

Ref document number: 19912426

Country of ref document: EP

Kind code of ref document: A1