WO2020119434A1 - 接口数据处理方法、自动化测试方法、装置、设备和介质 - Google Patents

接口数据处理方法、自动化测试方法、装置、设备和介质 Download PDF

Info

Publication number
WO2020119434A1
WO2020119434A1 PCT/CN2019/120593 CN2019120593W WO2020119434A1 WO 2020119434 A1 WO2020119434 A1 WO 2020119434A1 CN 2019120593 W CN2019120593 W CN 2019120593W WO 2020119434 A1 WO2020119434 A1 WO 2020119434A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
target
interface data
data
modified
Prior art date
Application number
PCT/CN2019/120593
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 WO2020119434A1 publication Critical patent/WO2020119434A1/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

Definitions

  • This application relates to the field of software testing, and in particular to an interface data processing method, automated testing method, device, equipment, and medium.
  • interface automation requires manually constructing the interface to be tested, and then injecting parameters into the interface instance to complete the test case. Due to the complicated interface construction process, a character error in the interface parameters of request header, body and cookie will cause the test cases formed based on the interface to fail to produce the expected effect during the test process. Therefore, the heavy workload in the interface construction process will directly affect the efficiency of test case generation in the automated testing process.
  • interface documents need to be used to record the development and construction process of interfaces.
  • maintaining interface documents requires a lot of energy from developers or testers, resulting in a relatively high cost of interface document maintenance. Therefore, the current common practice is only to maintain interface documents for external interfaces and a small number of core interfaces, which is not conducive to the maintenance of interface documents.
  • Embodiments of the present application provide an interface data processing method, device, equipment, and medium to solve the problems of complicated interface construction process and large interface document maintenance cost.
  • the embodiments of the present application provide an automated testing method, device, equipment, and medium to solve the problem of low test case generation efficiency in the current automated testing process.
  • An interface data processing method including:
  • Obtain a data grabbing task which includes a target system identifier and a target interface parameter
  • the original interface data is stored as new standard interface data in the interface document library.
  • An interface data processing device including:
  • a data grabbing task obtaining module used to obtain a data grabbing task, the data grabbing task includes a target system identifier and a target interface parameter;
  • the original interface data acquisition module is used to capture the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identifier using a packet capture tool, and store the original interface data in the original Interface library
  • a matching processing result obtaining module configured to match the original interface data in the original interface library and the standard interface data in the interface document library to obtain matching processing results
  • the interface data storage module is configured to store the original interface data as new standard interface data in the interface document library if the matching processing result is unsuccessful matching.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor.
  • the processor executes the computer-readable instructions, the following steps are implemented:
  • Obtain a data grabbing task which includes a target system identifier and a target interface parameter
  • the original interface data is stored as new standard interface data in the interface document library.
  • One or more readable storage media storing computer readable instructions, the computer readable storage media storing computer readable instructions, which when executed by one or more processors, causes the one Or multiple processors perform the following steps:
  • Obtain a data grabbing task which includes a target system identifier and a target interface parameter
  • the original interface data is stored as new standard interface data in the interface document library.
  • An automated testing method including:
  • an interface document library based on at least one of the interface requirements, obtain standard interface data corresponding to each of the interface requirements, and control the client to display the standard interface data;
  • An automated testing device including:
  • a use case editing request acquisition module configured to obtain a use case editing request sent by a client, where the use case editing request includes an interface sequence and at least one interface requirement;
  • a standard interface data acquisition module for querying an interface document library based on at least one of the interface requirements, acquiring standard interface data corresponding to each of the interface requirements, and controlling the client to display the standard interface data;
  • An interface modification request obtaining module configured to obtain an interface modification request sent by a client, where the interface modification request includes a target interface identifier and a target modification parameter;
  • a target interface data acquisition module configured to modify and debug the standard interface data corresponding to the target interface identifier based on the target modification parameters, and acquire target interface data that has been successfully debugged;
  • the target test case forming module is configured to combine at least one of the target interface data according to the interface order to form a target test case.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor.
  • the processor executes the computer-readable instructions, the following steps are implemented:
  • an interface document library based on at least one of the interface requirements, obtain standard interface data corresponding to each of the interface requirements, and control the client to display the standard interface data;
  • One or more readable storage media storing computer readable instructions, the computer readable storage media storing computer readable instructions, which when executed by one or more processors, causes the one Or multiple processors perform the following steps:
  • an interface document library based on at least one of the interface requirements, obtain standard interface data corresponding to each of the interface requirements, and control the client to display the standard interface data;
  • FIG. 1 is a schematic diagram of an application environment of an interface data processing method or an automated testing method in an embodiment of the present application
  • FIG. 3 is another flowchart of an interface data processing method in an embodiment of the present application.
  • FIG. 6 is another flowchart of an automated testing method in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an interface data processing device in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an automated testing device in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • Embodiments of the present application provide an interface data processing method.
  • the interface data processing method can be applied in the application environment shown in FIG. 1.
  • the interface data processing method is applied in an automated testing platform, which includes a client and a server as shown in FIG. 1, and the client and the server communicate through the network to realize automatic acquisition of standard interface data And store the standard interface data in the interface document library to improve the efficiency of acquiring standard interface data and further improve the efficiency of generating subsequent test cases.
  • the automated testing platform may specifically be a BIGAT interface automated platform.
  • the client is also called the user side, the front end or the browser side, which refers to the program corresponding to the server side and providing local services for the client.
  • the client can be installed on but not limited to various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices.
  • the server side is also called the back end, and can be implemented with an independent server side or a server side cluster composed of multiple server sides.
  • an interface data processing method is provided.
  • the method is applied to the server side in FIG. 1 as an example for illustration, including the following steps:
  • the data grabbing task includes a target system identifier and a target interface parameter.
  • the data grabbing task is a task used to trigger the server side to grab interface data.
  • the target system identifier is an identifier for distinguishing the target system.
  • the target system is a system corresponding to the interface data to be grabbed for this data grabbing task. For example, if the automated test platform needs to access back-end access data from the Ping An Yitong APP or Ping An Yitong client, the target system is the Pingyi Yitong system, and the target system is identified as the Pingyi Yitong system The corresponding logo.
  • the target interface parameters refer to the interface parameters required for this data crawling task.
  • the target interface parameters include but are not limited to function description, request method (method), status, path (path), request header (head), request body (request body), request time, response body, cookies and host, etc. , So that the server can capture more complete original interface data from the target system based on the target interface parameters, so that subsequent target test cases can be directly generated based on the standard interface data formed by the original interface data, to improve the automated testing process Test case generation efficiency.
  • S202 Use a packet capture tool to capture the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identifier, and store the original interface data in the original interface library.
  • the packet capture tool is a set of software designed according to the standard network transmission protocol. It is a tool for capturing interface data.
  • the packet capture tool can be an open source packet capture tool.
  • the access database corresponding to the target system identification is a database for storing raw interface data corresponding to the target system identification.
  • the original interface data refers to data formed by triggering communication between the client and the server through an interface in advance.
  • the original interface data grabbed from the access database corresponding to the target system identifier by the server-side packet capture tool are all interface data developed and tested by the target system corresponding to the target system identifier or formed by a specific application process.
  • these original interface data are developed and tested in advance, or have been formed by specific applications, these original interface data include relatively complete and standardized interface parameters, that is, the request header (header) and request in the original interface data Interface parameters such as body and cooki are relatively complete and standardized, and the probability of character errors is small. Therefore, the original interface data can be used as the standardized interface data corresponding to the target system without the need to set interface parameters separately, nor Carrying out standard inspection can improve the efficiency of acquiring the original interface data, so that the use cases formed based on these original interface data can produce the expected effect in the subsequent testing process.
  • the server side After capturing the original interface data corresponding to the target interface parameters, the server side stores the original interface data in the original interface library, which is used to implement the summary management of the original interface data, so as to subsequently perform interface data based on the original interface data Maintenance to ensure the smooth progress of automated testing. Understandably, store all the original interface data captured by the packet capture tool from the access database in the original interface library to realize the management of the original interface data and synchronize the original interface data in the original interface library to the interface document library for subsequent The preparation can also avoid the situation that the original interface data and the standard interface data cannot be successfully matched due to the interference of the environment or other external factors.
  • Synchronizing the original interface data in the original interface library to the interface document library refers to performing step S203, matching the original interface data in the original interface library with the standard interface data in the interface document library, and deciding whether to match based on the matching processing result
  • the original interface data needs to be stored in the interface document library as standard interface data.
  • a monitoring tool (specifically a packet capture tool) is pre-configured on the server side of the target system to monitor the back-end access data accessed by the client from the server side, and store the back-end access data in the access database in.
  • the packet capture tool can be used to capture the back-end access data matching the target interface parameters from the access database and determine it as the original interface data to obtain a more complete and standardized Original interface data.
  • client access includes front-end access and back-end access.
  • front-end access refers to access without access to the server side through the interface.
  • the jump process between the four front-end pages "My One Account”, “Bank”, “Insurance”, and “Investment” displayed on the homepage When accessing the server, it is front-end access.
  • the pre-configured monitoring tools in the server will not monitor and capture the data accessed by these front ends. Because the front end access process cannot simulate the operation of the interface access server side, it is not within the scope of the interface test, so the data formed by the front end access will not be stored in the access database.
  • Back-end access refers to triggering the client to access the server through the interface by clicking or performing other operations on the client, so as to achieve communication access between the client and the server.
  • Back-end access refers to triggering the client to access the server through the interface by clicking or performing other operations on the client, so as to achieve communication access between the client and the server.
  • the client side the access formed by clicking "My Account” is the back-end access.
  • the monitoring tool pre-configured on the server side will monitor and capture this back-end access data, and store this back-end access data in the access database For subsequent interface data maintenance.
  • the back-end access data stored in the access database can be related data in the HTTP request, including but not limited to the following: function description, request method (method), URL parameters, status, path (path), request header ( head), request body, request time, response body, cookies, etc.
  • the function description is used to explain the function of the interface, such as login interface, payment interface and collection interface.
  • the request method (method) is used to describe the method of calling a third-party interface, such as GET, POST, and PUT.
  • URL parameters refer to the parameters in the URL, which are used to specify the options of special parameters.
  • the status refers to the HTTP status code corresponding to the back-end access data.
  • Path is a character string separated by zero or more "/" symbols, generally used to indicate the directory or file address.
  • the request head (head) is used to tell the server, the client's relevant information, for example, Host is to tell the server, the host name that the client wants to access; Accept is to tell the server, the data type supported by the client; Referer is to tell the server End, from which resource the client accesses the server (generally used for anti-theft chain); Connection is to tell the server, whether to close or maintain the link after the request is completed;
  • User-Agent is to tell the server, the software environment of the client; Accept- Encoding is to tell the server that the client supports the data compression format; Accept-Language is to tell the server and the client's locale.
  • the request time is the time to trigger the HTTP request.
  • the response body is used to tell the client, the server-related information, for example, Server is to tell the client, the type of the server, Content-Encoding is to tell the client, the data compression format, Content-Length is to tell the client, to send back the data length. Cookies are used to tell the server that the client temporarily stores information on the server.
  • the interface document library is a database for storing standard interface data.
  • the standard interface data is the interface data stored in the interface document library in advance.
  • the standard interface data can exist in the form of excel, word, or other documents, that is, it can be stored in the form of interface documents for subsequent maintenance of interface documents.
  • any two standard interface data in the interface document library are different, that is, the standard interface data stored in the interface document library is unique.
  • the server after acquiring the original interface data from the access database using the packet capture tool (or storing the original interface data in the original interface library), the server needs to perform the original interface data with the standard interface data in the interface document library Matching one by one to determine whether there is standard interface data matching the original interface data to obtain matching processing results. Understandably, if the standard interface data matching the original interface data is stored in the interface document library, the matching processing result of successful matching is obtained; if the standard document data matching the original interface data is not stored in the interface document library, Then, the matching processing result of unsuccessful matching is obtained.
  • the original interface data and the standard interface data are matched to determine whether the two correspond to the same interface. If they are the same interface, the original interface data and the standard interface data are successfully matched; otherwise, if they are not the same interface, Then the original interface data does not match the standard interface data successfully. That is, by matching the original interface data and the standard interface data, according to the matching processing result, it is helpful for subsequent deduplication processing to ensure the uniqueness of the standard interface data stored in the interface document library, that is, each standard interface data corresponds The interface is unique.
  • the matching processing result is unsuccessful matching, it means that there is no standard interface data corresponding to the original interface data in the interface document library.
  • the original interface data can be stored as new standard interface data in In the interface document library, to ensure the uniqueness of the standard interface data in the interface document library, that is, to avoid duplicate standard interface data in the interface document library, which is beneficial to maintain the standard interface data in the interface document library and save storage space, and also conducive to storage space Improve the efficiency of generating test cases based on standard interface data.
  • the original interface data whose matching processing result is unsuccessful matching is stored as new standard interface data in the interface document library, so as to achieve a match formed by matching processing based on the original interface data and the standard interface data in the interface document library
  • the purpose of the processing result is to deduplicate the standard interface data stored in the interface document library.
  • each standard interface data in the interface document library includes a more complete and standardized interface parameter, which does not need to construct a new interface by writing relevant interface parameters, reducing the probability of errors in the interface parameter construction process.
  • the matching processing result is a successful match, it means that there is standard interface data corresponding to the same interface in the interface document library as the original interface data.
  • the original interface data is stored in the interface document library, it will be stored in the interface document library
  • There are at least two standard interface data corresponding to the same interface which increases the maintenance complexity of the standard interface data in the interface document library. For example, if three standard interface data A1, A2, and A3 are stored in the interface A corresponding to the target system, the three interface data A1, A2, and A3 need to be maintained at the same time when the interface document corresponding to the interface A is subsequently maintained
  • the interface document corresponding to the data causes the maintenance workload of the interface document to increase.
  • the original interface data corresponding to the target interface parameters is first grabbed from the access database, so as to quickly obtain the original interface data containing the more complete and standardized interface parameters in batches to improve the original
  • the efficiency of acquiring interface data after matching with the standard interface data in the interface document library, the original interface data of the unsuccessful matching processing result is stored as new standard interface data in the interface document library to ensure the interface document
  • the uniqueness of the standard interface data in the library is conducive to maintaining the standard interface data in the interface document library.
  • the data grabbing task acquired in step S201 further includes a task type, which is used to define the type of the data grabbing task this time, which may specifically be a real-time task and a scheduled task.
  • the packet capture tool in step S202 captures the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identification, which specifically includes the following steps:
  • the packet capture tool is triggered to capture the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identification.
  • the real-time task refers to a task that needs to be processed immediately after the server side receives the data capture task. Specifically, every time the server receives a data capture task, if the task type in the data capture task is a real-time task, the packet capture tool is used directly to access the database corresponding to the target system identifier in the data capture task In the process, grab the original interface data containing all the target interface parameters to ensure the real-time acquisition of the original interface data.
  • the second is that if the task type is a timed task, the trigger time monitoring tool monitors whether the system's current time reaches the timed trigger time carried in the data capture task. If the timed trigger time is reached, the packet capture tool is triggered from the target system identification. In the corresponding access database, grab the original interface data corresponding to the target interface parameters.
  • the timing task refers to a task that the server needs to wait for the timing trigger time carried in the data grabbing task after receiving the data grabbing task.
  • the timing trigger time is used to limit the time that triggers the server side to perform the data capture operation.
  • the timing trigger time is a time set independently by the user, for example, it can be set at 9:00 am every Monday or other time.
  • the time monitoring tool is a tool for obtaining the current time of the system and judging whether the current time of the system reaches the timing trigger time (that is, timing monitoring). For example, a function for collecting the current time of the system is set on the time monitoring tool.
  • a time monitoring tool pre-installed on the server side is triggered to monitor the current time of the system in real time.
  • the packet capture tool is triggered to capture the original interface data containing all target interface parameters from the access database corresponding to the target system ID in the data capture task to achieve Quickly grab the original interface data, and the crawling process does not require manual intervention, which is conducive to improving the efficiency of grabbing the original interface data.
  • matching the original interface data with the standard interface data in the interface document library in step S203 to obtain a matching processing result specifically includes the following steps:
  • S301 A string matching algorithm is used to match the path and request method in the original interface data with the path and request method in the standard interface data in the interface document library.
  • the original interface data and standard interface data both include the request method (method), status, path (path), request header (head), request body (body), request time, response body, cookies and Host these interface parameters, and in Under the same target system, the client composed of the path and the request method invokes the server's entry entrance. Therefore, under the same target system, the path and the request method are exactly the same as the same interface.
  • the path and the request method are exactly the same as the same interface.
  • the server uses a pre-configured string matching algorithm to match the path of the original interface data and the standard interface data to determine whether the path of the original interface data and the standard interface data are the same;
  • the interface data and standard interface data request methods are matched to determine whether the original interface data and standard interface data request methods are the same, thereby completing the matching process.
  • the string matching algorithm may use but is not limited to the Knuth-Morris-Pratt string matching algorithm (ie, KMP algorithm).
  • the original interface data and the standard interface data have the same path, and the original interface data and the standard interface data have the same request method, the original interface data and the standard interface data are deemed to be the same under the target system. Interface data formed by the interface to obtain matching processing results of successful matching.
  • the paths of the original interface data and the standard interface data are different, or the method of requesting the original interface data and the standard interface data is different, or the paths of the original interface data and the standard interface data ( path) and request method (method) are different, it is determined that the original interface data and the standard interface data are not the interface data formed by the same interface under the target system, and the matching processing result of unsuccessful matching is obtained.
  • the matching process can effectively simplify the matching process without matching all interface parameters and improve the matching processing efficiency.
  • the original interface data is stored in the interface document library in the form of interface documents as new standard interface data, and the interface document can also be named according to the corresponding interface name in its functional description, so as to standard interface in the interface document library
  • the data is standardized.
  • the interface data processing method includes the following steps:
  • S401 Obtain an interface modification request sent by a client.
  • the interface modification request includes a path to be modified and a method of the request to be modified.
  • the interface modification request is used to trigger the server to modify the standard interface data in the interface document library.
  • the path to be modified refers to a path corresponding to the interface that needs to be modified
  • the request to be modified method refers to a request method corresponding to the interface that needs to be modified.
  • the server obtains the interface modification request sent by the client.
  • the interface modification request specifically includes a path to be modified and a method to be modified. Since the path and the request method can uniquely determine an interface, according to the path to be modified and the method to be modified The request method can uniquely determine the interface to be modified, and the interface is the interface to be modified.
  • S402 Query the interface document library based on the path to be transformed and the method to be transformed, obtain the data of the interface to be transformed, and display the data of the interface to be transformed on the client.
  • the server queries the interface document library based on the path to be transformed and the request method to be transformed. Since each interface in the interface document library can be determined by its path and request method, it can be determined according to the path to be transformed and the request method to be transformed For the corresponding interface to be modified, the standard interface data corresponding to the path to be modified and the method to be modified request is determined as the interface data to be modified corresponding to the interface to be modified.
  • the server side displays the acquired interface data to be transformed on the interface editing interface of the client, so that the developer can modify the interface data to be transformed displayed on the interface editing interface.
  • S403 Obtain a parameter modification request formed by the client based on the interface data to be modified.
  • the parameter modification request includes the parameter name to be modified and the parameter value to be modified.
  • the parameter name to be modified specifically refers to the name of the interface parameter that needs to be modified, such as the URL parameter or the request body.
  • the parameter value to be modified specifically refers to the value of the interface parameter that needs to be modified.
  • the client’s interface editing interface will display the input parameters corresponding to the interface name, host, status code, request body, parameter, process number and file path. Box, the interface parameter corresponding to the standard interface data is displayed by default in the parameter input box, and the developer can modify the interface parameter displayed by default in the parameter input box to input the corresponding parameter modification request to realize the rapid modification of the interface data to be transformed . Understandably, a parameter modification request is formed based on the interface parameters to be transformed displayed by the client, so that the modification process has less modification content, and the modification efficiency is improved.
  • S404 Query the specification database based on the parameter name to be modified, and obtain the interface parameter editing rule corresponding to the parameter name to be modified.
  • the specification database is a database for storing editing rules corresponding to each interface parameter.
  • Interface parameter editing rules are rules pre-configured on the server side to limit the editing requirements of each interface parameter.
  • an interface parameter editing rule corresponding to each interface parameter is used to implement standardized management of each interface parameter and ensure the executability of interface data formed based on the interface parameter.
  • the server queries the specification database based on the parameter name to be modified to obtain the interface parameter editing rule corresponding to the parameter name to be modified, so that the interface parameter corresponding to the parameter name to be modified is subject to specification detection based on the interface parameter editing rule, thereby Ensure the executability of the updated interface parameters formed after the interface modification.
  • S405 Use the interface parameter editing rule to perform standard detection on the modified parameter value, and obtain the standard detection result.
  • the server adopts the interface parameter editing rule corresponding to the parameter name to be modified to perform standard detection on the parameter value to be modified to determine whether the parameter value to be modified meets the requirements of the corresponding interface parameter editing rule.
  • the result of the standard test passed; if it does not meet the requirements, the result of the standard test that failed the test is obtained.
  • each interface parameter editing rule is pre-configured with a regular expression for specification detection, and based on the regular expression configured in the interface parameter editing rule, the parameter value to be modified is subjected to specification detection to determine the parameter to be modified Whether the value meets the requirements of the interface parameter editing rules.
  • the interface parameter to be modified can be modified based on the parameter value to be modified, to Obtain updated interface data after transformation.
  • the updated interface data refers to the interface data formed by modifying the interface data to be modified using interface parameter values to be modified that conform to the interface parameter editing rules. Since each interface parameter in the updated interface data conforms to the corresponding interface parameter editing rules, the probability of errors in the process of modification is low, and the accuracy and enforceability of updating the interface data are improved.
  • step S405 if the standard detection result in step S405 is that the test fails, it means that the parameter value to be modified does not meet the requirements of the interface parameter editing rule.
  • the interface parameter to be modified is directly based on the parameter value to be modified
  • the modification may affect the executability of the modified interface parameters to be modified, so that the probability of error during the modification process is high. Therefore, a reminder message of parameter non-compliance needs to be sent to the client to remind the developer to make the modification.
  • the corresponding interface data to be modified is first determined according to the path to be modified and the method to be modified request, and the interface data to be modified is displayed on the client, so as to be based on the displayed Modify the interface data for quick modification.
  • the interface parameter editing rule is determined according to the parameter name to be modified in the parameter modification request, and the interface parameter editing rule is adopted to perform standard detection on the parameter value to be modified.
  • the standard detection result is that the test is passed
  • the modification is obtained based on the parameter value to be modified Update the interface data to ensure the accuracy and enforceability of the updated interface data.
  • the embodiments of the present application also provide an automated testing method, which can be applied in the application environment shown in FIG. 1.
  • the use case is generated and applied in an automated testing platform, which includes a client and a server as shown in FIG. 1, and the client and the server communicate through the network to implement an interface-based document library Standard interface data to quickly obtain target test cases to improve the efficiency of automated testing.
  • an automated testing method includes automatically generating test cases to improve the efficiency of generating test cases.
  • the method is applied to the server side in FIG. 5 as Examples to illustrate, including the following steps:
  • S501 Acquire a use case editing request sent by a client.
  • the use case editing request includes an interface sequence and at least one interface requirement.
  • the use case editing request is a request for triggering the server side to edit the test case.
  • the use case editing request is specifically an HTTP request.
  • the interface requirements are used to describe the requirements of the functions contained in the test cases to be edited in this use case editing request.
  • Interface order is used to limit the order of two or more interface requirements. For example, if the test case to be edited is Taobao's login function, the interface requirement is only the login requirement; if the test case to be edited is Taobao's payment function, then its interface requirements are login requirement, item browsing requirement, and car purchase. Five interface requirements such as demand, buyer information confirmation demand and payment demand.
  • S502 Query the interface document library based on at least one interface requirement, obtain standard interface data corresponding to each interface requirement, and control the client to display the standard interface data.
  • each standard interface data corresponds to an interface
  • each standard interface data in the interface document library can be stored in the form of an interface document and correspond to its functional description
  • the interface name is used to name the interface document in order to standardize the standard interface data in the interface document library.
  • the server can query each interface requirement in the use case editing request to check whether there is an interface name matching the interface requirement in the interface document library, and if there is a match with the interface requirement Interface name, the standard interface data corresponding to the interface name is determined as the standard interface data corresponding to the interface requirements, and the client’s use case editing page is displayed to display the standard interface data so that the tester can know the interface of the standard interface data Parameters for easy modification.
  • a reminder message needs to be sent to the client to remind the tester to edit the standard interface data corresponding to the interface requirements and store the standard interface data in the interface document In the library, to enrich the interface document library.
  • the interface modification request includes a target interface identifier and a target modification parameter.
  • the interface modification request is used to trigger the server to modify the interface parameters.
  • the interface modification request is a tester's request to modify the interface parameters in the standard interface data displayed on the use case editing page through the client.
  • the target interface identifier refers to the identifier corresponding to the target interface to be modified in this interface modification request.
  • the target modification parameter refers to the interface parameter corresponding to the target interface to be modified in this interface modification request.
  • the server obtains the standard interface data corresponding to each interface requirement from the interface document library, it is necessary to control the use case editing page of the client to display the standard interface data so that the tester can know the standard interface data.
  • Interface parameters for easy modification.
  • the parameter input boxes corresponding to the interface parameters of the interface name, host, status code, request body, parameters, process number and file path are displayed.
  • the input box displays the interface parameters corresponding to the standard interface data by default.
  • the tester can modify the interface parameters displayed by default in the parameter input box to enter the corresponding interface modification request to achieve rapid modification.
  • the content of the request body in the collection interface needs to be modified, then the target interface identifier is the identifier corresponding to the collection interface, and the target modification parameter is the parameter content filled in by the tester in the parameter input box of the request body, In order to achieve rapid modification.
  • the target interface identifier is the identifier corresponding to the collection interface
  • the target modification parameter is the parameter content filled in by the tester in the parameter input box of the request body
  • Target interface data refers to the modification and debugging of standard interface data to determine the target interface data that has been successfully debugged, to ensure that the subsequent test cases generated based on the target interface data are not affected by the target interface data during the testing process.
  • the impact of the interface That is, only the target interface data that has been successfully debugged can generate test cases, so as to avoid subsequent test cases formed based on the target interface data in the automated testing process, because the target interface data of an interface is wrong, the automatic test process of the test case is wrong, affecting Automated testing efficiency and accuracy.
  • the process of modifying and debugging the standard interface data corresponding to the target interface identifier includes the following situations:
  • the server modifies the data based on the target modification parameter, executes the modified data, and obtains the execution result; if the execution result is execution failure, the repeated execution of the modification data based on the target modification parameter, after executing the modification
  • the step of obtaining the execution result until the execution result is obtained is the successful execution of the loop process.
  • This debugging process can ensure that the obtained target interface data of each debugging success is formed in the formed target test case. In the process of automated testing, the test will not fail due to a single interface corresponding to the target interface data to ensure the efficiency and accuracy of automated testing.
  • the target interface ie, login interface
  • the standard interface data is modified according to the target modification parameters of the user name and password
  • debugging so that the login is successful (that is, the debugging is successful) to obtain the target interface data.
  • only the changed content needs to be input. Due to the less changed content, the probability of error is smaller, the efficiency is also high, and the overall probability of error during the debugging process will also be much less.
  • the standard interface data corresponding to the target interface identification is modified and debugged, which includes: based on the target modification parameters, the target modification parameters are subject to specification testing; if the specification testing passes, the interface with the target Identify the corresponding standard interface data for modification and debugging. Understandably, the target modification parameters are normatively detected, so that the target modification parameters conform to the specification of writing each interface parameter in the standard interface data, so as to ensure the smooth progress of automated testing.
  • the request body needs to be subjected to specification testing to ensure the smooth progress of the automated test.
  • the specification testing of the request body includes the following points: One is that the structure type of the request body must match the type declared in the request header. If the request header declares the json type, the request body must be of the json type; otherwise, the server side A reminder message of abnormal type will be returned to remind the tester to make changes. The second is that the fields of the request body must be consistent with the fields required by the backend. When the necessary fields are missing or the field names are incorrect, the server will return a reminder message of the field abnormality to remind the tester to modify it.
  • S505 Combine at least one target interface data according to the interface sequence to form a target test case.
  • the server side combines the successfully debugged target interface data obtained according to the requirements of each interface to form a target test case that can achieve specific functional requirements. Understandably, after the target test case is formed on the server side, the target test case will be stored in the use case database, so that each target test case corresponds to a use case identifier, so as to quickly find the corresponding target test case based on the use case identifier.
  • the standard interface data Since the standard interface data is stored in the interface document library, the reusability of the standard interface data can be improved, and only one import into the interface document library (that is, the standard interface data is stored in the interface document library through steps S201-S204), It can be repeatedly referenced by multiple target test cases, and can be combined with other standard interface data to form different target test cases to improve the efficiency of target test case generation.
  • the standard interface data contains interface parameters such as function description, request method, URL parameters, status, path, request head, request body, request time, response body, and cookies.
  • the parameter constructs a complete and standardized executable interface, so that the target interface data corresponding to at least one interface requirement is combined according to its interface order to form a new target test case, which improves the generation efficiency of the target test case and helps to improve The efficiency of automated testing.
  • the interface document library can be searched according to the requirements of each interface in the use case editing request, and the corresponding standard interface data can be quickly found without the need for the tester to edit the corresponding standard interface data by himself to improve the standard interface data Access efficiency.
  • only some interface parameters in the standard interface data need to be modified through the interface modification request, with fewer changes and a lower error probability, so as to improve the efficiency and accuracy of acquiring the modified target interface data.
  • the modified standard interface data needs to be debugged, and only target test cases are generated based on the successfully debugged target interface data, so as to avoid errors in the automated test process of the formed target test cases due to errors in the target interface data, thereby improving automated test efficiency .
  • the combination of at least one target interface data based on the interface sequence can quickly form a target test case and improve the efficiency of the target test case.
  • the automated testing method further includes: using a regular expression matching algorithm to perform static file filtering on each target interface data in the target test case to obtain the updated target test Example.
  • the server side is pre-configured with a regular expression for matching the static files in the target interface data
  • the regular expression matching algorithm formed based on the regular expression performs a static file process on each target interface data in the target test case to Remove the static files in the target interface data to obtain updated target test cases, which can reduce the amount of data in the target test cases and the workload of subsequent maintenance, and can make the subsequent automated testing process based on the target test cases eliminate static
  • a regular expression matching algorithm may be used to filter URLs in the target interface data to remove static files existing in the target interface data.
  • the static file refers to files such as HTML, CSS, and JS that the web system uses to render client pages.
  • an automated testing method includes performing an automated testing process based on test cases to improve the efficiency of automated testing. That is, after the steps of forming the target test case, the automated testing method further includes the following steps:
  • S601 Obtain the use case test request sent by the client, where the use case test request includes the target use case identifier.
  • the use case test request is a request to trigger the server to automatically execute the test case.
  • the use case test request is specifically an HTTP request.
  • the target use case identifier is an identifier used to uniquely identify a target test case. Each use case identifies a corresponding target test case.
  • S602 Query the use case database based on the target use case identifier to obtain a target test case corresponding to the target use case identifier.
  • the target test case includes an interface sequence and at least one target interface data, and each target interface data corresponds to an execution object.
  • the server side queries the use case database based on the target use case identifier in the use case test request to obtain the target test case corresponding to the target use case identifier.
  • all target test cases stored in the use case database are target test cases acquired according to steps S501-S505, which include the interface sequence and at least one target interface data, and each target interface data corresponds to an execution object.
  • the execution object refers to the object that needs to be accessed during the execution of the target test case.
  • the objects that the target test case needs to access are generally the test environment db, the test environment server side, and the platform script server side.
  • the main role of the target test case is the test environment server side, and the test environment DB and platform script server side are only auxiliary (generally built manually as needed).
  • S603 Perform target interface data sequentially according to the interface order, and obtain corresponding test data from the execution object corresponding to the target interface data.
  • each original interface data captured by the packet capture tool in step S202 carries initial data
  • the original interface data is matched with the standard interface data in the interface document library and stored as new standard interface data in the interface document Library, so that each standard interface data also carries initial data.
  • the default initial data will be loaded into the target test cases generated during the automated test to ensure automation
  • the test runs smoothly; if the standard interface data is modified according to the actual situation, the server side debugs the modified standard interface data, and only the target interface test data is formed based on the successful target interface data, so that the target interface formed during the debugging process
  • the data also carries the initial data corresponding to the target modification parameters.
  • a Web system consists of a front end and a back end, the front end is usually the client, and the back is the server.
  • client access includes front-end access and back-end access, and a monitoring tool (specifically a packet capture tool) is configured on the server side to capture back-end access data formed by back-end access.
  • a monitoring tool specifically a packet capture tool
  • the user performs the operation of accessing the back-end data on the client to pass it to the server through the client, then the back-end access data formed by this operation will be captured by the monitoring tool configured on the server
  • the monitoring tool configured on the server
  • the main test object is to access the back-end services, that is, according to the interface sequence pre-configured in the target test case, according to the execution of the target interface data, fully simulate the user's operating behavior on the client, so that the client is based on the
  • the operation behavior generates a corresponding data packet and passes it to the execution object (ie, the back end) corresponding to the target interface data to simulate the user's operation behavior and obtain the corresponding test data.
  • the so-called complete simulation of user behavior on the client refers to the execution of the target interface data in sequence according to the interface order.
  • the data packets passed to the back end can be completely consistent with the real user behavior to improve the efficiency of automated interface testing .
  • a test report template is pre-stored on the server side, and the test report template includes a template frame, a test field set in the template frame, and a filled area corresponding to each test field.
  • the server side After acquiring the test data based on step S603, the server side fills the test data into the filled area corresponding to the corresponding test field to obtain the target test report. This process can automatically generate the target test report without manual test report creation ,Improve efficiency.
  • the target test cases are obtained from the use case database according to the target use case identifier, and each target test case includes the interface sequence and at least one target interface data, so as to quickly obtain a more complete and standardized target interface data.
  • the target interface data is executed in order to obtain the corresponding test data from the execution object corresponding to the target interface data. Because the target interface data is relatively complete and standardized, the execution process of the target interface data makes the data packet passed to the execution object Consistent with the behavior of real users to ensure the accuracy and authenticity of the testing process. Then, based on the test data, the target test report is automatically obtained without manual preparation of the test report, which improves efficiency.
  • an interface data processing device is provided, and the interface data processing device corresponds to the interface data processing method in the above embodiment in one-to-one correspondence.
  • the interface data processing apparatus includes a data capture task acquisition module 701, an original interface data acquisition module 702, a matching processing result acquisition module 703, and an interface data storage module 704.
  • the detailed description of each functional module is as follows:
  • the data grabbing task obtaining module 701 is used to obtain a data grabbing task.
  • the data grabbing task includes a target system identifier and a target interface parameter.
  • the original interface data acquisition module 702 is used to capture the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identifier by using a packet capture tool, and store the original interface data in the original interface library.
  • the matching processing result obtaining module 703 is configured to match the original interface data in the original interface library with the standard interface data in the interface document library to obtain the matching processing result.
  • the interface data storage module 704 is configured to store the original interface data as new standard interface data in the interface document library if the matching processing result is unsuccessful matching.
  • the data capture task also includes the task type.
  • the original interface data acquisition module 702 includes a real-time interface data acquisition unit and an interface data timing acquisition unit.
  • the real-time interface data acquisition unit is used to trigger the packet capture tool to capture the original interface data corresponding to the target interface parameters from the access database corresponding to the target system identification if the task type is a real-time task.
  • the interface data timing acquisition unit is used to trigger the time monitoring tool to monitor whether the current time of the system reaches the timing trigger time carried in the data grabbing task if the task type is a timing task. If the timing trigger time is reached, the packet capture tool is triggered from In the access database corresponding to the target system identifier, grab the original interface data corresponding to the target interface parameters.
  • the matching processing result obtaining module 703 includes a matching processing unit, a first processing result obtaining unit and a second processing result obtaining unit.
  • the matching processing unit is used to match the path and the request method in the original interface data with the path and the request method in the standard interface data in the interface document library using a string matching algorithm.
  • the first processing result obtaining unit is configured to obtain a matching processing result of successful matching if the path and the request method are the same.
  • the second processing result obtaining unit is configured to obtain the matching processing result of unsuccessful matching if the path and/or the request method are different.
  • the interface data processing device further includes an interface modification request obtaining unit, an interface modification request obtaining unit, a parameter modification request obtaining unit, a parameter editing rule obtaining unit, a specification detection result obtaining unit, and updating interface data Acquisition unit and reminder information acquisition unit.
  • the interface modification request obtaining unit is used to obtain an interface modification request sent by the client.
  • the interface modification request includes a path to be transformed and a method to be transformed.
  • the interface data display unit to be modified is used to query the interface document library based on the path to be modified and the request method to be modified, obtain the interface data to be modified, and display the interface data to be modified on the client.
  • the parameter modification request obtaining unit is used to obtain a parameter modification request formed by the client based on the interface data to be modified, and the parameter modification request includes the name of the parameter to be modified and the value of the parameter to be modified.
  • the parameter editing rule acquisition unit is used to query the specification database based on the parameter name to be modified, and obtain the interface parameter editing rule corresponding to the parameter name to be modified.
  • the specification detection result obtaining unit is used for performing specification detection on the parameter value to be modified by using interface parameter editing rules to obtain the specification detection result.
  • the update interface data acquisition unit is used to modify the interface data to be modified based on the parameter value to be modified if the standard detection result is that the test passes, to obtain the updated interface data after the modification.
  • the reminder information obtaining unit is used to send a reminder message that the parameter is not compliant to the client if the standardized detection result is that the test fails.
  • an automated testing device is provided, and the automated testing device corresponds to the automated testing method in the foregoing embodiment one by one.
  • the automated test apparatus includes a use case editing request acquisition module 801, a standard interface data acquisition module 802, an interface modification request acquisition module 803, a target interface data acquisition module 804, and a target test case formation module 805.
  • the detailed description of each functional module is as follows:
  • the use case editing request obtaining module 801 is used to obtain a use case editing request sent by a client.
  • the use case editing request includes an interface sequence and at least one interface requirement.
  • the standard interface data acquisition module 802 is used to query the interface document library based on at least one interface requirement, acquire standard interface data corresponding to each interface requirement, and control the client to display the standard interface data.
  • the interface modification request obtaining module 803 is used to obtain an interface modification request sent by a client.
  • the interface modification request includes a target interface identifier and a target modification parameter.
  • the target interface data acquisition module 804 is configured to modify and debug the standard interface data corresponding to the target interface identifier based on the target modification parameters, and obtain the target interface data that has been successfully debugged.
  • the target test case forming module 805 is configured to combine at least one target interface data according to the interface order to form a target test case.
  • the automated testing device further includes a static file filtering processing module for filtering the static file of each target interface data in the target test case using a regular expression matching algorithm to obtain updates Target test case.
  • the automated testing device further includes a use case test request acquisition module, a target test case acquisition module, a test data acquisition module, and a target test report acquisition module.
  • the use case test request obtaining module is used to obtain the use case test request sent by the client, and the use case test request includes the target use case identifier.
  • the target test case acquisition module is used to query the use case database based on the target use case identifier, and obtain the target test case corresponding to the target use case identifier.
  • the target test case includes an interface sequence and at least one target interface data, and each target interface data corresponds to an execution object .
  • the test data acquisition module is used for sequentially executing the target interface data according to the interface sequence, and acquiring the corresponding test data from the execution object corresponding to the target interface data.
  • the target test report obtaining module is used to obtain the target test report based on the test data.
  • Each module in the above interface data processing device or automated test device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 9.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store data applied or generated during the execution of the interface data processing method or automated test method, such as standard interface data.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer readable instructions are executed by the processor to implement the interface data processing method or the automated testing method provided by the foregoing embodiments.
  • one or more readable storage media storing computer readable instructions storing the computer readable instructions, the computer readable instructions being executed by one or more processors
  • the steps of the interface data processing method in the above embodiments are executed, for example, steps S201-S204 shown in FIG. 2 or steps shown in FIG. 3.
  • the processor implements the functions of each module/unit in the embodiment of the interface data processing device when executing the computer-readable instructions, for example, the data capture task acquisition module 701, the original interface data acquisition module 702, and the matching shown in FIG.
  • the functions of the processing result acquisition module 703 and the interface data storage module 704 will not be repeated here to avoid repetition.
  • the readable storage medium in this embodiment includes a nonvolatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the processor executes the computer-readable instructions
  • the automation in the above embodiments is implemented
  • the steps of the test method such as steps S501-S505 shown in FIG. 5, or the steps shown in FIG. 6, are not repeated here to avoid repetition.
  • the processor executes computer-readable instructions
  • the functions of each module/unit in the embodiment of the automated test device are realized, for example, the use case editing request acquisition module 801, the standard interface data acquisition module 802, and the interface modification request shown in FIG. 8
  • the functions of the obtaining module 803, the target interface data obtaining module 804, and the target test case forming module 805 are described here to avoid repetition.
  • a computer-readable storage medium stores computer-readable instructions, which when executed by a processor implements the steps of the interface data processing method in the foregoing embodiment, For example, the steps S201-S204 shown in FIG. 2 or the steps shown in FIGS. 3 and 4 are not repeated here to avoid repetition.
  • the computer-readable instructions when executed by the processor, the functions of each module/unit in the embodiment of the interface data processing device described above are realized, for example, the data capture task acquisition module 701 shown in FIG. 7 and the original interface data acquisition module 702.
  • the functions of the matching processing result acquisition module 703 and the interface data storage module 704 are repeated here to avoid repetition.
  • one or more readable storage media storing computer readable instructions are provided, the computer readable storage media storing computer readable instructions, the computer readable instructions being used by one or more processors
  • the one or more processors are executed to implement the steps of the automated testing method in the above embodiments, for example, steps S501-S505 shown in FIG. 5 or steps shown in FIG. 6, in order to avoid repetition, here is not Repeat again.
  • the computer-readable instructions are executed by the processor, the functions of each module/unit in the embodiment of the above-mentioned automated test device are realized, for example, the use case editing request acquisition module 801, the standard interface data acquisition module 802 shown in FIG.
  • the readable storage medium in this embodiment includes a nonvolatile readable storage medium and a volatile readable storage medium.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

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

Abstract

一种接口数据处理方法、自动化测试方法、装置、设备和介质。该接口数据处理方法包括:获取数据抓取任务,数据抓取任务包括目标系统标识和目标接口参数(S201);采用抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据,将原始接口数据存储在原始接口库中(S202);将原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果(S203);若匹配处理结果为匹配不成功,则将原始接口数据作为新的标准接口数据存储在接口文档库中(S204)。该方法可实现快速获取批量包含较完整且规范的接口参数的原始接口数据,提高原始接口数据的获取效率,且有利于对接口文档库中的标准接口数据进行维护。

Description

接口数据处理方法、自动化测试方法、装置、设备和介质
本申请以2018年12月15日提交的申请号为201811536551.4,名称为“接口数据处理方法、自动化测试方法、装置、设备和介质”的中国发明申请为基础,并要求其优先权。
技术领域
本申请涉及软件测试领域,尤其涉及一种接口数据处理方法、自动化测试方法、装置、设备和介质。
背景技术
在当前自动化测试平台中,接口自动化的实现需要手动将需要测试的接口先构建出来,再在接口实例中注入参数,以完成测试用例。由于接口构建过程比较繁杂,请求头(header)、请求体(body)和cookie这些接口参数中一个字符出错,均会导致基于接口形成的测试用例在测试过程无法产生预期的效果。因此,接口构建过程中繁重的工作量会直接影响自动化测试过程中测试用例的生成效率。在接口构建过程中,需采用接口文档记录接口的开发和构建过程,目前维护接口文档需要耗费开发人员或者测试人员大量的精力,导致接口文档维护成本较大。因此,目前常用做法只是维护对外接口和少量核心接口的接口文档,不利于实现对接口文档的维护。
发明内容
本申请实施例提供一种接口数据处理方法、装置、设备和介质,以解决当前接口构建过程繁杂且接口文档维护成本大的问题。
本申请实施例提供一种自动化测试方法、装置、设备和介质,以解决当前自动化测试过程中测试用例的生成效率较低的问题。
一种接口数据处理方法,包括:
获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
一种接口数据处理装置,包括:
数据抓取任务获取模块,用于获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
原始接口数据获取模块,用于采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
匹配处理结果获取模块,用于将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
接口数据存储模块,用于若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
一种自动化测试方法,包括:
获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
一种自动化测试装置,包括:
用例编辑请求获取模块,用于获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
标准接口数据获取模块,用于基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
接口修改请求获取模块,用于获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
目标接口数据获取模块,用于基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
目标测试用例形成模块,用于依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控 制所述客户端显示所述标准接口数据;
获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
本申请的一个或多个实施例的细节在下面的附图及描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中接口数据处理方法或自动化测试方法的一应用环境示意图;
图2是本申请一实施例中接口数据处理方法的一流程图;
图3是本申请一实施例中接口数据处理方法的另一流程图;
图4是本申请一实施例中接口数据处理方法的另一流程图;
图5是本申请一实施例中自动化测试方法的一流程图;
图6是本申请一实施例中自动化测试方法的另一流程图;
图7是本申请一实施例中接口数据处理装置的一示意图;
图8是本申请一实施例中自动化测试装置的一示意图;
图9是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供一种接口数据处理方法,接口数据处理方法方法可应用在如图1所示的应用环境中。具体地,该接口数据处理方法应用在自动化测试平台中,该自动化测试平台包括如图1所示的客户端和服务器端,客户端与服务器端通过网络进行通信,用于实现自动获取标准接口数据,并将该标准接口数据存储在接口文档库中,以提高标准接口数据的获取效率,进一步提高后续测试用例的生成效率。本实施例中,该自动化测试平台具体可以BIGAT接口自动化平台。
其中,客户端又称为用户端、前端或者浏览器端,是指与服务器端相对应,为客户提供本地服务的程序。客户端可安装在但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务器端又称为后端,可以用独立的服务器端或者是多个服务器端组成的服务器端集群来实现。
在一实施例中,如图2所示,提供一种接口数据处理方法,以该方法应用在图1中的服务器端为例进行说明,包括如下步骤:
S201:获取数据抓取任务,数据抓取任务包括目标系统标识和目标接口参数。
其中,数据抓取任务是用于触发服务器端抓取接口数据的任务。目标系统标识是用于区别目标系统的标识,该目标系统为本次数据抓取任务所要抓取接口数据对应的系统。例如,若该自动化测试平台需从平安一帐通APP或者平安一帐通的客户端访问后端的后端访问数据时,目标系统为平安一帐通系统,该目标系统标识为平安一帐通系统对应的标识。
目标接口参数是指本次数据爬取任务所需抓取的接口参数。本实施例中,目标接口参数包括但不限于功能描述、请求方法(method)、状态、路径(path)、请求头(head)、请求体(body)、请求时间、响应体、cookies和Host等,以使服务器端基于该目标接口参数从目标系统中抓取到较为完整的原始接口数据,以使后续可直接基于该原始接口数据形成的标准接口数据生成目标测试用例,以提高自动化 测试过程中测试用例的生成效率。
S202:采用抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据,将原始接口数据存储在原始接口库中。
其中,抓包工具就是根据标准的网络传输协议来设计的一套软件,用于抓取接口数据的工具,该抓包工具可以为开源的抓包工具。与目标系统标识相对应的访问数据库是用于存储与目标系统标识相对应的原始接口数据的数据库。其中,原始接口数据是指预先通过某一接口触发客户端与服务器端之间通信所形成的数据。本实施例中,服务器端采用抓包工具从目标系统标识对应的访问数据库中抓取的原始接口数据均为该目标系统标识对应的目标系统开发并测试或者具体应用过程形成的接口数据。
由于这些原始接口数据是预先经过开发并测试,或者已经进行具体应用所形成的接口数据,则这些原始接口数据包括较为完整且规范的接口参数,即原始接口数据中的请求头(header)、请求体(body)和cooki等接口参数较完整且规范,其字符出错的概率较小,因此,可将该原始接口数据作为与目标系统相对应的规范的接口数据,无需另行设置接口参数,也无需进行规范检测,可提高原始接口数据的获取效率,使得基于这些原始接口数据形成的用例在后续测试过程中可产生预期的效果。
服务器端在抓取到与目标接口参数相对应的原始接口数据之后,将该原始接口数据存储的原始接口库中,用于实现对原始接口数据进行汇总管理,以便后续基于原始接口数据进行接口数据维护,保障自动化测试的顺利进行。可以理解地,将抓包工具从访问数据库中抓取的所有原始接口数据存储在原始接口库中,实现对原始接口数据的管理,为后续将原始接口库中的原始接口数据同步到接口文档库进行准备,也可避免因环境或者其他外部因素干扰而导致原始接口数据与标准接口数据无法顺利完成匹配处理时,需重新抓取原始接口数据的情况出现。该将原始接口库中的原始接口数据同步到接口文档库,是指执行步骤S203,将原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,根据匹配处理结果决定是否需要将原始接口数据作为标准接口数据存储在接口文档库中。
本实施例中,目标系统的服务器端中预先配置有一监控工具(具体可为一抓包工具),用于监控客户端访问服务器端的后端访问数据,并将该后端访问数据存储在访问数据库中。在服务器端获取到数据抓取任务之后,可采用抓包工具从访问数据库中抓取与目标接口参数相匹配的后端访问数据,将其确定为原始接口数据,以获取到较完整且规范的原始接口数据。
一般来说,客户端的访问包括前端访问和后端访问。其中,前端访问是指无需通过接口访问服务器端的访问。例如,在平安一帐通的客户端,在首页显示的“我的一帐通”、“银行”、“保险”和“投资”这四个前端页面之间的跳转过程,无需访问通过接口访问服务器端,则其为前端访问。一般来说,服务器端中预先配置的监控工具不会监控并抓取这些前端访问的数据。由于前端访问过程中无法模拟接口访问服务器端的操作,因此不在接口测试范畴之内,所以不会将前端访问所形成的数据存储在访问数据库中。后端访问是指通过在客户端进行点击或者其他操作,触发客户端通过接口访问服务器端,以实现客户端与服务器端之间的通信的访问。例如,在平安一帐通的客户端,在“我的一帐通”这一页面上点击“我的帐户”时,需要从服务器端获取对应的帐户数据,即需要通过预先配置的接口访问服务器端,则点击“我的帐户”所形成的访问为后端访问,服务器端预先配置的监控工具会监控并抓取这一后端访问数据,并将这一后端访问数据存储在访问数据库中,以便后续进行接口数据的维护。
例如,访问数据库中存储的后端访问数据可以为HTTP请求中的相关数据,具体包括但不限于如下内容:功能描述、请求方法(method)、URL参数、状态、路径(path)、请求头(head)、请求体(body)、请求时间、响应体和cookies等。其中,功能描述用于说明接口的功能,如登录接口、支付接口和催收接口等。请求方法(method)用于说明调用第三方接口的方法,如GET、POST和PUT等。URL参数是指URL中的parameters(参数),用于指定特殊参数的可选项。状态是指该后端访问数据对应的HTTP状态码,例如200状态码表示请求已成功,请求所希望的响应头或数据体将随此响应返回。路径(path)是由零或多个“/”符号隔开的字符串,一般用来表示目录或文件地址。请求头(head)是用于告诉服务器端,客户端的相关信息,例如,Host为告诉服务器端,客户端想访问的主机名;Accept为告诉服务器端,客户端支持的数据类型;Referer为告诉服务器端,客户端是从哪个资源来访问服务器端的(一般用于防盗链);Connection为告诉服务器端,请求完后是关闭还是保持链接;User-Agent为告诉服务器端, 客户端的软件环境;Accept-Encoding为告诉服务器端,客户端支持的数据压缩格式;Accept-Language为告诉服务器端,客户端的语言环境。请求体(body)为HTTP请求中的报文体,它将一个页面表单中的组件值通过param1=value1&param2=value2的键值对形式编码成一个格式化串,它承载多个请求参数的数据。请求时间为触发HTTP请求的时间。响应体是用于告诉客户端,服务器端的相关信息,例如Server为告诉客户端,服务器端的类型,Content-Encoding为告诉客户端,数据采用的压缩格式,Content-Length为告诉客户端,回送数据的长度。Cookie用于告诉服务器端,客户端暂存服务器端的信息。
S203:将原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果。
其中,接口文档库是用于存储标准接口数据的数据库。标准接口数据是预先存储在接口文档库中的接口数据。该标准接口数据可以以excel、word或者其他文档形式存在,即可存储成接口文档形式,以便后续进行接口文档维护。具体地,接口文档库中任意两个标准接口数据不相同,即存储在接口文档库中的标准接口数据具有唯一性。
具体地,服务器端在采用抓包工具从访问数据库中获取到原始接口数据(或者将该原始接口数据存储在原始接口库)之后,需将该原始接口数据与接口文档库中的标准接口数据进行逐一匹配处理,以确定该原始接口数据是否存在相匹配的标准接口数据,以获取匹配处理结果。可以理解地,若接口文档库中存储有与原始接口数据相匹配的标准接口数据,则获取匹配成功的匹配处理结果;若接口文档库中不存储有与原始接口数据相匹配的标准接口数据,则获取匹配不成功的匹配处理结果。
本实施例中,将原始接口数据和标准接口数据进行匹配处理,以判断两者是否对应同一接口,若为同一接口,则原始接口数据和标准接口数据匹配成功;反之,若不为同一接口,则原始接口数据与标准接口数据匹配不成功。即通过将原始接口数据和标准接口数据进行匹配处理,根据匹配处理结果,有助于后续进行去重处理,以保证接口文档库中存储的标准接口数据的唯一性,即每一标准接口数据对应的接口具有唯一性。
S204:若匹配处理结果为匹配不成功,则将原始接口数据作为新的标准接口数据存储在接口文档库中。
本实施例中,若匹配处理结果为匹配不成功,则说明接口文档库中不存在与原始接口数据对应同一接口的标准接口数据,此时可将该原始接口数据作为新的标准接口数据存储在接口文档库中,以保证接口文档库中标准接口数据的唯一性,即避免接口文档库中存在重复的标准接口数据,有利于维护接口文档库中的标准接口数据并节省存储空间,也有利于提高基于标准接口数据生成测试用例的效率。可以理解地,将匹配处理结果为匹配不成功的原始接口数据作为新的标准接口数据存储在接口文档库中,以达到根据原始接口数据与接口文档库中的标准接口数据进行匹配处理形成的匹配处理结果,对存储在接口文档库中的标准接口数据进行去重处理的目的。而且,接口文档库中的每一标准接口数据包括较完整且规范的接口参数,其无需通过编写相关接口参数构建新的接口,减少接口参数构建过程中出错的概率。
相应地,若匹配处理结果为匹配成功,则说明接口文档库中存在与原始接口数据对应同一接口的标准接口数据,若将该原始接口数据存储在接口文档库中,会使接口文档库中存储有同一接口对应的至少两个标准接口数据,增大接口文档库中的标准接口数据的维护复杂度。例如,若目标系统对应的接口A中存储有三个标准接口数据A1、A2和A3,在后续对该接口A对应的接口文档进行维护时,需要同时维护标准接口数据A1、A2和A3这三个数据对应的接口文档,导致其接口文档的维护工作量增大。
本实施例所提供的接口数据处理方法中,先从访问数据库中抓取与目标接口参数相对应的原始接口数据,实现快速获取批量包含较完整且规范的接口参数的原始接口数据,以提高原始接口数据的获取效率;将与接口文档库中的标准接口数据进行匹配处理后,获取匹配不成功的匹配处理结果的原始接口数据作为新的标准接口数据存储在接口文档库中,以保证接口文档库中标准接口数据的唯一性,有利于对接口文档库中的标准接口数据进行维护。
在一实施例中,步骤S201中获取的数据抓取任务还包括任务类型,该任务类型用于限定本次数据抓取任务的类型,具体可以为实时任务和定时任务两种类型。相应地,步骤S202中的采用抓包工具从 与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据,具体包括如下步骤:
其一是,若任务类型为实时任务,则触发抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据。
其中,实时任务是指服务器端接收到数据抓取任务之后需即刻进行处理的任务。具体地,服务器端每接收到一数据抓取任务,若该数据抓取任务中的任务类型为实时任务,则直接采用抓包工具从与该数据抓取任务中目标系统标识相对应的访问数据库中,抓取包含所有目标接口参数的原始接口数据,以保证原始接口数据获取的实时性。
其二是,若任务类型为定时任务,则触发时间监控工具监控系统当前时间是否达到数据抓取任务中携带的定时触发时间,若达到定时触发时间,则触发抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据。
其中,定时任务是指服务器端接收到数据抓取任务之后需等待到数据抓取任务中携带的定时触发时间才执行的任务。定时触发时间是用于限定触发服务器端执行数据抓取操作的时间。该定时触发时间是用户自主设置的时间,例如可设置在每周一上午9:00或者其他时间。时间监控工具是用于获取系统当前时间并判断系统当前时间是否达到定时触发时间(即可实现定时监控)的工具。例如,时间监控工具上设置有用于采集系统当前时间的函数。
具体地,服务器端每接收到一数据抓取任务,若该数据抓取任务中的任务类型为定时任务,则触发服务器端预先安装的时间监控工具,以实时监控系统当前时间,在系统当前时间达到数据抓取任务中设定的定时触发时间时,触发抓包工具从与该数据抓取任务中目标系统标识相对应的访问数据库中,抓取包含所有目标接口参数的原始接口数据,以实现快速抓取原始接口数据,且抓取过程无需人工干预,有利于提高原始接口数据的抓取效率。
在一实施例中,如图3所示,步骤S203中的将原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果,具体包括如下步骤:
S301:采用字符串匹配算法,对原始接口数据中的路径和请求方法与接口文档库中的标准接口数据中的路径和请求方法分别进行匹配处理。
由于原始接口数据和标准接口数据均包含请求方法(method)、状态、路径(path)、请求头(head)、请求体(body)、请求时间、响应体、cookies和Host这些接口参数,且在同一目标系统下,路径(path)和请求方法(method)组成的客户端调用服务器端的映入入口,因此,在同一目标系统下,路径(path)和请求方法(method)完全一致就认为是同一接口。为了保障接口文档库中的标准接口数据的唯一性,在将原始接口数据存储到接口文档库时,需将原始接口数据与每一标准接口数据的路径(path)和请求方法(method)是否匹配,即判断两者的路径(path)和请求方法(method)是否相同,以确定其是否为同一接口,从而进行去重处理。
具体地,服务器端采用预先配置的字符串匹配算法对原始接口数据和标准接口数据的路径(path)进行匹配处理,以判断原始接口数据和标准接口数据的路径(path)是否相同;并对原始接口数据和标准接口数据的请求方法(method)进行匹配处理,以判断原始接口数据和标准接口数据的请求方法(method)是否相同,从而完成匹配处理过程。本实施例中,字符串匹配算法可采用但不限于Knuth-Morris-Pratt字符串匹配算法(即KMP算法)。
S302:若路径和请求方法均相同,则获取匹配成功的匹配处理结果。
本实施例中,若原始接口数据和标准接口数据的路径(path)相同,且原始接口数据和标准接口数据的请求方法(method)相同,则认定原始接口数据和标准接口数据为目标系统下同一接口所形成的接口数据,以获取匹配成功的匹配处理结果。
S303:若路径和/或请求方法不相同,则获取匹配不成功的匹配处理结果。
本实施例中,若原始接口数据和标准接口数据的路径(path)不相同,或者原始接口数据和标准接口数据的请求方法(method)不相同,又或者原始接口数据和标准接口数据的路径(path)和请求方法(method)均不相同,则认定原始接口数据和标准接口数据不是目标系统下同一接口所形成的接口数据, 获取匹配不成功的匹配处理结果。
本实施例所提供的接口数据处理方法中,在原始接口数据和标准接口数据的所有接口参数中,只选取用于组合形成客户端调用服务器端的映射入口的路径(path)和请求方法(method)进行匹配处理,可有效简化其匹配处理过程,无需对所有接口参数进行匹配,提高匹配处理效率。
具体地,将原始接口数据作为新的标准接口数据以接口文档形式存储在接口文档库中,还可依据其功能描述中对应的接口名称对接口文档进行命名,以便对接口文档库中的标准接口数据进行规范处理。
在一实施例中,由于接口文档库中存储的所有标准接口数据均包括功能描述、请求方法(method)、URL参数、状态、路径(path)、请求头(head)、请求体(body)、请求时间、响应体和cookies等这些较完整的接口参数,在对标准接口数据所形成的接口文档进行维护过程中,可实现对每一标准接口数据对应的接口参数进行接口改造。如图4所示,在实现对标准接口数据对应的接口进行改造过程中,该接口数据处理方法包括如下步骤:
S401:获取客户端发送的接口改造请求,接口改造请求包括待改造路径和待改造请求方法。
其中,接口改造请求是用于触发服务器端对接口文档库中的标准接口数据进行改造的请求。该待改造路径是指需要改造的接口对应的路径,该待改造请求方法是指需要进行改造的接口对应的请求方法。具体地,服务器端获取客户端发送的接口改造请求,该接口改造请求具体包括待改造路径和待改造请求方法,由于路径和请求方法可唯一确定一接口,因此,根据该待改造路径和待改造请求方法可唯一确定所需进行改造的接口,该接口即为待改造接口。
S402:基于待改造路径和待改造请求方法查询接口文档库,获取待改造接口数据,并将待改造接口数据显示在客户端上。
具体地,服务器端基于待改造路径和待改造请求方法查询接口文档库,由于接口文档库中的每一接口可由其路径和请求方法确定,因此,可根据该待改造路径和待改造请求方法确定其对应的待改造接口,将与待改造路径和待改造请求方法对应的标准接口数据确定为该待改造接口对应的待改造接口数据。本实施例中,服务器端将所获取的待改造接口数据显示客户端的接口编辑界面上,以使开发人员可对该接口编辑界面上显示的待改造接口数据进行修改。
S403:获取客户端基于待改造接口数据形成的参数修改请求,参数修改请求包括待修改参数名和待修改参数值。
其中,待修改参数名具体是指需要进行修改的接口参数的名称,如URL参数或者请求体等。待修改参数值具体是指需要进行修改的接口参数的数值。具体地,在客户端显示待改造接口数据时,该客户端的接口编辑界面上会显示显示接口名称、host、状态码、请求体、参数、流程编号和文件路径这几个接口参数对应的参数输入框,该参数输入框中默认显示标准接口数据对应的接口参数,开发人员可对参数输入框中默认显示的接口参数进行修改,以输入相应的参数修改请求,以实现对待改造接口数据的快速修改。可以理解地,基于客户端显示的待改造接口参数形成参数修改请求,使得其修改过程中修改内容较少,提高修改效率。
S404:基于待修改参数名查询规范数据库,获取与待修改参数名相对应的接口参数编辑规则。
其中,规范数据库是用于存储各接口参数对应的编辑规则的数据库。接口参数编辑规则是服务器端预先配置的用于限定各接口参数的编辑要求的规则。具体地,每一接口参数对应的一接口参数编辑规则,以实现对各接口参数进行规范管理,保证基于接口参数形成的接口数据的可执行性。本实施例中,服务器基于待修改参数名查询规范数据库,获取与该待修改参数名相对应的接口参数编辑规则,以便基于该接口参数编辑规则对待修改参数名对应的接口参数进行规范检测,从而保证接口改造之后形成的更新接口参数的可执行性。
S405:采用接口参数编辑规则对待修改参数值进行规范检测,获取规范检测结果。
具体地,服务器采用与待修改参数名相对应的接口参数编辑规则对待修改参数值进行规范检测,以确定该待修改参数值是否符合相应的接口参数编辑规则的要求,若符合要求,则获取检测通过的规范检测结果;若不符合要求,则获取检测不通过的规范检测结果。本实施例中,每一接口参数编辑规则预先配置一用于实现规范检测的正则表达式,基于该接口参数编辑规则中配置的正则表达式对待修改参数值 进行规范检测,以确定该待修改参数值是否符合接口参数编辑规则的要求。
S406:若规范检测结果为检测通过,则基于待修改参数值对待改造接口数据进行修改,获取改造后的更新接口数据。
本实施例中,若步骤S405中的规范检测结果为检测通过,则说明该待修改参数值符合接口参数编辑规则的要求,此时,可基于该待修改参数值对待改造接口参数进行修改,以获取改造后的更新接口数据。可以理解地,该更新接口数据是指采用符合接口参数编辑规则的待修改接口参数值对待改造接口数据进行修改后形成的接口数据。由于更新接口数据中的每一接口参数均符合相应的接口参数编辑规则,使其改动过程中出错概率较低,提高更新接口数据的准确性和可执行性。
S407:若规范检测结果为检测不通过,则给客户端发送参数不合规的提醒信息。
本实施例中,若步骤S405中的规范检测结果为检测不通过,则说明该待修改参数值不符合接口参数编辑规则的要求,此时,若直接基于该待修改参数值对待改造接口参数进行修改,可能会影响修改后的待改造接口参数的可执行性,使得改动过程中出错的概率较高,因此,需给客户端发送参数不合规的提醒信息,以提醒开发人员进行修改。
本实施例所提供的接口数据处理方法中,先依据待改造路径和待改造请求方法确定其对应的待改造接口数据,并将该待改造接口数据显示在客户端上,以便基于所显示的待改造接口数据进行快速修改。依据参数修改请求中的待修改参数名确定接口参数编辑规则,采用该接口参数编辑规则对待修改参数值进行规范检测,在规范检测结果为检测通过时,获取基于该待修改参数值进行修改,获取更新接口数据,以保证更新接口数据的准确性和可执行性。若规范检测结果为检测不通过时,给客户端反馈提醒信息,以使开发人员基于该提醒信息进行修改,以避免基于不符合接口参数编辑规则的待修改参数值进行修改所导致的出错概率较高且可执行性低的问题。
相应地,本申请实施例还提供一种自动化测试方法,该自动化测试方法可应用在如图1所示的应用环境中。具体地,该用例生成就去应用在自动化测试平台中,该自动化测试平台包括如图1所示的客户端和服务器端,客户端与服务器端通过网络进行通信,用于实现基于接口文档库中的标准接口数据,快速获取目标测试用例,以提高自动化测试的测试效率。
在一实施例中,如图5所示,提供一种自动化测试方法,该自动化测试方法包括自动化生成测试用例,用于提高测试用例的生成效率,以该方法应用在图5中的服务器端为例进行说明,包括如下步骤:
S501:获取客户端发送的用例编辑请求,用例编辑请求包括接口顺序和至少一个接口需求。
其中,用例编辑请求是用于触发服务器端进行测试用例编辑的请求。该用例编辑请求具体为HTTP请求。接口需求是用于描述本次用例编辑请求所需编辑的测试用例所包含的功能的需求。接口顺序是用于限定两个或者两个以上接口需求之间先后顺序的需求。例如,所需编辑的测试用例为淘宝的登录功能,则其接口需求只有登录需求;若所需编辑的测试用例为淘宝的支付功能,则其接口需求依次为登录需求、物品浏览需求、购买车需求、买方信息确认需求和支付需求等五个接口需求。
S502:基于至少一个接口需求查询接口文档库,获取与每一接口需求相对应的标准接口数据,控制客户端显示标准接口数据。
如上实施例所示,接口文档库中存储有多个标准接口数据,每一标准接口数据对应一接口,并且接口文档库中每一标准接口数据可以存储成接口文档形式,并以其功能描述对应的接口名称对接口文档进行命名,以便对接口文档库中的标准接口数据进行规范处理。
具体地,服务器端在接收到用例编辑请求时,可依据该用例编辑请求中的每一接口需求,查询接口文档库中是否存在与该接口需求相匹配的接口名称,若存在与接口需求相匹配的接口名称,则将该接口名称对应的标准接口数据确定为该接口需求对应的标准接口数据,并控制客户端的用例编辑页面显示该标准接口数据,以使测试人员可获知该标准接口数据的接口参数,以便进行修改。相应地,若不存在与接口需求相匹配的接口名称,则需给客户端发送提醒信息,以提醒测试人员编辑与该接口需求相对应的标准接口数据,并将该标准接口数据存储在接口文档库中,以充实接口文档库。
S503:获取客户端发送的接口修改请求,接口修改请求包括目标接口标识和目标修改参数。
其中,接口修改请求是用于触发服务器端进行接口参数修改的请求。该接口修改请求是测试人员通 过客户端对用例编辑页面显示的标准接口数据中的接口参数进行修改的请求。目标接口标识是指本次接口修改请求所要修改的目标接口对应的标识。目标修改参数是指本次接口修改请求所要修改的目标接口对应的接口参数。
具体地,服务器端在从接口文档库中获取到与每一接口需求相对应的标准接口数据时,需控制客户端的用例编辑页面显示该标准接口数据,以使测试人员可获知该标准接口数据的接口参数,以便进行修改。例如,在用例编辑页面上显示的标准接口数据的接口参数时,会显示接口名称、host、状态码、请求体、参数、流程编号和文件路径这几个接口参数对应的参数输入框,该参数输入框中默认显示标准接口数据对应的接口参数,测试人员可对参数输入框中默认显示的接口参数进行修改,以输入相应的接口修改请求,以实现快速修改。例如,根据测试需求,需要对催收接口中的请求体的内容进行修改,则目标接口标识为催收接口对应的标识,目标修改参数为测试人员在请求体这一参数输入框中填写的参数内容,以实现快速修改。一般来说,只有在开发人员修改服务器端的接口等特殊情况时,才需进行人工干预维护标准接口数据中的接口参数,否则可直接调用相应的标准接口数据作为目标接口数据,以提高目标接口数据的获取效率。
S504:基于目标修改参数,对与目标接口标识相对应的标准接口数据进行修改和调试,获取调试成功的目标接口数据。
目标接口数据是指对标准接口数据进行修改和调试后,确定调试成功的目标接口数据,用于保证后续基于目标接口数据生成的测试用例在进行测试时,测试过程不受该目标接口数据对应的接口的影响。即只有调试成功的目标接口数据才可以生成测试用例,以避免后续基于目标接口数据形成的测试用例在自动化测试过程中,因某一接口的目标接口数据出错导致测试用例的自动化测试过程出错,影响自动化测试效率和准确性。
例如,在淘宝查找宝贝功能的自动化测试过程中,需输入不同关键字去搜索不同的宝贝信息,因此,在生成相应的目标测试用例过程中,也需要传入不同的接口参数来达到场景覆盖的目的,因此需要对所确定的标准接口数据中的接口参数进行修改和调试,以使所生成的目标测试用例达到场景覆盖的目的。具体地,基于接口修改请求,对与目标接口标识相对应的标准接口数据进行修改和调试过程包括如下几种情况:
(1)修改数据—>执行失败—>修改数据—>执行成功,获取调试成功的目标接口数据;或者
(2)修改数据—>执行成功,获取调试成功的目标接口数据;或者
(3)修改数据—>执行失败—>修改数据—>执行失败—>修改数据—>N个循环……执行成功,获取调试成功的目标接口数据。
可以理解地,服务器端在获取接口修改请求之后,基于目标修改参数修改数据,执行修改后的数据,获取执行结果;若执行结果为执行失败,则重复执行基于目标修改参数修改数据,执行修改后的数据,获取执行结果这一步骤,直至获取执行结果为执行成功的循环过程即为调试过程,这种调试过程可保障所获取到的每一调试成功的目标接口数据在形成的目标测试用例在自动化测试过程中,不会因为目标接口数据对应的单个接口原因导致测试失败,以保障自动化测试的效率和准确性。
又例如,在模拟用户登录操作流程的测试用例,只需要修改目标接口标识对应的目标接口(即登录接口)中不同的用户名和密码,并根据用户名和密码这些目标修改参数对标准接口数据进行修改和调试,使其登录成功(即调试成功),以获取目标接口数据。相比于其他同类产品中,需要在其用例编辑界面上显示的接口名称、host、状态码、请求体、参数、流程编号和文件路径这几个接口参数对应的参数输入框手动输入所有的接口参数,本实施例中只需对改动的内容进行输入,由于改动的内容少,出错的概率更小,效率也高,调试的过程总体上出错的概率也会少很多。
进一步地,基于目标修改参数,对与目标接口标识相对应的标准接口数据进行修改和调试,具体包括:基于目标修改参数,对目标修改参数进行规范检测;若规范检测通过,则对与目标接口标识相对应的标准接口数据进行修改和调试。可以理解地,对目标修改参数进行规范检测,以使目标修改参数符合标准接口数据中各接口参数的编写规范,以保障自动化测试的顺利进行。
例如,在对标准接口数据中的请求体进行修改的过程中,需对请求体进行规范检测,以保证自动化 测试的顺利进行。在对请求体进行规范检测包括如下几点内容:其一是,请求体的结构类型要和请求头声明的类型相符,如请求头声明json类型,请求体就必须是json类型,否则,服务器端就会返回类型异常的提醒信息,以提醒测试人员进行修改。其二是,请求体的字段要与后端要求的字段一致,缺少必要字段或者字段名不对时,服务器端会返回字段异常的提醒信息,以提醒测试人员进行修改。
S505:依据接口顺序对至少一个目标接口数据进行组合,形成目标测试用例。
具体地,服务器端依据用例编辑请求中的接口顺序,对依据每一接口需求获取到的调试成功的目标接口数据进行组合,以形成可实现特定功能需求的目标测试用例。可以理解地,服务器端在形成目标测试用例后,会将该目标测试用例存储在用例数据库中,使每一目标测试用例对应一用例标识,以便基于该用例标识快速查找到相应的目标测试用例。
由于标准接口数据存储在接口文档库中,可提高该标准接口数据的可复用性,只需一次导入至接口文档库(即通过步骤S201-S204将标准接口数据存储在接口文档库)中,即可被多个目标测试用例重复引用,并可与其他标准接口数据组合形成不同目标测试用例,以提高目标测试用例的生成效率。由于标准接口数据中包含功能描述、请求方法(method)、URL参数、状态、路径(path)、请求头(head)、请求体(body)、请求时间、响应体和cookies等接口参数,这些接口参数构建一个完整且规范可执行的接口,使得基于至少一个接口需求对应的目标接口数据依据其接口顺序进行组合,即可形成新的目标测试用例,提高目标测试用例的生成效率,有助于提高自动化测试的效率。
本实施例所提供的自动化测试方法中,可根据用例编辑请求中每一接口需求查找接口文档库,快速查找到相应的标准接口数据,无需测试人员自行编辑相应的标准接口数据,提高标准接口数据的获取效率。并且,只需通过接口修改请求对标准接口数据中部分接口参数进行修改,改动内容较少,出错概率更低,以提高修改后的目标接口数据的获取效率和准确性。而且,需对修改的标准接口数据进行调试,只基于调试成功的目标接口数据生成目标测试用例,以避免因目标接口数据出错导致所形成的目标测试用例的自动化测试过程出错,从而提高自动化测试效率。基于接口顺序对至少一个目标接口数据进行组合,可快速形成目标测试用例,提高目标测试用例的效率。
在另一实施例中,在形成目标测试用例的步骤之后,自动化测试方法还包括:采用正则表达式匹配算法对目标测试用例中的每一目标接口数据的进行静态文件过滤,获取更新的目标测试用例。
具体地,服务器端预先配置有用于匹配目标接口数据中的静态文件的正则表达式,基于该正则表达式形成的正则表达式匹配算法对目标测试用例中每一目标接口数据进行静态文件过程,以去除目标接口数据中的静态文件,从而获取更新的目标测试用例,即可以减少目标测试用例中的数据量和后续维护的工作量,并可以使后续基于目标测试用例进行自动化测试过程中,排除静态文件的影响,提高自动化测试效率。例如,可采用正则表达式匹配算法对目标接口数据中的URL进行过滤,以去除目标接口数据中存在的静态文件。该静态文件指的是web系统用来渲染客户端页面的Html、CSS和JS之类的文件。
在一实施例中,如图6所示,提供一种自动化测试方法,该自动化测试方法包括基于测试用例进行自动化测试过程,用于提高自动化测试效率。即在形成目标测试用例的步骤之后,自动化测试方法还包括如下步骤:
S601:获取客户端发送的用例测试请求,用例测试请求包括目标用例标识。
其中,用例测试请求是用于触发服务器端自动执行测试用例的请求。该用例测试请求具体为HTTP请求。目标用例标识是用于唯一识别某一目标测试用例的标识。每一用例标识对应的一目标测试用例。
S602:基于目标用例标识查询用例数据库,获取与目标用例标识相对应的目标测试用例,目标测试用例包括接口顺序和至少一个目标接口数据,每一目标接口数据对应一执行对象。
具体地,服务器端在接收到用例测试请求之后,基于该用例测试请求中的目标用例标识查询用例数据库,以获取与目标用例标识相对应的目标测试用例。可以理解地,用例数据库中存储的所有目标测试用例为依据步骤S501-S505所获取的目标测试用例,该包括接口顺序和至少一个目标接口数据,而且,每一目标接口数据对应一执行对象。其中,执行对象是指执行目标测试用例过程中需要访问的对象。例如,在自动化测试过程中,目标测试用例所需访问的对象一般为测试环境db、测试环境服务器端和平台script服务器端。一般来说,自动化测试过程中,目标测试用例主要的作用对象是测试环境服务器 端,而测试环境DB和平台script服务器端只是辅助(一般根据需要手动构建)。
S603:依据接口顺序,依次执行目标接口数据,从与目标接口数据对应的执行对象中获取对应的测试数据。
由于步骤S202中采用抓包工具所抓取的每一原始接口数据均携带有初始数据,将原始接口数据与接口文档库中的标准接口数据进行匹配处理并作为新的标准接口数据存储在接口文档库时,使得每一标准接口数据也携带有初始数据。在步骤S501-S505中基于标准接口数据生成目标测试用例过程中,若没有对标准接口数据进行修改,则其生成的目标测试用例进行自动化测试时就会将默认的初始数据加载进来,以保证自动化测试的顺利进行;若对标准接口数据根据实际情况进行修改,则服务器端对修改后的标准接口数据进行调试,只基于调试成功的目标接口数据形成目标测试用例,使得调试过程中形成的目标接口数据也携带用目标修改参数对应的初始数据,在其生成的目标测试用例进行自动化测试时就会将默认的初始数据加载进来,以保证自动化测试的顺利进行。
一般来说,一个Web系统由前端和后端组成,前端通常为客户端,而后面为服务器端。如上,客户端的访问包括前端访问和后端访问,服务器端配置有一监控工具(具体可为一抓包工具),用于抓取后端访问所形成的后端访问数据。例如,在测试过程中,用户在客户端进行访问后端数据的操作,以实现通过客户端传递到服务器端,则这一操作所形成的后端访问数据会被服务器端配置的监控工具抓取到;相应地,如果用户在客户端进行点击按键只是触发前端的一些操作而没有触发到访问后端的动作,则这些操作无法监控工具(具体可为一抓包工具)抓取到。
在接口自动化测试过程中,主要的测试对象是访问后端的服务,即根据目标测试用例中预先配置的接口顺序,依据执行目标接口数据,完全模拟用户在客户端的操作行为,以使客户端基于该操作行为生成相应的数据包并传递给与目标接口数据对应的执行对象(即后端),以模拟用户的操作行为,获取对应的测试数据。所谓的完全模拟用户在客户端的行为是指依据接口顺序,依次执行目标接口数据,在执行的过程中往后端传递的数据包可以做到与真实用户行为完全一致,以提高接口自动化测试的效率。这种接口自动化测试过程中,相比于其他需要手动构建接口的同类产品,由于接口构建的工作量问题,通常只往接口里传递一些关键的字段,使得后端接收到的数据包与用户操作中传递的数据包有较大差异,使得测试过程中准确性无法得到保障。
可以理解地,在接口自动测试过程中,需保证执行目标测试用例中的每一目标接口数据过程中向后端传递的请求体,与用户实际操作过程中通过客户端向后端发送的请求体相同,以实现自动执行目标测试用例和用户实际操作执行过程产生相同的效果,以保证测试场景的正式性。
S604:基于测试数据,获取目标测试报告。
具体地,服务器端预先存储有测试报告模板,该测试报告模板包括模板框架、设置在模板框架中的测试字段和与每一测试字段相对应的填充区域。服务器端在基于步骤S603获取到测试数据之后,将该测试数据填充到与其相对应的测试字段对应的填充区域中,以获取目标测试报告,此过程可自动化生成目标测试报告,无需人工制作测试报告,提高效率。
本实施例所提供的自动化测试方法中,根据目标用例标识从用例数据库中获取目标测试用例,每一目标测试用例包括接口顺序和至少一个目标接口数据,以实现快速获取较完整且规范的目标接口数据。依据接口顺序,依次执行目标接口数据,以从与目标接口数据对应的执行对象中获取对应的测试数据,由于目标接口数据较完整且规范,使得目标接口数据的执行过程向执行对象传递的数据包与真实用户行为一致,以保证测试过程的准确性和真实性。然后,基于测试数据自动获取目标测试报告,无需人工制作测试报告,提高效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种接口数据处理装置,该接口数据处理装置与上述实施例中接口数据处理方法一一对应。如图7所示,该接口数据处理装置包括数据抓取任务获取模块701、原始接口数据获取模块702、匹配处理结果获取模块703和接口数据存储模块704。各功能模块详细说明如下:
数据抓取任务获取模块701,用于获取数据抓取任务,数据抓取任务包括目标系统标识和目标接口 参数。
原始接口数据获取模块702,用于采用抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据,将原始接口数据存储在原始接口库中。
匹配处理结果获取模块703,用于将原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果。
接口数据存储模块704,用于若匹配处理结果为匹配不成功,则将原始接口数据作为新的标准接口数据存储在接口文档库中。
优选地,数据抓取任务还包括任务类型。
原始接口数据获取模块702包括接口数据实时获取单元和接口数据定时获取单元。
接口数据实时获取单元,用于若任务类型为实时任务,则触发抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据。
接口数据定时获取单元,用于若任务类型为定时任务,则触发时间监控工具监控系统当前时间是否达到数据抓取任务中携带的定时触发时间,若达到定时触发时间,则触发抓包工具从与目标系统标识相对应的访问数据库中,抓取与目标接口参数相对应的原始接口数据。
优选地,匹配处理结果获取模块703包括匹配处理单元、第一处理结果获取单元和第二处理结果获取单元。
匹配处理单元,用于采用字符串匹配算法,对原始接口数据中的路径和请求方法与接口文档库中的标准接口数据中的路径和请求方法分别进行匹配处理。
第一处理结果获取单元,用于若路径和请求方法均相同,则获取匹配成功的匹配处理结果。
第二处理结果获取单元,用于若路径和/或请求方法不相同,则获取匹配不成功的匹配处理结果。
优选地,在接口数据存储模块704之后,接口数据处理装置还包括接口改造请求获取单元、接口改造请求获取单元、参数修改请求获取单元、参数编辑规则获取单元、规范检测结果获取单元、更新接口数据获取单元和提醒信息获取单元。
接口改造请求获取单元,用于获取客户端发送的接口改造请求,接口改造请求包括待改造路径和待改造请求方法。
待改造接口数据显示单元,用于基于待改造路径和待改造请求方法查询接口文档库,获取待改造接口数据,并将待改造接口数据显示在客户端上。
参数修改请求获取单元,用于获取客户端基于待改造接口数据形成的参数修改请求,参数修改请求包括待修改参数名和待修改参数值。
参数编辑规则获取单元,用于基于待修改参数名查询规范数据库,获取与待修改参数名相对应的接口参数编辑规则。
规范检测结果获取单元,用于采用接口参数编辑规则对待修改参数值进行规范检测,获取规范检测结果。
更新接口数据获取单元,用于若规范检测结果为检测通过,则基于待修改参数值对待改造接口数据进行修改,获取改造后的更新接口数据。
提醒信息获取单元,用于若规范检测结果为检测不通过,则给客户端发送参数不合规的提醒信息。
在一实施例中,提供一种自动化测试装置,该自动化测试装置与上述实施例中自动化测试方法一一对应。如图8所示,该自动化测试装置包括用例编辑请求获取模块801、标准接口数据获取模块802、接口修改请求获取模块803、目标接口数据获取模块804和目标测试用例形成模块805。各功能模块详细说明如下:
用例编辑请求获取模块801,用于获取客户端发送的用例编辑请求,用例编辑请求包括接口顺序和至少一个接口需求。
标准接口数据获取模块802,用于基于至少一个接口需求查询接口文档库,获取与每一接口需求相对应的标准接口数据,控制客户端显示标准接口数据。
接口修改请求获取模块803,用于获取客户端发送的接口修改请求,接口修改请求包括目标接口标 识和目标修改参数。
目标接口数据获取模块804,用于基于目标修改参数,对与目标接口标识相对应的标准接口数据进行修改和调试,获取调试成功的目标接口数据。
目标测试用例形成模块805,用于依据接口顺序对至少一个目标接口数据进行组合,形成目标测试用例。
优选地,在目标接口数据获取模块804之后,自动化测试装置还包括静态文件过滤处理模块,用于采用正则表达式匹配算法对目标测试用例中的每一目标接口数据的进行静态文件过滤,获取更新的目标测试用例。
在目标接口数据获取模块804之后,自动化测试装置还包括用例测试请求获取模块、目标测试用例获取模块、测试数据获取模块和目标测试报告获取模块。
用例测试请求获取模块,用于获取客户端发送的用例测试请求,用例测试请求包括目标用例标识。
目标测试用例获取模块,用于基于目标用例标识查询用例数据库,获取与目标用例标识相对应的目标测试用例,目标测试用例包括接口顺序和至少一个目标接口数据,每一目标接口数据对应一执行对象。
测试数据获取模块,用于依据接口顺序,依次执行目标接口数据,从与目标接口数据对应的执行对象中获取对应的测试数据。
目标测试报告获取模块,用于基于测试数据,获取目标测试报告。
关于接口数据处理装置或者自动化测试装置的具体限定可以参见上文中对于接口数据处理方法或者自动化测试方法的限定,在此不再赘述。上述接口数据处理装置或者自动化测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储执行接口数据处理方法或者自动化测试方法过程中应用或者生成的数据,如标准接口数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现上述实施例所提供的接口数据处理方法或者自动化测试方法。
在一个实施例中,一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现上述实施例中接口数据处理方法的步骤,例如图2所示的步骤S201-S204,或者图3所示的步骤,为避免重复,这里不再赘述。或者,处理器执行计算机可读指令时实现接口数据处理装置这一实施例中的各模块/单元的功能,例如图7所示的数据抓取任务获取模块701、原始接口数据获取模块702、匹配处理结果获取模块703和接口数据存储模块704的功能,为避免重复,这里不再赘述。本实施例中的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中自动化测试方法的步骤,例如图5所示的步骤S501-S505,或者图6所示的步骤,为避免重复,这里不再赘述。或者,处理器执行计算机可读指令时实现自动化测试装置这一实施例中的各模块/单元的功能,例如图8所示的用例编辑请求获取模块801、标准接口数据获取模块802、接口修改请求获取模块803、目标接口数据获取模块804和目标测试用例形成模块805的功能,为避免重复,这里不再赘述。
在一实施例中,提供一计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述实施例中接口数据处理方法的步骤,例如图2所示的步骤S201-S204,或者图3和图4所示的步骤,为避免重复,这里不再赘述。或者,该计算机可读指令被处 理器执行时实现上述接口数据处理装置这一实施例中的各模块/单元的功能,例如图7所示的数据抓取任务获取模块701、原始接口数据获取模块702、匹配处理结果获取模块703和接口数据存储模块704的功能,为避免重复,这里不再赘述。
在一实施例中,提供一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现上述实施例中自动化测试方法的步骤,例如图5所示的步骤S501-S505,或者图6所示的步骤,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现上述自动化测试装置这一实施例中的各模块/单元的功能,例如图8所示的用例编辑请求获取模块801、标准接口数据获取模块802、接口修改请求获取模块803、目标接口数据获取模块804和目标测试用例形成模块805的功能,为避免重复,这里不再赘述。本实施例中的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一非易失性可读存储介质也可以存储在易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种接口数据处理方法,其特征在于,包括:
    获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
    采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
    将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
    若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
  2. 如权利要求1所述的接口数据处理方法,其特征在于,所述将所述原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果,包括:
    采用字符串匹配算法,对所述原始接口数据中的路径和请求方法与接口文档库中的标准接口数据中的路径和请求方法分别进行匹配处理;
    若所述路径和所述请求方法均相同,则获取匹配成功的匹配处理结果;
    若所述路径和/或所述请求方法不相同,则获取匹配不成功的匹配处理结果。
  3. 如权利要求1所述的接口数据处理方法,其特征在于,在所述将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中的步骤之后,所述接口数据处理方法还包括:
    获取客户端发送的接口改造请求,所述接口改造请求包括待改造路径和待改造请求方法;
    基于所述待改造路径和所述待改造请求方法查询接口文档库,获取待改造接口数据,并将所述待改造接口数据显示在所述客户端上;
    获取所述客户端基于所述待改造接口数据形成的参数修改请求,所述参数修改请求包括待修改参数名和待修改参数值;
    基于所述待修改参数名查询规范数据库,获取与所述待修改参数名相对应的接口参数编辑规则;
    采用所述接口参数编辑规则对所述待修改参数值进行规范检测,获取规范检测结果;
    若所述规范检测结果为检测通过,则基于所述待修改参数值对所述待改造接口数据进行修改,获取改造后的更新接口数据;
    若所述规范检测结果为检测不通过,则给所述客户端发送参数不合规的提醒信息。
  4. 一种自动化测试方法,其特征在于,包括:
    获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
    基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
    获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
    基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
    依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
  5. 如权利要求4所述的自动化测试方法,其特征在于,在所述形成目标测试用例的步骤之后,所述自动化测试方法还包括:
    采用正则表达式匹配算法对所述目标测试用例中的每一目标接口数据的进行静态文件过滤,获取更新的目标测试用例。
  6. 如权利要求4所述的自动化测试方法,其特征在于,在所述形成目标测试用例的步骤之后,所述自动化测试方法还包括:
    获取客户端发送的用例测试请求,所述用例测试请求包括目标用例标识;
    基于所述目标用例标识查询用例数据库,获取与所述目标用例标识相对应的目标测试用例,所述目标测试用例包括接口顺序和至少一个目标接口数据,每一所述目标接口数据对应一执行对象;
    依据所述接口顺序,依次执行所述目标接口数据,从与所述目标接口数据对应的执行对象中获取对应的测试数据;
    基于所述测试数据,获取目标测试报告。
  7. 一种接口数据处理装置,其特征在于,包括:
    数据抓取任务获取模块,用于获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
    原始接口数据获取模块,用于采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
    匹配处理结果获取模块,用于将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
    接口数据存储模块,用于若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
  8. 一种自动化测试装置,其特征在于,包括:
    用例编辑请求获取模块,用于获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
    标准接口数据获取模块,用于基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
    接口修改请求获取模块,用于获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
    目标接口数据获取模块,用于基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
    目标测试用例形成模块,用于依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
    采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
    将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
    若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
  10. 如权利要求9所述的计算机设备,其特征在于,所述将所述原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果,包括:
    采用字符串匹配算法,对所述原始接口数据中的路径和请求方法与接口文档库中的标准接口数据中的路径和请求方法分别进行匹配处理;
    若所述路径和所述请求方法均相同,则获取匹配成功的匹配处理结果;
    若所述路径和/或所述请求方法不相同,则获取匹配不成功的匹配处理结果。
  11. 如权利要求9所述的计算机设备,其特征在于,在所述将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取客户端发送的接口改造请求,所述接口改造请求包括待改造路径和待改造请求方法;
    基于所述待改造路径和所述待改造请求方法查询接口文档库,获取待改造接口数据,并将所述待改造接口数据显示在所述客户端上;
    获取所述客户端基于所述待改造接口数据形成的参数修改请求,所述参数修改请求包括待修改参数名和待修改参数值;
    基于所述待修改参数名查询规范数据库,获取与所述待修改参数名相对应的接口参数编辑规则;
    采用所述接口参数编辑规则对所述待修改参数值进行规范检测,获取规范检测结果;
    若所述规范检测结果为检测通过,则基于所述待修改参数值对所述待改造接口数据进行修改,获取改造后的更新接口数据;
    若所述规范检测结果为检测不通过,则给所述客户端发送参数不合规的提醒信息。
  12. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
    基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
    获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
    基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
    依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
  13. 如权利要求12所述的计算机设备,其特征在于,在所述形成目标测试用例的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    采用正则表达式匹配算法对所述目标测试用例中的每一目标接口数据的进行静态文件过滤,获取更新的目标测试用例。
  14. 如权利要求12所述的计算机设备,其特征在于,在所述形成目标测试用例的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取客户端发送的用例测试请求,所述用例测试请求包括目标用例标识;
    基于所述目标用例标识查询用例数据库,获取与所述目标用例标识相对应的目标测试用例,所述目标测试用例包括接口顺序和至少一个目标接口数据,每一所述目标接口数据对应一执行对象;
    依据所述接口顺序,依次执行所述目标接口数据,从与所述目标接口数据对应的执行对象中获取对应的测试数据;
    基于所述测试数据,获取目标测试报告。
  15. 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取数据抓取任务,所述数据抓取任务包括目标系统标识和目标接口参数;
    采用抓包工具从与所述目标系统标识相对应的访问数据库中,抓取与所述目标接口参数相对应的原始接口数据,将所述原始接口数据存储在原始接口库中;
    将所述原始接口库中的原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果;
    若所述匹配处理结果为匹配不成功,则将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中。
  16. 如权利要求15所述的可读存储介质,其特征在于,所述将所述原始接口数据与接口文档库中的标准接口数据进行匹配处理,获取匹配处理结果,包括:
    采用字符串匹配算法,对所述原始接口数据中的路径和请求方法与接口文档库中的标准接口数据中的路径和请求方法分别进行匹配处理;
    若所述路径和所述请求方法均相同,则获取匹配成功的匹配处理结果;
    若所述路径和/或所述请求方法不相同,则获取匹配不成功的匹配处理结果。
  17. 如权利要求15所述的可读存储介质,其特征在于,在所述将所述原始接口数据作为新的标准接口数据存储在所述接口文档库中的步骤之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取客户端发送的接口改造请求,所述接口改造请求包括待改造路径和待改造请求方法;
    基于所述待改造路径和所述待改造请求方法查询接口文档库,获取待改造接口数据,并将所述待改造接口数据显示在所述客户端上;
    获取所述客户端基于所述待改造接口数据形成的参数修改请求,所述参数修改请求包括待修改参数名和待修改参数值;
    基于所述待修改参数名查询规范数据库,获取与所述待修改参数名相对应的接口参数编辑规则;
    采用所述接口参数编辑规则对所述待修改参数值进行规范检测,获取规范检测结果;
    若所述规范检测结果为检测通过,则基于所述待修改参数值对所述待改造接口数据进行修改,获取改造后的更新接口数据;
    若所述规范检测结果为检测不通过,则给所述客户端发送参数不合规的提醒信息。
  18. 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取客户端发送的用例编辑请求,所述用例编辑请求包括接口顺序和至少一个接口需求;
    基于至少一个所述接口需求查询接口文档库,获取与每一所述接口需求相对应的标准接口数据,控制所述客户端显示所述标准接口数据;
    获取客户端发送的接口修改请求,所述接口修改请求包括目标接口标识和目标修改参数;
    基于所述目标修改参数,对与所述目标接口标识相对应的所述标准接口数据进行修改和调试,获取调试成功的目标接口数据;
    依据所述接口顺序对至少一个所述目标接口数据进行组合,形成目标测试用例。
  19. 如权利要求18所述的可读存储介质,其特征在于,在所述形成目标测试用例的步骤之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    采用正则表达式匹配算法对所述目标测试用例中的每一目标接口数据的进行静态文件过滤,获取更新的目标测试用例。
  20. 如权利要求18所述的可读存储介质,其特征在于,在所述形成目标测试用例的步骤之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取客户端发送的用例测试请求,所述用例测试请求包括目标用例标识;
    基于所述目标用例标识查询用例数据库,获取与所述目标用例标识相对应的目标测试用例,所述目标测试用例包括接口顺序和至少一个目标接口数据,每一所述目标接口数据对应一执行对象;
    依据所述接口顺序,依次执行所述目标接口数据,从与所述目标接口数据对应的执行对象中获取对应的测试数据;
    基于所述测试数据,获取目标测试报告。
PCT/CN2019/120593 2018-12-15 2019-11-25 接口数据处理方法、自动化测试方法、装置、设备和介质 WO2020119434A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811536551.4 2018-12-15
CN201811536551.4A CN109766262B (zh) 2018-12-15 2018-12-15 接口数据处理方法、自动化测试方法、装置、设备和介质

Publications (1)

Publication Number Publication Date
WO2020119434A1 true WO2020119434A1 (zh) 2020-06-18

Family

ID=66451902

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120593 WO2020119434A1 (zh) 2018-12-15 2019-11-25 接口数据处理方法、自动化测试方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN109766262B (zh)
WO (1) WO2020119434A1 (zh)

Cited By (53)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625473A (zh) * 2020-07-01 2020-09-04 北京字节跳动网络技术有限公司 接口测试用例生成方法、装置、存储介质和电子设备
CN111723019A (zh) * 2020-06-28 2020-09-29 深圳壹账通智能科技有限公司 接口的调试方法及系统
CN111767180A (zh) * 2020-06-29 2020-10-13 西安易朴通讯技术有限公司 压力测试方法、装置、设备和存储介质
CN111773728A (zh) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 数据表测试方法、装置、设备及存储介质
CN111984713A (zh) * 2020-06-29 2020-11-24 五八到家有限公司 一种数据处理方法、装置、设备和存储介质
CN111984228A (zh) * 2020-07-09 2020-11-24 招联消费金融有限公司 一种接口文档的处理方法、装置、计算机设备和存储介质
CN112000579A (zh) * 2020-08-26 2020-11-27 上海移远通信技术股份有限公司 一种软件接口测试方法、系统、设备及介质
CN112052161A (zh) * 2020-08-06 2020-12-08 中信银行股份有限公司 一种接口测试方法、装置、电子设备及介质
CN112115058A (zh) * 2020-09-25 2020-12-22 建信金融科技有限责任公司 测试方法及装置、测试用例生成方法及装置、测试系统
CN112131134A (zh) * 2020-10-14 2020-12-25 深圳壹账通智能科技有限公司 Ipo项目的时间点触发测试方法、装置、设备和存储介质
CN112131127A (zh) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 接口测试方法、装置、系统及电子设备
CN112199300A (zh) * 2020-11-13 2021-01-08 新华三大数据技术有限公司 一种接口测试方法、装置、电子设备及存储介质
CN112291300A (zh) * 2020-09-24 2021-01-29 南阳柯丽尔科技有限公司 一种富文本文件的上传方法及装置
CN112346973A (zh) * 2020-11-06 2021-02-09 深圳前海微众银行股份有限公司 测试方法、装置、设备及存储介质
CN112506769A (zh) * 2020-12-04 2021-03-16 数字广东网络建设有限公司 基于接口文档的请求体生成方法、装置和计算机设备
CN112559321A (zh) * 2020-11-18 2021-03-26 贝壳技术有限公司 准入测试用例确定方法、系统、电子设备和存储介质
CN112711538A (zh) * 2020-12-30 2021-04-27 招商局金融科技有限公司 测试系统模拟方法、装置、计算机设备及存储介质
CN112835809A (zh) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 一种基于浏览器的测试数据设置方法、装置、设备及介质
CN112948195A (zh) * 2021-03-31 2021-06-11 建信金融科技有限责任公司 接口测试的方法、装置、电子设备和存储介质
CN113128192A (zh) * 2021-04-06 2021-07-16 国网湖北省电力有限公司检修公司 输变电检测试验数据现场交互与集中管控方法
CN113127347A (zh) * 2021-04-14 2021-07-16 广联达科技股份有限公司 一种接口测试方法、装置、设备及可读存储介质
CN113238886A (zh) * 2021-05-12 2021-08-10 深圳前海微众银行股份有限公司 功能服务的测试方法、系统以及终端设备
CN113342667A (zh) * 2021-06-18 2021-09-03 杭州网易再顾科技有限公司 数据处理方法、装置、电子设备以及计算机可读存储介质
CN113342664A (zh) * 2021-06-16 2021-09-03 北京奇艺世纪科技有限公司 拨测方法、装置、存储介质及计算机设备
CN113407444A (zh) * 2021-06-03 2021-09-17 中科曙光国际信息产业有限公司 一种接口的测试用例生成方法、装置、设备及存储介质
CN113470731A (zh) * 2021-05-31 2021-10-01 成都佰维存储科技有限公司 Apst功能的测试方法、装置、可读存储介质及电子设备
CN113489650A (zh) * 2021-06-30 2021-10-08 中国平安人寿保险股份有限公司 客户端的路由方法、装置、设备及存储介质
CN113535832A (zh) * 2021-06-10 2021-10-22 杭州未名信科科技有限公司 云服务数据的获取方法、装置、电子设备及介质
CN113672520A (zh) * 2021-09-08 2021-11-19 京东科技控股股份有限公司 测试案例的生成方法、装置、电子设备及存储介质
CN113704123A (zh) * 2021-08-31 2021-11-26 平安银行股份有限公司 接口测试方法、装置、设备以及存储介质
CN113726854A (zh) * 2021-07-30 2021-11-30 联合汽车电子有限公司 一种信息处理方法、装置、存储介质、调试设备及车辆
CN113760707A (zh) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 接口测试方法、装置、设备及计算机可读存储介质
CN113760722A (zh) * 2021-01-13 2021-12-07 北京京东振世信息技术有限公司 测试系统和测试方法
CN113760697A (zh) * 2020-07-15 2021-12-07 北京沃东天骏信息技术有限公司 接口测试的方法、装置、电子设备和存储介质
CN113760708A (zh) * 2020-09-25 2021-12-07 北京沃东天骏信息技术有限公司 自动化测试方法及装置
CN113760716A (zh) * 2020-11-23 2021-12-07 北京沃东天骏信息技术有限公司 接口测试的方法和工具、服务编排流程引擎及存储介质
CN113806150A (zh) * 2021-08-16 2021-12-17 济南浪潮数据技术有限公司 一种存储服务器远程测试的方法、系统、设备和存储介质
CN113850042A (zh) * 2021-08-23 2021-12-28 深圳市紫光同创电子有限公司 基于可编程逻辑器件的并发调试方法及系统
CN114003491A (zh) * 2021-10-15 2022-02-01 赛轮集团股份有限公司 试验设备参数修改方法、装置、电子设备及存储介质
CN114077449A (zh) * 2020-08-20 2022-02-22 网联清算有限公司 数据库服务器的测试方法、装置、电子设备和存储介质
CN114205273A (zh) * 2020-08-26 2022-03-18 腾讯科技(深圳)有限公司 系统测试方法、装置和设备及计算机存储介质
CN114201213A (zh) * 2021-12-15 2022-03-18 北京达佳互联信息技术有限公司 接口文档同步方法、装置、电子设备及存储介质
CN114666258A (zh) * 2022-03-22 2022-06-24 阿波罗智联(北京)科技有限公司 接口测试方法、装置、电子设备和介质
CN114676067A (zh) * 2022-05-26 2022-06-28 武汉迎风聚智科技有限公司 一种测试脚本的参数化处理方法以及装置
CN114676062A (zh) * 2022-04-06 2022-06-28 北京百度网讯科技有限公司 用于接口的差异数据测试方法及装置、电子设备和介质
CN114997831A (zh) * 2022-06-14 2022-09-02 中国银行股份有限公司 一种客户端的协同管理方法及装置
CN115065627A (zh) * 2022-05-20 2022-09-16 北京奇艺世纪科技有限公司 参数修改方法、装置、电子设备及存储介质
CN115665286A (zh) * 2022-12-26 2023-01-31 深圳红途科技有限公司 接口聚类方法、装置、计算机设备及存储介质
CN115809201A (zh) * 2022-12-23 2023-03-17 广州市保伦电子有限公司 一种基于二维表的接口测试控制方法、装置、设备及介质
CN116881064A (zh) * 2023-09-06 2023-10-13 Tcl通讯科技(成都)有限公司 终端测试方法、装置、设备和存储介质
CN117130941A (zh) * 2023-10-24 2023-11-28 易方信息科技股份有限公司 基于浏览器插件的接口自动化方法、系统、设备及介质
CN117472764A (zh) * 2023-11-03 2024-01-30 深圳市移卡科技有限公司 一种测试用例平台管理方法、装置及相关介质
CN117931666A (zh) * 2024-01-26 2024-04-26 中国人民解放军军事科学院系统工程研究院 一种软件无线电通信设备核心框架测试系统及方法

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766262B (zh) * 2018-12-15 2022-05-06 深圳壹账通智能科技有限公司 接口数据处理方法、自动化测试方法、装置、设备和介质
CN110309048A (zh) * 2019-05-21 2019-10-08 深圳壹账通智能科技有限公司 基于模拟端口改进软件集成系统的方法及相关设备
CN110377463A (zh) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 接口测试方法、装置、终端及计算机可读存储介质
CN110704143A (zh) * 2019-08-14 2020-01-17 中国平安财产保险股份有限公司 页面的生成方法和装置
CN110750442B (zh) * 2019-09-06 2022-08-19 深圳平安医疗健康科技服务有限公司 测试用例的生成方法、装置、设备及存储介质
CN111045895B (zh) * 2019-12-16 2024-02-23 深圳市前海随手财富管理有限公司 一种验证结果的监控处理方法、装置、设备和存储介质
CN111221742B (zh) * 2020-01-19 2024-06-07 中国平安人寿保险股份有限公司 一种测试案例的更新方法、装置、存储介质和服务器
CN111427774A (zh) * 2020-03-09 2020-07-17 深圳开源互联网安全技术有限公司 用于应用程序测试实例的请求参数修改方法及系统
CN111338969A (zh) * 2020-03-23 2020-06-26 深圳开源互联网安全技术有限公司 基于正则动态匹配请求参数并修改的方法及系统
CN112100058A (zh) * 2020-08-19 2020-12-18 展讯半导体(南京)有限公司 一种接口规范检测方法及其装置
CN112416419A (zh) * 2020-11-16 2021-02-26 北京五八信息技术有限公司 一种数据的处理方法和装置
CN112380820A (zh) * 2020-11-17 2021-02-19 深圳壹账通智能科技有限公司 数据自动回填方法、装置、电子设备及计算机存储介质
CN112559350A (zh) * 2020-12-16 2021-03-26 杭州数梦工场科技有限公司 前端开发页面的调试方法、装置、设备及存储介质
CN112612706A (zh) * 2020-12-25 2021-04-06 深圳市彬讯科技有限公司 自动化测试方法、计算机设备及存储介质
CN112711505B (zh) * 2020-12-30 2024-03-19 招商局金融科技有限公司 测试数据获取方法、装置、计算机设备及存储介质
CN112287201A (zh) * 2020-12-31 2021-01-29 北京精准沟通传媒科技股份有限公司 对爬虫的请求去重的方法、装置、介质以及电子设备
CN113220584B (zh) * 2021-05-26 2024-07-16 京东科技控股股份有限公司 页面测试方法、装置、计算机设备和可读存储介质
CN113360300B (zh) * 2021-06-29 2023-10-24 北京思普艾斯科技有限公司 接口调用链路生成方法、装置、设备及可读存储介质
CN113608995A (zh) * 2021-06-30 2021-11-05 未鲲(上海)科技服务有限公司 一种造数方法、装置、计算机设备及存储介质
CN113704133A (zh) * 2021-09-10 2021-11-26 广西东信易通科技有限公司 一种接口测试的组织方法、系统及计算机设备
CN114064491A (zh) * 2021-11-18 2022-02-18 中国银行股份有限公司 测试数据的更新方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991040A (zh) * 2016-07-20 2017-07-28 平安科技(深圳)有限公司 数据接口测试方法和装置
CN107908542A (zh) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 测试用例创建方法、装置、计算机设备及存储介质
CN108427631A (zh) * 2017-02-14 2018-08-21 北京京东尚科信息技术有限公司 一种应用测试系统、方法、电子设备和可读存储介质
CN109766262A (zh) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 接口数据处理方法、自动化测试方法、装置、设备和介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499002A (zh) * 2008-02-02 2009-08-05 阿里巴巴集团控股有限公司 一种生成接口文档的方法、系统和装置
CN103164270B (zh) * 2011-12-12 2017-08-04 阿里巴巴集团控股有限公司 java系统应用程序编程接口调用方法及系统
FR3014576B1 (fr) * 2013-12-10 2018-02-16 Mbda France Procede et systeme d'aide a la verification et a la validation d'une chaine d'algorithmes
US20170223136A1 (en) * 2016-01-29 2017-08-03 AppDynamics, Inc. Any Web Page Reporting and Capture
CN108446190B (zh) * 2017-02-16 2021-08-17 杭州海康威视数字技术股份有限公司 接口测试方法及装置
CN107908540B (zh) * 2017-07-26 2021-04-06 平安壹钱包电子商务有限公司 测试用例创建方法、装置、计算机设备及介质
CN108829574B (zh) * 2018-04-13 2023-04-18 深圳壹账通智能科技有限公司 测试数据铺设方法、测试服务器及计算机可读存储介质
CN108710569A (zh) * 2018-05-09 2018-10-26 深圳壹账通智能科技有限公司 测试案例生成方法、数据生成方法、装置、设备及介质
CN108664665A (zh) * 2018-05-22 2018-10-16 深圳壹账通智能科技有限公司 数据格式转化方法、装置、设备及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991040A (zh) * 2016-07-20 2017-07-28 平安科技(深圳)有限公司 数据接口测试方法和装置
CN108427631A (zh) * 2017-02-14 2018-08-21 北京京东尚科信息技术有限公司 一种应用测试系统、方法、电子设备和可读存储介质
CN107908542A (zh) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 测试用例创建方法、装置、计算机设备及存储介质
CN109766262A (zh) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 接口数据处理方法、自动化测试方法、装置、设备和介质

Cited By (79)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723019A (zh) * 2020-06-28 2020-09-29 深圳壹账通智能科技有限公司 接口的调试方法及系统
CN111767180A (zh) * 2020-06-29 2020-10-13 西安易朴通讯技术有限公司 压力测试方法、装置、设备和存储介质
CN111984713A (zh) * 2020-06-29 2020-11-24 五八到家有限公司 一种数据处理方法、装置、设备和存储介质
CN111625473B (zh) * 2020-07-01 2023-08-22 北京字节跳动网络技术有限公司 接口测试用例生成方法、装置、存储介质和电子设备
CN111625473A (zh) * 2020-07-01 2020-09-04 北京字节跳动网络技术有限公司 接口测试用例生成方法、装置、存储介质和电子设备
CN111773728A (zh) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 数据表测试方法、装置、设备及存储介质
CN111984228A (zh) * 2020-07-09 2020-11-24 招联消费金融有限公司 一种接口文档的处理方法、装置、计算机设备和存储介质
CN111984228B (zh) * 2020-07-09 2023-12-12 招联消费金融有限公司 一种接口文档的处理方法、装置、计算机设备和存储介质
CN113760697A (zh) * 2020-07-15 2021-12-07 北京沃东天骏信息技术有限公司 接口测试的方法、装置、电子设备和存储介质
CN112052161B (zh) * 2020-08-06 2024-05-28 中信银行股份有限公司 一种接口测试方法、装置、电子设备及介质
CN112052161A (zh) * 2020-08-06 2020-12-08 中信银行股份有限公司 一种接口测试方法、装置、电子设备及介质
CN114077449B (zh) * 2020-08-20 2023-08-01 网联清算有限公司 数据库服务器的测试方法、装置、电子设备和存储介质
CN114077449A (zh) * 2020-08-20 2022-02-22 网联清算有限公司 数据库服务器的测试方法、装置、电子设备和存储介质
CN112000579B (zh) * 2020-08-26 2024-03-19 上海移远通信技术股份有限公司 一种软件接口测试方法、系统、设备及介质
CN112000579A (zh) * 2020-08-26 2020-11-27 上海移远通信技术股份有限公司 一种软件接口测试方法、系统、设备及介质
CN114205273B (zh) * 2020-08-26 2023-09-15 腾讯科技(深圳)有限公司 系统测试方法、装置和设备及计算机存储介质
CN114205273A (zh) * 2020-08-26 2022-03-18 腾讯科技(深圳)有限公司 系统测试方法、装置和设备及计算机存储介质
CN113760707A (zh) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 接口测试方法、装置、设备及计算机可读存储介质
CN112291300B (zh) * 2020-09-24 2022-12-06 南阳柯丽尔科技有限公司 一种富文本文件的上传方法及装置
CN112291300A (zh) * 2020-09-24 2021-01-29 南阳柯丽尔科技有限公司 一种富文本文件的上传方法及装置
CN112115058A (zh) * 2020-09-25 2020-12-22 建信金融科技有限责任公司 测试方法及装置、测试用例生成方法及装置、测试系统
CN113760708A (zh) * 2020-09-25 2021-12-07 北京沃东天骏信息技术有限公司 自动化测试方法及装置
CN112115058B (zh) * 2020-09-25 2024-03-29 建信金融科技有限责任公司 测试方法及装置、测试用例生成方法及装置、测试系统
CN112131127A (zh) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 接口测试方法、装置、系统及电子设备
CN112131127B (zh) * 2020-09-28 2024-04-16 北京同邦卓益科技有限公司 接口测试方法、装置、系统及电子设备
CN112131134A (zh) * 2020-10-14 2020-12-25 深圳壹账通智能科技有限公司 Ipo项目的时间点触发测试方法、装置、设备和存储介质
CN112346973A (zh) * 2020-11-06 2021-02-09 深圳前海微众银行股份有限公司 测试方法、装置、设备及存储介质
CN112199300A (zh) * 2020-11-13 2021-01-08 新华三大数据技术有限公司 一种接口测试方法、装置、电子设备及存储介质
CN112199300B (zh) * 2020-11-13 2022-08-19 新华三大数据技术有限公司 一种接口测试方法、装置、电子设备及存储介质
CN112559321A (zh) * 2020-11-18 2021-03-26 贝壳技术有限公司 准入测试用例确定方法、系统、电子设备和存储介质
CN113760716A (zh) * 2020-11-23 2021-12-07 北京沃东天骏信息技术有限公司 接口测试的方法和工具、服务编排流程引擎及存储介质
CN112506769A (zh) * 2020-12-04 2021-03-16 数字广东网络建设有限公司 基于接口文档的请求体生成方法、装置和计算机设备
CN112711538B (zh) * 2020-12-30 2024-03-19 招商局金融科技有限公司 测试系统模拟方法、装置、计算机设备及存储介质
CN112711538A (zh) * 2020-12-30 2021-04-27 招商局金融科技有限公司 测试系统模拟方法、装置、计算机设备及存储介质
CN113760722A (zh) * 2021-01-13 2021-12-07 北京京东振世信息技术有限公司 测试系统和测试方法
CN112835809A (zh) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 一种基于浏览器的测试数据设置方法、装置、设备及介质
CN112948195A (zh) * 2021-03-31 2021-06-11 建信金融科技有限责任公司 接口测试的方法、装置、电子设备和存储介质
CN113128192A (zh) * 2021-04-06 2021-07-16 国网湖北省电力有限公司检修公司 输变电检测试验数据现场交互与集中管控方法
CN113127347B (zh) * 2021-04-14 2024-02-13 广联达科技股份有限公司 一种接口测试方法、装置、设备及可读存储介质
CN113127347A (zh) * 2021-04-14 2021-07-16 广联达科技股份有限公司 一种接口测试方法、装置、设备及可读存储介质
CN113238886A (zh) * 2021-05-12 2021-08-10 深圳前海微众银行股份有限公司 功能服务的测试方法、系统以及终端设备
CN113470731B (zh) * 2021-05-31 2023-11-21 成都佰维存储科技有限公司 Apst功能的测试方法、装置、可读存储介质及电子设备
CN113470731A (zh) * 2021-05-31 2021-10-01 成都佰维存储科技有限公司 Apst功能的测试方法、装置、可读存储介质及电子设备
CN113407444A (zh) * 2021-06-03 2021-09-17 中科曙光国际信息产业有限公司 一种接口的测试用例生成方法、装置、设备及存储介质
CN113407444B (zh) * 2021-06-03 2022-11-25 中科曙光国际信息产业有限公司 一种接口的测试用例生成方法、装置、设备及存储介质
CN113535832A (zh) * 2021-06-10 2021-10-22 杭州未名信科科技有限公司 云服务数据的获取方法、装置、电子设备及介质
CN113342664B (zh) * 2021-06-16 2023-09-01 北京奇艺世纪科技有限公司 拨测方法、装置、存储介质及计算机设备
CN113342664A (zh) * 2021-06-16 2021-09-03 北京奇艺世纪科技有限公司 拨测方法、装置、存储介质及计算机设备
CN113342667A (zh) * 2021-06-18 2021-09-03 杭州网易再顾科技有限公司 数据处理方法、装置、电子设备以及计算机可读存储介质
CN113489650B (zh) * 2021-06-30 2022-10-21 中国平安人寿保险股份有限公司 客户端的路由方法、装置、设备及存储介质
CN113489650A (zh) * 2021-06-30 2021-10-08 中国平安人寿保险股份有限公司 客户端的路由方法、装置、设备及存储介质
CN113726854A (zh) * 2021-07-30 2021-11-30 联合汽车电子有限公司 一种信息处理方法、装置、存储介质、调试设备及车辆
CN113726854B (zh) * 2021-07-30 2024-05-31 联合汽车电子有限公司 一种信息处理方法、装置、存储介质、调试设备及车辆
CN113806150A (zh) * 2021-08-16 2021-12-17 济南浪潮数据技术有限公司 一种存储服务器远程测试的方法、系统、设备和存储介质
CN113806150B (zh) * 2021-08-16 2024-02-13 济南浪潮数据技术有限公司 一种存储服务器远程测试的方法、系统、设备和存储介质
CN113850042B (zh) * 2021-08-23 2024-04-30 深圳市紫光同创电子有限公司 基于可编程逻辑器件的并发调试方法及系统
CN113850042A (zh) * 2021-08-23 2021-12-28 深圳市紫光同创电子有限公司 基于可编程逻辑器件的并发调试方法及系统
CN113704123B (zh) * 2021-08-31 2024-04-23 平安银行股份有限公司 接口测试方法、装置、设备以及存储介质
CN113704123A (zh) * 2021-08-31 2021-11-26 平安银行股份有限公司 接口测试方法、装置、设备以及存储介质
CN113672520A (zh) * 2021-09-08 2021-11-19 京东科技控股股份有限公司 测试案例的生成方法、装置、电子设备及存储介质
CN114003491A (zh) * 2021-10-15 2022-02-01 赛轮集团股份有限公司 试验设备参数修改方法、装置、电子设备及存储介质
CN114201213A (zh) * 2021-12-15 2022-03-18 北京达佳互联信息技术有限公司 接口文档同步方法、装置、电子设备及存储介质
CN114666258A (zh) * 2022-03-22 2022-06-24 阿波罗智联(北京)科技有限公司 接口测试方法、装置、电子设备和介质
CN114666258B (zh) * 2022-03-22 2023-11-07 阿波罗智联(北京)科技有限公司 接口测试方法、装置、电子设备和介质
CN114676062A (zh) * 2022-04-06 2022-06-28 北京百度网讯科技有限公司 用于接口的差异数据测试方法及装置、电子设备和介质
CN115065627B (zh) * 2022-05-20 2024-04-12 北京奇艺世纪科技有限公司 参数修改方法、装置、电子设备及存储介质
CN115065627A (zh) * 2022-05-20 2022-09-16 北京奇艺世纪科技有限公司 参数修改方法、装置、电子设备及存储介质
CN114676067A (zh) * 2022-05-26 2022-06-28 武汉迎风聚智科技有限公司 一种测试脚本的参数化处理方法以及装置
CN114676067B (zh) * 2022-05-26 2022-08-30 武汉迎风聚智科技有限公司 一种测试脚本的参数化处理方法以及装置
CN114997831A (zh) * 2022-06-14 2022-09-02 中国银行股份有限公司 一种客户端的协同管理方法及装置
CN115809201A (zh) * 2022-12-23 2023-03-17 广州市保伦电子有限公司 一种基于二维表的接口测试控制方法、装置、设备及介质
CN115809201B (zh) * 2022-12-23 2023-10-20 广东保伦电子股份有限公司 一种基于二维表的接口测试控制方法、装置、设备及介质
CN115665286A (zh) * 2022-12-26 2023-01-31 深圳红途科技有限公司 接口聚类方法、装置、计算机设备及存储介质
CN116881064A (zh) * 2023-09-06 2023-10-13 Tcl通讯科技(成都)有限公司 终端测试方法、装置、设备和存储介质
CN116881064B (zh) * 2023-09-06 2023-12-15 Tcl通讯科技(成都)有限公司 终端测试方法、装置、设备和存储介质
CN117130941B (zh) * 2023-10-24 2024-03-26 易方信息科技股份有限公司 基于浏览器插件的接口自动化方法、系统、设备及介质
CN117130941A (zh) * 2023-10-24 2023-11-28 易方信息科技股份有限公司 基于浏览器插件的接口自动化方法、系统、设备及介质
CN117472764A (zh) * 2023-11-03 2024-01-30 深圳市移卡科技有限公司 一种测试用例平台管理方法、装置及相关介质
CN117931666A (zh) * 2024-01-26 2024-04-26 中国人民解放军军事科学院系统工程研究院 一种软件无线电通信设备核心框架测试系统及方法

Also Published As

Publication number Publication date
CN109766262A (zh) 2019-05-17
CN109766262B (zh) 2022-05-06

Similar Documents

Publication Publication Date Title
WO2020119434A1 (zh) 接口数据处理方法、自动化测试方法、装置、设备和介质
US11588922B2 (en) Capturing and replaying application sessions using resource files
US10769228B2 (en) Systems and methods for web analytics testing and web development
US11227221B2 (en) Framework management method and apparatus
US20220198025A1 (en) Web Attack Simulator
CN106484611B (zh) 基于自动化协议适配的模糊测试方法和装置
US20200026640A1 (en) Systems and methods for modular test platform for applications
US10705949B2 (en) Evaluation of library test suites using mutation testing
Felício et al. Rapitest: Continuous black-box testing of restful web apis
US11829278B2 (en) Secure debugging in multitenant cloud environment
CN112199263A (zh) 录制页面的方法、装置、设备以及介质
US9558307B1 (en) System and method for providing a scalable server-implemented regression query environment for remote testing and analysis of a chip-design model
CN112559525B (zh) 数据检查系统、方法、装置和服务器
CN112202598B (zh) 一种日志记录方法及装置
CN110750443A (zh) 网页测试的方法、装置、计算机设备及存储介质
CN113296653A (zh) 一种仿真交互模型构建方法、交互方法及相关设备
WO2020155765A1 (zh) 移动终端爬取数据的方法、装置、移动终端和存储介质
CN111552643A (zh) 多浏览器网页访问同步方法、系统
CN108228448B (zh) 一种代码跟踪方法及装置
CN115470152A (zh) 测试代码生成方法、测试代码生成装置以及存储介质
WO2022155685A1 (en) Web attack simulator
US10592388B1 (en) Methods for facilitating more efficient network message exchange and analysis and devices thereof
US20240005182A1 (en) Streaming Media Processing Method, Device and Electronic Equipment Based on Inference Service
US11928169B2 (en) System and method for implementing a functional documentation module
CN117992249A (zh) 一种基于Selenium技术的数据交互方法

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 19897341

Country of ref document: EP

Kind code of ref document: A1