CN114116745A - Interface change identification and display method, device, equipment and medium - Google Patents

Interface change identification and display method, device, equipment and medium Download PDF

Info

Publication number
CN114116745A
CN114116745A CN202111399263.0A CN202111399263A CN114116745A CN 114116745 A CN114116745 A CN 114116745A CN 202111399263 A CN202111399263 A CN 202111399263A CN 114116745 A CN114116745 A CN 114116745A
Authority
CN
China
Prior art keywords
interface
information
data set
database
data
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
CN202111399263.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.)
Spreadtrum Communications Tianjin Co Ltd
Original Assignee
Spreadtrum Communications Tianjin 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 Spreadtrum Communications Tianjin Co Ltd filed Critical Spreadtrum Communications Tianjin Co Ltd
Priority to CN202111399263.0A priority Critical patent/CN114116745A/en
Publication of CN114116745A publication Critical patent/CN114116745A/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/23Updating
    • 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/24Querying
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device, equipment and a medium for identifying and displaying interface change, wherein the identification method comprises the following steps: acquiring an original interface database and a GIT (general information technology) warehouse database, analyzing the latest codes in the GIT warehouse database, and acquiring information contents, wherein the latest codes are acquired by uploading records of codes on specified dates; determining a test script of a public interface for providing services to the outside in the information content, and storing the test script in a test interface database; and comparing the data information A with the data information B, determining modified contents, and updating the original interface database according to the modified contents. The invention determines the modified content by acquiring the code record uploaded on the appointed date, updates the data information in the database in real time, and assists the test developer to efficiently complete the development work by displaying the changed interface and the related content through the page.

Description

Interface change identification and display method, device, equipment and medium
Technical Field
The invention relates to the technical field of computer application, in particular to a method, a device, equipment and a medium for identifying and displaying interface change.
Background
In the process of jointly developing the test scripts, in order to improve the test efficiency and quickly respond to the test requirements, a module responsible person independently develops and maintains the common interface of each module. In order to improve the development efficiency and enhance the reusability of codes, common interfaces can be called among module responsible persons.
When the public interface of a certain module or the parameter information of the public interface is changed, the module responsible person needs to inform other module responsible persons of changing the related content in time.
When a public interface of a certain module cannot be timely notified to other module responsible persons after being modified, the calling of the interface by other modules is wrong; or the developer wants to call the public interface of the module in the development process, and fails to timely master the specific parameter information after the interface is changed, so that the problem occurs in the development of the subsequent script, and the development progress of the module test script is greatly delayed.
Therefore, in order to solve the above problems, the present invention provides a method, an apparatus, a device, and a medium for identifying and displaying an interface change, and updates information in a database in real time and enables a test developer to view related parameter information of a common interface of each module in real time.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for identifying and displaying interface changes, which can update data information in a database in real time, and can assist test developers to efficiently complete development work by displaying changed interfaces and related contents thereof through pages.
In a first aspect, the present invention provides a method for identifying an interface change, including: acquiring an original interface database and a GIT (generic identification) warehouse database, analyzing the latest code in the GIT warehouse database, and acquiring the information content contained in the latest code, wherein the latest code is acquired by uploading a record of the code on a specified date; determining a test script of a public interface for providing services to the outside in the information content through a label annotation symbol, and storing the test script in a test interface database; and comparing the data information A in the original interface database with the data information B in the test interface database, determining the modified content in the test interface database, and updating the original interface database according to the modified content.
The beneficial effects are that: according to the embodiment of the invention, the latest code of the appointed date is obtained through the GIT warehouse database, and the information content contained in the latest code is analyzed, so that the updating condition of the code can be known in time; the test script of the public interface for providing services to the outside in the information content is determined through the label annotation symbol, so that the workload of the system can be reduced; the test script is stored in a test interface database, so that comparison with data information in the original interface database is facilitated; the data information A in the original interface database is compared with the data information B in the test interface database to determine the modified content in the test interface database, and the original interface database is updated according to the modified content, so that the data information in the original interface database can be updated in real time, and the condition of data calling error caused by untimely update of the database when other interfaces call the information content of the public interface is prevented.
Optionally, the determining, by the tag annotator, a test script of a common interface for providing a service to the outside in the information content includes: and setting a label comment symbol in the code comment of the public interface for providing services to the outside, and determining that the test script containing the label comment symbol in the information content is the test script of the public interface for providing services to the outside. The beneficial effects are that: according to the invention, the label annotation symbol is set in the test script of the public interface in advance, so that the public interface belonging to the external service in the latest code can be directly screened out according to the label annotation symbol, and the condition that other interfaces call the public interface incorrectly due to the fact that the database is not updated in time is avoided if the public interface not belonging to the external service does not belong to the public interface of the external service, so that the workload of the system is further reduced.
Optionally, the obtaining an original interface database and a GIT repository database, and analyzing the latest code in the GIT repository database includes: and acquiring an original interface database and a GIT (generic identification) warehouse database, screening a file directory to which a public interface method belongs from the CIT warehouse database, and analyzing all codes under the file directory. The beneficial effects are that: the file directory to which the common interface method belongs can be positioned by screening the file directory to which the common interface method belongs from the CIT warehouse database, and the workload of the system is reduced.
Further optionally, the parsing the latest code in the GIT repository database and obtaining the information content included in the latest code includes: and analyzing the generated abstract syntax tree of all the codes in the file directory, and acquiring the information content of all the codes in the file directory. The beneficial effects are that: by analyzing the abstract syntax tree generated by all codes in the file directory, the key information content of the codes can be directly analyzed, and the working efficiency is improved.
Still further optionally, the information content comprises: at least one of a package name, a class name, a method name, a responsible maintenance department, an input parameter, an output parameter, a method content, and a method comment. The method has the advantages that the information content has representative significance, the information range of the compared information content is set, the purpose is strong, and the workload is reduced.
Optionally, the comparing the data information a in the original interface database with the data information B in the test interface database includes: taking a splicing character string of a packet name _ class name _ method name _ input parameter _ output parameter as the characteristic information of the data set in the data information A and the data set in the data information B; and matching the data set in the data information A with the data set in the data information B through the characteristic information to obtain a matching result, and comparing the data set in the data information A with the data set in the data information B according to the matching result. The beneficial effects are that: because the common interface methods with different contents may have the problem of method name duplication, in order to avoid matching errors, a splicing character string of a packet name _ class name _ method name _ input parameter _ output parameter is set as the feature information of the data set in the data information a and the data set in the data information B, and the data sets with the same feature information are matched and compared.
Further optionally, the matching the data set in the data information a and the data set in the data information B through the feature information to obtain a matching result, and comparing the data set in the data information a and the data set in the data information B according to the matching result includes: and matching the data set a in the data information A with the data set B in the data information B through the characteristic information, namely matching the data set a and the data set B containing the same characteristic information, and comparing the matched data set a with the matched data set B. The beneficial effects are that: it is meaningless to compare the data sets with inconsistent feature information, and the workload is increased, so that the data set a in the data information a and the data set B in the data information B are matched through the feature information, and the matched data set a and the data set B are compared, so that an accurate comparison result can be obtained.
Further optionally, determining modified content in the test interface database includes: if the data information of the data set a is inconsistent with the data information of the data set b, changing the method of the public interface corresponding to the data set a; if the data exists in the data set a and the data does not exist in the data set b, the common interface corresponding to the data set a is deleted; and if the data exists in the data set b and the data does not exist in the data set a, indicating that the common interface corresponding to the data set b is a newly added interface. The beneficial effects are that: the modification content can be a method for changing the public interface, or a new public interface can be added or the original public interface can be deleted, so that the accurate modification content can be obtained through the comparison, and the original interface database can be updated in time according to the modification content.
In a second aspect, the present invention provides a method for displaying an interface change, including: responding to a preset query condition, initiating a data acquisition request to a server, and receiving a response message corresponding to the data acquisition request returned by the server; wherein the response packet includes: the response code and the page are assembled to obtain the required content; inquiring a corresponding page template according to a response code carried by the response message, and inquiring configuration information of page elements contained in the page template according to a pre-configured script, wherein the page elements contain changed interfaces, and the changed interfaces are obtained by identification according to any one of the interface change identification methods in the first aspect; and assembling a page according to the page template, the configuration information of the page elements contained in the page template and the content required by page assembly carried by the response message, and displaying the assembled page.
The beneficial effects are that: the invention initiates a data acquisition request to the server by responding to the preset query condition, receives the response message corresponding to the data acquisition request returned by the server, and can directly acquire the content to be queried according to the preset query condition; according to the changed interface contained in the page element, the related information of the changed interface can be input into the page element; and the information content of the interface change can be directly and clearly obtained through page display, so that the test developer can be helped to efficiently complete the development work.
Optionally, the query condition includes at least one of a class name, a class author, and a method name. The beneficial effects are that: and the query condition comprises at least one of a class name, a class author and a method name, so that the problem to be searched and solved can be located according to the classification information.
Optionally, the page assembles the required content, including: package name, class author, class method description, and method list. The beneficial effects are that: assembling the required content through the page, including: the package name, the class author, the class method description and the method list can show the information content in detail and obtain the modified information content through the content.
Further optionally, the content required for page assembly further includes a department list. The beneficial effects are that: the content required by the page assembly also comprises a department list, so that the items responsible for the department can be directly filtered and screened, and the query range is further narrowed.
Optionally, the method list includes: a method completion name, a method author, a method input parameter, a method return value, a method exception, a method change date, and a method change content, the method change content being modified content obtained by the method of the first aspect. The beneficial effects are that: through the method list, including the method completion name, the method author, the method input parameter, the method return value, the method exception, the method change date and the method change content, the relevant information of the interface method can be obtained.
Optionally, the method list further comprises a method modifier. The beneficial effects are that: the method list also comprises related personnel which can be known by a method changer to modify the interface method, and the method changer can obtain the detailed information of the change according to the personnel, or can directly contact the personnel to carry out corresponding modification if the subsequent call is unsuccessful.
In a third aspect, the present invention provides an interface change identification device comprising means for performing any one of the possible design methods of the first aspect. These modules/units may be implemented by hardware, or by hardware executing corresponding software.
In a fourth aspect, the present invention provides a display device with an interface modification, the device comprising a module/unit for performing any one of the possible design methods of the second aspect. These modules/units may be implemented by hardware, or by hardware executing corresponding software.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. Wherein the memory is used to store one or more computer programs; the one or more computer programs stored in the memory, when executed by the processor, enable the electronic device to implement the method of any one of the possible designs of the first or second aspects described above.
In a sixth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the possible designs of the first or second aspects.
In a seventh aspect, an embodiment of the present application further provides a computer program product, which, when run on an electronic device, causes the electronic device to perform any one of the possible designs of the first aspect or the second aspect.
As for the advantageous effects of the above third to seventh aspects, reference may be made to the description in the above first aspect or the above second aspect.
Drawings
Fig. 1 is a flowchart of an interface change identification method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for displaying an interface change according to an embodiment of the present disclosure;
fig. 3 is a schematic view of an interface change recognition apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a display device with an interface change according to an embodiment of the present disclosure;
fig. 5 is a display page of an interface change according to an embodiment of the present application;
fig. 6 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
Before describing the embodiments of the present invention in detail, some terms used in the embodiments of the present invention will be explained below to facilitate understanding by those skilled in the art.
1) Distributed version control system (Git)
Git can handle project versioning from very small to very large versions efficiently and at high speed, and can completely mirror the original code repository. The GIT repository database in the present application is a database that stores data information of code upload records obtained by GIT, and herein, GIT is different from GIT, and GIT is only a name of repository, and can be taken at will, without any substantial effect and influence.
The technical solution in the embodiments of the present application is described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the specification of the present application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" means one or more than two (including two). The term "and/or" is used to describe an association relationship that associates objects, meaning that three relationships may exist; for example, a and/or B, may represent: a alone, both A and B, and B alone, where A, B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise. The term "coupled" includes both direct and indirect connections, unless otherwise noted. "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the application provides an identification method of interface change, as shown in fig. 1, the specific steps are as follows:
s101, acquiring an original interface database and a GIT warehouse database, analyzing the latest code in the GIT warehouse database, and acquiring the information content contained in the latest code, wherein the latest code is acquired by uploading a record of the code on a specified date.
In this step, the latest code of the specified date is obtained through the GIT repository database, and the information content contained in the latest code is analyzed, so that the update condition of the code can be known in time.
S102, determining a test script of a public interface for providing service to the outside in the information content through the label annotation symbol, and storing the test script in a test interface database.
In this step, the test script of the common interface for providing services to the outside in the information content is determined through the label annotator, so that the workload of the system can be reduced.
S103, comparing the data information A in the original interface database with the data information B in the test interface database, determining the modified content in the test interface database, and updating the original interface database according to the modified content.
In this step, the data information a in the original interface database is compared with the data information B in the test interface database to determine the modified content in the test interface database, and the original interface database is updated according to the modified content, so that the data information in the original interface database can be updated in real time, and the situation of data calling error caused by untimely database update when other interfaces call the information content of the public interface is prevented.
In a possible embodiment, the determining, by the tag annotator, a test script of a common interface of the information content for providing services to the outside includes: and setting a label comment symbol in the code comment of the public interface for providing services to the outside, and determining that the test script containing the label comment symbol in the information content is the test script of the public interface for providing services to the outside.
In this embodiment, the tag annotation symbol is set in the test script of the public interface in advance, so that the public interface belonging to the external service in the latest code can be directly screened out according to the tag annotation symbol, and because the public interface not belonging to the external service does not cause the condition that other interfaces call the public interface incorrectly because the database is not updated in time, the workload of the system is further reduced.
In yet another possible embodiment, the obtaining the raw interface database and the GIT repository database, and parsing the latest code in the GIT repository database, includes: and acquiring an original interface database and a GIT (generic identification) warehouse database, screening a file directory to which a public interface method belongs from the CIT warehouse database, and analyzing all codes under the file directory.
In this embodiment, the file directory to which the common interface method belongs is screened from the CIT warehouse database, so that the file directory to which the common interface method belongs can be located, and the workload of the system is reduced.
In yet another possible embodiment, the parsing the latest code in the GIT repository database and obtaining the information content contained in the latest code comprises: and analyzing the generated abstract syntax tree of all the codes in the file directory, and acquiring the information content of all the codes in the file directory.
In the embodiment, the key information content of the code can be directly analyzed by analyzing the generated abstract syntax tree of all the codes in the file directory, so that the working efficiency is improved.
In yet another possible embodiment, the information content comprises: at least one of a package name, a class name, a method name, a responsible maintenance department, an input parameter, an output parameter, a method content, and a method comment. The method has the advantages that the information content has representative significance, the information range of the compared information content is set, the purpose is strong, and the workload is reduced.
In a possible embodiment, the comparing the data information a in the original interface database with the data information B in the test interface database includes: taking a splicing character string of a packet name _ class name _ method name _ input parameter _ output parameter as the characteristic information of the data set in the data information A and the data set in the data information B; and matching the data set in the data information A with the data set in the data information B through the characteristic information to obtain a matching result, and comparing the data set in the data information A with the data set in the data information B according to the matching result.
In this embodiment, because the common interface methods with different contents may have a problem of method name duplication, in order to avoid matching errors, a concatenation character string of a packet name _ class name _ method name _ input parameter _ output parameter is set as feature information of a data set in the data information a and a data set in the data information B, and data sets with the same feature information are matched and compared.
In another possible embodiment, the matching the data set in the data information a and the data set in the data information B by using the feature information to obtain a matching result, and comparing the data set in the data information a and the data set in the data information B according to the matching result includes: matching the data set a in the data information A and the data set B in the data information B through the characteristic information to obtain a matching result; when the data set a and the data set b contain the same characteristic information, the data set a and the data set b are matched, and the data set a and the data set b are compared; otherwise the data set a and the data set b do not match.
In this embodiment, it is meaningless to compare data sets with inconsistent feature information, and the workload is increased, so that by using the feature information, the data set a in the data information a and the data set B in the data information B are matched, and the matched data set a and the data set B are compared, so that an accurate comparison result can be obtained.
In yet another possible embodiment, determining modified content in the test interface database includes: if the data information of the data set a is inconsistent with the data information of the data set b, changing the method of the public interface corresponding to the data set a; if the data exists in the data set a and the data does not exist in the data set b, the common interface corresponding to the data set a is deleted; and if the data exists in the data set b and the data does not exist in the data set a, indicating that the common interface corresponding to the data set b is a newly added interface. In this embodiment, the modified content may be a method of changing a public interface, or a method of adding a new public interface or deleting an original public interface, so that the accurate modified content can be obtained through the comparison, and the original interface database is updated in time according to the modified content.
The embodiment of the application provides a method for displaying interface change, as shown in fig. 2, the specific steps are as follows:
s201, responding to a preset query condition, initiating a data acquisition request to a server, and receiving a response message corresponding to the data acquisition request returned by the server; wherein the response packet includes: and the response code and the page assemble the required content.
In this step, the content to be queried can be directly obtained according to the preset query condition.
S202, querying a page template corresponding to the response message according to the response code carried in the response message, and querying configuration information of a page element included in the page template according to a pre-configured script, where the page element includes a changed interface, and the changed interface is identified and obtained according to the method for identifying an interface change according to any one of the embodiments.
In this step, according to the page element including the changed interface, the information related to the changed interface may be input into the page element.
S203, assembling the page according to the page template, the configuration information of the page elements contained in the page template and the content required by the page assembly carried by the response message, and displaying the assembled page.
In the step, the information content of the interface change is directly and clearly obtained through page display, so that the test developer is helped to efficiently complete the development work.
In one possible embodiment, the query condition includes at least one of a class name, a class author, and a method name. In this embodiment, the query condition includes at least one of a class name, a class author, and a method name, and a problem to be solved can be located according to the classification information.
In yet another possible embodiment, the page assembly of the desired content includes: package name, class author, class method description, and method list. In this embodiment, assembling the required content through the page includes: the package name, the class author, the class method description and the method list can show the information content in detail and obtain the modified information content through the content.
In a further possible embodiment, the content required for page assembly further includes a department list. In this embodiment, the content required by the page assembly further includes a department list, so that the items responsible for the department can be directly filtered and screened, and the query range is further narrowed.
In yet another possible embodiment, the list of methods includes: a method completion name, a method author, a method input parameter, a method return value, a method exception, a method change date, and a method change content, the method change content being modified content obtained by the method of the first aspect. In this embodiment, the method list includes a method completion name, a method author, a method input parameter, a method return value, a method exception, a method change date, and a method change content, and thus, the related information of the interface method can be obtained.
In a possible embodiment, the method list further comprises method modifiers. In this embodiment, the method list further includes a method modifier, so that a person who is related to modifying the interface method can be known, and according to the person, modified detailed information can be obtained, or if the subsequent call is unsuccessful, the person can be directly contacted to perform corresponding modification.
The embodiment of the present application provides a schematic diagram of an interface change recognition apparatus, where the above-mentioned interface change recognition method can be implemented by the recognition apparatus 300, and the recognition apparatus 300 includes: an acquisition module 301, a determination module 302, and a comparison module 303.
The obtaining module 301 is configured to obtain an original interface database and a GIT repository database, analyze the latest code in the GIT repository database, and obtain information content included in the latest code, where the latest code is obtained through a code upload record of a specified date.
The determining module 302 is configured to determine a test script of a public interface providing services to the outside in the information content through the tag annotator, and store the test script in a test interface database.
The comparison module 303 is configured to compare the data information a in the original interface database with the data information B in the test interface database, determine modified content in the test interface database, and update the original interface database according to the modified content.
All relevant contents of the steps related to the above method embodiments may be referred to the functional description of the corresponding unit module, and are not described herein again.
An embodiment of the present application provides a display apparatus 400 for interface change, as shown in fig. 4, where the display method for interface change can be implemented by the identification device 400, and the display apparatus 400 includes: a request module 401, a query module 402 and a presentation module 403.
The request module 401 is configured to respond to a preset query condition, initiate a data acquisition request to a server by a terminal, and receive a response message corresponding to the data acquisition request and returned by the server; wherein the response packet includes: and the response code and the page assemble the required content.
The query module 402 is configured to query a page template corresponding to the response code carried in the response packet according to the response code, and query configuration information of a page element included in the page template according to a pre-configured script, where the page element includes a changed interface, and the changed interface is identified and obtained according to the identification method of an interface change described in any one of the embodiments.
The displaying module 403 is configured to assemble a page according to the page template, the configuration information of the page elements included in the page template, and the content required by page assembly carried in the response packet, and display the assembled page.
All relevant contents of the steps related to the above method embodiments may be referred to the functional description of the corresponding unit module, and are not described herein again.
In order to facilitate understanding of the above embodiments, the embodiments of the present application provide a presentation page of interface change, as shown in fig. 5.
The display page adopts a left-right segmentation structure page, the left side of the display page corresponds to each department of the navigation bar, and a module interface method for filtering the responsibility of a certain team by clicking the department is convenient to search. If the page screen is small, the navigation bar on the left side can be hidden for viewing, only the keywords of the department list are reserved, and the directory branches under the department list are expanded when the department list is clicked.
The method provides three query conditions, namely the class name, the class author and the method name, and can be convenient for a user to quickly locate the relevant information of the query method.
And the right side of the display page is an interface method display page of the test script. When the Package (Package) list is accessed for the first time, the Package names (packagemame) of all modules are displayed, and similarly, when the Class (Class) list is accessed for the first time, the Class names (ClassName) of all modules are displayed.
When the Package name of the Package list is clicked, refreshing the Class list, and displaying the Class list corresponding to the Package name; when the class name is clicked, the detailed information of the class is shown on the right side. Shown in order from top to bottom are a list of class authors (classsauthor), class Method descriptions, and methods (methods) for the selected class.
When the Method list is clicked, detailed information of the selected Method is specifically displayed, and the detailed information comprises the following steps: a method completion name (not shown in the figure), a method author, a method parameter, a method return value, a method exception, and update content related information including: method change dates, method changers (e.g., not filling out default method authors), and method modification content.
Through the display page, when the method of the related public interface is called, the tester can know whether the related content of the public interface is changed and the related changed content at a glance, so that the calling error of the tester is prevented, and the software testing efficiency is improved.
In other embodiments of the present application, an embodiment of the present application discloses an electronic device, which may include, as shown in fig. 6: one or more processors 601; a memory 602; a display 603; one or more application programs (not shown); and one or more computer programs 604, which may be connected via one or more communication buses 605. Wherein the one or more computer programs 604 are stored in the memory 602 and configured to be executed by the one or more processors 601, the one or more computer programs 604 comprising instructions which may be used to perform the steps as in the respective embodiments of fig. 1 or fig. 2.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. An interface change recognition method, comprising:
acquiring an original interface database and a GIT (generic identification) warehouse database, analyzing the latest code in the GIT warehouse database, and acquiring the information content contained in the latest code, wherein the latest code is acquired by uploading a record of the code on a specified date;
determining a test script of a public interface for providing services to the outside in the information content through a label annotation symbol, and storing the test script in a test interface database;
and comparing the data information A in the original interface database with the data information B in the test interface database, determining the modified content in the test interface database, and updating the original interface database according to the modified content.
2. The method of claim 1, wherein the determining a test script of a common interface for providing services to outside in the information content through a tag annotator comprises:
and setting a label comment symbol in the code comment of the public interface for providing services to the outside, and determining that the test script containing the label comment symbol in the information content is the test script of the public interface for providing services to the outside.
3. The method of claim 1, wherein the obtaining the raw interface database and the GIT repository database, and parsing the latest code in the GIT repository database comprises:
and acquiring an original interface database and a GIT (generic identification) warehouse database, screening a file directory to which a public interface method belongs from the CIT warehouse database, and analyzing all codes under the file directory.
4. The method according to claim 1 or 3, wherein the parsing the latest code in the GIT repository database and obtaining the information content contained in the latest code comprises:
and analyzing the generated abstract syntax tree of all the codes in the file directory, and acquiring the information content of all the codes in the file directory.
5. The method of claim 1, wherein the information content comprises: at least one of a package name, a class name, a method name, a responsible maintenance department, an input parameter, an output parameter, a method content, and a method comment.
6. The method of claim 1, wherein comparing the data information a in the raw interface database with the data information B in the test interface database comprises:
taking a splicing character string of a packet name _ class name _ method name _ input parameter _ output parameter as the characteristic information of the data set in the data information A and the data set in the data information B;
and matching the data set in the data information A with the data set in the data information B through the characteristic information to obtain a matching result, and comparing the data set in the data information A with the data set in the data information B according to the matching result.
7. The method according to claim 6, wherein the matching the data set in the data information a with the data set in the data information B through the feature information to obtain a matching result, and the comparing the data information a with the data set in the data information B according to the matching result includes:
matching the data set a in the data information A and the data set B in the data information B through the characteristic information to obtain a matching result;
when the data set a and the data set b contain the same characteristic information, the data set a and the data set b are matched, and the data set a and the data set b are compared; otherwise the data set a and the data set b do not match.
8. The method of claim 1 or 7, wherein determining modified content in the test interface database comprises:
if the data information of the data set a is inconsistent with the data information of the data set b, changing the method of the public interface corresponding to the data set a;
if the data exists in the data set a and the data does not exist in the data set b, the common interface corresponding to the data set a is deleted;
and if the data exists in the data set b and the data does not exist in the data set a, indicating that the common interface corresponding to the data set b is a newly added interface.
9. A method for displaying interface changes is characterized by comprising the following steps:
responding to a preset query condition, initiating a data acquisition request to a server, and receiving a response message corresponding to the data acquisition request returned by the server; wherein the response packet includes: the response code and the page are assembled to obtain the required content;
inquiring a corresponding page template according to a response code carried by the response message, and inquiring configuration information of page elements contained in the page template according to a pre-configured script, wherein the page elements contain changed interfaces, and the changed interfaces are obtained by identification according to the identification method of the interface change in any one of claims 1 to 8;
and assembling a page according to the page template, the configuration information of the page elements contained in the page template and the content required by page assembly carried by the response message, and displaying the assembled page.
10. The method of claim 9, wherein the query condition comprises at least one of a class name, a class author, and a method name.
11. The method of claim 9, wherein the page assembling the desired content comprises: package name, class author, class method description, and method list.
12. The method of claim 1, wherein the content required for page assembly further comprises a department list.
13. The method of claim 11, wherein the list of methods comprises:
method completion name, method author, method input parameter, method return value, method exception, method change date, and method change content, the method change content being the modified content obtained by the method of claims 1 to 9.
14. The method of claim 13, wherein the method list further comprises method modifiers.
15. An apparatus for identifying an interface change, comprising:
the acquisition module is used for acquiring an original interface database and a GIT (generic identification) warehouse database, analyzing the latest codes in the GIT warehouse database and acquiring the information content contained in the latest codes, wherein the latest codes are acquired by uploading records of codes on specified dates;
the determining module is used for determining a test script of a public interface for providing services to the outside in the information content through the label annotation symbol, and storing the test script in a test interface database;
and the comparison module is used for comparing the data information A in the original interface database with the data information B in the test interface database, determining the modified content in the test interface database, and updating the original interface database according to the modified content.
16. An interface change display device, comprising:
the terminal sends a data acquisition request to the server and receives a response message corresponding to the data acquisition request returned by the server; wherein the response packet includes: the response code and the page are assembled to obtain the required content;
the query module is used for querying a page template corresponding to the response message according to the response code carried by the response message, and querying configuration information of page elements contained in the page template according to a pre-configured script, wherein the page elements contain changed interfaces, and the changed interfaces are identified and obtained according to the identification method of the interface change according to any one of claims 1 to 8;
and the display module is used for assembling the page according to the page template, the configuration information of the page elements contained in the page template and the content required by page assembly carried by the response message, and displaying the assembled page.
17. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, causing the processor to carry out the identification method of any one of claims 1 to 8 or the presentation method of any one of claims 9 to 14.
18. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the identification method according to any one of claims 1 to 8 or the presentation method according to any one of claims 9 to 14.
CN202111399263.0A 2021-11-19 2021-11-19 Interface change identification and display method, device, equipment and medium Pending CN114116745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111399263.0A CN114116745A (en) 2021-11-19 2021-11-19 Interface change identification and display method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111399263.0A CN114116745A (en) 2021-11-19 2021-11-19 Interface change identification and display method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114116745A true CN114116745A (en) 2022-03-01

Family

ID=80440678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111399263.0A Pending CN114116745A (en) 2021-11-19 2021-11-19 Interface change identification and display method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114116745A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578499A (en) * 2023-07-13 2023-08-11 建信金融科技有限责任公司 Intelligent analysis and test method and system for public component function change influence

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578499A (en) * 2023-07-13 2023-08-11 建信金融科技有限责任公司 Intelligent analysis and test method and system for public component function change influence
CN116578499B (en) * 2023-07-13 2023-09-22 建信金融科技有限责任公司 Intelligent analysis and test method and system for public component function change influence

Similar Documents

Publication Publication Date Title
EP2041672B1 (en) Methods and apparatus for reusing data access and presentation elements
EP3433732B1 (en) Converting visual diagrams into code
US7225197B2 (en) Data entry, cross reference database and search systems and methods thereof
US11720631B2 (en) Tool to build and store a data model and queries for a graph database
CN108762743B (en) Data table operation code generation method and device
CN108762808B (en) Interface document generation method and system
US20180165179A1 (en) Determining incompatibilities of automated test cases with modified user interfaces
CN113360519B (en) Data processing method, device, equipment and storage medium
CN116011400A (en) Automatic generation method and device for project standard test document
CN111061733B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN107515866B (en) Data operation method, device and system
CN114036425A (en) Page access method, client, server and system
CN112307191A (en) Multi-system interactive log query method, device, equipment and storage medium
CN112799718A (en) Enumerated document generation method and device, electronic equipment and storage medium
CN110109981B (en) Information display method and device for work queue, computer equipment and storage medium
CN111414410A (en) Data processing method, device, equipment and storage medium
CN116450890A (en) Graph data processing method, device and system, electronic equipment and storage medium
CN113608955B (en) Log recording method, device, equipment and storage medium
CN111427577A (en) Code processing method and device and server
CN114116745A (en) Interface change identification and display method, device, equipment and medium
CN116303641B (en) Laboratory report management method supporting multi-data source visual configuration
US11907238B2 (en) Metadata-based software artifact search
CN116737535A (en) Interface test method, device, computer equipment and storage medium
WO2019209855A1 (en) Data analytics systems and methods
CN112463896B (en) Archive catalogue data processing method, archive catalogue data processing device, computing equipment and storage medium

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