Interface testing method and device, computer equipment, medium and program product

By automatically identifying interface parameters and test categories, generating and executing exception test cases, the problem of omissions in existing interface tests is solved, and the accuracy and comprehensiveness of the test is improved.

CN119597610APending Publication Date: 2025-03-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411830562.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the existing interface testing methods, artificially setting the test scenario can easily lead to scene missing, resulting in incomplete testing and poor quality.

Method used

By determining the target software version and interface content, automatically identifying the interface parameters and their required test categories, calling the exception test template to generate the target exception test case, and executing the use case to determine the interface test results.

Benefits of technology

Improve the accuracy and comprehensiveness of interface testing, reduce human errors, and ensure the quality of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597610A_ABST
    Figure CN119597610A_ABST
Patent Text Reader

Abstract

The invention relates to an interface testing method and device, computer equipment, a medium and a program product. Relates to the technical field of testing, and comprises the following steps: determining a target software version for interface testing, and determining interface contents of a target interface according to the target software version; performing content identification on the interface content, and determining parameter information corresponding to a plurality of parameters in the target interface and at least one target test category required to be tested by each parameter; for each target test category needing to be tested by each parameter, calling an abnormal test template of the target test category, and generating a target abnormal test case corresponding to the parameter according to the abnormal test template and parameter information corresponding to the parameter; after each target abnormal test case is executed, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case, so that the test quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to an interface testing method, device, computer equipment, medium and program product. Background Art

[0002] With the development of computer technology, the complexity and scale of software development are also increasing. In order to achieve the decoupling and maintainability of software, the software is decomposed into multiple units or components, which communicate with each other through interfaces. In addition, the software also needs to be integrated with external systems or services. These external systems usually provide a set of interfaces for other systems to call. Therefore, in order to ensure the normal operation of the software, interface testing is required during the software testing process.

[0003] In the related art, testers are usually required to determine abnormal test scenarios based on experience and construct corresponding test cases for interface testing. However, the number of abnormal test scenarios faced by interface testing is large, and manual settings can easily lead to scenario omissions, making interface testing incomplete and ineffective, resulting in poor test quality. Summary of the invention

[0004] Based on this, it is necessary to provide an interface testing method, apparatus, computer equipment, medium and program product that can improve the test quality of interface testing in response to the above technical problems.

[0005] In a first aspect, the present application provides an interface testing method, comprising:

[0006] Determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version;

[0007] Performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter;

[0008] For each target test category that needs to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter;

[0009] After executing each target abnormal test case, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case.

[0010] In a second aspect, the present application also provides an interface testing device, comprising:

[0011] A content determination module, used to determine the target software version targeted by the interface test, and determine the interface content of the target interface according to the target software version;

[0012] A content identification module, used to perform content identification on the interface content, determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter;

[0013] A case generation module, for calling an abnormal test template of each target test category required to be tested for each parameter, and generating a target abnormal test case corresponding to the parameter according to the abnormal test template and parameter information corresponding to the parameter;

[0014] The interface testing module is used to determine the interface testing result of the target interface according to the execution results corresponding to each target abnormal test case after executing each target abnormal test case.

[0015] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0016] Determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version;

[0017] Performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter;

[0018] For each target test category that needs to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter;

[0019] After executing each target abnormal test case, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0021] Determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version;

[0022] Performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter;

[0023] For each target test category that needs to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter;

[0024] After executing each target abnormal test case, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case.

[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0026] Determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version;

[0027] Performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter;

[0028] For each target test category that needs to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter;

[0029] After executing each target abnormal test case, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case.

[0030] The above-mentioned interface testing method, device, computer equipment, medium and program product can obtain the interface content of the target interface matching the target software version by determining the target software version targeted by the interface test, and then, by automatically identifying the content of the interface content, accurately and comprehensively query the target test category required for the target interface, thereby determining the parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter, avoiding the lack of test scenarios caused by artificial settings. Subsequently, for each target test category required to be tested for each parameter, the abnormal test template of the target test category is called, and the target abnormal test case corresponding to the parameter is automatically generated according to the parameter information corresponding to the abnormal test template and the parameter. That is, directly according to the matched abnormal test template, the target abnormal test case matching each target test category is adaptively constructed, without the need for manual one-to-one construction, ensuring the accuracy of the target abnormal test case construction, and reducing the error rate. Then, by executing each target abnormal test case, the target interface can be tested more accurately and comprehensively. In this way, after executing each target abnormal test case, the interface test result of the target interface is determined according to the execution results corresponding to each target abnormal test case. In this way, the test quality of interface testing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 An application environment diagram of an interface testing method in an embodiment;

[0033] Figure 2 A schematic diagram of a flow chart of an interface testing method in an embodiment;

[0034] Figure 3 A schematic diagram of interface content in one embodiment;

[0035] Figure 4 is a schematic diagram of target test categories in one embodiment;

[0036] Figure 5 is a structural block diagram of an interface testing device in an embodiment;

[0037] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] The interface testing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0040] In some embodiments, the terminal 102 determines the target software version for the interface test, and determines the interface content of the target interface based on the target software version; performs content recognition on the interface content to determine parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter; for each target test category required to be tested for each parameter, the terminal 102 calls the exception test template of the target test category, and generates a target exception test case corresponding to the parameter based on the exception test template and the parameter information corresponding to the parameter; the terminal 102 sends each target exception test case to the server 104 to instruct the server 104 to execute each target exception test case, obtain each corresponding execution result, and return each execution result to the terminal 102, and the terminal 102 determines the interface test result of the target interface based on each execution result.

[0041] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0042] In an exemplary embodiment, Figure 2 As shown, an interface testing method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, including the following steps S202 to S208. Among them:

[0043] Step S202, determining the target software version for the interface test, and determining the interface content of the target interface according to the target software version.

[0044] Among them, the target software version is the version of the target software code, and the interface test is to test the target interface involved in the target software code. It can be understood that the target interface is derived from the target software code, and the interface content of the target interface is used to define the content of the target interface. Exemplarily, the form of the interface content includes but is not limited to documents, tables, and pictures. The interface content defines the basic information, request parameter information, and request header information of the target interface. The basic information includes interface name, interface description, communication protocol, communication port, request example, and response example; the request parameter information includes parameter name, description, type, value description, and whether it is necessary; the request header information includes request header name, description, data type, value description, and whether it is necessary.

[0045] Optionally, the terminal determines the software corresponding to the interface test and uses the latest software version of the software as the target software version. Alternatively, the terminal uses the selected software version as the target software version in response to a selection operation for the software version.

[0046] Optionally, after determining the target software version, the terminal determines a target interface related to the target software version, and acquires interface content of the target interface.

[0047] Exemplarily, the terminal queries the interface description content associated with the target software version, and obtains the interface content of the target interface according to the interface description content. Each software version has an associated interface description content, which is used to define the interface content of each interface in the software code of the software version.

[0048] Step S204: perform content recognition on the interface content to determine parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter.

[0049] There are multiple parameters in the target interface, such as request parameters and request header parameters. For example, request parameters include parameters describing the object name (username), and request header parameters include parameters describing the object age (age). The parameter information corresponding to each parameter can be understood as the value or definition of the parameter; for example, when the parameter is a request parameter, the corresponding parameter information is the request parameter information, and when the parameter is a request header parameter, the corresponding parameter information is the request header information.

[0050] The target test category refers to the category of abnormal test scenarios that require parameters when performing interface testing on the target interface. For example, the target test category can be a necessary parameter test category, a data type test category, a null value test category, a parameter length test category, an enumeration type test category, a boundary value test category, etc.

[0051] Optionally, if it is determined that the interface content passes the integrity check, the terminal returns to step S204 to continue execution. If it is determined that the interface content does not pass the integrity check, the terminal generates and displays a content error prompt message to instruct the tester to enter the complete interface content.

[0052] Exemplarily, the integrity verification step includes: the terminal identifies key fields of the interface content to obtain a key field identification result. If the key field identification result indicates that the interface content has a basic information field, a request parameter information field, and a request header information field, then the integrity verification is confirmed to have passed. If the key field identification result indicates that the interface content does not have a basic information field, or does not have a request parameter information field, or does not have a request header information field, then the integrity verification is confirmed to have failed.

[0053] Optionally, after the terminal performs content recognition on the interface content and determines multiple parameters of the target interface, for each parameter, the terminal determines at least one target test category required to be tested according to the parameter information.

[0054] Exemplarily, the terminal obtains a plurality of preset information items, and for each information item, the terminal analyzes whether there is description information of the information item in the parameter information, and if so, the information item is used as a target test category.

[0055] For example, Figure 3 FIG. 1 is a schematic diagram of interface content in an embodiment. Figure 3 In the example, the interface content of the target interface GetUer (get object information) includes the following information: interface description: This interface is used to get object information; communication protocol: HTTPS (Hypertext Transfer Protocol Secure); communication port: 8080; request parameter table; request header table. Figure 3 The table headers of the request parameter table and the request header table indicate the name and description of the parameter. In addition, the "type", "value description", and "necessary" in the header can all be considered as information items. Among them, "type" can be a data type or an enumeration type; "value description" can be an information item of the parameter length, an information item of the null value, or an information item of the boundary value.

[0056] For example, request parameter 11 describes the name of the object, which is the object name username. The information item of the type is a string (that is, the type of request parameter 11 is a string type), the information of the value description is the length range: [5,20] (that is, the length of request parameter 11 is within the length range), and the information of whether it is necessary is yes (that is, request parameter 11 is a necessary parameter and cannot be missing). Similarly, for the request header parameter 21 in the request header table, which describes the age of the object, the information item of the type is an integer (that is, the type of request parameter 21 is an integer type), the information of the value description is [1, 100] (that is, the value of request header parameter 21 is within the range of [1, 100]), and the information of whether it is necessary is no (that is, request parameter 21 is not a necessary parameter and can be missing).

[0057] Optionally, the terminal may also directly perform content recognition on the interface content according to the content recognition model to obtain parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter.

[0058] Step S206, for each target test category required to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and parameter information corresponding to the parameter.

[0059] Among them, the exception test template is a template for performing abnormal interface testing. Each target test category has a corresponding exception test template. For each parameter and each target test category, the corresponding exception test template defines the description content of the parameter not meeting the target test category. The target exception test case can be understood as a request for performing abnormal interface testing, that is, constructing a corresponding request based on the exception test template and parameter information to send to the server for abnormal interface testing.

[0060] Exemplarily, for each target test category required to be tested for each parameter, the terminal selects an abnormal test template corresponding to the target test category from a plurality of pre-stored abnormal test templates. The terminal generates a target abnormal test case corresponding to the parameter based on the selected abnormal test template, the parameter information of the parameter, and the basic information of the target interface.

[0061] like Figure 4 FIG. 1 is a schematic diagram of target test categories in an embodiment. Figure 4 The target test categories are listed as required parameters, data types, null values, parameter lengths, boundary values, and enumeration types. Figure 4 Let's take an example:

[0062] Example 1: For a parameter in the target interface, the parameter is a necessary parameter. When the target test category to be tested includes the necessary parameter L1, the corresponding abnormal test template M1 stipulates that the parameter belonging to the necessary parameter is refused to be set, thereby, the parameter is generated in the target abnormal test case.

[0063] Example 2: For a parameter in the target interface, when the target test category to be tested includes data type L2, the corresponding exception test template M2 specifies that the data type is refused to be set according to the description of data type L2. For example, the description specifies that the data type of the parameter is Boolean type, and the corresponding exception test template M2 is called, and the generated target exception test case is set to other types, that is, types other than Boolean type.

[0064] Example 3: For a parameter in the target interface, when the target test category to be tested includes a null value L3, the corresponding exception test template M3 specifies that the parameter value is refused to be set, that is, it is automatically set to NULL (null value). For example, for this parameter, in this case, the parameter value in the generated target exception test case is a null value.

[0065] Example 4: For a parameter in the target interface, when the target test category to be tested includes parameter length L4, the corresponding exception test template M4 stipulates that the parameter length range specified in the description is refused to be set. For example, the description specifies a specific parameter length range, such as [10, 99]. The exception test template M4 is called, and the parameter length of the parameter in the generated target exception test case is not within the parameter length range, for example, the parameter length is 9.

[0066] Example 5: For a parameter in the target interface, when the target test category to be tested includes the boundary value L5, the corresponding abnormal test template M5 specifies that at least one boundary value is set according to the numerical range specified in the description content, and each boundary value is not within the numerical range. The parameter value in the generated target abnormal test case is the boundary value. The boundary value is determined according to the upper and lower boundary values ​​of the numerical range. For example, the boundary value is determined by the upper boundary value of the numerical range as an example: if the numerical range includes the upper boundary value, the corresponding boundary value is the upper boundary value plus 1; if the numerical range does not include the upper boundary value, the corresponding boundary value is the upper boundary value; the boundary value is determined by the lower boundary value of the numerical range as an example: if the numerical range includes the lower boundary value, the corresponding boundary value is the lower boundary value minus 1; if the numerical range does not include the lower boundary value, the corresponding boundary value is the lower boundary value. For example, the description content specifies a specific numerical range, such as (10, 99], the upper limit value 99 is included in the numerical range, and the boundary value can be 100; the lower limit value 10 is not included in the numerical range, and the boundary value is 10. In this way, it can be ensured that the parameter value of the parameter in the generated target abnormal test case is not within the numerical range.

[0067] Example 6: For a parameter in the target interface, the target test category to be tested includes the enumeration type L6. The corresponding exception test template M6 specifies that the description content of the enumeration type is rejected. For example, the description content specifies the enumeration value (such as true or false). The exception test template M6 is called, and the parameter value in the generated target exception test case is set to a non-enumeration value, such as a garbled string.

[0068] Step S208, after executing each target abnormal test case, determine the interface test result of the target interface according to the execution result corresponding to each target abnormal test case.

[0069] Optionally, the terminal sends each target abnormal test case to the server in turn to instruct the server to execute each target abnormal test case to determine the corresponding execution result. After determining that each target abnormal test case has been executed, the terminal determines the interface test result of the target interface according to each execution result sent by the server.

[0070] Exemplarily, the terminal sends each target exception test case to the server in turn to instruct the server to respond according to each target exception test case received, and generate a response code for each target exception test case, and generate a corresponding execution result according to the response code of each target exception test case until the execution result of the last target exception test case is generated. The server generates a response end message according to each execution result and sends it to the terminal.

[0071] After receiving the response completion information, the terminal confirms that each target abnormal test case has been executed, and parses the response completion information to obtain the execution results corresponding to each target abnormal test case, and determines the interface test result of the target interface based on each execution result.

[0072] In the above interface testing method, by determining the target software version targeted by the interface test, the interface content of the target interface matching the target software version can be obtained according to the target software version, and then, by automatically identifying the content of the interface content, the target test category required for the target interface can be accurately and comprehensively queried, thereby determining the parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required for each parameter to be tested, avoiding the lack of test scenarios caused by artificial settings. Subsequently, for each target test category required to be tested for each parameter, the abnormal test template of the target test category is called, and the target abnormal test case corresponding to the parameter is automatically generated according to the parameter information corresponding to the abnormal test template and the parameter. That is, directly according to the matched abnormal test template, the target abnormal test case matching each target test category is adaptively constructed, without the need for manual one-to-one construction, ensuring the accuracy of the target abnormal test case construction, and reducing the error rate. Then, by executing each target abnormal test case, the target interface can be subjected to a more accurate and more comprehensive interface test. In this way, after executing each target abnormal test case, the interface test result of the target interface is determined according to the execution results corresponding to each target abnormal test case. In this way, the test quality of the interface test can be improved.

[0073] In some embodiments, the interface content of the target interface is determined according to the target software version, including: determining the target software code of the target software version, and determining the interface description content associated with the target software version; determining the target interface for interface testing according to one of the target software code and the interface description content; and obtaining the interface content of the target interface from the interface description content.

[0074] Exemplarily, the terminal queries the corresponding target software code from the local storage according to the target software version, and queries the interface description content associated with the target software version from the local storage according to the mapping relationship between the software version and the content identifier of the interface description content.

[0075] It should be noted that each software version has a corresponding interface description content, and all interfaces involved in the interface description content are used in the software code corresponding to the software version.

[0076] Exemplarily, the terminal identifies multiple interfaces involved in the target software code, and uses any one of the multiple interfaces as the target interface. Alternatively, the terminal identifies multiple interfaces in the interface description content, and uses any one of the multiple interfaces as the target interface. Alternatively, the terminal extracts a key code fragment from the target software code, identifies the interface involved in the key code fragment, and uses the identified interface as the target interface.

[0077] Exemplarily, the terminal intercepts the interface content of the target interface from the interface description content.

[0078] In this embodiment, the matching interface description content is determined according to the target software version. And the target interface currently undergoing interface testing is accurately located through one of the target software code and the interface description content of the target software version. Thus, the interface content of the target interface can be accurately queried from the interface description content.

[0079] In some embodiments, a target interface for interface testing is determined based on one of a target software code and an interface description content, including: when the target software version is the first software version, using the interface in the interface description content as the target interface; when the target software version is not the first software version, determining the previous software version of the target software version and obtaining the previous software code of the previous software version; obtaining a code snippet inconsistent with the previous software code from the target software code, and using the interface involved in the code snippet as the target interface.

[0080] The target software version may be the latest software version, the first software version, or a non-first software version.

[0081] Exemplarily, if the target software version is the first software version, any interface in the interface description content is used as the target interface.

[0082] Exemplarily, if the target software version is not the first software version, the previous software code of the previous software version is obtained, and the previous software code and the target software code are compared to determine the code fragment in the target software code that is inconsistent with the previous software code. The code fragment can be a newly added code fragment or an updated code fragment, which is not specifically limited. The terminal identifies any interface in the code fragment as the target interface.

[0083] Exemplarily, if the target software version is not the first software version, historical interface test records are obtained from local storage to verify whether there is a previous interface test result corresponding to the previous software version in the historical interface test records. If so, it means that the interface in the previous software code has undergone interface testing. At this time, return to the step of obtaining the previous software code of the previous software version to continue execution.

[0084] In this embodiment, when the target software version is the first software version, the target interface is directly determined from the interface description content that only involves interface-related information, avoiding searching for information about the interface one by one from the target software code containing many different types of information, thereby improving the efficiency of determining the target interface. When the target software version is not the first software version, from the code fragments in the target software code that are inconsistent with the previous software code, only the interface existing in the code fragment needs to be searched, without searching the interface for the entire target software code, thereby also improving the efficiency of determining the target interface.

[0085] In some embodiments, content recognition is performed on the interface content to determine parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category that needs to be tested for each parameter, including: calling a content recognition model, and performing content recognition on the interface content through the content recognition model to obtain an identification result of the target interface; based on the identification result of the target interface, determining parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category that needs to be tested for each parameter.

[0086] Among them, the content recognition model can be a model based on a neural network.

[0087] Exemplarily, the terminal inputs the interface content into the content recognition model, outputs the recognition result of the target interface, and parses the recognition result of the target interface to obtain parameter information corresponding to each of the multiple parameters in the target interface and multiple candidate test categories required to be tested for each parameter.

[0088] Then, the terminal may use each candidate test category as a target test category, that is, the total number of candidate test categories is consistent with the total number of target test categories of the actual interface test, which can be understood as a full interface test.

[0089] Alternatively, the terminal selects a target test category from a plurality of candidate test categories required to be tested for each parameter based on the test requirements of the target interface, or if it is verified that the interface test cycle of the target interface is less than the full test cycle.

[0090] In this embodiment, the parameter information and test category information of the target interface are automatically identified through the content recognition model, without the need for manual one-by-one query, thereby improving the test efficiency of the entire interface test.

[0091] In some embodiments, based on the identification result of the target interface, parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter are determined, including: obtaining the parameter information corresponding to each parameter and the multiple candidate test categories associated with each parameter from the identification result of the target interface; obtaining the test category priority information of the target interface; for each parameter, according to the test category priority information, sorting the multiple candidate test categories associated with the parameter from high to low priority, and using a preset number of candidate test categories with the highest ranking as the target test categories required to be tested for the parameter.

[0092] Among them, each interface has corresponding test category priority information, and each test category priority information includes the priorities of all preset test categories (pre-set test categories). The test category priority information of different interfaces is different. For example, there are multiple preset test categories in the interface test, namely L1 to Lx. For interface 1, the corresponding test category priority information is: L1; L2; ...; Lx, that is, L1 has the highest priority, L2 has the second highest priority, ..., and Lx has the lowest priority. For interface 2, the corresponding test category priority information is: Lx; L3; ...; L1, that is, Lx has the highest priority, L3 has the second highest priority, ..., and L1 has the lowest priority.

[0093] Exemplarily, the preset number may be the same as the number of candidate test categories, that is, all candidate test categories are subjected to interface tests, which belongs to full-quantity testing. Exemplarily, the preset number may be less than the number of candidate test categories, that is, not all candidate test categories are subjected to interface tests, which belongs to non-full-quantity testing. For example, when the interface test cycle of the target interface is less than the full-quantity testing cycle, the preset number is less than the number of candidate test categories.

[0094] Exemplarily, the terminal parses the identification result of the target interface to obtain parameter information corresponding to each of the multiple parameters and multiple candidate test categories associated with each parameter. For each parameter, the multiple associated candidate test categories are prioritized from high to low according to the test category priority information. The terminal determines the importance of the parameter, determines the preset number of the parameter according to the importance, and uses the preset number of candidate test categories ranked at the top as the target test categories required to be tested for the parameter.

[0095] The importance of each parameter in the target interface is different. For example, the higher the importance, the more corresponding presets; the lower the importance, the fewer corresponding presets.

[0096] For example, assuming that the preset test categories are L1, L2, L3, L4, and L5; for the target interface, the corresponding test category priority information is: L3; L2; L1; L4; L5. For a certain parameter in the target interface, the associated candidate test categories involve L1, L2, L3, and L4; the corresponding preset number is 2, then the target test category corresponding to the parameter is L3 and L2.

[0097] In this embodiment, after determining the multiple candidate test categories corresponding to each parameter, a preset number of candidate test categories with higher priorities are selected as the target test categories required to be tested for the parameter according to the test category priority information of the target interface. In this way, the number of target abnormal test cases in the interface test can be flexibly selected according to actual needs, and the interface test process is more convenient.

[0098] In some embodiments, the interface test result of the target interface is determined according to the execution results corresponding to each target abnormal test case, including: for each target abnormal test case, obtaining the expected error code corresponding to the target abnormal test case, parsing the corresponding execution result, obtaining the response code of the target abnormal test case, and verifying whether the response code of the target abnormal test case is consistent with the corresponding expected error code, to obtain the verification result corresponding to the target abnormal test case; when each verification result indicates consistency, determining that the interface test result of the target interface is successful; when there is at least one verification result indicating inconsistency, determining that the interface test result of the target interface is a failure.

[0099] The expected error code refers to the error code expected after executing the target exception test case. The error code not only indicates the response error, but also indicates the cause of the error.

[0100] Exemplarily, in the process of generating a target abnormal test case, a corresponding expected error code is determined according to the corresponding target test category. The execution result includes a response code and response information.

[0101] For example, after determining each verification result, the terminal integrated Allure plug-in (a lightweight test report tool) can be used to generate a test report for each verification result and display it, so that the tester can intuitively and clearly view the test report to determine the interface test result.

[0102] In this embodiment, by verifying whether the response code of the target abnormal test case is consistent with the corresponding expected error code, the interface test result of the target interface can be determined quickly and accurately, thereby improving the efficiency of the interface test.

[0103] In some embodiments, after determining the target software version for the interface test, the method further includes: performing content recognition on the interface description content associated with the target software version, determining the content recognition files corresponding to each of the multiple preset test categories, each content recognition file including multiple parameter information corresponding to each interface identifier; determining the target interface. For each parameter in the target interface, according to the target interface identifier of the target interface, traverse all content recognition files, and use the content recognition file with the target interface identifier as the target content recognition file, and use the preset test category corresponding to the target content recognition file as at least one target test category required for the parameter to be tested. For each parameter in the target interface, query the parameter information of the parameter from the multiple parameter information corresponding to the target interface identifier in the target content recognition file; for each target test category required for each parameter in the target interface, call the abnormal test template of the target test category, and generate the target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter; after executing each target abnormal test case, determine the interface test result of the target interface according to the execution results corresponding to each target abnormal test case.

[0104] For example, the content identification file can be presented in a table form. Content identification is performed on the interface description content, and 6 content identification files are identified, namely, content identification file E1 corresponding to the necessary parameter L1, content identification file E2 corresponding to the data type L2, content identification file E3 corresponding to the null value L3, content identification file E4 corresponding to the parameter length L4, content identification file E5 corresponding to the boundary value L5, and content identification file E6 corresponding to the enumeration type L6. E1 to E6 are all presented in table form, see cases 1 to 6 below for details.

[0105] It should be noted that in the following table, id represents the interface identifier, url refers to the uniform resource locator (UniformResourceLocator); each row represents the relevant information of each parameter, which at least includes the interface identifier of the interface where the parameter is located, the basic information of the interface (such as url, port, protocol, request method, request body), test category, parameter name, and expected error code:

[0106] Case 1: The content identification file E1 corresponding to the necessary parameter L1 is presented in the form of Table 1:

[0107] Table 1

[0108]

[0109] Table 1 shows that both parameter 11 and parameter 12 of interface 1 need to perform interface test of required parameter L1. For parameter 11 of interface 1, relevant information includes: uniform resource locator is url1, port is 8080, request method is PUT (upload data), protocol is HTTP (Hypertext Transfer Protocol), request body (unknown), test category is required parameter L1, and expected error code is 403. For parameter 12 of interface 1, relevant information includes: uniform resource locator is url1, port is 8080, request method is PUT (upload data), protocol is HTTP, request body (unknown), test category is required parameter L1, and expected error code is 404. Table 1 also shows that parameter 21 of interface 2 needs to perform interface test of required parameter L1. For parameter 21 of interface 2, relevant information includes: uniform resource locator is url2, port is 8080, request method is POST (submit data), protocol is HTTP, request body (unknown), test category is required parameter L1, and expected error code is 404.

[0110] Case 2: The content identification file E2 corresponding to the data type L2 is presented in the form of Table 2:

[0111] Table 2

[0112]

[0113] For data type L2, each row also needs to include the parameter type. Table 2 shows that parameter 11 of interface 1, parameter 31 of interface 3, and parameter 41 of interface 4 all need to perform interface tests of data type L2. For parameter 11 of interface 1, the relevant information includes: the uniform resource locator is url1, the port is 8080, the request method is PUT, the protocol is HTTP, the request body (unknown), the test category is data type L2, the parameter type is a string, and the corresponding expected error code is 403. For parameter 31 of interface 3, the relevant information includes: the uniform resource locator is url3, the port is 9099, the request method is HEAD (get meta information), the protocol is HTTP, the request body (unknown), the test category is data type L2, the parameter type is a string, and the corresponding expected error code is 403. For parameter 41 of interface 4, the relevant information includes: the uniform resource locator is url4, the port is 8081, the request method is DELETE (delete), the protocol is HTTPS, the request body (unknown), the test category is data type L2, the parameter type is a long integer, and the corresponding expected error code is 404.

[0114] Case 3: The content identification file E3 corresponding to the null value L3 is presented in the form of Table 3:

[0115] Table 3

[0116]

[0117] Table 3 shows that parameter 13 of interface 1, parameter 21 of interface 2, and parameter 31 of interface 3 all need to perform interface test with empty value L3. For parameter 13 of interface 1, the relevant parameters include: uniform resource locator is url1, port is 8080, request method is PUT, protocol is HTTP, request body (unknown), test category is empty value L3, and expected error code is 403. For parameter 21 of interface 2, the relevant parameters include: uniform resource locator is url2, port is 8080, request method is POST, protocol is HTTP, request body (unknown), test category is empty value L3, and expected error code is 404. For parameter 31 of interface 3, the relevant parameters include: uniform resource locator is url3, port is 9099, request method is HEAD, protocol is HTTP, request body (unknown), test category is empty value L3, parameter type is string, and the corresponding expected error code is 403.

[0118] Case 4: The content identification file E4 corresponding to the parameter length L4 is presented in the form of Table 4:

[0119] Table 4

[0120]

[0121] For parameter length L4, each row also contains the length range and parameter type. Table 4 shows that parameter 14 of interface 1 and parameter 22 of interface 2 both need to perform interface tests of parameter length L4. For parameter 14 of interface 1, the relevant information includes: the uniform resource locator is url1, the port is 8080, the request method is PUT, the protocol is HTTP, the request body (unknown), the test category is parameter length L4, the length range is [1, 99], the parameter type is a string, and the expected error code is 403. For parameter 22 of interface 2, the relevant information includes: the uniform resource locator is url2, the port is 8080, the request method is POST, the protocol is HTTP, the request body (unknown), the test category is parameter length L4, the length range is (a, d], the parameter type is a string, and the corresponding expected error code is 404.

[0122] Case 5: The content identification file E5 corresponding to the boundary value L5 is presented in the form of Table 5:

[0123] Table 5:

[0124]

[0125] For the boundary value L5, each row also contains the parameter type and length range. Table 5 shows that parameter 14 of interface 1 and parameter 22 of interface 2 both need to perform interface testing of boundary value L5. For parameter 14 of interface 1, the relevant information includes: the uniform resource locator is url1, the port is 8080, the request method is PUT, the protocol is HTTP, the request body (unknown), the test category is the boundary value L5, the length range is [1, 99], the parameter type is a string, and the expected error code is 403. For parameter 22 of interface 2, the relevant information includes: the uniform resource locator is url2, the port is 8080, the request method is POST, the protocol is HTTP, the request body (unknown), the test category is the boundary value L5, the length range is (a, d], the parameter type is a string, and the corresponding expected error code is 404.

[0126] Case 6: The content identification file E6 corresponding to the enumeration type L6 is presented in the form of Table 6:

[0127] Table 6:

[0128]

[0129] For enumeration type L6, each row also contains enumeration value and parameter type. Table 6 shows that parameter 15 of interface 1 and parameter 51 of interface 5 both need to perform interface test of enumeration type L6. For parameter 15 of interface 1, relevant information includes: uniform resource locator is url1, port is 8080, request method is PUT, protocol is HTTP, request body (unknown), test category is enumeration type L6, enumeration value is "Allowed" and "NotAllowed", parameter type is string, and expected error code is 403. For parameter 51 of interface 5, relevant information includes: uniform resource locator is url5, port is 8080, request method is POST, protocol is HTTP, request body (unknown), test category is enumeration type L6, enumeration value can be a value in {1, 2, 3, 4}, parameter type is integer, and the corresponding expected error code is 404.

[0130] After obtaining Tables 1 to 6, if the target interface is interface 1, taking parameter 11 in interface 1 as an example, first, verify that parameter 11 exists in Tables 1-2, then determine that the target test category of parameter 11 is required parameter L1 and data type L2. Then, for parameter 11 and required parameter L1, based on the relevant information of the row where parameter 11 is located in Table 1, call the corresponding exception test template to generate the corresponding target exception test case. In a similar way, traverse each target test category that needs to be tested for each parameter in interface 1 to obtain all target exception test cases corresponding to the target interface.

[0131] In this embodiment, the entire interface description content is identified as a whole to determine all the prediction test categories involved in the interface description content, and to determine the content identification file for each prediction test category. In this way, after determining the target interface, the target test category required for each parameter in the target interface is determined by traversing and querying all content identification files, thereby automatically generating corresponding target abnormal test cases without the need for manual construction one by one, saving time and improving test efficiency, while also being able to conduct more comprehensive interface testing to ensure test quality.

[0132] In a specific embodiment, the terminal is used as the implementation subject for explanation, wherein the terminal supports continuous integration, can quickly discover potential interface problems, and helps to accelerate the software delivery cycle and continuous iteration of functions. For example, the terminal supports the integration of continuous integration tools such as Jenkins (an open source continuous integration) to ensure that the terminal can automate the interface testing process. The specific interface testing steps are as follows:

[0133] Step 1: The terminal determines the target software code of the target software version and determines the interface description content associated with the target software version.

[0134] Step 2: The terminal determines the target interface for interface testing according to one of the target software code and the interface description content.

[0135] Specifically, when the target software version is the first software version, each interface identified by the interface description content is used as a target interface, and each target interface can obtain an interface test result of each target interface by executing the following steps 3-5.

[0136] When the target software version is not the first software version, determine the previous software version of the target software version, and obtain the previous software code of the previous software version; obtain the code fragment inconsistent with the previous software code from the target software code, and use each interface involved in the code fragment as the target interface. Each target interface can obtain the interface test result of each target interface by executing the following steps 3-5.

[0137] Step 3: Get the interface content of the target interface from the interface description content.

[0138] Step 4: Call the content recognition model, and use the content recognition model to perform content recognition on the interface content to obtain the recognition result of the target interface; obtain the parameter information corresponding to each parameter and the multiple candidate test categories associated with each parameter from the recognition result of the target interface; obtain the test category priority information of the target interface; for each parameter, according to the test category priority information, sort the multiple candidate test categories associated with the parameter from high to low priority, and use a preset number of candidate test categories with the highest ranking as the target test categories that the parameter needs to be tested.

[0139] Step 5: For each target exception test case, obtain the expected error code corresponding to the target exception test case, parse the corresponding execution result, obtain the response code of the target exception test case, and verify whether the response code of the target exception test case is consistent with the corresponding expected error code, and obtain the verification result corresponding to the target exception test case; when each verification result represents consistency, determine that the interface test result of the target interface is successful; when there is at least one verification result that represents inconsistency, determine that the interface test result of the target interface is failed.

[0140] In this embodiment, by determining the target software version for the interface test, the interface content of the target interface matching the target software version can be obtained according to the target software version. Then, by automatically identifying the content of the interface content, the target test category required for the target interface can be accurately and comprehensively queried, thereby determining the parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required for each parameter to be tested, avoiding the lack of test scenarios caused by artificial settings. Subsequently, for each target test category required to be tested for each parameter, the abnormal test template of the target test category is called, and the target abnormal test case corresponding to the parameter is automatically generated according to the parameter information corresponding to the abnormal test template and the parameter. That is, directly according to the matched abnormal test template, the target abnormal test case matching each target test category is adaptively constructed, without the need for manual one-to-one construction, ensuring the accuracy of the target abnormal test case construction, and reducing the error rate. Then, by executing each target abnormal test case, the target interface can be tested more accurately and comprehensively. In this way, after executing each target abnormal test case, the interface test result of the target interface is determined according to the execution results corresponding to each target abnormal test case. In this way, the test quality of the interface test can be improved. In addition, the entire process is applicable to exception testing of various interfaces. There is no need to manually set target exception test cases, nor is there a need to write target exception test code separately. This realizes standardized interface exception testing and greatly improves testing efficiency.

[0141] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0142] Based on the same inventive concept, the embodiment of the present application also provides an interface testing device for implementing the interface testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more interface testing device embodiments provided below can refer to the limitations on the interface testing method above, and will not be repeated here.

[0143] In an exemplary embodiment, Figure 5 As shown, an interface testing device 500 is provided, comprising: a content determination module 502, a content identification module 504, a use case generation module 506 and an interface testing module 508, wherein:

[0144] The content determination module 502 is used to determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version;

[0145] A content identification module 504 is used to perform content identification on the interface content, determine parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter;

[0146] A case generation module 506 is used to call the abnormal test template of the target test category for each target test category required to be tested for each parameter, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and parameter information corresponding to the parameter;

[0147] The interface testing module 508 is used to determine the interface testing result of the target interface according to the execution results corresponding to each target abnormal test case after executing each target abnormal test case.

[0148] In some embodiments, the content determination module 502 is used to determine the target software code of the target software version and determine the interface description content associated with the target software version; determine the target interface for interface testing based on one of the target software code and the interface description content; and obtain the interface content of the target interface from the interface description content.

[0149] In some embodiments, the content determination module 502 is used to use the interface in the interface description content as the target interface when the target software version is the first software version; when the target software version is not the first software version, determine the previous software version of the target software version and obtain the previous software code of the previous software version; obtain a code fragment inconsistent with the previous software code from the target software code, and use the interface involved in the code fragment as the target interface.

[0150] In some embodiments, the content recognition module 504 is used to call the content recognition model, and perform content recognition on the interface content through the content recognition model to obtain the recognition result of the target interface; based on the recognition result of the target interface, determine the parameter information corresponding to each of the multiple parameters in the target interface and at least one target test category required to be tested for each parameter.

[0151] In some embodiments, the content identification module 504 is used to obtain parameter information corresponding to each parameter and multiple candidate test categories associated with each parameter from the identification result of the target interface; obtain the test category priority information of the target interface; for each parameter, according to the test category priority information, sort the multiple candidate test categories associated with the parameter from high to low priority, and use a preset number of candidate test categories with the highest order as the target test categories required to be tested for the parameter.

[0152] In some embodiments, the interface testing module 508 is used to obtain the expected error code corresponding to the target abnormal test case for each target abnormal test case, and parse the corresponding execution result, obtain the response code of the target abnormal test case, and verify whether the response code of the target abnormal test case is consistent with the corresponding expected error code, and obtain the verification result corresponding to the target abnormal test case; when each verification result represents consistency, the interface test result of the target interface is determined to be successful; when there is at least one verification result that represents inconsistency, the interface test result of the target interface is determined to be failed.

[0153] Each module in the above interface test device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0154] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an interface testing method is implemented.

[0155] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0156] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0158] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0162] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An interface testing method, characterized in that: The method comprises: Determine the target software version for the interface test, and determine the interface content of the target interface according to the target software version; Performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter; For each target test category that needs to be tested for each parameter, call the abnormal test template of the target test category, and generate a target abnormal test case corresponding to the parameter according to the abnormal test template and the parameter information corresponding to the parameter; After executing each target abnormal test case, the interface test result of the target interface is determined according to the execution result corresponding to each target abnormal test case.

2. The method according to claim 1, characterized in that The step of determining the interface content of the target interface according to the target software version includes: Determine the target software code of the target software version, and determine the interface description content associated with the target software version; Determining a target interface for interface testing according to one of the target software code and the interface description content; The interface content of the target interface is obtained from the interface description content.

3. The method according to claim 2, characterized in that The step of determining a target interface for interface testing according to one of the target software code and the interface description content includes: When the target software version is the first software version, the interface in the interface description content is used as the target interface; If the target software version is not the first software version, determining a previous software version of the target software version, and obtaining a previous software code of the previous software version; A code segment that is inconsistent with the previous software code is obtained from the target software code, and an interface involved in the code segment is used as a target interface.

4. The method according to claim 1, characterized in that The performing content recognition on the interface content to determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter includes: Calling a content recognition model, and performing content recognition on the interface content through the content recognition model to obtain a recognition result of the target interface; Based on the recognition result of the target interface, parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter are determined.

5. The method according to claim 4, characterized in that The step of determining parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter based on the recognition result of the target interface includes: Acquire parameter information corresponding to each parameter and a plurality of candidate test categories associated with each parameter from the recognition result of the target interface; Obtaining test category priority information of the target interface; For each parameter, multiple candidate test categories associated with the parameter are sorted from high to low priority according to the test category priority information, and a preset number of candidate test categories with top rankings are used as target test categories required to be tested for the parameter.

6. The method according to claim 1, characterized in that Determining the interface test result of the target interface according to the execution results corresponding to each target abnormal test case includes: For each target abnormal test case, obtain the expected error code corresponding to the target abnormal test case, parse the corresponding execution result, obtain the response code of the target abnormal test case, and verify whether the response code of the target abnormal test case is consistent with the corresponding expected error code, and obtain the verification result corresponding to the target abnormal test case; When each verification result is consistent, the interface test result of the target interface is determined to be successful; In the case that at least one verification result indicates inconsistency, it is determined that the interface test result of the target interface is failed.

7. An interface testing device, characterized in that: The device comprises: A content determination module, used to determine the target software version targeted by the interface test, and determine the interface content of the target interface according to the target software version; A content identification module, used to perform content identification on the interface content, determine parameter information corresponding to each of the plurality of parameters in the target interface and at least one target test category required to be tested for each parameter; A case generation module, for calling an abnormal test template of each target test category required to be tested for each parameter, and generating a target abnormal test case corresponding to the parameter according to the abnormal test template and parameter information corresponding to the parameter; The interface testing module is used to determine the interface testing result of the target interface according to the execution results corresponding to each target abnormal test case after executing each target abnormal test case.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.