Interface quality inspection method, task scheduling method, interface quality inspection system and medium

By dynamically parsing the path configuration of the data returned by the interface, the mapping of interface fields is automatically implemented, which solves the problem of difficult field mapping in interface quality inspection, improves the accuracy and adaptability of quality inspection, and reduces maintenance costs.

CN120994537APending Publication Date: 2025-11-21SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510896774.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The lack of a fast and accurate field mapping solution in the existing technology makes it difficult to determine the correspondence between the data returned by the interface and the target data, which affects the accuracy and efficiency of interface quality inspection. In addition, manual configuration is prone to errors and has high maintenance costs.

Method used

By dynamically parsing the data information returned by the interface under test and the path configuration of the target field in the target information, a translation bridge is built between heterogeneous data formats, the storage location of data values ​​is automatically located, and interference from format differences is eliminated, thereby achieving automation and accuracy in field mapping.

Benefits of technology

It significantly improves the accuracy and adaptability of interface quality inspection, avoids mapping failures caused by format version changes, reduces manual maintenance costs, and ensures that interface status determination is based on logical comparison of data values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994537A_ABST
    Figure CN120994537A_ABST
Patent Text Reader

Abstract

The invention discloses an interface quality inspection method, a task scheduling method, an interface quality inspection system and a medium. The quality inspection method comprises the steps of obtaining first data information returned by a to-be-tested interface and preset first target information corresponding to the first data information; obtaining a first target field simultaneously existing in the first data information and the first target information, and a first target value corresponding to the first target field in the first target information; determining a first path configuration corresponding to the first target field in the first data information according to the data format of the first data information and the data format of the first target information; and according to the first path configuration, determining a first data value corresponding to the first target field in the first data information, and according to the first data value and the first target value, determining the state of the to-be-tested interface. According to the method, potential data processing errors of the to-be-tested interface can be effectively identified, and it is ensured that the to-be-tested interface can operate accurately and stably in an actual service scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and in particular to an interface quality inspection method and task scheduling method, an interface quality inspection system and a medium. BACKGROUND

[0002] In today's era of rapid digital development, various business systems highly rely on interfaces to achieve data interaction and functional collaboration. As a bridge for data transmission between different systems or modules, the accuracy of the returned data of the interface is directly related to the stable operation of the entire system and the correct execution of the business logic.

[0003] In practical applications, when verifying whether a developed interface meets the online conditions, a key and tricky problem is faced: there is often a lack of explicit field mapping relationship between the data information returned by the interface and the corresponding reference target data information. Different interfaces may be designed by different teams or developers based on their own understanding and needs, resulting in differences in the structure, field naming, etc. of the returned data.

[0004] In the prior art, for this field mapping problem, the manual configuration of mapping rules is usually adopted. The developer needs to carefully compare the structure of the interface returned data and the reference target data, determine the mapping relationship field by field, and then write code to implement this mapping. However, this method has many drawbacks: first, manual configuration of mapping rules is inefficient, especially in the case of complex interface returned data structure and numerous fields, it requires a lot of time and effort; second, this method is prone to errors, some fields may be missed or the mapping relationship may be configured incorrectly during the manual comparison and configuration process, resulting in deviations in subsequent data processing and analysis; finally, when the interface or reference target data structure changes, manual comparison and configuration of mapping rules need to be performed again, which is high in maintenance cost and prone to introduce new problems.

[0005] Due to the lack of effective automatic field mapping solutions, it is difficult to accurately determine the correspondence between the interface returned data and the reference target data in the interface quality inspection process, and thus the quality of the interface cannot be comprehensively and accurately evaluated. This may lead to data inconsistency, business logic errors, etc. after the interface is put online, seriously affecting the normal operation of the business and user experience. SUMMARY

[0006] One of the purposes of the present application is to provide an interface quality inspection method to solve the technical problem in the prior art that there is a lack of quick and accurate mapping of the data information returned by the interface to be tested and its corresponding target information, making it difficult to detect potential errors in the interface.

[0007] To achieve the above-mentioned one of the purposes of the application, the application provides an interface quality inspection method, comprising: obtaining first data information returned by a to-be-tested interface, and first target information corresponding to the first data information; obtaining a first target field existing in the first data information and the first target information, and a first target value corresponding to the first target field in the first target information; determining a first path configuration corresponding to the first target field in the first data information according to a data format of the first data information and a data format of the first target information; determining a first data value corresponding to the first target field in the first data information according to the first path configuration; and determining a state of the to-be-tested interface according to the first data value and the first target value.

[0008] As a further improvement of an embodiment of the application, before the obtaining of the first data information returned by the to-be-tested interface, the method further comprises: obtaining configuration parameters of the to-be-tested interface, the configuration parameters comprising at least one of an interface address, a request field, a request type and a request body; sending a request to the to-be-tested interface according to the configuration parameters; and generating corresponding first data information according to returned response data and the request field.

[0009] As a further improvement of an embodiment of the application, the determining of the state of the to-be-tested interface according to the first data value and the first target value comprises: determining a plurality of classification indexes according to a matching result of the first data value and the first target value; and determining the state of the to-be-tested interface according to the plurality of classifications.

[0010] As a further improvement of an embodiment of the application, the determining of the plurality of classification indexes according to the matching result of the first data value and the first target value comprises: determining a plurality of matching types according to the matching result, the matching types representing classification situations of the matching result of the first data value and the first target value returned by the to-be-tested interface, the matching types comprising at least one of a first type, a second type, a third type and a fourth type; and determining corresponding classification indexes according to statistical quantities corresponding to the first type, the second type, the third type and the fourth type in the first data information, the classification indexes comprising at least one of a precision rate, an accuracy rate and a recall rate.

[0011] As a further improvement of the embodiment of the application, the determining the several matching types according to the matching result comprises: initializing a first counting mark for counting the number of the first type, a second counting mark for counting the number of the second type, a third counting mark for counting the number of the third type, and a fourth counting mark for counting the number of the fourth type; when the first data value is equal to the first target value and not empty, the first counting mark is increased by 1; when the first data value is equal to the first target value and empty, the second counting mark is increased by 1; when the first data value is not equal to the first target value, the third counting mark is increased by 1; when the first data value is empty or missing, and the first target value is not empty, the fourth counting mark is increased by 1; and the determining the corresponding classification index according to the counted number corresponding to the first type, the second type, the third type and the fourth type in the first data information comprises: determining the several classification indexes according to the first counting mark, the second counting mark, the third counting mark and the fourth counting mark.

[0012] As a further improvement of the embodiment of the application, the determining the corresponding classification index according to the first type, the second type, the third type and the fourth type comprises: determining the accuracy rate according to the ratio of the sum of the counted number corresponding to the first type and the second type to the total counted number corresponding to all the matching types; and / or determining the precision rate according to the ratio of the first counted number corresponding to the first type to the sum of the counted number corresponding to the first type and the third type; and / or determining the recall rate according to the ratio of the first counted number corresponding to the first type to the sum of the counted number corresponding to the first type and the fourth type.

[0013] As a further improvement of the embodiment of the application, the determining the state of the interface under test according to the several classifications comprises: determining the priority of the several first target fields according to the business requirement; and determining that the interface under test meets the quality inspection requirement when the several classification indexes of the first target field with the highest priority meet the preset condition.

[0014] As a further improvement of the embodiment of the application, the classification index comprises the accuracy rate; and the determining the state of the interface under test according to the several classifications comprises: determining the several first target fields according to the business requirement; and determining that the interface under test meets the quality inspection requirement when the accuracy rates corresponding to the several first target fields are all greater than a preset threshold.

[0015] As a further improvement of the embodiment of the application, the method further comprises: obtaining the first classification index corresponding to the interface under test before updating and the second classification index corresponding to the interface under test after updating, respectively; and determining that the performance of the interface under test after updating is higher than the performance of the interface under test before updating when the second classification index is greater than the first classification index.

[0016] To achieve the above-mentioned one of the purposes of the application, the application further provides a task scheduling method, comprising: creating a target task based on the input operation of a user on a task scheduling page, the target task being used for executing the interface quality inspection method; and displaying the quality inspection result of the interface to be tested on the task scheduling page.

[0017] To achieve the above-mentioned one of the purposes of the application, the application further provides an interface quality inspection system, comprising: an input module, configured to obtain first data information returned by an interface to be tested, and first target information corresponding to the first data information; obtain a first target field existing in the first data information and the first target information simultaneously, and a first target value corresponding to the first target field in the first target information; a configuration module, configured to determine a first path configuration corresponding to the first target field in the first data information according to the data format of the first data information and the data format of the first target information; and a detection module, configured to determine a first data value corresponding to the first target field in the first data information according to the first path configuration, and determine the state of the interface to be tested according to the first data value and the first target value.

[0018] To achieve the above-mentioned one of the purposes of the application, the application further provides a computer storage medium, comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to make the processor execute the steps of the interface quality inspection method or the steps of the task scheduling method.

[0019] Compared with the prior art, the embodiments of the application have at least one of the following beneficial effects: The application adopts an interface quality inspection method, and by utilizing the structural features of data formats, the path corresponding relationship of target fields in the first data information returned by the interface to be tested and the corresponding first target information is dynamically analyzed, and the original implicit format difference is converted into an explicit path configuration rule. The path configuration essentially builds a translation bridge between heterogeneous data formats, so that the field mapping is no longer dependent on artificial experience or fixed templates, but the storage position of the data value is automatically located through format comparison, thereby eliminating the interference of the data format difference on the field matching, and ensuring that the value comparison always occurs in the field dimension with semantic equivalence. The mapping method based on the path configuration avoids the mapping failure caused by the format version change, and eliminates the cost of manually maintaining the corresponding relationship of the fields, so that the interface state determination is converted into pure data value logical comparison, and the accuracy and adaptability of the quality inspection are significantly improved. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a structural schematic diagram of an interface quality inspection system in an embodiment of the application.

[0021] Figure 2is a step schematic diagram of the interface quality inspection method in an embodiment of the present application.

[0022] Figure 3 is a partial step schematic diagram before step S1 in an embodiment of the present application.

[0023] Fig. 4(a) is a first path configuration schematic diagram of the first data information in an embodiment of the present application.

[0024] Fig. 4(b) is a second path configuration schematic diagram of the first target information in an embodiment of the present application.

[0025] Fig. 5(a) is a partial step schematic diagram of step S4' in an embodiment of the present application.

[0026] Fig. 5(b) is a step schematic diagram of step S4' in another embodiment of the present application.

[0027] Fig. 5(c) is a step schematic diagram of step S4' in still another embodiment of the present application.

[0028] Fig. 6(a) is a whole statistics schematic diagram of the matching result of the first data value and the first target value in an embodiment of the present application.

[0029] Fig. 6(b) is a detailed schematic diagram of the matching result of the first data value and the first target value in an embodiment of the present application.

[0030] Figure 7 is a change schematic diagram of the classification index before and after the interface to be tested is updated in an embodiment of the present application.

[0031] Figure 8 is a step schematic diagram of the task scheduling method in an embodiment of the present application.

[0032] Fig. 9(a) is a structure schematic diagram of the task scheduling interface in an embodiment of the present application.

[0033] Fig. 9(b) is a structure schematic diagram of the task scheduling interface in an embodiment of the present application.

[0034] Figure 10 is a flow schematic diagram of the interface quality inspection method in a more preferred embodiment of the present application. DETAILED DESCRIPTION

[0035] The present application will be described in detail below with reference to the specific embodiments shown in the drawings. However, these embodiments do not limit the present application, and the structural, method, or functional changes made by those of ordinary skill in the art based on these embodiments are included in the protection scope of the present application.

[0036] It is to be understood that the terminology "including", "comprising", or other variations thereof, is intended to cover a non-exclusive inclusion such that process, method, article, or apparatus that comprises a list of elements does not include only those elements recited but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Further, the use of the term "first", "second", etc. is merely intended to describe a variety of elements and does not imply a relative importance of one element over another. It is also to be understood that the use of the singular includes the plural unless otherwise indicated.

[0037] As shown in FIG. 1, an embodiment of the present application provides an interface quality inspection system 100. Figure 1

[0038] In an embodiment, the interface quality inspection system 100 is a system for quality detection and verification of an interface (e.g. an application programming interface).

[0039] The interface quality inspection system 100 comprises an input module 11. In one aspect, the input module 11 is configured to obtain first data information returned by a to-be-tested interface, and first target information corresponding to the first data information.

[0040] In another aspect, the input module 11 is configured to obtain a first target field existing in both the first data information and the first target information, and a first target value in the first target information corresponding to the first target field.

[0041] The input module 11 can refer to real-time calling of the to-be-tested interface to obtain the first data information, such as JSON data returned by a RESTful API (dynamic collection). It can also refer to reading of the first target information from a database or a file, such as a CSV file of a standard data table (static loading).

[0042] The interface quality inspection system 100 comprises a configuration module 12. The configuration module 12 is configured to determine a first path configuration in the first data information corresponding to the first target field according to a data format of the first data information and a data format of the first target information.

[0043] The configuration module 12 is configured to establish a field mapping relationship between the to-be-tested data and the standard data, and to accelerate the work efficiency of field matching.

[0044] The interface quality inspection system 100 comprises a detection module 13. The detection module 13 is configured to determine a first data value in the first data information corresponding to the first target field according to the first path configuration, and to determine a state of the to-be-tested interface according to the first data value and the first target value.

[0045] The detection module 13 quantitatively processes the detection quality of the field, realizes field-level quality detection, and ensures that the quality of the to-be-tested interface meets the expectation.

[0046] As shown in FIG. 1, an embodiment of the present application provides an interface quality inspection system 100. Figure 2 ​As shown, an embodiment of the present application provides an interface quality inspection method.

[0047] The interface quality inspection method is applied to an interface quality inspection system.

[0048] In an embodiment, the interface quality inspection system can be configured as Figure 1 and described above, and the corresponding technical solutions are arranged in the quality inspection method provided by the present application. Of course, the interface quality inspection system to which the interface quality inspection method provided by the present application is applied is not limited to this configuration structure.

[0049] As shown, the interface quality inspection method provided in an embodiment of the present application includes the following steps. Figure 2

[0050] Step S1, obtaining first data information returned by a to-be-tested interface and preset first target information corresponding to the first data information; Step S2, obtaining a first target field existing in the first data information and the first target information at the same time, and a first target value in the first target information corresponding to the first target field; Step S3, determining a first path configuration of the first target field in the first data information according to a data format of the first data information and a data format of the first target information; Step S4, determining a first data value in the first data information corresponding to the first target field according to the first path configuration, and determining a state of the to-be-tested interface according to the first data value and the first target value.

[0051] In this way, by utilizing the structural characteristics of the data format, the path corresponding relationship of the target field in the first data information returned by the to-be-tested interface and the corresponding first target information is dynamically analyzed, and the originally implicit format difference is converted into an explicit path configuration rule. This path configuration essentially builds a translation bridge between heterogeneous data formats, so that the field mapping is no longer dependent on manual experience or fixed templates, but the storage location of the data value is automatically located through format comparison, thereby eliminating the interference of the data format difference on the field matching, and ensuring that the value comparison always occurs in the field dimension with semantic equivalence. This mapping method based on the path configuration avoids the mapping failure caused by the format version change, and eliminates the cost of manually maintaining the field corresponding relationship, so that the interface state determination is converted into pure data value logical comparison, which significantly improves the accuracy and adaptability of the quality inspection.

[0052] In the above step S1, the first data information refers to a data set returned by the to-be-tested interface in the actual running process. It is the data generated and fed back to the calling party after the interface receives the request and processes it through internal business logic.

[0053] ​For example, taking a company information query interface as an example, when the interface is called to query the information of a company, the data returned by the interface may include the company name, company profile, legal person of the enterprise, contact information, etc. These information collectively constitutes the first data information.

[0054] As shown in Figure 3 In an embodiment, before obtaining the first data information returned by the interface to be tested in step S1, the quality inspection method can further include the following steps.

[0055] Step P11, obtaining the configuration parameters of the interface to be tested, the configuration parameters including at least one of interface address, request field, request type and request body; Step P12, sending a request to the interface to be tested according to the configuration parameters, and generating corresponding first data information according to the returned response data and the request field.

[0056] In this way, by standardizing the cumbersome manual interface calling process, the configuration parameters drive the entire quality inspection process as metadata, so that the system can automatically adapt to different protocol interfaces, reduce the time-consuming of the collection link, and avoid parameter transmission errors caused by manual operation.

[0057] In step P11, the configuration parameters of the interface to be tested can be set through a visual configuration interface, for example, a drop-down selection control for providing an interface address, a check box group for a request field, a drop-down selection control for a request type, and a template editor for a request body. Quality inspection personnel complete parameter configuration through interface interaction, which not only shortens the time and improves the accuracy, but also assigns the interface quality inspection capability to non-technical personnel (such as business test personnel) through zero-code configuration, reducing the technical threshold.

[0058] According to the configuration parameters, the interface to be tested returns corresponding first data information, and the data fields in the returned first data information can be modified or deleted according to business requirements, and the corresponding data format can also be edited and modified, which has strong adaptability; at the same time, it is convenient to recheck and correct before transmitting the data of the interface to be tested to the system, thereby improving the accuracy of the data.

[0059] In step S1, the first target information is a set of data expected to be returned by the interface to be tested according to the design requirements and business logic of the interface to be tested, which is a reference standard for judging whether the returned data of the interface to be tested is correct.

[0060] For example, continuing the above company information query interface, when querying the information of an enterprise with company ID 1001, the expected returned data includes company name “A”, company profile “xxxx”, legal person of the enterprise “B”, and contact information “xxxx”. These preset data constitute the first target information, which exists as an expected result.

[0061] In step S3, the data format refers to the organization and storage mode of data, which specifies how data is represented, transmitted and stored. Different data formats have different structures and rules, such as JSON, XML, etc.

[0062] The first path configuration refers to the specific path information determined from the first data information according to the data format of the first data information, which is used to describe the accurate positioning of the target field to be compared from the complex data interface.

[0063] It should be noted that different data formats correspond to different first path configurations. For example, in the JSON data format, the path configuration can be represented in the form of a dot or square brackets, such as positioning to the "age" field in the "user" object, the corresponding first path configuration is user.age; in the XML data format, the path configuration can use XPath expression, such as the XPath path of the "age" field is " / user / age".

[0064] In other embodiments, the path configuration of the dynamic field can also be used according to the key name or level information in the data structure corresponding to the first data information. In this path configuration, the square brackets are used to wrap the key name, and the dynamic key name can be injected through the variable, for example, $[‘user’][‘name’].

[0065] In addition, in addition to the first path configuration of the first data information, the redundancy rule of the corresponding first target field can also be set, such as non-empty, keeping two decimal places, etc., which is a further limitation of the first data value or the first target value.

[0066] For ease of understanding, for example, as shown in FIG. 4(a), the first path configuration (i.e., target field mapping rule) of the first target field (i.e., target field) is configured according to the data format of the first data information, so as to determine the corresponding first data value. The target field redundancy rule is a further limitation of the first target field, which can be adaptively configured according to actual business requirements.

[0067] As shown in FIG. 4(b), the second path configuration (i.e., verification set field mapping rule) of the first target field is configured according to the preset first target information, when the data information in the first target information is processed to form a data format similar to the key-value pair form, the second path configuration can be empty (because the actual storage node of the target field in the complex structure has been processed as a mapping relationship), and the corresponding first target value can be directly determined according to the first target field (i.e., verification set field).

[0068] In one embodiment, the step S4 of determining the state of the interface under test according to the first data value and the first target value comprises the following steps.

[0069] The step S4' of determining the state of the interface under test according to the matching result of the first data value and the first target value comprises the following steps.

[0070] As shown in FIG. 5(a), in one embodiment, the step S4' can specifically comprise the following steps.

[0071] The step S411 of determining the matching type according to the matching result; The step S412 of determining the classification index according to the statistical number of the first type, the second type, the third type and the fourth type in the first data information.

[0072] The matching type represents the classification of the matching result of the first data value returned by the interface under test and the first target value, and the matching type comprises at least one of the first type, the second type, the third type and the fourth type; and the classification index comprises at least one of the precision, the accuracy and the recall rate.

[0073] In this way, the two-level index conversion system can not only locate the specific problem field, but also evaluate the structural compliance as a whole, which helps to reduce the misjudgment rate of interface quality detection.

[0074] In the step S411, the matching type is a classification based on the matching result of the first data value returned by the interface under test and the first target value, which is essentially a classification description of the interface data matching result, and is used to directly reflect the field-level matching details.

[0075] In the step S412, the classification index, also known as a derived index, is a key index for comprehensively evaluating the interface quality, which is obtained by further calculation and analysis on the basis of the matching type. They can more comprehensively and deeply reflect the performance and quality status of the interface.

[0076] In one specific embodiment, the step S411 of determining the matching type according to the matching result can specifically comprise the following steps.

[0077] The step S4111 of initializing the first counting mark for counting the number of the first type, the second counting mark for counting the number of the second type, the third counting mark for counting the number of the third type and the fourth counting mark for counting the number of the fourth type; The step S4112 of adding 1 to the first counting mark when the first data value is equal to the first target value and is not empty; The step S4113 of adding 1 to the second counting mark when the first data value is equal to the first target value and is empty; Step S4114, when the first data value is not equal to the first target value, the third count mark is increased by 1; Step S415, when the first data value is empty or missing, and the first target value is not empty, the fourth count mark is increased by 1; Step S412', according to the first count mark, the second count mark, the third count mark and the fourth count mark, a plurality of classification indexes are determined.

[0078] In this way, by strictly distinguishing the matching states of value equality, control matching, value inequality and missing, the defect that the traditional method mixes "null value" and "missing" is overcome, and the classification accuracy is improved.

[0079] In step S411, the first classification index indicates that the first data value is compliant and matches the first target value (i.e., value matching and meeting business rules). For example, the first target field returned by the interface under test is a phone number, and the corresponding first data value is "138xxxxxxxxx", which meets the 11-digit mobile phone number, and the first target value is also "138xxxxxxxxx", and the two values match. The second classification index indicates that the first data value and the first standard value are both empty, and the business allows empty values (i.e., both parties recognize empty values). For example: the interface returns { "phone ": null}, and the first standard information is { "contact number ": null}.

[0080] The third classification index indicates that the first data value does not match the first target value. For example, the first data value of the first target field returned by the interface under test is "123", and the first target value is "138xxxxxxxxx", which are not equal.

[0081] The fourth classification index indicates that the first data value is missing or empty, but the first standard value exists and is compliant (i.e., the interface under test does not return the field that should have been returned). For example, the first data value corresponding to the first target field returned by the interface under test is empty, and the first target value is "138xxxxxxxxx".

[0082] The above matching types are used to classify and determine the matching results of the data values corresponding to a plurality of target fields in the first data information and the first target information and the target values, so that the matching degree at the field level can be determined.

[0083] In a specific embodiment, the accuracy rate is determined according to the sum of the statistical quantities corresponding to the first type and the second type, and the ratio of the total statistical quantity corresponding to all matching types.

[0084] In a specific embodiment, the precision rate is determined according to the first statistical quantity corresponding to the first type, and the ratio of the sum of the statistical quantities corresponding to the first type and the third type.

[0085] In a specific embodiment, the recall rate is determined according to the ratio of the first type corresponding to the first statistical quantity and the sum of the statistical quantities corresponding to the first type and the fourth type.

[0086] In other embodiments, any two or three of the above embodiments can be combined, and adaptive selection can be made according to actual business needs, which is not specifically limited here.

[0087] In order to intuitively understand the matching result of the first data value and the first target value in the first data information, the statistical quantity corresponding to the matching type and the classification index determined according to the statistical quantity can be displayed in the visualization interface. As shown in FIG. 6(a) and FIG. 6(b).

[0088] FIG. 6(a) shows the overall statistical result of the first type (TP), the second type (TN), the third type (FP), and the fourth type (FN) corresponding to all data records in the first data information. According to the overall statistical result, the detailed content of the corresponding index can also be viewed, as shown in FIG. 6(b). The detailed content includes the target field, the corresponding data value and target value, and the corresponding basic index determined according to the matching result.

[0089] When the system needs to be iterated quickly, the precision and recall of the core field can be ensured first, and the requirements for non-key fields are temporarily relaxed.

[0090] As shown in FIG. 5(b), in another embodiment, the step S4' of determining the state of the to-be-tested interface according to a plurality of classifications includes the following steps.

[0091] Step S421, determining the priority of a plurality of first target fields according to business needs; Step S422, determining that the to-be-tested interface meets the quality inspection requirements when a plurality of classification indexes of the first target field with the highest priority meet the preset conditions.

[0092] In this way, by establishing a field priority mechanism, the interface is allowed to be online on the premise that the quality of the key business field meets the requirements, thereby achieving a balance between business emergency needs and quality control.

[0093] In a specific embodiment, when the accuracy of the first target field with the highest priority is greater than a preset first threshold, it is determined that the to-be-tested interface meets the quality inspection requirements.

[0094] For example, the priority of the a field is the highest, when the a field meets the business requirements (such as the accuracy reaching 98%), even if the b field does not meet the business online requirements, but the priority of the b field is lower than that of the a field, then it is still determined that the to-be-tested interface meets the quality inspection requirements, and it is still selected to be online.

[0095] In another specific embodiment, when the accuracy of the first target field with the highest priority is greater than the first threshold value and the recall rate is greater than the second threshold value, it is determined that the interface to be tested meets the quality inspection requirements.

[0096] As shown in FIG. 5(c), in another embodiment, the step of determining the state of the interface to be tested according to a plurality of categories in step S4' specifically includes the following steps.

[0097] Step S431, determining a plurality of first target fields according to business requirements; Step S432, when the accuracy of each of the plurality of first target fields is greater than a preset threshold value, determining that the interface to be tested meets the quality inspection requirements.

[0098] In this way, by using the unified threshold value control of the accuracy of a plurality of fields, the data recognition quality of the interface in multiple dimensions is ensured to be balanced and reliable, and the usability and credibility of the interface in the data layer are ensured.

[0099] In one embodiment, the interface quality inspection method of the present application can further include the following steps.

[0100] Step S51, obtaining a first classification index corresponding to the interface to be tested before updating and a second classification index corresponding to the interface to be tested after updating, respectively; Step S52, when the second classification index is greater than the first classification index, the performance of the interface to be tested after updating is higher than the performance of the interface to be tested before updating.

[0101] In this way, by capturing the difference between the classification indexes before and after updating, the improvement effect of the version is directly quantified, thereby avoiding the misjudgment risk caused by the deviation of test data or manual sampling in the traditional method.

[0102] Figure 7 By showing the change of the classification index of the interface to be tested before and after updating, the rise and fall of the classification index of the plurality of target fields in the first data information can be directly determined. In this way, the user can quickly and accurately determine the performance change of the core field and the performance difference of the interface to be tested before and after updating.

[0103] As shown in FIG. 5(c), in another embodiment, the step of determining the state of the interface to be tested according to a plurality of categories in step S4' specifically includes the following steps. Figure 8 As shown in FIG. 5(c), in another embodiment, the step of determining the state of the interface to be tested according to a plurality of categories in step S4' specifically includes the following steps.

[0104] Step M1, creating a target task based on the input operation of a user on a task scheduling page, the target task being used to execute the interface quality inspection method; Step M2, displaying the quality inspection result of the interface to be tested on the task scheduling page.

[0105] Therefore, by allowing the user to create a target task on the task scheduling page, and the target task is specially used for executing a specific interface quality inspection method, the design enables the user to start the interface quality inspection task only through simple page operation without deep code level or complex configuration, greatly simplifies the task creation process, saves time and effort, and improves the convenience of task scheduling.

[0106] In step M1, the task scheduling page is a visual interface specially used for managing and controlling task scheduling related operations in the software system or platform.

[0107] The above various embodiments, examples or specific instances provided by the present application can be combined with each other, thereby forming more optimal embodiments.

[0108] Figure 10 A flowchart of an interface quality inspection method in a preferred embodiment is shown, and the working process of the interface quality inspection will be described below in combination with the content shown in Figure 10

[0109] First, the first data information returned by the to-be-tested interface and the corresponding preset first target information are obtained, and the first data value and the first target value matched with the first target field are found from the first data information and the first target information.

[0110] Secondly, according to the difference between the first data value and the first target value, the corresponding matching type is determined, and for each target field in the first data information and the first target information, the corresponding data value and the target value are compared one by one according to the preset determination rule (for example, for the target field A, if the first data value is equal to the first target value and within the expected value range, it is determined that the matching is successful; if not equal or beyond the expected value range, it is determined that the matching fails), and the matching type corresponding to each target field is determined. Then, the number of occurrences of each matching type in all target fields is counted to obtain the statistical number of the first type, the second type, the third type and the fourth type.

[0111] Finally, according to the statistical number of the first type, the second type, the third type and the fourth type, the corresponding classification index is determined, and whether the to-be-tested interface meets the online condition is determined according to the classification index.

[0112] An embodiment of the present application provides a computer readable storage medium.

[0113] ​In an embodiment, the computer readable storage medium stores a computer program executed by the processor mentioned above, or the interface quality inspection method or the task scheduling method in any of the technical solutions mentioned above.

[0114] When the processor executes the computer program, the description of the interface quality inspection method or the description of the task scheduling method in any of the technical solutions mentioned above can be performed, and thus will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here.

[0115] The computer readable storage medium can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0116] To sum up, the interface quality inspection method and the task scheduling method, the interface quality inspection system and the medium provided by the application are provided. By obtaining the first data information returned by the to-be-tested interface and the corresponding first target information, the detection benchmark and the actual object are determined. According to the data format, the first path configuration is determined, which provides a reliable guide for accurately extracting target data from complex data structures. Finally, the first data value is obtained according to the path configuration and compared with the first target value to determine the interface state. Whether the interface correctly returns the expected data when processing the business logic can be quickly and accurately judged. The potential data processing error of the to-be-tested interface can be effectively identified, the to-be-tested interface can be accurately and stably operated in the actual business scenario, reliable quality support is provided for the safe online of the to-be-tested interface, business failures after the to-be-tested interface is online are effectively avoided, and the stable operation of the business system is ensured.

[0117] It should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be combined appropriately to form other embodiments that can be understood by those skilled in the art.

[0118] The series of detailed descriptions listed above are only specific descriptions of the feasible embodiments of the application, and are not intended to limit the protection scope of the application. Any equivalent embodiments or changes made without departing from the spirit of the application should be included in the protection scope of the application.

Claims

1. An interface quality inspection method, characterized in that, The method comprises the following steps: obtaining first data information returned by the interface under test, and preset first target information corresponding to the first data information; obtaining a first target field existing in the first data information and the first target information, and a first target value in the first target information corresponding to the first target field; determining a first path configuration in the first data information corresponding to the first target field according to a data format of the first data information and a data format of the first target information; determining a first data value in the first data information corresponding to the first target field according to the first path configuration, and determining a state of the interface under test according to the first data value and the first target value.

2. The interface quality inspection method of claim 1, wherein, Before the step of obtaining the first data information returned by the interface under test, the method further comprises the following steps: obtaining configuration parameters of the interface under test, wherein the configuration parameters comprise at least one of an interface address, a request field, a request type and a request body; sending a request to the interface under test according to the configuration parameters, and generating corresponding first data information according to returned response data and the request field.

3. The interface quality inspection method of claim 1, wherein, The step of determining the state of the interface under test according to the matching result of the first data value and the first target value comprises the following steps: determining a plurality of classification indexes according to the matching result of the first data value and the first target value, and determining the state of the interface under test according to the plurality of classifications.

4. The interface quality inspection method of claim 3, wherein, The step of determining a plurality of matching types according to the matching result comprises the following steps: determining a plurality of matching types according to the matching result, wherein the matching types represent classification conditions of the matching result of the first data value returned by the interface under test and the first target value, and the matching types comprise at least one of a first type, a second type, a third type and a fourth type; determining corresponding classification indexes according to statistical quantities of the first type, the second type, the third type and the fourth type in the first data information, wherein the classification indexes comprise at least one of precision, accuracy and recall rate.

5. The interface quality inspection method of claim 4, wherein, The step of determining a plurality of matching types according to the matching result comprises the following steps: initializing a first counting mark for counting the number of the first type, a second counting mark for counting the number of the second type, a third counting mark for counting the number of the third type and a fourth counting mark for counting the number of the fourth type; when the first data value is equal to the first target value and is not empty, the first counting mark is increased by 1; when the first data value is equal to the first target value and is empty, the second counting mark is increased by 1; when the first data value is not equal to the first target value, the third counting mark is increased by 1; when the first data value is empty or missing, and the first target value is not empty, the fourth counting mark is increased by 1; The step of determining corresponding classification indexes according to statistical quantities of the first type, the second type, the third type and the fourth type in the first data information comprises the following steps: determining a plurality of classification indexes according to the first counting mark, the second counting mark, the third counting mark and the fourth counting mark.

6. The interface quality inspection method of claim 4, wherein, The step of determining corresponding classification indexes according to the first type, the second type, the third type and the fourth type comprises the following steps: determining accuracy according to a ratio of a sum of statistical quantities corresponding to the first type and the second type to a total statistical quantity corresponding to all matching types. And / or, according to the first type corresponding to the first statistical quantity, and the ratio of the sum of the statistical quantities corresponding to the first type and the third type, the precision is determined; And / or, according to the first type corresponding to the first statistical quantity, and the ratio of the sum of the statistical quantities corresponding to the first type and the fourth type, the recall rate is determined.

7. The interface quality inspection method of claim 3, wherein, The method further comprises: According to the business requirements, the priority of the first target field is determined; When the classification index of the first target field with the highest priority meets the preset condition, it is determined that the interface to be tested meets the quality inspection requirements.

8. The interface quality inspection method of claim 3, wherein, The classification index includes accuracy; the method further comprises: According to the business requirements, the first target field is determined; When the accuracy corresponding to the first target field is greater than the preset threshold value, it is determined that the interface to be tested meets the quality inspection requirements.

9. The interface quality inspection method of claim 1, wherein, The method further comprises: Respectively obtaining the first classification index corresponding to the interface to be tested before updating and the second classification index corresponding to the interface to be tested after updating; When the second classification index is greater than the first classification index, the performance of the interface to be tested after updating is higher than the performance of the interface to be tested before updating.

10. A task scheduling method characterized by comprising: It comprises: Based on the input operation of the user on the task scheduling page, the target task is created, and the target task is used to execute the interface quality inspection method of any one of claims 1-9; The quality inspection result of the interface to be tested is displayed on the task scheduling page.

11. An interface quality inspection system, characterized by, It comprises: The input module is used to obtain the first data information returned by the interface to be tested and the preset first target information corresponding to the first data information; The first target field existing in the first data information and the first target information at the same time is obtained, and the first target value corresponding to the first target field in the first target information is obtained; The configuration module is used to determine the first path configuration corresponding to the first target field in the first data information according to the data format of the first data information and the data format of the first target information; The detection module is used to determine the first data value corresponding to the first target field in the first data information according to the first path configuration, and determine the state of the interface to be tested according to the first data value and the first target value.

12. A computer storage medium, comprising: At least one processor; Memory, the memory stores a computer program capable of running on the processor, characterized in that when the processor executes the program, it executes the steps of the interface quality inspection method of any one of claims 1-9 or executes the steps of the task scheduling method of claim 10.