CN115422298A - Interface information synchronization method and device, computer equipment and storage medium - Google Patents

Interface information synchronization method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115422298A
CN115422298A CN202211131308.0A CN202211131308A CN115422298A CN 115422298 A CN115422298 A CN 115422298A CN 202211131308 A CN202211131308 A CN 202211131308A CN 115422298 A CN115422298 A CN 115422298A
Authority
CN
China
Prior art keywords
interface
information
development platform
synchronization
synchronized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211131308.0A
Other languages
Chinese (zh)
Inventor
胡佳慧
范渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202211131308.0A priority Critical patent/CN115422298A/en
Publication of CN115422298A publication Critical patent/CN115422298A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

The application relates to an interface information synchronization method, an interface information synchronization device, computer equipment and a storage medium. The method comprises the following steps: acquiring an interface to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information is associated with the interface to be synchronized; sending a first data acquisition request to an interface development platform based on interface development platform configuration information by using a preset first information synchronization function, and acquiring interface identification information corresponding to an interface to be synchronized, which is sent by the interface development platform in response to the first data acquisition request; transmitting the interface identification information into a preset second information synchronization function; and sending a second data acquisition request to the interface development platform based on the interface identification information by using a second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information. By adopting the method, the synchronization of the interface information in large batch can be efficiently and accurately completed.

Description

Interface information synchronization method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of digital data processing technologies, and in particular, to a method and an apparatus for synchronizing interface information, a computer device, and a storage medium.
Background
With the increasing complexity of software application and the increasing scale of software development, testers need to perform regression on the main process of all functions of a product before the product is released, and need to enter all functional interfaces into an interface automation platform to realize automatic full regression of the interfaces.
At present, no effective solution is provided for the problem that the interface information synchronization is time-consuming and has a high error rate because a large number of interfaces can only be input by a manual method in the related technology.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for synchronizing interface information to solve the problems of time consuming and high error rate in interface information synchronization.
In a first aspect, the present application provides an interface information synchronization method, including:
acquiring at least one interface to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information is associated with the interface to be synchronized;
sending a first data acquisition request to an interface development platform based on interface development platform configuration information by using a preset first information synchronization function, and acquiring interface identification information corresponding to an interface to be synchronized, which is sent by the interface development platform in response to the first data acquisition request;
transmitting the interface identification information into a preset second information synchronization function;
and sending a second data acquisition request to the interface development platform based on the interface identification information by using a second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
In one embodiment, after being applied to an automation platform and acquiring all data information, the method further includes:
acquiring a preset target interface type, wherein the preset target interface type is matched with the interface synchronization platform; and converting all the data information of the interface to be synchronized into a preset target interface type according to the difference of all the data information types and the difference of the transmission modes of the interface to be synchronized, and obtaining the target interface information corresponding to the target interface type.
In one embodiment, the sending the first data obtaining request to the interface development platform based on the interface development platform configuration information by using a preset first information synchronization function further includes:
the project name is transmitted to a first information synchronization function, and a first data acquisition request is sent to an interface development platform based on the project name by using the first information synchronization function;
acquiring interface identification information which is sent by the interface development platform in response to the first data acquisition request and corresponds to an interface to be synchronized, wherein the interface identification information comprises:
and acquiring interface tree information sent by the interface development platform in response to the first data acquisition request, wherein the interface tree information comprises interface identification information.
In one embodiment, acquiring the interface tree information sent by the interface development platform in response to the first data acquisition request includes:
acquiring interface category information and interface list information which are sent by an interface development platform in response to a first data acquisition request; the interface list information comprises interface identification information;
generating interface tree information according to the interface category information and the interface list information;
generating the interface synchronization result based on the entire data information includes:
and generating an interface synchronization result according to all the data information and the interface tree information, and storing the interface synchronization result in a preset database.
In one embodiment, the interface information synchronization method further includes:
if detecting that the configuration information of the interface development platform is missing, sending error reporting information to the terminal equipment; and if the interface development platform configuration information is detected to exist, generating a visualization result according to the interface synchronization result, and sending the visualization result to the terminal equipment for displaying.
Further, the generating a visualization result according to the interface synchronization result includes:
acquiring a query instruction which is input by a user and aims at a target interface to be tested, wherein the target interface to be tested is an interface corresponding to the query instruction in interfaces to be synchronized;
and responding to the query instruction, acquiring all interface information of the target interface to be tested, generating a test case according to all interface information of the target interface, and generating a visual result according to the interface synchronization result and the test interface.
In a second aspect, the present application further provides an interface information synchronization apparatus. The device comprises:
the system comprises a configuration information collection module, a synchronization module and a synchronization module, wherein the configuration information collection module is used for acquiring at least one interface to be synchronized and interface development platform configuration information, and the interface development platform configuration information is associated with the interface to be synchronized;
the interface information acquisition module is used for sending a first data acquisition request to the interface development platform based on the configuration information of the interface development platform by using a preset first information synchronization function and acquiring interface identification information which is sent by the interface development platform in response to the first data acquisition request and corresponds to an interface to be synchronized;
the information transmitting module is used for transmitting the interface identification information into a preset second information synchronization function;
and the interface synchronization module is used for sending a second data acquisition request to the interface development platform based on the interface identification information by using a second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
Further, after the interface synchronization result is generated based on all the data information, the device further comprises a display module,
the display module is used for sending error reporting information to the terminal equipment if detecting that the configuration information of the interface development platform is lost; and if the display module detects that the interface development platform configuration information exists, generating a visualization result according to the interface synchronization result, and sending the visualization result to the terminal equipment for displaying.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
acquiring at least one interface to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information is associated with the interface to be synchronized;
sending a first data acquisition request to an interface development platform based on interface development platform configuration information by using a preset first information synchronization function, and acquiring interface identification information corresponding to an interface to be synchronized, which is sent by the interface development platform in response to the first data acquisition request;
transmitting the interface identification information into a preset second information synchronization function;
and sending a second data acquisition request to the interface development platform based on the interface identification information by using a second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
In a fourth aspect, the present application further provides a computer-readable storage medium. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of:
acquiring at least one interface to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information is associated with the interface to be synchronized;
sending a first data acquisition request to an interface development platform based on interface development platform configuration information by using a preset first information synchronization function, and acquiring interface identification information which is sent by the interface development platform in response to the first data acquisition request and corresponds to an interface to be synchronized;
transmitting the interface identification information into a preset second information synchronization function;
and sending a second data acquisition request to the interface development platform based on the interface identification information by using a second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
Compared with the prior art, the interface information synchronization method provided by the embodiment of the application synchronizes the interface data on the interface development platform to the automation platform through the preset information synchronization function, solves the problems of much time consumption and easy error when manually inputting a large amount of interface data, and realizes the purpose of efficiently and accurately inputting a large amount of interface data.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more concise and understandable description of the application, and features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow diagram of a method for interface information synchronization in one embodiment;
FIG. 2 is a flow chart of a method for interface information synchronization in a preferred embodiment;
FIG. 3 is a block diagram showing the structure of an interface information synchronization apparatus according to an embodiment;
fig. 4 is an internal configuration diagram of the interface information synchronization apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a method for interface information synchronization is provided, and fig. 1 is a flowchart of an interface information synchronization method according to an embodiment of the present application, and as shown in fig. 1, the flowchart includes the following steps:
step S110, at least one interface to be synchronized and interface development platform configuration information are obtained, where the interface development platform configuration information is associated with the interface to be synchronized.
In practical application, the number of the interfaces to be synchronized is thousands; the interface development platform configuration information includes: the method comprises the following steps of interface development platform path, project unique identification information, project name and the like. The interface development platform configuration information is used to indicate a path, unique identification information, and an ID name for an item. One project comprises a plurality of functional modules, each functional module comprises a plurality of interfaces to be synchronized, and one project usually comprises thousands of interfaces.
Step S120, sending a first data obtaining request to the interface development platform based on the configuration information of the interface development platform by using a preset first information synchronization function, and obtaining interface identification information corresponding to the interface to be synchronized, which is sent by the interface development platform in response to the first data obtaining request.
Specifically, the project name in the interface development platform is input into a first information synchronization function, after the first information synchronization function acquires the project name, a request for acquiring first data is sent to the interface development platform according to the project indicated by the project name, and then interface identification information sent by the interface development platform in response to the first data acquisition request is acquired, wherein the interface identification information is used for indicating specific category information of the interface corresponding to the interface identification information.
In one embodiment, the interface development platform sends interface tree information in response to the first data acquisition request, the interface tree information including the interface identification information. Further, the interface tree information includes interface category information and interface list information, where the interface list information includes interface identification information, the interface category information is mainly used to classify different function modules in the project, the interface list information is generally used to distinguish which function module an interface belongs to, and the interface list information does not include detailed information of the interface. . The first information synchronization function is used for acquiring interface identification information from an interface development platform; the first information synchronization function may be set by a user in advance, for example, the first information synchronization function may be a custom syncInterface function, and an example of the code of the syncInterface function is as follows:
def syncInterface(yapi_url,yapi_token,project_id);
step S130, transmitting the interface identification information into a preset second information synchronization function;
the second information synchronization function may be preset by a user, for example, the second information synchronization function may be a customized syncinterface info function, and is used to receive all data information corresponding to the interface to be synchronized, which is returned by the interface development platform, where an example of a code of the syncinterface info function is as follows:
def syncInterfaceinfo(yapi_url,yapi_token,interface_id);
step S140, sending a second data obtaining request to the interface development platform based on the interface identification information by using a second information synchronization function, obtaining all data information corresponding to the interface to be synchronized, which is sent by the interface development platform in response to the second data obtaining request, and generating an interface synchronization result based on all the data information.
Wherein, the above-mentioned all data information includes request state, parameter type, request parameter, etc.; the second information synchronization function is used for acquiring detailed information of the interface from the interface development platform according to the transmitted interface identification information and returning all data information of the interface to the first information synchronization function, and after the first information synchronization function receives all data information of the interface, all data information and the previously acquired interface tree information are stored in the database.
Through the steps S110 to S140, in the interface information synchronization method, firstly, a project to be interface-synchronized is determined through interface development platform configuration information and interface development platform configuration information corresponding to the project is acquired, then, interface identification information corresponding to an interface to be synchronized is acquired according to the interface development platform configuration information by using a first information synchronization function, then, the interface identification information is transmitted to a preset second information synchronization function, finally, all data information corresponding to the interface to be synchronized is acquired according to the interface identification information through the second information synchronization function, and an interface synchronization result is generated based on all the data information. Therefore, the technical scheme in the application can completely get rid of the problem that a large batch of interfaces to be synchronized are synchronized by using a manual entry method in the prior art, the method of acquiring the interface identification information and synchronizing the interfaces to be synchronized according to the interface identification information can accurately and efficiently finish the synchronization of the large batch of interfaces, one piece of interface identification information corresponds to one interface to be synchronized, and the interface identification information not only indicates the represented interface to be synchronized, but also indicates which functional module of a project the interface to be synchronized belongs to. According to the technical scheme, not only can the large-batch interfaces be accurately and quickly synchronized, but also the interfaces can be quickly called when subsequent related technical personnel test the synchronously finished interfaces and other operations due to the fact that different functional modules to which each interface belongs are defined.
In this embodiment, after acquiring all interface data information, the interface information synchronization method further includes:
acquiring a preset target interface type, wherein the preset target interface type is matched with the interface synchronization platform; and converting all the data information of the interface to be synchronized into a preset target interface type according to the difference of all the data information types and the difference of the transmission modes of the interface to be synchronized, and obtaining the target interface information corresponding to the target interface type.
Specifically, because the interface development platform and the automation platform have different requirements for format types of all data information of the interface to be synchronized, format conversion is usually performed when the interface is synchronized to the automation platform, so as to obtain all data information of the interface meeting the requirements of the automation platform. For example, in request parameter types in the interface data information, different interface type conversion processing needs to be performed according to request parameter types with different formats and different types of request modes, where the format of the request parameter type may be raw, form, json, and the like, and common request modes include GET, POST, and the like.
Format type conversion is carried out on all acquired interface data information through the automation platform, so that the automation platform can realize quick and convenient calling of all interface data information in subsequent operation, and can better carry out subsequent processing on the interface data information synchronized from the interface development platform.
In some embodiments, the interface information synchronization method further includes transmitting a project name included in the interface development platform configuration information to a first information synchronization function, and sending a first data acquisition request to the interface development platform based on the project name by using the first information synchronization function; and then acquiring interface tree information sent by the interface development platform in response to the first data acquisition request, wherein the interface tree information comprises interface identification information.
Specifically, when the interface development platform returns the interface tree information in response to the first data acquisition request sent by the first information synchronization function, the interface development platform returns the interface tree information corresponding to the project name to the automation platform through a first open interface, where the first open interface may be an open API interface provided by the interface development platform and may be/API/interface/list _ menu.
In some embodiments, the interface information synchronization method further includes acquiring interface category information and interface list information sent by the interface development platform in response to the first data acquisition request; the interface list information comprises interface identification information; generating interface tree information according to the interface category information and the interface list information; and generating an interface synchronization result according to all the data information and the interface tree information, and storing the interface synchronization result in a preset database.
Specifically, after generating the interface tree information according to the interface category information and the interface list information, the second information synchronization function sends a second data acquisition request to the interface development platform according to the interface identification information in the interface tree information, and in response to the second data acquisition request, the interface development platform returns all data information through a second open interface, where the second open interface may be another open API interface provided by the interface development platform, and the interface may be/API/interface/get. And then generating an interface synchronization result according to all the data information and the interface tree information, wherein the interface synchronization result comprises all the data information of each interface and information indicating a function module to which each interface belongs.
In summary, interface tree information is obtained from the interface development platform according to the first information synchronization function, and the interface tree information does not include detailed data information of an interface to be synchronized, but only explains the category of a function module in the project, the name of the interface under the function module, interface identification information and the like, and is used for distinguishing which function module the interface belongs to; and then, according to the interface identification information in the interface tree information, acquiring all data information of the interface to be synchronized through a second information synchronization function. Therefore, the tree-shaped interface tree information is obtained first, and then the detailed information of the interface to be synchronized is obtained, so that the detailed data information of all the interfaces can be stored in a classified and planned way, and the tasks of calling the required interface, testing and the like in subsequent tasks can be efficiently completed; and all data information of the interface to be synchronized is acquired from the interface development platform through the interface tree information, so that all data information of the interface to be synchronized can be efficiently and accurately acquired in large batch.
According to the interface information synchronization method, the interface tree information and all data information of the interfaces are transmitted to the interface development platform respectively through two different API interfaces provided by the interface development platform, the task of interface information synchronization can be efficiently and clearly completed, the two different API interfaces do not influence each other, and the respective data transmission task is efficiently completed.
In some embodiments, the interface information synchronization method further includes: if detecting that the configuration information of the interface development platform is lost, sending error reporting information to the terminal equipment; and if the interface development platform configuration information is detected to exist, generating a visualization result according to the interface synchronization result, and sending the visualization result to the terminal equipment for displaying.
Specifically, if the loss of the interface development platform configuration information is detected, the terminal device may prompt the relevant technical staff in a text content or sound alarm manner based on the error reporting information sent by the automation platform, so as to remind the relevant technical staff that the interface development platform configuration information can be supplemented in time. And if the interface development platform configuration information is detected to exist, displaying the visualization result of the interface synchronization in the terminal equipment. The visualization result includes all data information of all synchronously completed interfaces, such as a coding type, a returned data type, parameter data, and the like, and further includes data information corresponding to each parent node in the interface tree information.
If the interface development platform configuration information is lost, alarming is carried out, and if the interface development platform configuration information exists, all data information of the synchronously completed interface is visually displayed.
In some embodiments, the interface information synchronization method further includes obtaining a query instruction, which is input by a user and is specific to a target interface to be tested, where the target interface to be tested is an interface corresponding to the query instruction in the interfaces to be synchronized; and responding to the query instruction, acquiring all interface information of the target interface to be tested, generating a test case according to all interface information of the target interface, and generating a visual result according to the interface synchronization result and the test interface.
The query instruction for the target interface to be tested may be to query the target interface by querying an interface name or an interface address, and after the query for the target interface is completed, the automation platform may automatically fill all interface information of the target interface, such as a request mode of the target interface, an interface path, and the like, directly generate a test case, and visually display the test case of the target interface. If the synchronization of the interface to be synchronized is completed, a part of the interfaces are adjusted and changed in the interface development platform, the data of the interface to be synchronized next time can cover the synchronous data of the historical interface in the synchronization of the interface to be synchronized next time, but the test case of the historical interface cannot be covered, the record of the test case can be kept all the time, and the subsequent checking of related technicians is facilitated. Furthermore, the design of the automation platform in the application can efficiently and visually finish the query and test of the target interface, so that manpower and material resources are greatly saved. Moreover, the storage of the test cases is convenient for relevant technicians to check the test condition of the interface, and the test condition of the current interface is combined with the test condition of the historical interface for analysis, so that the further improvement of the subsequent interface is facilitated.
The present embodiment further provides a specific embodiment of an interface information synchronization method, as shown in fig. 2, and fig. 2 is a flowchart of an interface information synchronization method in a preferred embodiment.
Firstly, an automation platform acquires a large quantity of interfaces to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information comprises an interface development platform path, project unique identification information and project names. And then, transmitting the project name into a first information synchronization function, wherein the first information synchronization function is used for sending a first data acquisition request to an interface development platform, after the first information synchronization function acquires the project name, sending the first data acquisition request to the interface development platform according to the project name, and returning interface tree information to the first information synchronization function through a first open interface provided by the interface development platform according to the first data acquisition request, wherein the interface tree information comprises interface category information and interface list information, the interface list information comprises interface identification information, and the interface identification information is used for indicating a specific interface in a large batch of interfaces to be synchronized. And, the interface tree information does not include detailed data information of the interface to be synchronized. And the interface development platform returns all data information corresponding to the interface to be synchronized responding to the second data acquisition request to the second information synchronization function through a second open interface provided by the interface development platform according to the interface identification information. And after the second information synchronization function acquires all the data information of the interface to be synchronized, the second information synchronization function returns all the data information to the first information synchronization function, then the first information synchronization function stores all the data information of the interface to be synchronized and the interface tree information to a database, and an interface synchronization result is generated based on all the data information and the interface tree information. And finally, if the configuration information of the interface development platform is successful, generating a visualization result according to the synchronized interface synchronization result, and sending the visualization result to the terminal equipment for displaying. After the synchronization of the interface information to be synchronized is completed, if a target interface needs to be tested, firstly, an inquiry instruction input by a user is obtained, then, all interface information of the target interface to be tested is obtained in response to the inquiry instruction, a test case is generated according to all the interface information of the target interface, a visual result is generated according to the test result, and the visual result is displayed on the terminal equipment. The interface information synchronization method can completely complete the synchronization of the large-batch interfaces through the automation platform and the interface development platform, and can be seen from the technical characteristics that the interface tree information is synchronized firstly and then all data information of the interfaces is synchronized.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides an interface information synchronization apparatus for implementing the above-mentioned interface information synchronization method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the interface information synchronization device provided below can refer to the limitations on the interface information synchronization method in the foregoing, and details are not described herein again. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
In one embodiment, an interface information synchronization apparatus is provided, as shown in fig. 3, which is a block diagram of an interface information synchronization apparatus, and includes: a configuration information collection module 31, an interface information collection module 32, an information transmission module 33, an interface synchronization module 34, and a display module 35, wherein:
the configuration information collecting module 31 is configured to obtain at least one interface to be synchronized and interface development platform configuration information, where the interface development platform configuration information is associated with the interface to be synchronized.
The interface information collection module 32 is configured to send a first data acquisition request to an interface development platform based on the interface development platform configuration information by using a preset first information synchronization function, and acquire interface identification information corresponding to the interface to be synchronized, which is sent by the interface development platform in response to the first data acquisition request;
an information transmitting module 33, configured to transmit the interface identification information into a preset second information synchronization function;
the interface synchronization module 34 is configured to send the second data obtaining request to the interface development platform based on the interface identification information by using the second information synchronization function, obtain all data information corresponding to the interface to be synchronized, which is sent by the interface development platform in response to the second data obtaining request, and generate an interface synchronization result based on the all data information.
The display module 35 is configured to send an error message to the terminal device if detecting that the interface development platform configuration information is missing; if detecting that the interface development platform configuration information exists, the display module 35 generates a visualization result according to the interface synchronization result, and sends the visualization result to the terminal device for displaying.
Specifically, the configuration information collecting module 31 is configured to obtain at least one interface to be synchronized and interface development platform configuration information, and in practical applications, a large number of interfaces to be synchronized are usually obtained, where the interface development platform configuration information includes information such as an interface development platform path, project unique identification information, and project name. The interface development platform configuration information is associated with the interface to be synchronized; then, the interface information collection module 32 calls a first information synchronization function, a project name in the configuration information collected by the configuration information collection module 31 is transmitted into the first information synchronization function, the first information synchronization function sends a first data acquisition request to the interface development platform according to the project name, the interface development platform sends corresponding interface tree information to the interface information collection module 32 through a first open interface, and the interface tree information comprises interface identification information; then, the information introducing module 33 is configured to introduce the interface identification information into a preset second information synchronization function; the information input module 33 is connected to the interface synchronization module 34, the interface synchronization module 34 sends a second data acquisition request to the interface development platform according to the interface identification information through a second information synchronization function, the interface development platform sends all corresponding data information to the interface synchronization module 34 through a second open interface, and the interface synchronization module 34 generates an interface synchronization result according to all the data information. If the interface development platform configuration information is detected to be missing, an error prompt can be performed in the display module 35, and a voice prompt is performed; if the interface development platform configuration information is detected to exist, a visualization result is generated according to the interface synchronization result, and the visualization result is displayed in the display module 35.
By the interface information synchronization device, the synchronization of a large batch of interfaces to be synchronized can be quickly and accurately finished, and moreover, as the synchronized interface data information and the tree-shaped interface tree information are jointly stored, the device is beneficial for technicians to quickly and accurately finish the operations of calling, testing and the like of a target interface.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 4. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for communicating with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an interface information synchronization method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be understood by those skilled in the art that the structure shown in fig. 4 is a block diagram of only a portion of the structure relevant to the present application, and does not constitute a limitation on the segmented statistics apparatus to which the present application is applied, and a particular segmented statistics apparatus may include more or fewer components than shown in the figures, or some components may be combined, or have a different arrangement of components.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for synchronizing interface information, the method comprising:
acquiring at least one interface to be synchronized and interface development platform configuration information, wherein the interface development platform configuration information is associated with the interface to be synchronized;
sending a first data acquisition request to an interface development platform based on the configuration information of the interface development platform by using a preset first information synchronization function, and acquiring interface identification information which is sent by the interface development platform in response to the first data acquisition request and corresponds to the interface to be synchronized;
transmitting the interface identification information into a preset second information synchronization function;
and sending a second data acquisition request to the interface development platform based on the interface identification information by using the second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
2. The interface information synchronization method according to claim 1, applied to an automation platform, after the obtaining of the entire data information, the method further comprises:
acquiring a preset target interface type, wherein the preset target interface type is matched with an interface synchronization platform;
and converting all the data information of the interface to be synchronized into the preset target interface type according to the difference of all the data information types and the difference of transmission modes of the interface to be synchronized, and obtaining the target interface information corresponding to the target interface type.
3. The interface information synchronization method according to claim 1, wherein the interface development platform configuration information includes a project name, and the sending a first data acquisition request to an interface development platform based on the interface development platform configuration information by using a preset first information synchronization function includes:
the project name is transmitted to the first information synchronization function, and the first data acquisition request is sent to the interface development platform based on the project name by using the first information synchronization function;
the acquiring interface identification information, which is sent by the interface development platform in response to the first data acquisition request and corresponds to the interface to be synchronized, includes:
and acquiring interface tree information sent by the interface development platform in response to the first data acquisition request, wherein the interface tree information comprises the interface identification information.
4. The interface information synchronization method according to claim 3, wherein the obtaining interface tree information sent by the interface development platform in response to the first data obtaining request includes:
acquiring interface category information and interface list information which are sent by the interface development platform in response to the first data acquisition request; wherein the interface list information includes the interface identification information;
generating the interface tree information according to the interface category information and the interface list information;
the generating an interface synchronization result based on the all data information comprises:
and generating the interface synchronization result according to the all data information and the interface tree information, and storing the interface synchronization result in a preset database.
5. The interface information synchronization method according to any one of claims 1 to 4, characterized in that the method further comprises:
if detecting that the interface development platform configuration information is missing, sending error reporting information to terminal equipment; and if the interface development platform configuration information is detected to exist, generating a visualization result according to the interface synchronization result, and sending the visualization result to the terminal equipment for displaying.
6. The interface information synchronization method according to claim 5, wherein the generating a visualization result according to the interface synchronization result comprises:
acquiring a query instruction which is input by a user and aims at a target interface to be tested, wherein the target interface to be tested is an interface corresponding to the query instruction in the interfaces to be synchronized;
and responding to the query instruction, acquiring all interface information of the target interface to be tested, generating a test case according to all interface information of the target interface, and generating the visual result according to the interface synchronization result and the test interface.
7. An interface information synchronization apparatus, comprising:
the system comprises a configuration information collection module, a synchronization module and a synchronization module, wherein the configuration information collection module is used for acquiring at least one interface to be synchronized and interface development platform configuration information, and the interface development platform configuration information is associated with the interface to be synchronized;
the interface information collection module is used for sending a first data acquisition request to an interface development platform based on the configuration information of the interface development platform by using a preset first information synchronization function and acquiring interface identification information which is sent by the interface development platform in response to the first data acquisition request and corresponds to the interface to be synchronized;
the information transmitting module is used for transmitting the interface identification information into a preset second information synchronization function;
and the interface synchronization module is used for sending a second data acquisition request to the interface development platform based on the interface identification information by using the second information synchronization function, acquiring all data information which is sent by the interface development platform in response to the second data acquisition request and corresponds to the interface to be synchronized, and generating an interface synchronization result based on all the data information.
8. The interface information synchronization apparatus of claim 7, the apparatus further comprising a display module,
the display module is used for sending error reporting information to the terminal equipment if detecting that the configuration information of the interface development platform is lost; and if the display module detects that the interface development platform configuration information exists, generating a visualization result according to the interface synchronization result, and sending the visualization result to the terminal equipment for displaying.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202211131308.0A 2022-09-16 2022-09-16 Interface information synchronization method and device, computer equipment and storage medium Pending CN115422298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211131308.0A CN115422298A (en) 2022-09-16 2022-09-16 Interface information synchronization method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211131308.0A CN115422298A (en) 2022-09-16 2022-09-16 Interface information synchronization method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115422298A true CN115422298A (en) 2022-12-02

Family

ID=84203884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211131308.0A Pending CN115422298A (en) 2022-09-16 2022-09-16 Interface information synchronization method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115422298A (en)

Similar Documents

Publication Publication Date Title
CN107908631B (en) Data processing method, data processing device, storage medium and computer equipment
CN107861870B (en) Interface test and test data generation method, device, terminal and storage medium
CN112098924B (en) Interactive function testing method and device based on double-core intelligent electric meter
CN111459794A (en) Communication network testing method, device, computer equipment and storage medium
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN109633351B (en) Intelligent IT operation and maintenance fault positioning method, device, equipment and readable storage medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN110380939A (en) The conformance test method and system of local communication protocol in a kind of power information acquisition system
US8046638B2 (en) Testing of distributed systems
CN111506358B (en) Method and device for updating container configuration
CN111352836A (en) Pressure testing method and related device
CN105813102B (en) Automatic test system and method
CN112822073B (en) Test method, device, system, electronic equipment and readable storage medium
JP2017016507A (en) Test management system and program
CN115422298A (en) Interface information synchronization method and device, computer equipment and storage medium
CN112235358A (en) Data acquisition method and device, electronic equipment and computer readable storage medium
CN109359707B (en) Method and device for processing rock and soil sample information, computer equipment and storage medium
CN109800112A (en) Test method, device, computer equipment and storage medium
US9097720B2 (en) Displaying glucose measurements on a handheld glucose meter
CN113419932B (en) Equipment performance analysis method and device
CN113242254A (en) Communication message processing method, device, terminal equipment and storage medium
CN114978937B (en) Page data verification method and device
CN116298799B (en) Multi-interface linkage display method and system for chip test
CN116541442B (en) New energy automobile log analysis method and device
CN117499234A (en) Point list configuration method, device and system

Legal Events

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