WO2022134915A1 - 一种接口测试方法、计算机设备及计算机可读存储介质 - Google Patents

一种接口测试方法、计算机设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2022134915A1
WO2022134915A1 PCT/CN2021/130150 CN2021130150W WO2022134915A1 WO 2022134915 A1 WO2022134915 A1 WO 2022134915A1 CN 2021130150 W CN2021130150 W CN 2021130150W WO 2022134915 A1 WO2022134915 A1 WO 2022134915A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
function
test case
testing method
test
Prior art date
Application number
PCT/CN2021/130150
Other languages
English (en)
French (fr)
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 WO2022134915A1 publication Critical patent/WO2022134915A1/zh

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

Definitions

  • the present disclosure relates to, but is not limited to, the field of computers, in particular, but not limited to, an interface testing method, a computer device, and a computer-readable storage medium.
  • the present disclosure provides an interface testing method, a computer device and a computer-readable storage medium, which solve the technical problem of low interface testing efficiency in the related art.
  • An embodiment of the present disclosure provides an interface testing method, including: acquiring an intermediate interface function of an interface to be tested, where the intermediate interface function is automatically generated according to a predetermined template; acquiring a function function, which is formed according to the intermediate interface function, and the function function calls at least An intermediate interface function implements at least one step of a business function; generates a test case, the test case calls at least one function function according to the required business function, and is formed according to the function function; executes the test case for testing.
  • Embodiments of the present disclosure also provide a computer device, including a processor, a memory, and a communication bus.
  • the communication bus is configured to implement connection communication between the processor and the memory; the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the above interface testing method.
  • Embodiments of the present disclosure further provide a computer storage medium, where one or more programs are stored in the computer-readable storage medium, and the one or more programs can be executed by one or more processors to implement the above-mentioned interface testing method A step of.
  • FIG. 1 is a schematic flowchart of an interface testing method according to Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic structural diagram of an interface testing system according to Embodiment 2 of the present disclosure.
  • FIG. 3 is a schematic flowchart of the refinement of the interface testing method according to the second embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a further refinement of the interface testing method according to the second embodiment of the present disclosure
  • FIG. 5 is a schematic flow chart of another further refinement of the interface testing method according to the second embodiment of the disclosure.
  • FIG. 6 is a schematic flowchart of an automated testing process of the interface testing method according to Embodiment 2 of the present disclosure
  • FIG. 7 is a schematic structural diagram of a computer device according to Embodiment 3 of the present disclosure.
  • the interface testing method includes the following steps S101-S104.
  • the intermediate interface function is not a function that can be directly called for testing.
  • the intermediate interface function is automatically generated according to a predetermined template. In the case of setting transmission parameters, the intermediate interface function can realize the most basic information exchange of the interface.
  • by automatically generating the intermediate interface functions it can be ensured that all the intermediate interface functions have a uniform style and are easy to read and maintain.
  • Automated intermediate interface function generation facilitates timely updates, always consistent with the actual interface configuration.
  • these automatically generated intermediate interface functions may also include relevant descriptions, such as but not limited to the types of parameters passed into the interface, descriptions of parameters, data formats of parameters, and descriptions of parameters returned by the interface, and more Easy for testers to understand.
  • the automatic generation of the intermediate interface function according to the interface to be tested according to a predetermined template includes: acquiring an interface description file, in which the interface is described in a predetermined format; and generating the intermediate interface function according to the interface description file.
  • the interface description file may be in any form, but it should be noted that the format of the interface description file should be consistent, and the structure consistency referred to here may also include style and level consistency. That is to say, the interface description file is structured to ensure that the computer program can obtain the description of the interface in the interface description file according to the set method.
  • the interface description file can be an online file or a local file.
  • online files can include but are not limited to web pages, etc.
  • local files can include but are not limited to excel (Microsoft Office Excel, the file format of spreadsheet software), word (Microsoft Office Word, the file format for word processor applications), txt (a text format that comes with the operating system) and other file formats documents.
  • excel Microsoft Office Excel, the file format of spreadsheet software
  • word Microsoft Office Word, the file format for word processor applications
  • txt a text format that comes with the operating system
  • documents in these file formats can also be stored in the cloud as online files.
  • generating the intermediate interface function according to the interface description file may specifically include: acquiring parameter information of the interface from the interface description file; and generating the intermediate interface function in the form of the target language according to the parameter information.
  • the parameter information referred to here includes, but is not limited to, the type of parameters passed in by the interface, the description of the parameters, the data format of the parameters, and the description of the parameters returned by the interface.
  • the intermediate interface function is generated according to the required parameter information, and the tester can select it according to the actual situation, that is, this embodiment does not limit whether the intermediate interface function needs to utilize all the parameter information in the interface description file.
  • descriptive parameter information such as the description of the above parameters can be added to the intermediate interface function in the form of, but not limited to, comments, annotations, etc., so as to facilitate the understanding and maintenance of testers.
  • the interface description file includes a web page recording parameter information of the interface.
  • obtaining parameter information from the interface description file includes: parsing the web page through a web page parsing tool, so as to obtain the parameter information in the web page.
  • web pages may include, but are not limited to, swagger web pages, which is a canonical and complete framework for generating, describing, invoking, and visualizing RESTful (REST: Representational State Transfer) style Web (network) )Serve.
  • RESTful Representational State Transfer
  • the description of the interface is recorded in the swagger webpage. It is understandable that swagger web pages cannot be called directly by test cases.
  • the web pages are usually written in Hyper Text Markup Language (HTML, Hyper Text Markup Language) and parsed by Hyper Text Markup Language.
  • HTML Hyper Text Markup Language
  • the tool parses the swagger webpage and obtains the parameter information recorded in it. It can be understood that the interface description file in this embodiment is structured, and even if the swagger web page is replaced by other open source or custom interface description web pages, the parameter information therein can be obtained through a corresponding parsing tool according to corresponding rules.
  • generating the intermediate interface function in the target language according to the parameter information includes: mapping the acquired parameter information to a function template corresponding to the target language, and generating an intermediate interface function callable in the target language according to the function template.
  • the target language referred to here can be any desired programming language, for example, including but not limited to java, C, python, C#, php, etc., which is selected according to the needs of the tester.
  • S102 Acquire a function function that invokes at least one intermediate interface function to implement at least one step of the business function.
  • the functional function of this embodiment is formed according to an intermediate interface function, which invokes at least one intermediate interface function to implement at least one step of one or more business functions.
  • the function function in this embodiment is equivalent to a function obtained by encapsulating the intermediate interface function again based on the service function.
  • the function function can be written by the tester. Since the intermediate interface function has been automatically generated, the tester does not need to focus on the underlying operation implementation when writing the function function, but focuses on the assembly of the business function. Therefore, in some implementations It is easier for testers to develop and debug in the process, which is conducive to improving efficiency.
  • test case in the embodiments of the present disclosure refers to the test case in the form of runnable code, which, after being executed by the processor, realizes the completion of a single or a series of test operations according to the set test function and scenario for testing. A step of.
  • the test case in this embodiment is generated according to the function function according to the required business function, and the test case calls the function function for testing.
  • the test case corresponds to the complete process of registering and logging in to the registered account.
  • the test case calls the function functions that implement these business functions to Simulate the implementation of the complete flow described above.
  • the test case may be written by the tester. Since the functional function capable of realizing the business function has been obtained in step S102, the tester only needs to consider the actual business function of the test case when writing the test case, and does not need to consider the actual business function of the test case.
  • the internal specific implementation is easy for testers to develop and debug, which is conducive to improving efficiency. It can be understood that, the above-mentioned functional functions and test cases can be written by testers, and can also be generated by a computer through methods such as artificial intelligence.
  • test case fails during the testing process, it indicates that there may be a problem in the writing of the test case, or that there is a problem with the tested interface. Record the test results, and then fix the corresponding problems according to the test results.
  • the interface testing method further includes the following steps S105-S106.
  • the failure to pass the test means that the correct result is not obtained, which includes but is not limited to not obtaining the result and obtaining the wrong result.
  • the test case fails it may be that the tester made an error in the writing process, and the updated test case can be obtained and tested again.
  • the test case may fail to pass the test due to the error of the interface. Before or after the updated test case is generated, it can also be judged whether it is an error of the interface. If it is caused by the error of the interface, after the interface is adjusted and updated, the corresponding interface is tested again.
  • the interface testing method further includes the following steps S107-S108.
  • the parameters of the interface may change. Since the intermediate interface function in this embodiment can be automatically generated according to a predetermined template, it can be updated quickly and be consistent with the actual interface configuration. After obtaining the updated intermediate interface function, execute the test case for testing, which can detect whether there is an error in the updated interface, or whether the test case can still be applied to test the current interface.
  • the interface testing method by obtaining the intermediate interface function automatically generated according to the predetermined template, obtaining the function function that can realize at least one step of the business function generated according to the intermediate interface function, and obtaining the function function according to the required business function
  • the test case formed by the function execute the test case for testing. Due to the automatic generation of intermediate interface functions, each interface function in the test process has a unified style, which is convenient for maintenance and can be updated quickly following the actual interface configuration.
  • the function function formed according to the intermediate interface function does not need to be considered in the writing process.
  • the specific implementation of the interface function, and the test case formed according to the function function does not need to consider the specific implementation process of the function during the writing process.
  • the development level in the test process is simple and clear, which is conducive to maintenance, distributed development, and improved interface testing. Overall test efficiency and quality.
  • the interface testing method is further described in this embodiment with reference to an example.
  • FIG. 2 a schematic diagram of the architecture of an interface testing system is shown, and the interface testing method of the embodiment of the present disclosure may be implemented in combination with the architecture of the interface testing system.
  • this architecture includes the interface layer to be tested, the intermediate interface function layer, the component layer, and the business layer.
  • the interface layer to be tested provides an interface description file to the intermediate interface function layer
  • the intermediate interface function layer generates an intermediate interface function according to the interface description file
  • the component layer encapsulates the intermediate interface function as a function function capable of realizing at least one step of the business function
  • the business layer constructs test cases according to the actual business.
  • the implementation of the interface test method in combination with the architecture of the above interface test system is only an optional implementation manner, and the interface test method can also be implemented in any form in practical applications.
  • the description is continued by taking the interface of the web site as an example, but it can be understood that the interface testing method of the embodiment of the present disclosure is also applicable to the testing of interfaces in other scenarios.
  • the intermediate interface function layer After obtaining the interface description file, the intermediate interface function layer builds a unified intermediate interface function for the test case for the function function of the component layer to call.
  • the intermediate interface function layer also provides an interface conversion function suite, and the interface conversion function module includes a language template component, a back-end document parsing component, and an interface function generation component.
  • the language template component is the programming language used to develop automated test cases, including but not limited to java, C, python, C#, php, etc. This component provides necessary function templates for generating interface functions that can be called.
  • the back-end document parsing component can parse the interface description files, including but not limited to web pages, excel, word, txt and other types of documents, and can parse the interface description files including But not limited to interface methods such as post, get, put, delete, and option.
  • the interface function generation component can use the interface parameters parsed by the above-mentioned back-end document parsing component to map the interface parameters to the function template of the language template component, thereby constructing the required intermediate interface function.
  • each component of the above interface conversion function suite may be in the same programming language, or may be in different programming languages.
  • the intermediate interface function layer is only oriented to the interface with the web site, such as the HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol) interface, and does not consider the web site's implementation. specific function.
  • the intermediate interface function layer does not judge the returned results, and is not subject to manual changes in the normal testing process.
  • the interface testing method specifically includes the following steps S301-S305.
  • the swagger page may be obtained from the interface layer to be tested, for example, obtained from a web site, and of course, it may be obtained in any manner in other implementation manners.
  • the web site to be tested uses the swagger page to describe the interface, that is to say, the swagger page is the interface description file in this example.
  • the swagger page cannot be called directly by the test case.
  • the page is directly saved to the local way to obtain the swagger page.
  • this process can be implemented by the above-mentioned interface function generation component, and a function template component that is ready to generate the python language is constructed, and the function template component is used to generate an intermediate interface function that the python language can directly call.
  • the swagger web page is an HTML file
  • the back-end document parsing component can be a hypertext markup language parsing tool, such as the lxml tool in python (lxml is a parsing library of python that supports HTML parsing); use the lxml tool to parse the swagger web page, Use the lxml tool to decompose, extract and classify the parameter information of the HTML root node, and obtain the interface information including but not limited to body, form, parameter name and other information.
  • the interface function generation component uses the parameter information obtained by the back-end document parsing component to map to the function template component one by one, thereby generating an intermediate interface function that the python language can call.
  • step S302 may be triggered by the user, or may be automatically triggered by the machine when a predetermined condition is met.
  • Testers can write functional functions according to the intermediate interface functions.
  • testers who write functional functions are equivalent to the component layer.
  • the function function is encapsulated for a single step of a specific business. Since the intermediate interface function has been automatically generated, the HTTP operation is isolated in the process of writing the function function, and the tester can focus more on the assembly of the business function. Of course, according to actual test requirements, reasonable exception assertions can be made in this function for specific businesses.
  • a functional function can implement at least one step of a business function.
  • each function function encapsulates the steps of a simple single function, so that the function function can be reused.
  • Testers can write test cases based on functional functions.
  • testers who write test cases are equivalent to the business layer.
  • the test case is constructed for the specific business of each function in the web site under test. Since the function function has been obtained for the test case to call, the tester does not need to consider the specific implementation of the interface.
  • the writing focuses on the business logic flow, and the writing of the test case can be completed directly by using the function function obtained in the above step S303.
  • the test case may include multiple test cases, which may be a collection of test cases, or may be a test case framework.
  • This embodiment also shows other implementation examples of the interface testing method in combination with other scenarios.
  • the following examples further describe the interface testing method based on the completion of the above steps.
  • the website is updated.
  • the interface testing method further includes the following steps S401-S404.
  • the update of the web site may cause the test case to be abnormal, so the intermediate interface function to be used in the test needs to be updated.
  • the HTTP interface of the web site is adjusted. After the HTTP interface is adjusted, the developer can notify the tester.
  • Testers use the interface function generation component to generate new intermediate interface functions. It can be understood that, in this process, the above operations may be performed only for the HTTP interfaces that are adjusted and other HTTP interfaces that may be affected by these HTTP interfaces.
  • test case fails, it indicates that the specific implementation of a certain step or the specific process for implementing the corresponding business function may have changed, and the tester writes new functional functions and/or test cases according to the actual situation. Since the intermediate interface function is automatically generated, if the specific process for realizing the business function does not change, there is no need to modify the test case, and only need to consider whether the function function needs to be adjusted.
  • test case After the test case is updated, execute the test case to test whether there are errors in the HTTP interface.
  • test case fails the test, it can also be judged whether it is caused by an HTTP interface error. If it can be determined that the error is caused by the HTTP interface, the developer can be notified to fix the error, and the test can be performed after the error is fixed.
  • the process of testing the interface includes the following steps S501-S506.
  • the intermediate interface function is automatically generated according to the new interface description file.
  • the tester can issue relevant instructions to trigger execution after the interface description file is updated.
  • step S505. When an error occurs in the interface and the test case fails to pass the test, go back to step S501.
  • the tester checks the functional function and the writing of the test case itself for any problems, and modifies the functional function and/or the test case for the failed test case.
  • the tester does not need to consider the specific implementation of the intermediate interface function during the testing process, and can focus on testing the business function, and only needs to adjust the function function and/or the test case, It is easy to maintain and debug, which is conducive to improving the efficiency of interface testing and ensuring the quality of testing.
  • this embodiment also exemplifies an automated testing process in combination with a test scenario, and the process exemplifies how to call a function function to generate a test case.
  • the process includes the following steps S601-S605.
  • a tester writes a test case, and the test case needs to use a function function that obtains a user authority according to a user name.
  • test case can be written by the tester, and the tester writes the test case according to the required test scenario, for example, when testing whether the function of judging whether the user has permission to perform certain operations is normal or not. , you may need to use the function of obtaining user permissions based on the user name.
  • the obtained function functions are stored in the function function library.
  • step S603 is performed; if there is, step S604 is performed.
  • the query process may be that the tester manually flips through the function library, or the tester may input corresponding keywords.
  • the computer inquires from the functional function library whether the relevant description of one or some functional functions matches the keywords input by the tester, and feeds back the inquired functional functions to the tester for the tester to choose.
  • S603 Obtain an HTTP interface function that returns user information from the user name, and encapsulate the required function according to the HTTP interface function.
  • the object tested in this example may be an interface of a web site.
  • the HTTP interface function in this embodiment is automatically generated according to a predetermined template, and the format is uniform, and the tester does not need to consider the get request information of the HTTP request, or in other words, reduce or Eliminates the tester's consideration of the underlying implementation of HTTP interface functions. Based on the automatically generated HTTP interface function that returns user information from the user name, the tester can efficiently complete the re-encapsulation of business steps to form the required functional functions.
  • step S604 can be continued to perform test.
  • the function function can be called directly. Since various functional functions of the site under test have been obtained in the functional function library, when writing a test case, the tester calls at least one functional function according to the requirements of the business function of the test case to realize one or more functions. Personnel can efficiently complete the writing of test cases.
  • the corresponding test can be performed by executing the test case, and the execution of the test case includes, but is not limited to, compiling and running the corresponding code.
  • the test case includes, but is not limited to, compiling and running the corresponding code.
  • the function function is called to simulate the action of obtaining user rights according to the user name, so as to check whether the function meets the design requirements.
  • the test case can also implement a series of pre- or subsequent steps based on this to test a series of business processes.
  • the interface testing method of the embodiment of the present disclosure is beneficial to the maintenance and update of test cases, the efficiency of writing function functions and test cases by testers is high, and the development level in the test process is simple and clear, which is conducive to maintenance and distributed testing. Developed to improve the overall test efficiency and quality of interface testing.
  • This embodiment also provides a computer device, as shown in FIG. 7 , which includes a processor 701 , a memory 702 and a communication bus 703 .
  • the communication bus 703 is configured to implement connection communication between the processor 701 and the memory 702 .
  • the processor 701 is configured to execute one or more computer programs stored in the memory 702 to implement at least one step in the interface testing methods in the first and second embodiments above.
  • the present embodiments also provide a computer-readable storage medium embodied in any method or technology for storing information, such as computer-readable instructions, data structures, computer program modules, or other data volatile or nonvolatile, removable or non-removable media.
  • Computer-readable storage media include but are not limited to RAM (Random Access Memory, random access memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable Read Only Memory, electrically erasable programmable read-only memory) ), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital versatile disc) or other optical disk storage, magnetic cartridge, tape, disk storage or other Magnetic storage or any other medium that can be used to store the desired information and that can be accessed by a computer.
  • the computer-readable storage medium in this embodiment may be used to store one or more computer programs, and the one or more computer programs stored therein may be executed by a processor to implement the interface testing methods in the first and second embodiments above at least one step.
  • the functional modules/units in the system, and the device can be implemented as software (which can be implemented by computer program codes executable by a computing device). ), firmware, hardware, and their appropriate combination.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components Components execute cooperatively.
  • Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
  • communication media typically embodies computer readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery, as is well known to those of ordinary skill in the art medium. Therefore, the present disclosure is not limited to any particular combination of hardware and software.

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

本公开提供一种接口测试方法、计算机设备及计算机可读存储介质,该方法通过获取根据预定模板自动生成的待测试的接口的中间接口函数,获取调用至少一个中间接口函数以实现业务功能的至少一个步骤的功能函数,生成按照所需的业务功能调用至少一个功能函数的测试用例,执行该测试用例以进行测试。

Description

一种接口测试方法、计算机设备及计算机可读存储介质
相关申请的交叉引用
本申请要求享有2020年12月25日提交的名称为“一种接口测试方法、计算机设备及计算机可读存储介质”的中国专利申请CN202011561105.6的优先权,其全部内容通过引用并入本申请中。
技术领域
本公开涉及但不限于计算机领域,具体而言,涉及但不限于一种接口测试方法、计算机设备及计算机可读存储介质。
背景技术
随着互联网的高速发展,软件开发工具和技术的日渐完善导致各种各样的软件产品开始涌现,越来越多的国内外IT企业对软件的质量提出更高的要求。近年来,IT行业对于软件测试的自动化日益重视,特别在敏捷开发流程中,更是不可或缺。然而在相关技术中,针对接口的测试仍在存在效率低下、难以调试和冗余代码多等问题,容易影响测试的质量。
发明内容
本公开提供的一种接口测试方法、计算机设备及计算机可读存储介质,解决了相关技术中对于接口的测试效率低下的技术问题。
本公开实施例提供一种接口测试方法,包括:获取待测试的接口的中间接口函数,该中间接口函数根据预定模板自动生成;获取功能函数,该功能函数根据中间接口函数形成,功能函数调用至少一个中间接口函数实现业务功能的至少一个步骤;生成测试用例,该测试用例按照所需的业务功能调用至少一个功能函数,根据功能函数形成;执行测试用例进行测试。
本公开实施例还提供一种计算机设备,包括处理器、存储器及通信总线。该通信总线配置为实现处理器和存储器之间的连接通信;该处理器配置为执行存储器中存储的一个或者多个计算机程序,以实现如上的接口测试方法的步骤。
本公开实施例还提供一种计算机存储介质,该计算机可读存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行时实现如上所述的接口测试方 法的步骤。
本公开其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本公开说明书中的记载变得显而易见。
附图说明
图1为本公开实施例一的接口测试方法的流程示意图;
图2为本公开实施例二的接口测试系统的架构示意图;
图3为本公开实施例二的接口测试方法的细化流程示意图;
图4为本公开实施例二的接口测试方法的进一步细化流程示意图;
图5为本公开实施例二的接口测试方法另一进一步细化流程示意图;
图6为本公开实施例二的接口测试方法的自动化测试过程的流程示意图;
图7为本公开实施例三的计算机设备的结构示意图。
具体实施方式
为了使本公开的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本公开实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。
实施例一
为了解决相关技术中针对接口的测试效率低下、难以调试和冗余代码的问题。本公开实施例提供一种接口测试方法,请参见图1,接口测试方法包括如下步骤S101~S104。
S101、获取根据预定模板自动生成的待测试的接口的中间接口函数。
应当说明的是,在本公开实施例中,中间接口函数并非是可以直接被调用以进行测试的函数。中间接口函数是根据预定模板自动生成的,在设置传输参数的情况下,该中间接口函数可以实现接口的最基本的信息交互。本实施例中,通过自动化的生成中间接口函数,能够保证所有中间接口函数的风格统一,易于阅读和维护。同时,相较于相关技术中使用人工进行编写的方式,避免了函数调用不一致或者对于相同的接口编写有冗余函数,使得自动化测试的代码臃肿的问题。自动化的中间接口函数生成有利于及时的更新,始终与实际的接口配置保持一致。
在一些具体实施过程中,这些自动生成的中间接口函数还可以包括相关的说明,例如 包括但不限于接口传入参数的类型、参数的说明、参数的数据格式以及接口返回的参数的说明,更加易于测试人员的理解。
在一些实施方式中,中间接口函数根据待测试的接口按预定模板自动生成包括:获取接口描述文件,接口描述文件中以预定格式对接口进行描述;根据接口描述文件,生成中间接口函数。
该接口描述文件可以是任何形式的文件,但应当说明的是,接口描述文件的格式应当保持一致,这里所指的结构一致还可以包括样式、层次的一致。也就是说接口描述文件是结构化的,保证计算机程序按照设定的方式就能够对接口描述文件中对接口的描述进行获取。
接口描述文件可以是在线文件,也可以是本地文件,例如在线文件可以包括但不限于网页等,本地文件可以包括但不限于excel(Microsoft Office Excel,电子表格软件的文件格式)、word(Microsoft Office Word,文字处理器应用程序的文件格式)、txt(操作系统上附带的一种文本格式)等文件格式文档。当然,这些文件格式的文档也可以存储在云端作为在线文件的形式存在。
在一些实施方式中,上述根据接口描述文件,生成中间接口函数具体可以包括:从接口描述文件中获取接口的参数信息;根据参数信息生成目标语言形式的中间接口函数。
这里所指的参数信息包括但不限于接口传入参数的类型、参数的说明、参数的数据格式以及接口返回的参数的说明。但应当理解的是,实际应用中在实现一个接口的接口函数时,并非需要用到所有的参数信息。例如,对于代码而言,在一些情况下即使没有参数的说明、接口返回的参数的说明等参数信息也并不影响其可运行性。具体根据哪些所需的参数信息生成中间接口函数,测试人员可根据实际的情况进行选择,也即本实施例并不限定中间接口函数是否需要将接口描述文件中的所有参数信息都利用到。当然,实际应用中可以将上述参数的说明等说明性的参数信息以包括但不限于注释、注解等形式添加到中间接口函数中,以便于测试人员理解和维护。
在一些实施方式中,接口描述文件包括记载有接口的参数信息的网页。当接口描述文件是网页时,从接口描述文件中获取参数信息包括:通过网页解析工具解析网页,从而获取到网页中的参数信息。作为一种示例,网页可以包括但不限于swagger网页,swagger是一个规范和完整的框架,用于生成、描述、调用和可视化RESTful(REST:Representational State Transfer,表述性状态转换)风格的Web(网络)服务。本示例中,swagger网页中记载了对于接口的描述。可以理解的是,swagger网页无法被测试用例直接调用,可以通过爬虫工具或者将网页文件下载保存到本地,网页通常为超级文本标记语言(HTML,Hyper Text  Markup Language)编写,通过超级文本标记语言解析工具对swagger网页进行解析,获取其中记载的参数信息。可以理解的是,本实施例的接口描述文件是结构化的,即使将swagger网页替换为其他开源或自定义的接口描述网页,也能够按照相应的规则通过相应的解析工具获取其中的参数信息。
在一些实施方式中,根据参数信息生成目标语言形式的中间接口函数包括:将获取的参数信息映射到对应于目标语言的函数模板中,根据函数模板生成目标语言可调用的中间接口函数。这里所指的目标语言可以是任何需要的编程语言,例如包括但不限于java、C、python、C#、php等,具体根据测试人员的需要选择。
S102、获取调用至少一个中间接口函数实现业务功能的至少一个步骤的功能函数。
本实施例的功能函数是根据中间接口函数形成的,其调用至少一个中间接口函数实现一个或多个业务功能的至少一个步骤。应当说明的是,本实施例的功能函数相当于基于业务功能对中间接口函数再次进行封装后得到的函数。该功能函数可以是由测试人员进行编写的,由于已经自动生成了中间接口函数,测试人员在编写功能函数时不需要重点考虑底层的操作实现,而侧重于对于业务功能的组装,因此在一些实施过程中更易于测试人员的开发、调试,利于提升效率。
在获取到功能函数后,可以将这些功能函数保存,以供所需要的时候进行调用。
S103、生成按照所需的业务功能调用至少一个根据功能函数的测试用例。
应当说明的是,本公开实施例中的测试用例是指可运行代码形式的测试用例,其被处理器执行后,实现根据设定的测试功能和场景完成单个或一系列的测试操作以进行测试的步骤。
本实施例的测试用例是按照所需的业务功能根据功能函数生成的,测试用例调用功能函数以进行测试。作为一个示例,例如测试用例对应于注册以及对注册后的账号进行登录的完整流程进行测试,按照该完整流程中所涉及的一个或多个业务功能,测试用例调用实现这些业务功能的功能函数以模拟实施上述完整流程。测试用例可以是由测试人员进行编写的,由于步骤S102中已经获取到能够实现业务功能的功能函数,测试人员在编写测试用例时,只需要考虑测试用例的实际业务功能进行编写,不需要考虑其内部的具体实现,易于测试人员的开发、调试,利于提升效率。可以理解的是,上述功能函数以及测试用例都可以由测试人员进行编写,也可以是计算机通过例如人工智能等方式生成的。
S104、执行测试用例进行测试。
若测试用例在测试过程中没有通过,则表明测试用例的编写可能存在问题,或者表明 是被测试的接口存在问题。对于测试的结果进行记录,后续可针对测试的结果进行相应的问题修复。
在一些实施方式中,接口测试方法还包括如下步骤S105~S106。
S105、当测试用例没有通过测试时,生成进行了更新的测试用例。
S106、执行进行了更新的测试用例进行测试。
这里所指的没有通过测试即指没有获得正确的结果,其包括但不限于没有获取到结果以及获取到错误的结果。当测试用例没有通过,有可能是测试人员在编写过程中出现了错误,可获取更新后的测试用例再次进行测试。
当然,在实际应用中,也可能是由于接口的错误导致测试用例无法通过测试,在生成更新的测试用例之前或之后,还可以判断是否是接口的错误。若是接口的错误造成的,则在接口进行调整更新后对应于该接口再次进行测试。
在一些实施方式中,接口测试方法还包括如下步骤S107~S108。
S107、当待检测的接口更新后,获取更新的接口对应的中间接口函数。
S108、再次执行测试用例进行测试。
可以理解的是,当接口更新后,接口的参数可能发生变化,由于本实施例中的中间接口函数可以根据预定的模板自动生成,因此可以实现快速的更新并与实际的接口配置保持一致。获取到更新的中间接口函数后,执行测试用例进行测试,可检测出更新后的接口是否存在错误,或检测出测试用例是否还能够适用于对当前的接口进行测试。
在一些实施方式中,上述步骤S108中再次执行测试用例进行测试之后,还包括如下步骤S109~S110。
S109、当测试用例没有通过测试,获取更新后的功能函数和/或更新后的测试用例。
S110、执行最新获取到的测试用例进行测试。
可以理解的是,接口更新后,实现某个功能所需的逻辑可能发生改变,实现某个测试用例所需的业务逻辑也可能发生改变,测试人员根据实际的情况对功能函数和/或测试用例进行修改,在获取到更新后的功能函数和/或更新后的测试用例之后再次进行测试。
利用本公开实施例提供的接口测试方法,通过获取根据预定模板自动生成的中间接口函数,获取根据中间接口函数生成的能够实现业务功能的至少一个步骤的功能函数,获取按照所需业务功能根据功能函数形成的测试用例,执行该测试用例进行测试。由于中间接口函数的自动生成,使得测试过程中的各个接口函数具有统一的风格,利于维护并且能够 跟随实际的接口配置快速完成更新,根据中间接口函数形成的功能函数在编写过程中,不需要考虑接口函数的具体实现,而根据功能函数形成的测试用例在编写过程中不需要考虑功能的具体实现过程,测试过程中的开发层次简单明确,利于维护,有利于分布式的开发,提高接口测试的整体测试效率和质量。
实施例二
为了更好的对本公开实施例的接口测试方法进行说明,本实施例结合示例对接口测试方法做进一步的说明。
请参见图2,示意出一种接口测试系统的架构示意图,本公开实施例的接口测试方法可以结合该接口测试系统的架构进行实施。在该架构中,包括待测接口层、中间接口函数层、组件层、业务层。其中,待测接口层向中间接口函数层提供接口描述文件,中间接口函数层根据该接口描述文件生成中间接口函数,组件层将中间接口函数封装为能够实现业务功能的至少一个步骤的功能函数,业务层根据实际的业务进行测试用例的构建。但应当说明的是,结合上述接口测试系统的架构进行接口测试方法的实施仅仅是一种可选的实施方式,实际应用中接口测试方法还可以以任何形式进行实施。
本实施例中以对web站点的接口为例继续进行说明,但可以理解的是,本公开实施例的接口测试方法对于其他场景中的接口的测试也是适用的。
中间接口函数层获取到接口描述文件后,为测试用例构建统一的中间接口函数,供组件层的功能函数进行调用。中间接口函数层还提供接口转换功能套件,接口转换功能模块包括语言模板组件、后端文档解析组件以及接口函数生成组件。语言模板组件开发自动化测试用例使用的编程语言,包含但不限于java、C、python、C#、php等,该组件为生成能够调用的接口函数提供必要的函数模板。后端文档解析组件,即自动化生成测试接口的解析工具,可以针对接口描述文件进行解析,这些接口描述文件包括但不限于网页、excel、word、txt等类型的文档,可以解析接口描述文件中包括但不限于post、get、put、delete、option等接口方法。接口函数生成组件可以使用上述后端文档解析组件解析出来的接口参数,将接口参数映射到语言模板组件的函数模板中,从而构建出所需的中间接口函数。实际应用中,上述接口转换功能套件的各个组件可以是同种编程语言,也可以是不同的编程语言。
可见,在本实施例上述的接口测试系统的架构中,中间接口函数层仅仅面向与web站点的接口,例如HTTP(Hyper Text Transfer Protocol,超文本传输协议)接口,并不考虑web站点所实现的具体功能。同时,中间接口函数层不对返回的结果进行评判,并在正常测试过程中不受到人工的改动。
参见图3,在本实施例的示例中,接口测试方法具体包括如下步骤S301~S305。
S301、获取swagger页面。
该swagger页面可以是从待测接口层获取的,例如从web站点获取,当然在其他实施方式中可以通过任意方式获取。待测的web站点使用swagger页面进行接口描述,也就是说该swagger页面即是本示例中的接口描述文件,该swagger页面无法被测试用例直接调用,可通过包括但不限于爬虫工具或将该swagger页面直接保存到本地的方式获取到swagger页面。
S302、生成python语言能够调用的中间接口函数。
本示例中,假设以python语言作为编写测试用例的语言,因此生成的中间接口函数是python语言能够调用的。在实际应用中,还可以使用其他编程语言编写测试用例,只需要生成相应的编程语言能够调用的中间接口函数即可。
本示例中,该过程可通过上述的接口函数生成组件实施,构建准备生成python语言的函数模板组件,函数模板组件用来生成python语言可以直接调用的中间接口函数。swagger网页是HTML文件,后端文档解析组件可以是超文本标记语言解析工具,例如python中的lxml工具(lxml是python的一个解析库,支持HTML的解析);利用lxml工具对swagger网页进行解析,通过lxml工具将HTML根节点进行参数信息分解与提取归类,获取接口的包括但不限于body、form、参数名等信息。接口函数生成组件利用后端文档解析组件获取到的参数信息,逐个映射到函数模板组件中,从而生成python语言可以调用的中间接口函数。
可以理解的是,上述步骤S302可以由用户触发,也可以是机器在达到预定条件时自动触发。
S303、获取功能函数。
测试人员可根据中间接口函数编写功能函数,在上述接口测试系统的架构中,编写功能函数的测试人员相当于组件层。本示例中,该功能函数是针对具体业务的单个步骤进行封装的,由于中间接口函数已经自动生成,编写功能函数的过程中隔离了HTTP操作,测试人员可以更专注于业务功能的组装。当然,根据实际的测试需求,该功能函数中可以针对具体的业务作出合理的异常断言。
实际应用中,一个功能函数可以实现业务功能的至少一个步骤。本示例中,每个功能函数进行简单的单个功能的步骤的封装,以便对功能函数进行复用。
S304、生成测试用例。
测试人员可根据功能函数编写测试用例,在上述接口测试系统的架构中,编写测试用例的测试人员相当于业务层。本示例中,该测试用例是针对于被测的web站点中的各个功能的具体业务进行构建的,由于已经获取了功能函数供测试用例调用,测试人员不需要考虑接口的具体实现,测试用例的编写侧重于业务逻辑流程,可直接利用上述步骤S303获取的功能函数完成测试用例的编写。应当说明的是,测试用例可包括多个,可以是测试用例的集合,也可以是测试用例框架。
S305、执行测试用例。
本实施例还结合其他场景,示出接口测试方法的另一些实施示例。以下的示例均在上述步骤执行完毕的基础上,对接口测试方法进行进一步的说明。
在一种示例中,web站点进行了更新,参见图4,接口测试方法还包括如下步骤S401~S404。
S401、获取更新后的中间接口函数。
web站点的更新可能导致测试用例出现异常,因此需要对测试中所要使用的中间接口函数进行更新。
由于web站点的业务的变更或者性能优化等原因,web站点的HTTP接口进行了调整,在HTTP接口调整之后,开发人员可以通知测试人员。
测试人员使用接口函数生成组件生成新的中间接口函数。可以理解的是,此过程中,可以仅仅针对出现调整的HTTP接口以及这些HTTP接口可能影响到的其他HTTP接口进行上述操作。
S402、执行测试用例。
于HTTP接口调整后再次执行测试用例,以对更新后的HTTP接口进行测试。
S403、当测试用例没有通过测试,获取更新的功能函数和/或测试用例。
可以理解的是,测试用例没有通过,说明某个步骤的具体实现或者实现相应业务功能时的具体流程可能发生了改变,测试人员根据实际的情况编写新的功能函数和/或测试用例。由于中间接口函数是自动生成的,因此若实现业务功能的具体流程没有发生变化,则不需要修改测试用例,仅需要考虑功能函数是否需要进行调整。
S404、执行最新获取的测试用例完成后续测试。
当测试用例更新后,执行测试用例,测试HTTP接口是否存在错误。
可以理解的是,本示例中,也可以在测试用例没有通过测试时,判断是否是由于HTTP 接口错误导致的。若能够判断出是由于HTTP接口错误导致的,则可通知开发人员对错误进行修复,在错误修复后再进行测试。
在另一种示例中,参见图5,对接口进行测试的过程包括如下步骤S501~S506。
S501、当执行测试用例发现测试用例没有通过测试,记录错误原因。
S502、通知web站点的开发人员进行修改。
S503、重新获取中间接口函数。
在开发人员对web站点的接口进行修改之后,根据新的接口描述文件自动生成中间接口函数。该过程可由测试人员在接口描述文件更新之后发出相关的指令以触发执行。
S504、执行测试用例。
根据实际的情况,可以仅执行前次未通过的测试用例,也可以选择将相关的或者是所有的测试用例都再次执行。
S505、当接口出现错误导致测试用例没有通过测试时,回到步骤S501。
S506、当测试用例错误导致测试用例没有通过测试时,获取更新的功能函数和/或测试用例。
测试人员针对没有通过的测试用例,检查功能函数以及测试用例本身的编写是否存在问题,对功能函数和/或测试用例进行修改。
可见,通过本实施例的接口测试方法,测试人员在测试的过程中不需要考虑中间接口函数的具体实现,能够更专注的对业务功能进行测试,并且只需要调整功能函数和/或测试用例,易于维护和调试,有利于提高接口测试的效率,保证测试的质量。
为了更好的理解,本实施例还结合一个测试场景示例出一种自动化测试的过程,该过程示例出如何调用功能函数生成测试用例。请参见图6,该过程包括如下步骤S601~S605。
S601、测试人员编写测试用例,该测试用例需要用到根据用户名获取到用户权限的功能函数。
可以理解的是,该测试用例是可以是由测试人员编写的,测试人员根据所需的测试场景编写测试用例,例如在对判断用户是否具备权限去执行某些操作的功能是否正常而进行测试时,可能需要使用到根据用户名获取到用户权限的功能。
S602、查询功能函数库中是否存在该功能函数。
本示例中,获取到的功能函数均被存储于功能函数库中,当测试用例需要使用某个功 能的步骤时,可查询功能函数库中是否存在相应的功能函数。
若功能函数库中不存在实现相应功能的功能函数,则执行步骤S603;若存在,则执行步骤S604。
该查询的过程可以是测试人员人工进行翻阅功能函数库,也可以是测试人员输入相应的关键词。计算机从功能函数库中查询是否有某个或某些功能函数的相关描述符合测试人员输入的关键词,并将查询到功能函数反馈给测试人员以供测试人员选用。
S603、获取从用户名返回用户信息的HTTP接口函数,并根据该HTTP接口函数封装出所需的功能函数。
本示例所测试的对象可以是web站点的接口,本实施例中的HTTP接口函数是根据预定模板自动生成的,格式统一,且不需要测试人员考虑HTTP请求的get请求信息,或者说,减少或消除了测试人员对于HTTP接口函数的底层实现的考虑。测试人员在自动生成的从用户名返回用户信息的HTTP接口函数的基础上,能够高效的完成对于业务步骤的再次封装,形成所需的功能函数。
本示例中,在获取到的测试人员编写好的根据用户名获取到用户权限的功能函数之后,可将该功能函数添加到功能函数库中以备测试用例调用;并可继续执行步骤S604以进行测试。
S604、从功能函数库中调用该功能函数,生成测试用例。
当功能函数库中存在测试用例所需的功能函数,例如本示例中的根据用户名获取到用户权限的功能函数,则可直接调用该功能函数。由于功能函数库中已经获取了被测站点的各种功能函数,因此,测试人员在编写测试用例时,根据测试用例的业务功能的需求调用至少一个功能函数以实现某个或多个功能,测试人员能够高效的完成测试用例的编写。
S605、执行该测试用例。
生成测试用例之后,执行该测试用例即可进行对应的测试,执行该测试用例包括但不限于对相应的代码进行编译、运行。在本示例中,执行测试用例后,至少调用功能函数模拟出根据用户名获取用户权限的动作,以检验该功能是否满足设计需求。实际应用中,测试用例还可以基于此实现一系列的前置或后续的步骤,以测试一系列的业务流程。
可见,通过本公开实施例的接口测试方法,利于测试用例的维护和更新,测试人员对功能函数和测试用例的编写效率高,测试过程中的开发层次简单明确,利于维护,有利于分布式的开发,提高接口测试的整体测试效率和质量。
实施例三
本实施例还提供了一种计算机设备,参见图7所示,其包括处理器701、存储器702及通信总线703。
通信总线703配置为实现处理器701和存储器702之间的连接通信。
处理器701配置为执行存储器702中存储的一个或者多个计算机程序,以实现上述实施例一和实施例二中的接口测试方法中的至少一个步骤。
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器)、ROM(Read-Only Memory,只读存储器)、EEPROM(Electrically Erasable Programmable Read Only Memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器)、DVD(Digital versatile disc,数字多功能盘)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。
本实施例中的计算机可读存储介质可用于存储一个或者多个计算机程序,其存储的一个或者多个计算机程序可被处理器执行,以实现上述实施例一和实施例二中的接口测试方法的至少一个步骤。
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本公开不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本公开实施例所作的进一步详细说明,不能认定本公开的具体实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保护范围。

Claims (10)

  1. 一种接口测试方法,其中,所述接口测试方法包括:
    获取待测试的接口的中间接口函数,所述中间接口函数根据预定模板自动生成;
    获取功能函数,所述功能函数根据所述中间接口函数形成,所述功能函数调用至少一个所述中间接口函数实现业务功能的至少一个步骤;
    生成测试用例,所述测试用例按照所需的业务功能调用至少一个所述功能函数;
    执行所述测试用例进行测试。
  2. 如权利要求1所述的接口测试方法,其中,所述中间接口函数根据待测试的接口按预定模板自动生成包括:
    获取接口描述文件,所述接口描述文件中以预定格式对所述接口进行描述;
    根据所述接口描述文件,生成中间接口函数。
  3. 如权利要求2所述的接口测试方法,其中,所述根据所述接口描述文件生成中间接口函数包括:
    从所述接口描述文件中获取所述接口的参数信息;
    根据所述参数信息生成目标语言形式的中间接口函数。
  4. 如权利要求3所述的接口测试方法,其中,所述接口描述文件包括记载有所述接口的参数信息的网页,其中,所述从所述接口描述文件中获取参数信息包括:
    通过网页解析工具解析所述网页,获取自所述网页中解析到的参数信息。
  5. 如权利要求3所述的接口测试方法,其中,根据所述参数信息生成目标语言形式的中间接口函数包括:
    将获取的所述参数信息,映射到对应于目标语言的函数模板中,根据所述函数模板生成所述目标语言可调用的所述中间接口函数。
  6. 如权利要求1所述的接口测试方法,其中,所述接口测试方法还包括:
    当所述测试用例没有通过测试时,生成进行了更新的所述测试用例;
    执行所述进行了更新的测试用例进行测试。
  7. 如权利要求1所述的接口测试方法,其中,所述接口测试方法还包括:
    当所述待检测的接口更新后,重新获取更新的接口对应的中间接口函数;
    再次执行所述测试用例进行测试。
  8. 如权利要求7所述的接口测试方法,其中,再次执行所述测试用例进行测试之后,还包括:
    当所述测试用例没有通过测试,获取更新后的功能函数和/或更新后的测试用例;
    执行最新获取到的测试用例进行测试。
  9. 一种计算机设备,其中,所述计算机设备包括处理器、存储器及通信总线,其中,
    所述通信总线配置为实现处理器和存储器之间的连接通信;
    所述处理器配置为执行存储器中存储的一个或者多个计算机程序,以实现如权利要求1至8中任一项所述的接口测试方法的步骤。
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有一个或者多个计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如权利要求1至8中任一项所述的接口测试方法的步骤。
PCT/CN2021/130150 2020-12-25 2021-11-11 一种接口测试方法、计算机设备及计算机可读存储介质 WO2022134915A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011561105.6 2020-12-25
CN202011561105.6A CN114691464A (zh) 2020-12-25 2020-12-25 一种接口测试方法、计算机设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2022134915A1 true WO2022134915A1 (zh) 2022-06-30

Family

ID=82129348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130150 WO2022134915A1 (zh) 2020-12-25 2021-11-11 一种接口测试方法、计算机设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN114691464A (zh)
WO (1) WO2022134915A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297039A (zh) * 2022-10-08 2022-11-04 天津华来科技股份有限公司 Http协议参数化测试架构方法、电子设备、存储介质
CN115543857A (zh) * 2022-12-02 2022-12-30 北京蔚领时代科技有限公司 Sdk测试包的制作方法、sdk测试方法及设备
CN115603797A (zh) * 2022-11-08 2023-01-13 武汉卓目科技有限公司(Cn) 卫星地面自动化测试平台、测试系统及测试方法
CN116680171A (zh) * 2023-05-22 2023-09-01 前海飞算云智软件科技(深圳)有限公司 测试方法、装置、存储介质及电子设备
CN117724989A (zh) * 2024-02-18 2024-03-19 粤港澳大湾区数字经济研究院(福田) 一种接口的回归测试方法、装置、终端及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686463B (zh) * 2022-12-30 2023-04-11 科讯嘉联信息技术有限公司 基于Python和Excel的接口自动化框架控制系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268285A (zh) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 针对api接口的健壮性测试用例自动生成方法和装置
CN108108162A (zh) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 应用程序编程接口生成方法及装置
CN108549606A (zh) * 2018-04-16 2018-09-18 成都医云科技有限公司 接口测试方法及装置
CN109117131A (zh) * 2018-08-16 2019-01-01 杭州云纪网络科技有限公司 代码生成方法及装置、存储介质及电子终端
CN110287098A (zh) * 2019-05-21 2019-09-27 深圳壹账通智能科技有限公司 自动创建测试脚本方法、服务器及计算机可读存储介质
US10437712B1 (en) * 2018-06-20 2019-10-08 Ca, Inc. API functional-test generation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268285A (zh) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 针对api接口的健壮性测试用例自动生成方法和装置
CN108108162A (zh) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 应用程序编程接口生成方法及装置
CN108549606A (zh) * 2018-04-16 2018-09-18 成都医云科技有限公司 接口测试方法及装置
US10437712B1 (en) * 2018-06-20 2019-10-08 Ca, Inc. API functional-test generation
CN109117131A (zh) * 2018-08-16 2019-01-01 杭州云纪网络科技有限公司 代码生成方法及装置、存储介质及电子终端
CN110287098A (zh) * 2019-05-21 2019-09-27 深圳壹账通智能科技有限公司 自动创建测试脚本方法、服务器及计算机可读存储介质

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297039A (zh) * 2022-10-08 2022-11-04 天津华来科技股份有限公司 Http协议参数化测试架构方法、电子设备、存储介质
CN115297039B (zh) * 2022-10-08 2023-01-10 天津华来科技股份有限公司 Http协议参数化测试架构方法、电子设备、存储介质
CN115603797A (zh) * 2022-11-08 2023-01-13 武汉卓目科技有限公司(Cn) 卫星地面自动化测试平台、测试系统及测试方法
CN115543857A (zh) * 2022-12-02 2022-12-30 北京蔚领时代科技有限公司 Sdk测试包的制作方法、sdk测试方法及设备
CN116680171A (zh) * 2023-05-22 2023-09-01 前海飞算云智软件科技(深圳)有限公司 测试方法、装置、存储介质及电子设备
CN116680171B (zh) * 2023-05-22 2024-03-08 前海飞算云智软件科技(深圳)有限公司 测试方法、装置、存储介质及电子设备
CN117724989A (zh) * 2024-02-18 2024-03-19 粤港澳大湾区数字经济研究院(福田) 一种接口的回归测试方法、装置、终端及存储介质

Also Published As

Publication number Publication date
CN114691464A (zh) 2022-07-01

Similar Documents

Publication Publication Date Title
WO2022134915A1 (zh) 一种接口测试方法、计算机设备及计算机可读存储介质
US9218269B2 (en) Testing multiple target platforms
US7823164B2 (en) Automated generation of different script versions
WO2019072110A1 (zh) 应用程序的生成方法、装置、系统、设备和介质
US8156473B2 (en) Model oriented debugging
BR112015011537B1 (pt) Método e dispositivo de armazenamento para associação de metadados com código fonte
US9772830B2 (en) System and method for modeling cloud rules for migration to the cloud
US9104797B1 (en) Efficient cloud-based annotation of crash reports
US8832125B2 (en) Extensible event-driven log analysis framework
KR20040097909A (ko) 명령에 대한 입력 파라미터의 반영 기반 프로세싱
AU2021206497B2 (en) Method and apparatus for authority control, computer device and storage medium
US9098290B2 (en) Method and apparatus for facilitating diagnostic logging for software components
Manner et al. Troubleshooting serverless functions: a combined monitoring and debugging approach
Chen et al. Extracting and studying the Logging-Code-Issue-Introducing changes in Java-based large-scale open source software systems
US20070234328A1 (en) File handling for test environments
WO2012052215A1 (en) Software development
US10275236B2 (en) Generating related templated files
WO2021022703A1 (zh) 软件项目重构方法、装置、计算机装置及存储介质
US8438542B2 (en) Generating a management pack at program build time
CN111475150B (zh) 一种跨语言绑定方法、装置、设备及存储介质
US10606569B2 (en) Declarative configuration elements
Mateos et al. Measuring the impact of the approach to migration in the quality of web service interfaces
Gao et al. Formal verification of consensus in the taurus distributed database
Rabkin Using program analysis to reduce misconfiguration in open source systems software
Balogh et al. Workflow-driven tool integration using model transformations

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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