CN116991725A - Interface test management system, method, device and program product - Google Patents

Interface test management system, method, device and program product Download PDF

Info

Publication number
CN116991725A
CN116991725A CN202310962909.4A CN202310962909A CN116991725A CN 116991725 A CN116991725 A CN 116991725A CN 202310962909 A CN202310962909 A CN 202310962909A CN 116991725 A CN116991725 A CN 116991725A
Authority
CN
China
Prior art keywords
interface
test
data
target
information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310962909.4A
Other languages
Chinese (zh)
Inventor
杨雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
58 Chang Life Beijing Information Technology Co ltd
Original Assignee
58 Chang Life Beijing Information Technology Co ltd
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 58 Chang Life Beijing Information Technology Co ltd filed Critical 58 Chang Life Beijing Information Technology Co ltd
Priority to CN202310962909.4A priority Critical patent/CN116991725A/en
Publication of CN116991725A publication Critical patent/CN116991725A/en
Pending legal-status Critical Current

Links

Classifications

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

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

The embodiment of the application provides an interface test management system, method, equipment and program product, which are used for acquiring various interface data and corresponding interface information in a mode of adapting to each data source channel, determining target interface data and corresponding target interface information of a target interface to be tested and generating corresponding target test cases, wherein the whole process does not need to be manually participated, thereby being beneficial to saving labor cost and improving the efficiency of data processing. When the automatic test is required to be carried out on the target interface, the target interface information is tested by executing the target test case, and the operation can be carried out on each interface in the development project according to whether the automatic test passes the test result of the marked target interface or not, so that the test conditions of different interfaces can be visually presented on the whole, the test results corresponding to the interfaces with high call volume levels can be checked preferentially on the interfaces with different call volume levels, and the staff can manage the test tasks in time.

Description

Interface test management system, method, device and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to an interface test management system, method, device, and program product.
Background
The interface is a basic component unit of a system and is also a bridge for interaction of a plurality of systems, so that the stability of the interface plays a role in the system, and therefore, the existing interface on the line can be reconstructed according to specific service requirements at all times, and in order to ensure that the reconstructed interface can be successfully executed, the interface needs to be tested. In the conventional test method, the method generally needs to rely on a mode that a developer provides an interface to use a document or manually grasp a package to acquire interface information such as an access path, head information, request parameters, a response result and the like of the interface, and further, operations such as writing a test case, executing the test case, recording the test result and the like are compiled based on the acquired interface information.
However, this approach not only consumes labor and time costs, but also makes it difficult to implement full coverage of the test scene for the project system based on the manual interface information and the test case writing for the huge project system, and also makes it impossible to intuitively confirm the test coverage.
Disclosure of Invention
The application provides an interface test management system, an interface test management method, interface test management equipment and an interface test management program product from multiple aspects, which are used for automatically generating test cases and automatically testing interfaces based on the test cases, so that the labor cost is reduced, and the test efficiency is improved.
The embodiment of the application provides an interface test management system, which comprises: the data management module is used for acquiring a plurality of interface data and a plurality of corresponding interface information from each data source channel in a mode of adapting to each data source channel, wherein the interface data comprises flow data or types of the flow data, and each interface data corresponds to the call volume information; determining target interface data from the plurality of interface data according to target interface information of the target interface for each interface to be tested; generating corresponding target test data according to the flow data or the type of the flow data contained in the target interface data; generating a corresponding target test case according to the target interface information and the target test data; the interface management module is used for determining the priority corresponding to the target interface according to the call volume information corresponding to each interface to be tested; and sending the target test case to an automatic test device according to the priority, so that the automatic test device can automatically test the target interface information according to the target test case.
In an alternative embodiment, the data management module is configured to, when acquiring a plurality of interface data and a corresponding plurality of interface information from each data source channel in a manner of adapting to each data source channel: sending a service request to a third party platform, and acquiring interface data of a first interface existing locally and corresponding first interface information from the third party platform; and/or acquiring interface data of the second interface and corresponding second interface information according to the grabbing breakpoint which is injected in the project code in advance; and/or acquiring a preset project package, and analyzing the preset project package to acquire interface data of a third interface corresponding to the preset project package and corresponding third interface information.
In an alternative embodiment, the data management module is configured to, when acquiring the preset package: downloading a preset project package uploaded in advance from a preset storage position; or, reading preset path information in the configuration file, accessing a corresponding path according to the preset path information, and downloading a corresponding preset project package from the path.
In an optional embodiment, the data management module is configured to, when generating the corresponding target test data according to the traffic data or the type of the traffic data included in the target interface data: taking the flow data as target test data corresponding to the target interface under the condition that the target interface data comprises the flow data; and under the condition that the target interface data comprises the type of the flow data, generating default flow data corresponding to the type as target test data corresponding to the target interface.
In an alternative embodiment, the interface management module is further configured to: receiving test results reported by the automatic test equipment aiming at all interfaces; determining interfaces passing the test and interfaces failing the test according to the test result; and distinguishing and marking the interfaces which pass the test and the interfaces which fail the test, so as to determine test coverage information of each interface which passes the test and fails the test.
In an alternative embodiment, the system further comprises a monitoring module for: and monitoring test coverage information of each interface, and outputting corresponding prompt information under the condition that the interface corresponding to the preset priority is determined to be not tested or the interface test is not passed.
The embodiment of the application also provides a test case generation method, which comprises the following steps: acquiring a plurality of interface data and a plurality of corresponding interface information from each data source channel in a mode of adapting each data source channel, wherein the interface data comprises flow data or types of the flow data, and each interface data corresponds to calling quantity information; determining target interface data from the plurality of interface data according to target interface information of the target interface for each interface to be tested; generating corresponding target test data according to the flow data or the type of the flow data contained in the target interface data; and generating a corresponding target test case according to the target interface information and the target test data.
The embodiment of the application also provides an automatic test method, which comprises the following steps: responding to a test operation executed for a target interface, and acquiring corresponding target interface information; determining a corresponding target test case according to the target interface information, wherein the target test case is generated according to a plurality of interface data acquired from each data source channel and a plurality of corresponding interface information, and the interface data comprises flow data or types of the flow data; executing the target test case, and testing the target interface information to determine a test result corresponding to the target interface; and sending the test result to the automatic management system so that the automatic management system marks the test coverage information of the target interface according to the test result.
In an alternative embodiment, the target interface includes an on-line interface and an off-line interface corresponding thereto, and the method further includes: comparing the execution results of the online interface and the offline interface; and under the condition that the comparison results of the two are the same, determining that the functions of the on-line interface and the off-line interface are matched, and the corresponding test result is that the test passes.
In an alternative embodiment, in response to a test operation performed on the target interface, obtaining corresponding target interface information includes: responding to a test task creation operation, and acquiring test task information input by editing, wherein the test task information comprises an access path and a version number of a to-be-tested project package; responding to the test operation executed on the test task information, and acquiring an access path and a version number of the item package to be tested; downloading a to-be-tested project package corresponding to the version number from the access path; and analyzing the item package to be tested, and determining the target interface to be tested and the corresponding target interface information.
The embodiment of the application also provides automatic test equipment, which comprises a memory and a processor, wherein the memory comprises a computer program/instruction, and the processor is used for executing the computer program/instruction for the steps in the test case generating method or the automatic test method.
Embodiments of the present application also provide a computer program product storing a computer program/instruction which, when executed by a processor, causes the processor to implement steps in the test case generating method or the automated test method.
In the embodiment of the application, by acquiring various interface data and corresponding interface information in a mode of adapting to each data source channel, the target interface data and the corresponding target interface information of the target interface to be tested can be determined, and the corresponding target test case can be generated based on the target interface data and the corresponding target interface information, so that the whole process does not need to be manually participated, the labor cost is saved, and the efficiency is improved. Based on the above, when the automatic test is needed to be performed on the target interface, the target interface information can be tested by executing the target test case, and according to whether the automatic test passes the test result of the marked target interface, and so on, the above operation can be performed for each interface in the development project, so that the test conditions of different interfaces can be visually presented on the whole, and the test results corresponding to the interfaces with high call volume levels can be checked preferentially for the interfaces with different call volume levels, thereby being beneficial to the staff to manage the test tasks in time.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1a is a schematic diagram of an interface test management system according to an embodiment of the present application;
FIG. 1b is a schematic diagram illustrating a process of injecting a grab break point in a program code according to an embodiment of the present application;
FIG. 1c is a schematic diagram of another interface test management system according to an embodiment of the present application;
FIG. 1d is a flowchart of an interface test result label according to an embodiment of the present application;
FIG. 2a is a flowchart of a method for generating test cases according to an embodiment of the present application;
FIG. 2b is a flow chart of an automated test method according to an embodiment of the present application;
FIG. 2c is a schematic diagram of a test operation interface according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Because the traditional test case writing needs to rely on a developer to provide an interface document or manually capture a package to acquire interface information, the method not only consumes more labor cost and has low efficiency, but also can not ensure the accuracy and the comprehensiveness of the acquired interface information by manually acquiring the interface information for development projects with huge scale. Therefore, the embodiment of the application provides an interface test management system, which is used for acquiring and managing the interface information and the interface data in the development project without manually collecting the interface information, and automatically generating test cases based on the interface information and the interface data so as to be used for automatically testing the interfaces to be tested in the development project. In addition, the interface test management system provided by the embodiment of the application can also carry out test marking and monitoring on each interface in the development project, so as to intuitively present the test result of each interface for the staff, and facilitate the staff to adjust the test task at any time.
The following describes functions of the interface test management system provided by the embodiment of the present application with reference to the accompanying drawings.
Fig. 1a is a schematic structural diagram of an interface test management system according to an embodiment of the present application, as shown in fig. 1a, the interface test management system includes a data management module 10 and an interface management module 20, where the data management module 10 is configured to obtain a plurality of interface data and a plurality of corresponding interface information from each data source channel in a manner of adapting to each data source channel. Optionally, the acquired interface data may be flow data corresponding to the interface in the process of being called in real time, that is, a transfer parameter and a response result when the interface is called, or may be a type of flow data acquired by the interface when the interface is not called, that is, a data type corresponding to each transfer parameter in a parameter list of the interface and a data type corresponding to the response result. In the embodiment of the application, the relation between each data source channel and the development project is not limited, and optionally, each data source channel can be any sub-module in the development project, can also be other management systems for managing the development project, or can be a third party platform for carrying out business communication with the development project. Correspondingly, according to different types of the data source channels, the mode of acquiring the interface data and the corresponding interface information is different, for example, if the data source channels are sub-modules in the development project, the interface data and the corresponding interface information can be directly acquired from the sub-modules in the development project; for another example, the data source channel is other management systems for managing the development project or is a third party platform for performing service communication with the development project, so that the interface data and the corresponding interface information can be obtained by accessing other management systems or a ground three party platform, and the specific mode can be determined according to actual requirements.
Further, in the case that the plurality of interface data and the corresponding plurality of interface information are acquired, for each interface to be tested, the data management module 10 may determine target interface data from the plurality of interface data according to target interface information of the target interface, where the target interface may be any one or more of the interfaces to be tested. Optionally, the target interface may be an interface specified according to a specific test requirement, for example, a developer or a tester initiates a test task for the target interface to trigger the test requirement, and after the interface test task responds to the test requirement, a corresponding target interface may be determined, and corresponding target interface data and corresponding target interface information may be determined from a plurality of interface data. Further optionally, when determining the target interface data and the corresponding target interface information, whether the matched target interface data and the corresponding target interface information exist in the interface data and the corresponding interface information acquired from each data source channel can be determined according to different data source channels, and optionally, the target interface data and the corresponding target interface information corresponding to the target interface to be tested can be determined by comprehensively matching domain names, cluster identifiers, full paths of interfaces, application program interfaces (Application Programming Interface, API) and the like.
Based on the above, when the target interface data and the corresponding target interface information are acquired, the target interface data and the corresponding target interface information may be stored according to the flow data or the type of the flow data included in the target interface data, and used as the target test data corresponding to the target interface, and further, the corresponding target test case may be generated according to the target interface information and the target test data. Further, under the condition that the target test data corresponding to the target interface is obtained, a target test case corresponding to the target interface can be generated based on the corresponding relation between the target test data and the target interface information, so as to be used for testing the target interface. Optionally, for the case that the target interface data is only the type of the flow data, default flow data of a corresponding type may also be generated as target test data corresponding to the target interface; or the type of the flow data is only used as initial target test data, and the initial target test data is updated under the condition that the real flow data is obtained, and the specific mode is not limited.
When the traffic data or the type of the traffic data in the target interface data is stored separately, if the traffic data is stored for the interface data corresponding to the same interface, the latest traffic data is stored each time, and if the traffic data is stored, only one copy of the traffic data can be stored when the traffic data is acquired for the first time, and then the same traffic data type can be acquired again.
In the embodiment of the application, the acquired interface data further comprises call volume information corresponding to each interface data, and optionally, the call volume information can be total called times and frequencies of each interface or called times in proportion in all interfaces, etc. so as to be used for representing the importance degree of each interface in a development project. Optionally, the more the total number of times the target interface is called, or the higher the frequency of being called, or the greater the proportion of the number of times being called in all interfaces, the higher the level of the corresponding priority. Based on this, in the case that the target interface data is obtained, the interface management module 20 may extract the target interface information such as the interface path, the request parameter, the response result, and the like in the target interface data, further, determine the priority corresponding to the target interface according to the call volume information corresponding to the target interface, and further, send the target test case to the automated test equipment according to the priority, so that the automated equipment performs the automated test on the target interface information according to the target test case.
It should be noted that, the embodiment of the present application is not limited to the relationship between the automation device and other systems, alternatively, the automation device may be an interface test management system, or another system for managing a development project, for example, a test system for performing an automated test on the development project alone, or may be a separate computer device or the like, which may be specifically determined according to the system architecture of the actual development project.
In the embodiment of the application, the specific type corresponding to each data source channel is not limited, and optionally, in the case that the data source channel is other management systems for managing the development project or is a third party platform for performing service communication with the development project, the third party platform can provide an HTTP interface developed based on a hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) so as to enable the outside to obtain the interface data of the first interface and the corresponding first interface information existing locally on the third party platform directly through an HTTP request. Based on the above, in the case that the interface data and the corresponding interface information need to be acquired from the third party platform, a service request may be sent to the third party platform, and the interface data and the corresponding first interface information of the first interface existing locally from the third party platform may be acquired. In this embodiment, the interface data of the first interface and the corresponding first interface information of the local existing first interface of the third party platform are obtained from the development project by the third party platform, optionally, the third party platform may obtain various interface data and the corresponding interface information thereof from the development project by actively obtaining, passively receiving, monitoring flow, capturing logs, and the like, and the specific manner may be determined according to a management relationship or a communication relationship between the third party platform and the development project, which is not limited herein.
Accordingly, in the case where the data source channel is a sub-module in the development project, the sub-module may be a server-free cloud function (Serverless Cloud Function, SCF) interface provided by the development project, and interface data of a second interface in the development project and corresponding second interface information may be acquired through the SCF interface. Because the SCF interface cannot directly obtain the interface data and the corresponding interface information in the manner of an access request like the HTTP interface, in order to obtain the interface data and the corresponding second interface information of the second interface in the development project, a capture breakpoint may be pre-injected into the project code corresponding to the SCF interface, so that when the project code corresponding to the SCF interface is executed, the interface data and the corresponding second interface information of the second interface may be obtained according to the capture breakpoint pre-injected into the project code.
Optionally, the pre-injected grabbing breakpoint may dynamically modify Java bytecode in the development project through a Java agent technology, so as to grab the interface data of the second interface and the corresponding second interface information. For example, as shown in fig. 1b, a grabbing breakpoint may be injected into a bytecode file through JavaAgent technology in program codes corresponding to various interfaces or services of a development project, for example, the SCF interface and wresis service shown in fig. 2b, when a request for accessing the development project is made, the program codes corresponding to the interfaces or services in the development project are executed, and a corresponding response result is obtained, and at the same time, the grabbing breakpoint may grab access paths corresponding to various interfaces or services in various scenes (traceID shown in fig. 2 b) during execution of the program codes, based on which interface data and corresponding interface information of various interfaces or services may be obtained.
Further optionally, in the case that the data source channel is a sub-module in a development project, the sub-module may also be a sub-project package in the development project, for convenience of explanation, the embodiment of the present application refers to a preset project package, based on which, when the interface data of the third interface of the preset project package and the corresponding interface information need to be acquired, the preset project package may be acquired, and the preset project package may be parsed to acquire the interface data of the third interface corresponding to the preset project package and the corresponding third interface information. In the embodiment of the present application, the preset package may be stored in a preset storage location, and before the development project is started, the preset package may be uploaded to the preset storage location, and the mode of obtaining the preset package is not limited in the embodiment of the present application.
Optionally, when the interface data and the corresponding interface information of the third interface of the preset project package need to be acquired, the preset project package uploaded in advance may be directly downloaded from the preset storage location, or before the development project is started, the preset path information corresponding to the preset storage location may be configured into a configuration file corresponding to the development project, and when the interface data and the corresponding interface information of the third interface of the preset project package need to be acquired, the preset path information in the configuration file may be read, and the corresponding path may be accessed according to the preset path information and the corresponding preset project package may be downloaded from the path. Further optionally, the embodiment of the present application is not limited to a specific manner of storing the preset package in the preset storage location, and optionally, the preset package may be manually uploaded by a developer, or may be automatically uploaded by a system-triggered upload of a test code after the developer or the tester performs a test operation on the preset package.
It should be noted that, no matter what uploading mode, the preset storage location may include preset packages of multiple versions, and when the preset packages are downloaded from the preset storage location, the preset packages of the corresponding versions may be downloaded according to actual requirements and parsed. It should be further noted that, in the foregoing embodiment, the two ways of acquiring the interface data of the first interface from the third party platform and acquiring the interface data of the second interface by injecting the grabbing breakpoint into the project code may both be that the first interface and the second interface traffic data may be acquired in real time, and the interface data of the third interface acquired by acquiring the preset project packet is not acquired in real time, so that the type of the traffic data of the third interface is acquired, and for the difference based on the traffic data or the type of the traffic data, reference may be made to the foregoing embodiment and will not be repeated herein.
Based on the above embodiment, the interface test management system provided by the embodiment of the present application may be further refined into a structure as shown in fig. 1c, where the data management module 10 includes a data entry module 11 and a data processing module 12, and the interface management module 20 includes an interface information management module 21 and an interface test management module 22. Further optionally, as shown in fig. 1c, the interface test management system may further include a scheduling module 40 to schedule the test tasks corresponding to the departments, projects, clusters, and the like from the dimensions of the specific departments, projects, clusters, and the like.
Optionally, as shown in fig. 1c, the data entry module 11 includes two parts, that is, obtaining interface data and corresponding interface information from a third party platform and obtaining interface data and corresponding interface information from a development project, where obtaining interface data and corresponding interface information from a development project includes obtaining interface data and corresponding interface information in a manner of downloading a preset project package, extracting a project package, capturing a breakpoint, and the like. Based on this, when the data entry module 11 acquires a plurality of interface data and corresponding interface information from each data source channel, the data processing module 12 may process the acquired interface data and corresponding interface information to generate a corresponding test case. Optionally, as shown in fig. 1c, the data processing module 12 includes an interface data matching module, configured to determine target interface data and corresponding target interface information from a plurality of interface data and corresponding interface information according to specific test requirements; the interface data storage module is used for respectively storing the acquired interface data and the corresponding interface information; the test data/case generation module is used for generating target test data and target test cases corresponding to the target interfaces; the project code analysis module is used for analyzing the downloaded preset project package and the like. It should be noted that, for how to obtain the interface data and the corresponding interface information from the third party platform or the development project, and the specific process of processing the obtained interface data and the corresponding interface information, reference may be made to the description of the foregoing embodiments, which is not repeated herein.
Further alternatively, the interface management module 20 may manage the acquired interface data and the corresponding interface information, for example, the interface information management module 21 may include an interface definition module for defining the acquired traffic data or the type of the traffic data in each interface data to correspond to each interface; the priority definition module is used for determining the priority corresponding to each interface; the call volume information module is used for determining call volume information corresponding to each interface; the test coverage information module is used for checking the test coverage condition of each interface. The interface test management module 22 may include a case detail module for checking detailed information of the test case corresponding to each interface; the case execution module is used for executing specific test cases; the test result module is used for checking the execution result of each test case; the batch execution module is used for executing a plurality of test cases in batch, and the like, and of course, the batch execution module is not limited to this in practical application, and specific functional modules can be determined according to specific requirements of development projects.
Based on the above, in the case that the test cases are executed on each interface by the interface management module 20, the monitoring module 30 may monitor the test results of each interface in the development project, and optionally, as shown in fig. 1c, the monitoring module 30 may include a cluster distribution module, configured to monitor the test results corresponding to each cluster; the business requirement information module is used for monitoring requirement information corresponding to each interface in the development project so as to determine whether the test result of each interface is matched with the corresponding requirement information; the accurate test module is used for checking the test result of the specific interface; in addition, the monitoring module 30 may further include other modules, such as an alarm reminding module, a code statistics module, a response time module, a timeout amount/abnormal amount module, etc., for monitoring whether the interfaces in the development project are abnormal or not and performing other processes, such as reminding when the interfaces are monitored to be abnormal, etc., which may be specifically determined according to actual requirements, and is not limited herein.
In the embodiment of the present application, the interface management module 20 may further receive a test result reported by the automatic test device for each interface, where the test result includes a test passing and a test failing, based on this, according to the test result, the interface through which the test passes and the interface through which the test fails may be determined, and a distinguishing mark is made for the interface through which the test passes and the interface through which the test fails, so as to determine test passing and test failing coverage information of each interface, which is helpful for visually presenting test conditions of each interface in a development project for a developer or a tester. Optionally, when the interface management module 20 performs the distinguishing and labeling on the test results of each interface, the labeling operation may be performed according to the flow shown in fig. 1d, as shown in fig. 1d, where the interface management module 20 may receive the test result reported by the automatic test device, further, if it is determined that the development project configures the cluster, analyze the cluster identifier corresponding to the development project and the target interface name of the current test, and if not, analyze the development project identifier and the target interface name of the current test. Further, under the condition that analysis is determined to be successful, marking the test result as passing the test, otherwise marking the test result as failing the test.
Based on this, the monitoring module 30 may monitor the test coverage information of each interface, so as to determine whether the interfaces with different priorities obtain due test results according to the test coverage information, for example, for interfaces with higher priorities to be frequently used, in order to ensure that the development projects normally operate, the functions of such interfaces need to be tested preferentially, so that when it is determined that the interfaces corresponding to the preset priorities are not tested or that the interface tests do not pass, corresponding prompt information may be output to prompt a developer or a tester to timely check whether the test task is abnormal. In the embodiment of the present application, the specific functions of the monitoring module 30 are not limited, and besides the above-mentioned monitoring of the test coverage information of each interface and outputting the corresponding prompt information, the monitoring module 30 may monitor other aspects of the development project, for example, but not limited to, monitoring the cluster distribution of the development project, abnormal alarm, response time length and code quantity statistics of each module, etc., and according to different functions of the development project, the functions provided by the monitoring module 30 may also be different, specifically may be determined according to actual requirements, through these functions, a developer or a tester may more intuitively view and manage the overall functions and operation conditions of the development project, so as to timely process under the situation that the occurrence of the abnormality is determined. Based on the above system embodiment, the embodiment of the present application further provides a test case generating method, fig. 2a is a flowchart of the method, and as shown in fig. 2a, the method includes:
S1a, acquiring a plurality of interface data and a plurality of corresponding interface information from each data source channel in an adaptive mode, wherein the interface data comprise flow data or types of the flow data, and each interface data corresponds to calling quantity information;
s2a, determining target interface data from a plurality of interface data according to target interface information of the target interface for each interface to be tested;
s3a, generating corresponding target test data according to flow data or types of the flow data contained in the target interface data;
s4a, generating a corresponding target test case according to the target interface information and the target test data.
It should be noted that, for details of implementation of each step in the above method, reference may be made to the functional description of the corresponding module in the above system embodiment, which is not repeated herein.
Correspondingly, the embodiment of the application also provides an automatic test method, which can be applied to the automatic test equipment matched with the interface test management system, and fig. 2a is a flow chart of the automatic test method, and as shown in fig. 2b, the method comprises the following steps:
s1b, responding to a test operation executed for a target interface, and acquiring corresponding target interface information;
S2b, determining a corresponding target test case according to the target interface information, wherein the target test case is generated according to a plurality of interface data acquired from each data source channel and a plurality of corresponding interface information, and the interface data comprises flow data or types of the flow data;
s3b, executing a target test case, and testing the target interface information to determine a test result corresponding to the target interface;
and S4b, sending the test result to an automatic management system, so that the automatic management system marks the test coverage information of the target interface according to the test result.
In the embodiment of the application, under the condition of test requirement, a developer or a tester can execute test task creation operation and create a corresponding test task, and based on the test task creation operation, the automatic test equipment can acquire the corresponding test task information under the condition of responding to the test task creation operation. Alternatively, the automated test equipment may provide a test operation interface as shown in fig. 2c, and a developer or a tester may input information such as an access path and a version number of the package to be tested as test task information on the test operation interface, based on which the automated test equipment obtains the test task information input by editing. Further, a developer or a tester can execute a test operation for the test task information, and under the condition that the automatic test equipment responds to the test operation executed for the test task information, the access path and the version number of the item package to be tested can be obtained according to the test task information, the item package to be tested corresponding to the version number is downloaded from the access path, the item package to be tested is analyzed, and the target interface to be tested at this time and the target interface information corresponding to the target interface to be tested are determined.
Further, according to the target interface information, a corresponding target test case can be determined, the target test case is executed, and the target interface information is tested to determine a test result corresponding to the target interface. Based on the above, under the condition that the test result of the target interface information is obtained, the test result can be sent to the automation management system, so that the automation management system marks the test coverage information of the target interface according to the test result, and the test condition of each interface in the development project can be intuitively presented for a developer or a tester. The target test case is generated according to a plurality of interface data and a plurality of corresponding interface information acquired from each data source channel, the interface data includes flow data or a type of the flow data, and the system embodiment will not be described herein again with reference to how to acquire the flow data or the type of the flow data and generate the corresponding test case.
In the embodiment of the present application, the type of the target interface is not limited, alternatively, the target interface package may include an on-line interface and an off-line interface corresponding to the on-line interface, where the off-line interface corresponding to the on-line interface in the embodiment of the present application refers to that the request parameter is the same as the response result, but the internal structures of the two interfaces are not limited. For example, before the interface is used online, at least one round of test is performed in the test environment, but with the continuous update of the service requirement, the structure of the interface is also continuously updated and reconfigured, so that there may be a previous online version of the online interface, while the structure of the offline interface corresponding to the online interface in the test environment is reconfigured, so as to ensure that the function of the reconfigured interface is normal, the phenomenon structure can be tested by adopting test data of the interface on the adapted line, so as to determine whether the reconfigured structure can be used online.
Alternatively, the target interface information input in the test operation interface by the developer or the tester before performing the test operation may include interface information of an on-line interface and interface information of a corresponding off-line interface. For example, in the test operation interface shown in fig. 2c, the "tested service" may be regarded as an offline interface, and the "online service" may be regarded as an online interface, based on which, after performing the test-lifting operation, the automated test equipment may perform the synchronous test of the online interface and the offline interface by the target test case. Further, in the case of obtaining the execution results of the on-line interface and the off-line interface, respectively, the execution results of the on-line interface and the off-line interface may be compared to determine whether the comparison results of the on-line interface and the off-line interface are the same. Based on the above, under the condition that the comparison results of the two are different, the mismatching of the functions of the on-line interface and the off-line interface can be determined, and further, corresponding prompt information can be output so as to prompt a developer or a tester that the target interface is abnormal in function, so that the developer can check and modify in time; correspondingly, under the condition that the comparison results of the two are the same, the function matching of the on-line interface and the off-line interface is determined, and the corresponding test result is that the test passes.
In the embodiment of the application, by acquiring various interface data and corresponding interface information in a mode of adapting to each data source channel, the target interface data and the corresponding target interface information of the target interface to be tested can be determined, and the corresponding target test case can be generated based on the target interface data and the corresponding target interface information, so that the whole process does not need to be manually participated, the labor cost is saved, and the efficiency is improved. Based on the above, when the automatic test is needed to be performed on the target interface, the target interface information can be tested by executing the target test case, and according to whether the automatic test passes the test result of the marked target interface, and so on, the above operation can be performed for each interface in the development project, so that the test conditions of different interfaces can be visually presented on the whole, and the test results corresponding to the interfaces with high call volume levels can be checked preferentially for the interfaces with different call volume levels, thereby being beneficial to the staff to manage the test tasks in time.
It should be noted that, the specific implementation manner of each step of the above method may participate in the description of the corresponding portion in the above system embodiment, and will not be described herein. The execution subjects of the steps of the method provided in the above embodiment may be the same device, or the method may be executed by different devices. For example, the execution subject of step S1 to step S6 may be the device a; for another example, the execution subject of step S1a may be the device a, and the execution subjects of steps S2a to S4a may be the device B; etc.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or performed in parallel, the sequence numbers of the operations, such as S1a, S1b, etc., are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Based on the foregoing, an embodiment of the present application further provides a computer device, and fig. 3 is a schematic structural diagram of the computer device, where, as shown in fig. 3, the computer device includes: a processor 31 and a memory 32 storing a computer program; wherein the processor 31 and the memory 32 may be one or more.
The memory 32 is mainly used for storing computer programs, and the computer programs can be executed by the processor 31, so that the processor 31 controls the computer device to realize corresponding functions and complete corresponding actions or tasks. In addition to storing computer programs, the memory 32 may also be configured to store various other data to support operations on the computer device. Examples of such data include instructions for any application or method operating on a computer device.
The memory 32 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In the embodiment of the present application, the implementation form of the processor 31 is not limited, and may be, for example, but not limited to, a CPU, a GPU, an MCU, or the like. The processor 31 may be regarded as a control system of a computer device operable to execute a computer program stored in the memory 32 for controlling the computer device to perform the respective functions, perform the respective actions or tasks. It should be noted that, depending on the implementation form of the computer device and the scene in which the computer device is located, the functions, actions or tasks to be implemented may be different; accordingly, the computer programs stored in the memory 32 may also vary, and execution of the different computer programs by the processor 31 may control the computer device to perform different functions, perform different actions or tasks.
In some alternative embodiments, as shown in FIG. 3, the computer device may further comprise: a display 33, a power supply assembly 34, and a communication assembly 35. The illustration of only a few components in fig. 3 does not mean that the computer device comprises only the components shown in fig. 3, but that the computer device may also comprise other components for different application requirements, for example, in case of a voice interaction requirement, as shown in fig. 3, the computer device may also comprise an audio component 36. The components that the computer device may include may depend on the product form of the computer device, and are not limited herein.
In the embodiment of the present application, when the processor executes the computer program in the memory 31, each step in the test case generating method or the automated test method in the above-described embodiment is used.
It should be noted that, regarding the specific functions of the processor in the above-mentioned computer device, reference may be made to the above-mentioned system embodiments and method embodiments, which are not described herein again.
Accordingly, embodiments of the present application also provide a computer program product storing a computer program/instruction that, when executed, enables implementation of the steps of the above-described method embodiments that are executable by a computer device.
The communication assembly of the above embodiments is configured to facilitate wired or wireless communication between the device in which the communication assembly is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a mobile communication network of WiFi,2G, 3G, 4G/LTE, 5G, etc., or a combination thereof. In one exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
The display in the above-described embodiments includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
The power supply assembly in the above embodiment provides power for various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
The audio component of the above embodiments may be configured to output and/or input audio signals. For example, the audio component includes a Microphone (MIC) configured to receive external audio signals when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal may be further stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (12)

1. An interface test management system, comprising:
the data management module is used for acquiring a plurality of interface data and a plurality of corresponding interface information from each data source channel in a mode of adapting to each data source channel, wherein the interface data comprises flow data or types of the flow data, and each interface data corresponds to the call volume information; determining target interface data from the plurality of interface data according to target interface information of the target interface for each interface to be tested; generating corresponding target test data according to the flow data or the type of the flow data contained in the target interface data; generating a corresponding target test case according to the target interface information and the target test data;
the interface management module is used for determining the priority corresponding to the target interface according to the call volume information corresponding to each interface to be tested; and sending the target test case to an automatic test device according to the priority, so that the automatic test device can automatically test the target interface information according to the target test case.
2. The system of claim 1, wherein the data management module, when obtaining a plurality of interface data and a corresponding plurality of interface information from each data source channel in a manner that adapts the data source channel, is configured to:
sending a service request to a third party platform, and acquiring interface data of a first interface existing locally and corresponding first interface information from the third party platform; and/or the number of the groups of groups,
acquiring interface data of a second interface and corresponding second interface information according to grabbing breakpoints which are injected in the project codes in advance; and/or the number of the groups of groups,
and acquiring a preset project package, and analyzing the preset project package to acquire interface data of a third interface corresponding to the preset project package and corresponding third interface information.
3. The system of claim 2, wherein the data management module, when retrieving the preset project package, is configured to:
downloading a preset project package uploaded in advance from a preset storage position; or alternatively, the process may be performed,
and reading preset path information in the configuration file, accessing a corresponding path according to the preset path information, and downloading a corresponding preset project package from the path.
4. The system of claim 3, wherein the data management module, when generating the corresponding target test data according to the traffic data or the type of traffic data contained in the target interface data, is configured to:
Taking the flow data as target test data corresponding to the target interface under the condition that the target interface data comprises the flow data;
and under the condition that the target interface data comprises the type of the flow data, generating default flow data corresponding to the type as target test data corresponding to the target interface.
5. The system of claim 4, wherein the interface management module is further configured to:
receiving test results reported by the automatic test equipment aiming at all interfaces;
determining interfaces passing the test and interfaces failing the test according to the test result;
and distinguishing and marking the interfaces which pass the test and the interfaces which fail the test, so as to determine test coverage information of each interface which passes the test and fails the test.
6. The system of any one of claims 1-5, further comprising a monitoring module for:
and monitoring test coverage information of each interface, and outputting corresponding prompt information under the condition that the interface corresponding to the preset priority is determined to be not tested or the interface test is not passed.
7. A test case generation method, comprising:
Acquiring a plurality of interface data and a plurality of corresponding interface information from each data source channel in a mode of adapting each data source channel, wherein the interface data comprises flow data or types of the flow data, and each interface data corresponds to calling quantity information;
determining target interface data from the plurality of interface data according to target interface information of the target interface for each interface to be tested;
generating corresponding target test data according to the flow data or the type of the flow data contained in the target interface data;
and generating a corresponding target test case according to the target interface information and the target test data.
8. An automated testing method, comprising:
responding to a test operation executed for a target interface, and acquiring corresponding target interface information;
determining a corresponding target test case according to the target interface information, wherein the target test case is generated according to a plurality of interface data acquired from each data source channel and a plurality of corresponding interface information, and the interface data comprises flow data or types of the flow data;
executing the target test case, and testing the target interface information to determine a test result corresponding to the target interface; and
And sending the test result to the automatic management system so that the automatic management system marks the test coverage information of the target interface according to the test result.
9. The method of claim 8, wherein the target interface comprises an on-line interface and an off-line interface corresponding thereto, the method further comprising:
comparing the execution results of the online interface and the offline interface;
and under the condition that the comparison results of the two are the same, determining that the functions of the on-line interface and the off-line interface are matched, and the corresponding test result is that the test passes.
10. The method of claim 9, wherein obtaining corresponding target interface information in response to a test operation performed for a target interface comprises:
responding to a test task creation operation, and acquiring test task information input by editing, wherein the test task information comprises an access path and a version number of a to-be-tested project package;
responding to the test operation executed on the test task information, and acquiring an access path and a version number of the item package to be tested;
downloading a to-be-tested project package corresponding to the version number from the access path;
And analyzing the item package to be tested, and determining the target interface to be tested and the corresponding target interface information.
11. An automatic test equipment comprising a memory and a processor, the memory comprising computer programs/instructions for executing the computer programs/instructions for implementing the steps in the method of any of claims 7-10.
12. A computer program product having stored thereon a computer program/instruction which, when executed by a processor, causes the processor to implement the method of any of claims 7-10.
CN202310962909.4A 2023-08-01 2023-08-01 Interface test management system, method, device and program product Pending CN116991725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310962909.4A CN116991725A (en) 2023-08-01 2023-08-01 Interface test management system, method, device and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310962909.4A CN116991725A (en) 2023-08-01 2023-08-01 Interface test management system, method, device and program product

Publications (1)

Publication Number Publication Date
CN116991725A true CN116991725A (en) 2023-11-03

Family

ID=88533413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310962909.4A Pending CN116991725A (en) 2023-08-01 2023-08-01 Interface test management system, method, device and program product

Country Status (1)

Country Link
CN (1) CN116991725A (en)

Similar Documents

Publication Publication Date Title
US10372600B2 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN107688530B (en) Software testing method and device
US11315084B2 (en) Method and system for aggregating diagnostic analyzer related information
CN111459794A (en) Communication network testing method, device, computer equipment and storage medium
US9547579B1 (en) Method and apparatus for automatically detecting defects
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN102693183A (en) Method and system for realizing automatic software testing
CN110347085B (en) Automated test system, method, vehicle, and computer-readable medium
CN109684847A (en) Self-repairing method, device, equipment and the storage medium of script loophole
CN114356785B (en) Data processing method and device, electronic equipment and storage medium
CN113448854A (en) Regression testing method and device
CN109359032B (en) Test data collection method, device and system and electronic equipment
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN109657475A (en) Code vulnerabilities check method, apparatus, equipment and storage medium
CN114356434B (en) Page loading method, device, apparatus, storage medium and program product
CN111092767B (en) Method and device for debugging equipment
CN110347565B (en) Application program abnormity analysis method and device and electronic equipment
CN112559348B (en) Test analysis method, system, equipment and medium based on jacoco
CN106557419B (en) Program testing method and device
CN109634734A (en) Automatic compiling dissemination method, device and computer readable storage medium
CN113672502A (en) Program multi-system testing method and corresponding device, equipment and medium
CN110908708B (en) Code release method, device and system
CN114896168B (en) Quick debugging system, method and memory for automatic driving algorithm development
CN116991725A (en) Interface test management system, method, device and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination