Interface analysis method, device and equipment

The interface parameters are compared and marked through interface analysis method, which solves the problems of low testing efficiency and high error risk caused by changes in interface parameters, and achieves efficient and accurate interface testing and automated maintenance.

CN119512619APending Publication Date: 2025-02-25AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411736223.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Software updates lead to changes in interface parameters and outgoing parameters, and testers need to continuously update and maintain interface use cases, resulting in inefficient testing and high risk of errors.

Method used

Provide an interface analysis method, which can finally update the final interface parameter column by responding to requests from different versions of the same interface, read interface parameters and attributes, obtain configuration table documents, compare interface parameters of different versions row by row, and label the differences based on the comparison results.

Benefits of technology

It improves the efficiency and accuracy of interface testing, reduces the complexity of manual operations and the risk of errors, and makes interface automation maintenance more convenient and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512619A_ABST
    Figure CN119512619A_ABST
Patent Text Reader

Abstract

The invention discloses an interface analysis method, device and equipment, and aims to track and analyze the evolution of an interface by responding to different version requests of the same interface. According to the method, interface parameters and interface attributes including interface parameters of a previous version and interface parameters of a latest version are read, the information is arranged in a configured table document, and a table comprises an interface attribute column, an interface parameter column of the previous version, an interface parameter column of the latest version and a final interface parameter example. The interface parameters of different versions are compared line by line, and differences are marked in a table, so that the change of the interface parameters is clear at a glance. In addition, according to the method, the final interface parameter column can be updated based on the latest version interface parameter column, and automatic support is provided for test development design. According to the method, the development speed of interface testing is increased, the testing accuracy is improved, manual operation is reduced, and automatic maintenance of the interface becomes more efficient and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing, and more specifically, to an interface analysis method, device and equipment. Background Art

[0002] With the rapid development of the software industry, software testing has become a core link in ensuring software quality, among which interface testing is particularly critical because it can verify the correctness of the interaction between software components. When software updates cause changes in the input and output parameters of the interface, testers need to continuously update and maintain the corresponding interface use cases to maintain the accuracy of the test. Since interface use cases involve many parameters, manually identifying whether these parameters have increased, decreased, or changed in type is a time-consuming and error-prone task. This not only reduces testing efficiency, but also increases the risk of errors. Summary of the invention

[0003] In view of the above problems, this application is proposed to provide an interface analysis method, device and equipment to improve the performance of interface testing. The specific solution is as follows:

[0004] In a first aspect, an interface analysis method is provided, comprising:

[0005] In response to access requests of different versions of the same interface, read interface parameters and interface attributes of different versions, wherein the interface parameters of different versions include previous version interface parameters and latest version interface parameters;

[0006] Obtain a configured table document, the table document including an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter example, and put the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document accordingly;

[0007] Reading the previous version interface parameter column and the latest version interface parameter column in the table document line by line, comparing the previous version interface parameter column with the latest version interface parameter column, and marking different interface parameters based on the comparison result;

[0008] The final interface parameters corresponding to the final interface parameter column are updated based on the latest version interface parameters.

[0009] In one possible design, in another implementation of the first aspect of the embodiment of the present application, the interface parameters include interface parameters of an input parameter type and interface parameters of an output parameter type.

[0010] In one possible design, in another implementation of the first aspect of the embodiment of the present application, the process of comparing the previous version interface parameter column with the latest version interface parameter column and marking different interface parameters based on the comparison result includes:

[0011] Compare the fields of the previous version interface parameters and the latest version interface parameters to see if there are any additions or deletions. If so, mark the newly added or deleted fields and their corresponding field values.

[0012] In a possible design, in another implementation of the first aspect of the embodiment of the present application, the process of comparing the previous version interface parameter column with the latest version interface parameter column and marking different interface parameters based on the comparison result further includes:

[0013] If there are no additions or deletions in the fields of the previous version interface parameters and the latest version interface parameters, determine whether the field values ​​of the same field in the previous version interface parameters and the latest version interface parameters are the same; if not, mark the different field values ​​and their corresponding fields.

[0014] In a possible design, in another implementation of the first aspect of the embodiment of the present application, the method further includes:

[0015] If the field value of the same field in the previous version interface parameter and the latest version interface parameter is the same, and the field value of the latest version interface parameter is in a non-string format, the field value of the latest version interface parameter is converted into a string format.

[0016] In a possible design, in another implementation of the first aspect of the embodiment of the present application, the method further includes:

[0017] In response to the interface format definition instruction, the final interface parameters of the final interface parameter column are exported to the automation use case platform according to the defined interface format.

[0018] In one possible design, in another implementation of the first aspect of the embodiment of the present application, the interface attribute includes an interface description and an interface identifier, and the interface attribute column includes an interface description column and an interface identifier column;

[0019] Place the interface attributes into the interface attribute column of the table document, including:

[0020] The interface description and interface identification are respectively placed in the interface description column and the interface identification column in the value table document, and the interface description is used to characterize the function realized by the interface.

[0021] In one possible design, in another implementation of the first aspect of the embodiment of the present application, the marking method includes any one of highlighting, bolding, preset data color and preset data background color.

[0022] In a second aspect, an interface analysis device is provided, comprising:

[0023] An interface response unit, used to respond to access requests of different versions of the same interface, and read interface parameters and interface attributes of different versions, wherein the interface parameters of different versions include the interface parameters of the previous version and the interface parameters of the latest version;

[0024] An interface import unit is used to obtain a configured table document, wherein the table document includes an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter example, and put the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document respectively;

[0025] An interface comparison unit, used for reading the interface parameter column of the previous version and the interface parameter column of the latest version in the table document row by row, comparing the interface parameter column of the previous version with the interface parameter column of the latest version, and marking different interface parameters based on the comparison result;

[0026] The table document updating unit is used to update the final interface parameters corresponding to the final interface parameter column based on the latest version of the interface parameters.

[0027] In a third aspect, an electronic device is provided, comprising: a memory and a processor;

[0028] The memory is used to store programs;

[0029] The processor is used to execute the program to implement each step of the interface analysis method described in any one of the first aspects of the present application.

[0030] By means of the above technical scheme, the present application proposes an interface analysis method, which first responds to access requests of different versions of the same interface, reads interface parameters and interface attributes of different versions, and the interface parameters of different versions include the interface parameters of the previous version and the interface parameters of the latest version, so as to track and analyze the evolution of the interface. By obtaining a configured table document, the table document contains an interface attribute column, a column of interface parameters of the previous version, a column of interface parameters of the latest version, and a column of final interface parameters, the read interface attributes and interface parameters are respectively placed in corresponding columns, which provides a basis for subsequent comparative analysis. The interface parameters in the table document are read line by line, and the parameters of the two versions are compared, and the different interface parameters in the table are marked, so as to intuitively display the changes in the interface parameters. Finally, the final interface parameters corresponding to the final interface parameter column are updated based on the latest version of the interface parameters. This process facilitates developers to quickly understand the changes in interface parameters by intuitively displaying the changes in interface parameters. At the same time, the automatically generated updated final interface parameters can accelerate the development and design of the test. This greatly improves the efficiency and accuracy of interface testing, reduces the operational difficulty of automated testing, and reduces manual operations. Therefore, interface automation maintenance becomes more convenient and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0032] Figure 1 A schematic diagram of an interface analysis method flow provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of another interface analysis method flow provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of interface parameter comparison provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the structure of an interface analysis device provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] Before introducing this application, the English terms involved in this article are explained first:

[0038] API Use Case: refers to the test case for testing the software interface, including request parameters, request headers, request methods and other information.

[0039] Interface parameters: When using an application programming interface (API), the input values ​​passed to the API are used to control the behavior of the API or specify how the API operates. When the API receives a request and processes it, it returns a response with the output value. These parameters can be required or optional, and they define how the API performs its functions. Interface parameters can include input parameters and output parameters.

[0040] Input parameter: The full name is input parameter, which refers to the data passed from the caller to the callee when calling a function, method or application programming interface (API). This data is used as information required to perform a specific operation and is used to control the behavior and output results of the function or method.

[0041] Output parameter: The full name is output parameter, which refers to the data returned to the caller after the function, method or program is executed. This data is the result of the called function or method processing, which can be a value, an object, a structure or any other type of data structure.

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The present application provides an interface analysis method, which responds to different version requests of the same interface, reads interface parameters and interface properties, including the interface parameters of the previous version and the latest version, and organizes this information into a configuration table document, the table containing interface attribute columns, previous version interface parameter columns, latest version interface parameter columns and final interface parameter examples. By comparing the interface parameters of different versions line by line and marking the differences in the table, the changes in the interface parameters are clear at a glance. Finally, the final interface parameter column is updated based on the latest version interface parameter column, providing automated support for test development and design, improving the accuracy of the test and reducing manual operations.

[0044] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a mobile phone, computer, server, etc.

[0045] Next, see Figure 1, a flowchart of an interface analysis method provided by the present application, the interface analysis method of the present application can be implemented by an interface analysis tool deployed on a terminal, as described below, specifically including the following steps:

[0046] Step S100: respond to access requests of different versions of the same interface, and read interface parameters and interface attributes of different versions.

[0047] Specifically, in the process of software interface testing and automated use case design, it is often necessary to deal with different versions of the same interface. The present application can automatically respond to and read interface requests of these different versions, and perform a detailed analysis of their interface parameters and properties. The analysis of interface parameters can include a comparative analysis of the interface parameters of the previous version and the interface parameters of the latest version.

[0048] Step S110, obtaining a configured table document, and placing the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document accordingly.

[0049] Specifically, get a pre-configured table document, which is used to record and compare different versions of the interface. The table document is designed to contain several columns, each with its specific purpose and meaning:

[0050] Interface attribute column: This column is used to record the attribute information of the interface. These attributes are the basis for interface identification and calling, and are crucial for understanding the functions and behaviors of the interface.

[0051] Previous version interface parameter column: This column is used to store the parameter information of the previous version interface. These parameters describe in detail the data structure received and returned by the previous version interface, including parameter name, type, order, and value.

[0052] Latest version interface parameter column: Similar to the previous version interface parameter column, this column is used to record the parameter information of the latest version interface. By comparing the parameters of the previous version and the latest version, you can identify changes in interface parameters, such as new parameters, deleted parameters, or changes in parameter values.

[0053] Final interface parameter column: This column shows the results of the comparative analysis. It contains the final interface parameters determined after comparing the interface parameters of the previous version and the latest version. These parameters can be used to update automated test cases to ensure that the test cases can adapt to the latest changes in the interface.

[0054] In actual operation, the interface attributes, the interface parameters of the previous version, and the interface parameters of the latest version are placed in the corresponding columns of the table document to form a structured data comparison view. This configuration allows testers to intuitively see the changes in interface attributes and interface parameters, thereby more efficiently performing interface testing and updating automated use cases.

[0055] Step S120, reading the previous version interface parameter column and the latest version interface parameter column in the table document row by row, comparing the previous version interface parameter column with the latest version interface parameter column, and marking different interface parameters based on the comparison result.

[0056] Specifically, the tool reads the data in the table document line by line. For each line, the tool reads the contents of the previous version interface parameter column and the latest version interface parameter column respectively. This line-by-line processing method ensures that each pair of interface parameters of the old version and the new version can be compared one by one. Then, the tool will perform a detailed comparative analysis of the read interface parameters of the previous version and the latest version. This comparison can include the number and name of the parameters, as well as the value, type, order and other details of the parameters. The purpose of the comparison is to identify the differences between the two versions. Based on the comparison results, the tool will mark the different interface parameters so that testers can quickly identify which parameters have changed, reducing human errors and saving testers' time.

[0057] Step S130: Update the final interface parameters corresponding to the final interface parameter column based on the latest version interface parameters.

[0058] Specifically, once a detailed comparative analysis of the latest version of the interface parameters and the previous version of the interface parameters is completed, the next step is to update these latest parameters to the final interface parameter column of the spreadsheet document. This process involves synchronizing the latest interface parameters confirmed after comparative analysis, and any newly added parameters, modified parameter values, and any necessary format adjustments in the latest interface parameters to the final interface parameter column. This ensures that the final interface parameter column reflects the latest status of the interface and includes all the latest changes so that automated test cases can be accurately designed and executed based on these latest parameters. In this way, the final interface parameter column not only contains the latest parameters of the interface, but also provides an accurate starting point for automated testing, allowing testers to rely on these latest parameters to build and maintain automated test cases, thereby improving the efficiency and accuracy of testing.

[0059] This embodiment proposes an interface analysis method, first responding to access requests of different versions of the same interface, reading interface parameters and interface attributes of different versions, where the interface parameters of different versions include the previous version interface parameters and the latest version interface parameters, so as to track and analyze the evolution of the interface. By obtaining a configured table document, the table document contains an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter column, and the read interface attributes and interface parameters are respectively placed in corresponding columns, providing a basis for subsequent comparative analysis. The interface parameters in the table document are read line by line, and the parameters of the two versions are compared, and the different interface parameters in the table are marked, so as to intuitively display the changes in the interface parameters. Finally, the final interface parameters corresponding to the final interface parameter column are updated based on the latest version interface parameters. This process facilitates developers to quickly understand the changes in interface parameters by intuitively displaying the changes in interface parameters. At the same time, the automatically generated updated final interface parameters can accelerate the development and design of the test. This greatly improves the efficiency and accuracy of interface testing, reduces the operational difficulty of automated testing, and reduces manual operations. Therefore, interface automation maintenance becomes more convenient and efficient.

[0060] Further, in some embodiments of the present application, interface parameters can be divided into two types: input parameter type interface parameters and output parameter type interface parameters. Input parameter type interface parameters refer to the input data required for the interface to perform its function. They can include necessary authentication information, operation instructions, query conditions, etc., and are the key to the interface's ability to correctly process requests and return expected results. Output parameter type interface parameters refer to the data returned as a response after the interface processes the request. These parameters may include operation results, data sets obtained by query, status codes, error messages, etc., which are direct manifestations of the results of the execution of interface functions.

[0061] In interface testing and automated use case design, the composition of the table document is flexible and can be adjusted according to different requirements and test scenarios. It can contain only input parameters, that is, the parameters that must be provided when the interface is called, to ensure that the interface can receive the correct input and execute as expected. The construction and verification of this input parameter is a key step in the testing process. Similarly, the table document can also contain only output parameters, that is, the parameters returned by the interface after processing the request. These output parameters need to be checked and compared in detail to verify whether the interface returns the correct results as expected.

[0062] In addition, to achieve more comprehensive test coverage, the table document can also include both input and output parameters. This approach allows testers to compare and analyze the input and output of the interface in the same document, thereby more fully understanding and verifying the behavior of the interface. In this way, testers can ensure that the interface can produce the expected output after receiving the correct input, while also being able to identify and handle any possible exceptions or error responses. This comprehensive testing approach helps improve the stability and reliability of the interface and ensure the overall quality of the software system.

[0063] This embodiment helps testers quickly identify any changes in interface parameters, whether input or output, by automatically analyzing and comparing these two types of interface parameters, thereby ensuring that automated test cases can be updated in a timely manner to adapt to the latest status of the interface. This method improves the efficiency and accuracy of interface testing and reduces the complexity and error possibility of manual operations.

[0064] Further, in some embodiments of the present application, a specific method may be used to compare the interface parameter list of the previous version with the interface parameter list of the latest version, referring to Figure 2 , Figure 2 A schematic diagram of another interface analysis method provided in an embodiment of the present application, the specific process is as follows:

[0065] Step S200: respond to access requests of different versions of the same interface, and read interface parameters and interface attributes of different versions.

[0066] Step S210: Obtain a configured table document, and put the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document accordingly.

[0067] Specifically, the above steps S200-S210 correspond one-to-one to the steps S100-S110 in the aforementioned embodiment, and please refer to the above introduction for details, which will not be repeated here.

[0068] Step S220: Read the previous version interface parameter column and the latest version interface parameter column in the table document line by line.

[0069] Specifically, the interface parameter columns of the previous version and the interface parameter columns of the latest version in the table document are read line by line. In the process of reading line by line, the tool can compare the input and output parameters of the previous version in each line with the input and output parameters of the latest version.

[0070] Step S230, compare the fields of the previous version interface parameters and the latest version interface parameters to see if there are any additions or deletions. If so, execute step S240; if not, execute step S250.

[0071] Specifically, when comparing the interface parameters of the previous version with the latest version, you can first check the increase or decrease of fields between the two versions. The tool can analyze the interface parameters of the previous version and the latest version to determine whether new fields are added to the latest version or whether fields are removed from the previous version.

[0072] If the tool detects the addition or deletion of fields, these changes can be marked so that testers can understand which parameters have changed in the latest version. If the tool does not detect the addition or deletion of fields, it determines whether the field values ​​of the same field in the previous version interface parameters and the latest version interface parameters are the same.

[0073] One possible implementation method may involve a detailed inspection of interface parameters during the comparative analysis process, which may include identifying and marking changes in the input and output parameters of the interface between different versions. Specifically, the tool will compare the input parameters of the previous version of the interface with the input parameters of the latest version of the interface, as well as the output parameters of the previous version of the interface with the output parameters of the latest version of the interface, to check whether there are any additions or deletions to the fields. This comparison can provide testers with a clear view of the details of the changes in the interface input and output parameters with different versions.

[0074] Step S240: mark the newly added or deleted fields and their corresponding field values.

[0075] Specifically, when it is found that there are new fields in the latest version of the interface parameters that are not in the previous version, or when fields that existed in the previous version are missing in the latest version, that is, fields are deleted, these changes will be marked. For new fields that appear in the latest version, the tool will mark the corresponding positions in the table document to highlight these newly added fields and their field values. For fields that no longer appear in the latest version, that is, deleted fields, the tool will also mark them in the table document to indicate that these fields no longer exist in the latest version of the interface parameters.

[0076] One possible implementation method is that for input parameters, if new input parameter fields are found, the tool will mark these fields and their corresponding values ​​so that testers can quickly identify these changes and understand their possible impact on interface calls. Similarly, if input parameter fields are found to be deleted, the tool will also mark these fields and their values ​​so that testers can notice these changes and adjust test strategies and use cases accordingly. For new output parameter fields, the tool will mark these fields and their values ​​to help testers understand the changes in the data returned by the interface. For deleted output parameter fields, the tool will also mark them so that testers can update test cases in a timely manner to ensure that the test covers the latest behavior and return results of the interface.

[0077] Step S250, determine whether the field value of the same field in the previous version interface parameter and the latest version interface parameter is the same, if so, execute step S270; if not, execute step S260.

[0078] Specifically, when comparing the interface parameters of the previous version with the latest version, if it is found that the fields in the two versions have not been added or deleted, that is, the number and name of the fields are the same, then the tool will enter the next step of comparative analysis. This step is to evaluate whether the field value of the same field in the two versions has changed. Specifically, the tool will check the value of each field one by one and compare whether the corresponding field values ​​in the previous version and the latest version are the same. If it is found that the values ​​of the same field in the two versions are inconsistent, that is, there are differences, the tool will mark these different field values ​​and their corresponding fields. If it is found that the values ​​of the same field in the two versions are consistent, and the field value of the latest version of the interface parameter is not in string format, the field value of the latest version of the interface parameter is converted to string format.

[0079] One possible implementation is that during the comparison and analysis of the interface parameters of the previous version and the latest version, if it is found that the input and output parameters have not been added or deleted in the two versions, that is, the field list remains consistent, then the next step is to conduct a deeper comparison and analysis of the field values. For the input parameters, the tool will compare each field value in the input parameters of the previous version of the interface and the input parameters of the latest version of the interface one by one. This means that even if the field name has not changed, the tool will check whether the values ​​of these fields are consistent between the old and new versions. If the value of any field is found to be different in the two versions, it indicates that although the field structure has not changed, its data or content has changed, which may affect the behavior of the interface and the test results. Similarly, for the output parameters, the tool will perform a similar comparison and analysis. It will check whether the values ​​of the corresponding fields in the output parameters of the previous version of the interface and the output parameters of the latest version of the interface are the same. Changes in the field values ​​of the output parameters may directly affect the results of the interface call and subsequent processing, so they also need to be identified and recorded.

[0080] Step S260: label different field values ​​and their corresponding fields.

[0081] Specifically, when comparing and analyzing interface parameters, if differences are found between the field values ​​of the previous version of the interface parameters and the latest version of the interface parameters, the tool will mark these differences. The purpose of marking is to enable testers to quickly identify which field values ​​have changed. These changes may be caused by updates to interface functions, adjustments to business logic, or other reasons. By marking these changed field values ​​and their corresponding fields, testers can intuitively see the specific differences in interface parameters without having to manually check and compare large amounts of data.

[0082] For input parameters, annotations will indicate which input parameter values ​​are different between the old and new versions; for output parameters, annotations will reveal which output parameter values ​​have changed. This detailed annotation not only helps testers understand changes in interface behavior, but also ensures that automated test cases can be updated in a timely manner to adapt to the latest status of the interface.

[0083] Step S270: When the field value of the latest version interface parameter is in a non-string format, convert the field value of the latest version interface parameter into a string format.

[0084] Specifically, when comparing the interface parameters of the previous version with the interface parameters of the latest version, if it is found that the field value of the same field in the two versions is the same, and this field value is not in a string format in the latest version, then the non-string format field value in the interface parameters of the latest version can be converted into a string format.

[0085] Because some automated testing platforms may misidentify non-string data. For example, field values ​​converted to string format can ensure that interface parameters can be processed consistently in automated test cases, regardless of their original data types. This unified data representation method helps reduce errors caused by data type mismatches and ensures the accuracy and reliability of test cases. It can improve the compatibility and flexibility of automated testing, allowing test cases to adapt to data inputs in different formats. This practice helps simplify the testing process, reduce the complexity caused by data type differences, and ensure the consistency and accuracy of test results.

[0086] Step S280: Update the final interface parameters corresponding to the final interface parameter column based on the latest version of the interface parameters.

[0087] Specifically, after analyzing and comparing the latest version of the interface parameters, these latest parameters can be updated to the final interface parameter column of the table document. This means that all fields in the latest version of the interface parameters, including those newly added fields, deleted fields, and those fields whose values ​​have changed, and if the field values ​​in the latest version of the interface parameters are in non-string format, they can be converted to string format, and this information is updated to the final interface parameter column one by one. Such an update ensures that the final interface parameter column contains all the information of the latest version, including field names, field values, and their data types.

[0088] Step S290, in response to the interface format definition instruction, export the final interface parameters of the final interface parameter column to the automation use case platform according to the defined interface format.

[0089] Specifically, respond to the definition instructions of the interface format. This means that the system will export the parameters in the final interface parameter column to the automated use case platform according to the defined interface format. This may include but is not limited to HTTP interfaces, SOAP interfaces, or any other custom interface formats. The exported parameters will fully meet the design requirements of the automated test cases, ensuring that the test cases can accurately simulate the actual interface calls. Such export operations not only improve the efficiency of test case design, but also ensure the accuracy and consistency of the tests. In this way, testers can use the exported interface parameters to design and execute tests directly on the automated use case platform without manually re-entering or adjusting the parameters. This greatly reduces the time and complexity of test preparation, while also reducing the possibility of human errors and improving the overall efficiency and reliability of the testing process.

[0090] This embodiment significantly improves the efficiency and accuracy of interface testing through systematic analysis and processing of interface parameters. Interface parameters include interface parameters of input parameter type and output parameter type. This classification helps to clarify the data flow of the interface during the request and response process. By comparing the interface parameter column of the previous version with the interface parameter column of the latest version, the addition and deletion of fields can be effectively identified. If the addition or deletion of fields is found, these changes and their corresponding field values ​​will be automatically marked, so that testers can quickly understand the evolution of the interface and ensure that the test cases can adapt to these changes in a timely manner. Further, when it is found that the fields of the interface parameters of the previous version and the latest version are not added or deleted, it will continue to determine whether the field values ​​of the same field are the same. If there are differences in field values, different field values ​​and their corresponding fields will be marked. This process ensures that even if the field structure remains unchanged, testers can identify potential problems and changes in a timely manner, and then adjust the test strategy. This detailed comparison and marking mechanism greatly reduces the workload of manual inspection and improves the comprehensiveness and accuracy of the test. In addition, for the case where the field values ​​are the same but the formats are different, a function of converting non-string format field values ​​to string format is also provided. This conversion not only improves the consistency of the data, but also ensures that these parameters can be correctly identified and processed in the automated testing platform, avoiding test failures caused by data type mismatches. Finally, in response to the definition instruction of the interface format, the parameters of the final interface parameter column are exported to the automated use case platform according to the predefined interface format, further simplifying the design process of the test case. In this way, testers can directly use the exported parameters for testing without manual input or adjustment, which significantly improves work efficiency and reduces the risk of human error. In summary, this embodiment not only improves the efficiency and accuracy of interface testing through systematic parameter comparison and automated processing, but also provides strong support for software development and testing, ensuring the stability and reliability of the interface.

[0091] In some embodiments of the present application, for the process of "putting the interface attributes into the interface attribute column of the table document" in the aforementioned embodiment, the interface attributes may be divided into an interface description and an interface identifier. The process is described below:

[0092] Optionally, in the table document, the interface attribute column can be further subdivided into an interface description column and an interface identification column to store these attribute information.

[0093] The interface description column can be used to record the specific functions and uses of each interface. It provides a detailed description of the functions implemented by the interface to help testers understand the role and business logic of the interface. The interface identification column contains identifiers that uniquely identify each interface. These identifiers may be the name, number, or other unique code of the interface, which is used to quickly identify and reference specific interfaces in automated testing and interface documentation.

[0094] When placing interface properties into a table document, the interface description and interface identifier are filled in the corresponding columns. This method not only makes the interface information clear at a glance, but also makes it convenient for testers to quickly find and reference relevant information when performing interface testing and maintenance.

[0095] The interface attribute columns in the table document in this embodiment become an information center for centralized storage and management of interface attributes, providing a clear reference point for automated testing. This structured recording method helps improve the efficiency of interface management, ensure the accuracy of testing work, and promote the standardization of interface documents.

[0096] In some embodiments of the present application, when different interface parameters are marked, there may be one or more marking methods, which are described in detail below:

[0097] Optionally, you can highlight changes or important information when comparing and analyzing interface parameters. There are various marking methods, including highlighting, bolding, preset data color, and preset data background color. You can select any one of them as needed to ensure that the changed field value and its corresponding field can be intuitively and clearly identified.

[0098] Highlighting is a commonly used annotation method. It can make specific field values ​​more conspicuous in the table by changing the color or background color of the text, making it easier for testers to quickly identify which parameters have changed. Boldness increases the thickness of the font to attract attention, making the annotated fields more visually prominent. Preset data colors and preset data background colors provide more personalized options, allowing users to set different color schemes according to personal preferences or team specifications to distinguish different types of changes. For example, use red to highlight deleted fields and green to highlight newly added fields.

[0099] This diversified annotation method in this embodiment not only improves the readability of the comparative analysis, but also enhances the efficiency of information transmission. Testers can choose the most appropriate annotation method according to their preferences and actual needs, and identify changes in interface parameters in the most intuitive way, so as to perform interface testing and maintenance more effectively. Through such an annotation mechanism, users are provided with an intuitive, flexible and efficient interface parameter comparative analysis tool.

[0100] The interface analysis method of this application will have a significant effect, see Figure 3 , Figure 3 A schematic diagram for comparing interface parameters provided in an embodiment of the present application.

[0101] Figure 3Each interface example in shows the changes of interface parameters. For example, in the "Add Test" interface, you can see that the value of "key3_1" has changed from "value3_1" to "value3_11", and the "key4" field has been added to the input parameters and the "success" field has been added to the output parameters in the latest version. In the "Edit Test" interface, you can see that the value of "key3_1" has changed from "value3_1" to "value3_11", and the structure of the "key4" field has changed from a single value to a nested structure containing "key4_1". In addition, the representation of the "success" field in the output parameters has changed from the number "1" to "true" in different versions. It helps testers and developers clearly identify changes in interface parameters and ensure the correctness and stability of the interface. Figure 3 As shown, the above different parameters are specially marked.

[0102] The interface analysis device provided in an embodiment of the present application is described below. The interface analysis device described below and the interface analysis method described above can be referenced to each other.

[0103] See also Figure 4 , Figure 4 A schematic diagram of the structure of an interface analysis device disclosed in an embodiment of the present application.

[0104] like Figure 4 As shown, the device may include:

[0105] An interface response unit 11 is used to respond to access requests of different versions of the same interface, and read interface parameters and interface attributes of different versions, wherein the interface parameters of different versions include the interface parameters of the previous version and the interface parameters of the latest version;

[0106] The interface importing unit 12 is used to obtain a configured table document, wherein the table document includes an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter example, and the interface attributes, the previous version interface parameters, and the latest version interface parameters are placed in the interface attribute column, the previous version interface parameter column, and the latest version interface parameter column of the table document respectively;

[0107] The interface comparison unit 13 is used to read the previous version interface parameter column and the latest version interface parameter column in the table document line by line, compare the previous version interface parameter column with the latest version interface parameter column, and mark different interface parameters based on the comparison result;

[0108] The table document updating unit 14 is used to update the final interface parameters corresponding to the final interface parameter column based on the latest version of the interface parameters.

[0109] In a possible implementation, the interface parameters include input parameter type interface parameters and output parameter type interface parameters.

[0110] In a possible implementation, the interface comparison unit 13 compares the interface parameter column of the previous version with the interface parameter column of the latest version, and marks different interface parameters based on the comparison result, including:

[0111] Compare the fields of the previous version interface parameters and the latest version interface parameters to see if there are any additions or deletions. If so, mark the newly added or deleted fields and their corresponding field values.

[0112] In a possible implementation, the process in which the interface comparison unit 13 compares the interface parameter column of the previous version with the interface parameter column of the latest version and marks different interface parameters based on the comparison result further includes:

[0113] If there are no additions or deletions in the fields of the previous version interface parameters and the latest version interface parameters, determine whether the field values ​​of the same field in the previous version interface parameters and the latest version interface parameters are the same; if not, mark the different field values ​​and their corresponding fields.

[0114] In a possible implementation, the process in which the interface comparison unit 13 compares the interface parameter column of the previous version with the interface parameter column of the latest version and marks different interface parameters based on the comparison result further includes:

[0115] If the field value of the same field in the previous version interface parameter and the latest version interface parameter is the same, and the field value of the latest version interface parameter is in a non-string format, the field value of the latest version interface parameter is converted into a string format.

[0116] Optionally, an interface analysis device in an embodiment of the present application further includes:

[0117] The interface export unit, in response to the interface format definition instruction, exports the final interface parameters of the final interface parameter column to the automated use case platform according to the defined interface format.

[0118] In a possible implementation, the interface attribute includes an interface description and an interface identifier, the interface attribute column includes an interface description column and an interface identifier column, and the process in which the interface response unit 11 puts the interface attribute into the interface attribute column of the table document includes:

[0119] The interface description and interface identification are respectively placed in the interface description column and the interface identification column in the value table document, and the interface description is used to characterize the function realized by the interface.

[0120] In a possible implementation, when the interface comparison unit 13 marks different interface parameters based on the comparison result, the adopted marking method includes any one of highlighting, bolding, preset data color and preset data background color.

[0121] The present application also provides an electronic device in an embodiment. Figure 5 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, tablet computers, wearable devices, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0122] like Figure 5 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the interface analysis method of the aforementioned embodiment of the present application. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0123] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0124] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the interface analysis method of the aforementioned embodiment of the present application.

[0125] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0126] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0127] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0128] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0129] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

Claims

1. An interface analysis method, characterized in that: include: In response to access requests of different versions of the same interface, read interface parameters and interface attributes of different versions, wherein the interface parameters of different versions include previous version interface parameters and latest version interface parameters; Obtain a configured table document, the table document including an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter example, and put the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document accordingly; Reading the previous version interface parameter column and the latest version interface parameter column in the table document line by line, comparing the previous version interface parameter column with the latest version interface parameter column, and marking different interface parameters based on the comparison result; The final interface parameters corresponding to the final interface parameter column are updated based on the latest version interface parameters.

2. The method according to claim 1, characterized in that The interface parameters include input parameter type interface parameters and output parameter type interface parameters.

3. The method according to claim 1, characterized in that The process of comparing the interface parameter column of the previous version with the interface parameter column of the latest version, and marking different interface parameters based on the comparison result, includes: Compare the fields of the previous version interface parameters and the latest version interface parameters to see if there are any additions or deletions. If so, mark the newly added or deleted fields and their corresponding field values.

4. The method according to claim 3, characterized in that The process of comparing the interface parameter column of the previous version with the interface parameter column of the latest version, and marking different interface parameters based on the comparison result, further includes: If there are no additions or deletions in the fields of the previous version interface parameters and the latest version interface parameters, determine whether the field values ​​of the same field in the previous version interface parameters and the latest version interface parameters are the same; if not, mark the different field values ​​and their corresponding fields.

5. The method according to claim 4, characterized in that Also includes: If the field value of the same field in the previous version interface parameter and the latest version interface parameter is the same, and the field value of the latest version interface parameter is in a non-string format, the field value of the latest version interface parameter is converted into a string format.

6. The method according to claim 1, characterized in that Also includes: In response to the interface format definition instruction, the final interface parameters of the final interface parameter column are exported to the automation use case platform according to the defined interface format.

7. The method according to claim 1, characterized in that The interface attributes include an interface description and an interface identifier, and the interface attribute columns include an interface description column and an interface identifier column; Place the interface attributes into the interface attribute column of the table document, including: The interface description and interface identification are respectively placed in the interface description column and the interface identification column in the value table document, and the interface description is used to characterize the function realized by the interface.

8. The method according to any one of claims 1 to 7, characterized in that: The marking method includes any one of highlighting, bolding, preset data color and preset data background color.

9. An interface analysis device, characterized in that: include: An interface response unit, used to respond to access requests of different versions of the same interface, and read interface parameters and interface attributes of different versions, wherein the interface parameters of different versions include the interface parameters of the previous version and the interface parameters of the latest version; An interface import unit is used to obtain a configured table document, wherein the table document includes an interface attribute column, a previous version interface parameter column, a latest version interface parameter column, and a final interface parameter example, and put the interface attributes, previous version interface parameters, and latest version interface parameters into the interface attribute column, previous version interface parameter column, and latest version interface parameter column of the table document respectively; An interface comparison unit, used for reading the interface parameter column of the previous version and the interface parameter column of the latest version in the table document row by row, comparing the interface parameter column of the previous version with the interface parameter column of the latest version, and marking different interface parameters based on the comparison result; The table document updating unit is used to update the final interface parameters corresponding to the final interface parameter column based on the latest version of the interface parameters.

10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the interface analysis method as described in any one of claims 1 to 8.