CN115421773A - Interface inspection method, device, equipment and medium based on gitlab - Google Patents

Interface inspection method, device, equipment and medium based on gitlab Download PDF

Info

Publication number
CN115421773A
CN115421773A CN202211064177.9A CN202211064177A CN115421773A CN 115421773 A CN115421773 A CN 115421773A CN 202211064177 A CN202211064177 A CN 202211064177A CN 115421773 A CN115421773 A CN 115421773A
Authority
CN
China
Prior art keywords
interface
code
new code
interface information
information
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
CN202211064177.9A
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211064177.9A priority Critical patent/CN115421773A/en
Publication of CN115421773A publication Critical patent/CN115421773A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the field of software development, and particularly relates to a method, a device, equipment and a medium for checking an interface based on gitlab, wherein the method comprises the following steps: acquiring a new code submitted by a user, wherein the user is a software developer; and comparing the interface information contained in the new code with the interface information of a preset code base, and when the interface information contained in the new code is inconsistent with the interface information of the preset code base, stopping compiling and incorporating the new code and sending error reporting information to the user. The method ensures the quality of the software codes, adapts to the current speed that only the verification and the deployment of all software integration can be accelerated, and is convenient for updating the iteration version quickly.

Description

Interface inspection method, device, equipment and medium based on gitlab
Technical Field
The invention belongs to the field of software development, and particularly relates to a method, a device, equipment and a medium for interface inspection based on gitlab.
Background
In the fast iteration of the intelligent driving vehicle software, the problem of misalignment is easily caused by interfaces among huge software functional modules in the whole data stream. This problem can directly lead to delays in the overall software development iteration plan, affecting product functionality and the company's business competitiveness. With the increase of software functions, development teams become huge, and the whole development progress is affected possibly because communication is not timely or communication interfaces are not aligned under other conditions. The prior art can not feed back to developers in real time aiming at the interface problem in the development process of the multifunctional module, and the processing timeliness is influenced.
Disclosure of Invention
In view of the above drawbacks of the prior art, the present invention provides a method, an apparatus, a device, and a medium for interface inspection based on gitlab, which can inspect an interface and feed back the interface to a developer in time in a large-scale development process, thereby improving software development efficiency and solving the above technical problems.
In order to achieve the above objects and other related objects, the present invention provides a method for checking an interface based on gitlab, comprising the steps of:
acquiring a new code submitted by a user, wherein the user is a software developer;
and comparing the interface information contained in the new code with the interface information of a preset code base, and when the interface information contained in the new code is inconsistent with the interface information of the preset code base, stopping compiling and incorporating the new code and sending error reporting information to the user.
In an optional embodiment of the present invention, the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing the compiling and the incorporating of the new code, and sending error information to the user includes:
judging whether target output interfaces corresponding to the names of all input interfaces in the new code exist in the interface information of the preset code library or not;
and if the interface information of the preset code library lacks a target output interface corresponding to the name of any input interface in the new code, preventing compiling and incorporating of the new code and sending error reporting information to the user.
In an optional embodiment of the present invention, the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing compiling and merging of the new code, and sending error report information to the user further includes:
if the interface information of the preset code library has target output interfaces corresponding to the names of all input interfaces in the new code, respectively judging whether the content of each input interface is consistent with the content of each target output interface;
and if the content of any input interface is inconsistent with the content of the target output interface, preventing the compiling and the incorporating of the new code and sending error report information to the user.
In an optional embodiment of the present invention, the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing the compiling and the incorporating of the new code, and sending error information to the user further includes:
if the content of each input interface is consistent with the content of each target output interface, judging whether all output interfaces in the new code are contained in the interface information of the preset code library;
and if any output interface of the new code is not contained in the interface information of the preset code library, preventing the compiling and the incorporating of the new code and sending error reporting information to the user.
In an optional embodiment of the present invention, the method further comprises the following steps:
and if all output interfaces in the new code are contained in the interface information of the preset code base, compiling and merging the new code.
In an optional embodiment of the present invention, the preset code library includes a plurality of sub-function modules, and each of the sub-function modules is provided with its own output interface.
In an optional embodiment of the present invention, a section of test code is stored in the preset code library corresponding to each of the sub-function modules, and the test code includes a statement for defining an interface of the corresponding sub-function module.
In an optional embodiment of the present invention, the step of comparing the interface information included in the new code with the interface information of a preset code library includes:
and comparing the statement defining the interface information in the new code with the statement defining the interface information in the new test code.
To achieve the above and other related objects, the present invention also provides a gitlab-based interface inspection apparatus, comprising:
the new code acquisition module is used for acquiring a new code submitted by a user, wherein the user is a software developer;
and the execution module is used for comparing the interface information contained in the new code with the interface information of a preset code base, and when the interface information contained in the new code is inconsistent with the interface information of the preset code base, the compiling and the incorporating of the new code are prevented, and error reporting information is sent to the user.
To achieve the above and other related objects, the present invention also provides an electronic device, comprising:
one or more processors;
a storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the gitlab-based interface inspection method.
To achieve the above and other related objects, the present invention also provides a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor of a computer, causes the computer to execute the gitlab-based interface inspection method.
The invention has the beneficial effects that: the invention is based on the CI/CD continuous integration function of the gitlab, ensures the rapid continuous integration deployment, simultaneously carries out the upstream and downstream verification of the communication interface, and informs the corresponding functional module responsible persons in real time. The method has the advantages that the quality of the software codes is guaranteed, the verification and deployment speed of all software integration can be increased only at present, and the iterative version can be updated quickly.
The method and the system realize the tracking and the checking of the whole vehicle data stream interface based on the CI/CD function, the shell script and the like of the gitlab, solve the problem of interface misalignment caused by numerous developers and complex tasks in rapid integration iteration, and improve the development speed and the accuracy.
The invention takes the software function stabilization and the rapid iteration of the intelligent driving rapid iteration as the target, takes the whole vehicle software data flow as the guide and carries out the unified management on the interfaces of all the related functions. Subdividing all input and output signals to match input and output interfaces. And the method is integrated into the rapid integrated deployment of the gitlab CI \ CD, thereby greatly reducing the number of departments participated by people, improving the development efficiency and accuracy, and laying a solid foundation for the subsequent detailed function test and version iteration plan.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 is a schematic view of an application scenario of the interface inspection method based on gitlab according to the embodiment of the present invention;
FIG. 2 is a flow chart of a method for unifying dataflow interfaces in an iterative version development plan according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for interface inspection based on gitlab provided by an embodiment of the present invention;
FIG. 4 is a detailed flowchart of an interface checking method provided by an embodiment of the present invention;
FIG. 5 is a diagram of data flow interface validation logic provided by an embodiment of the present invention;
fig. 6 is a functional block diagram of an interface inspection apparatus based on gitlab according to an embodiment of the present invention;
fig. 7 is a block diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure of the present specification, wherein the following description is made for the embodiments of the present invention with reference to the accompanying drawings and the preferred embodiments. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
First, it should be noted that gitlab is an open source project for a warehouse management system, and Web services are built on the basis of Git as a code management tool. The installation method is to reference the Wiki page of gitlab on GitHub. The gitlab is an open source code management platform based on git, which is widely used at present, is constructed based on Ruby on Rails, and mainly manages codes and documents generated in the software development process, the gitlab mainly manages the codes and the documents in two dimensions of group and project, wherein group is a group, project is an engineering project, one group can manage a plurality of projects, and it can be understood that a group has a plurality of software development tasks, and one project may include a plurality of branches, meaning that each project has a plurality of branches, the branches are independent from each other, and different branches can be merged. The native CI/CD function of gitlab can realize the automatic packing and compiling of codes and the function of checking code specification
The interface is a reference type defining an agreement, is a code in a special form for realizing data interaction between different modules in a software system, and in order to ensure normal data interaction between an upstream module and a downstream module, the name and specific implementation of an output interface of the upstream module are required to be consistent with those of the output interface of the downstream module.
Fig. 1 is a schematic view of an application scenario of the interface inspection method based on gitlab provided in the embodiment of the present invention, where a plurality of sub-function modules exist in the scenario, each sub-function module corresponds to one or more interfaces, it should be noted that the upstream and downstream attributes of the same sub-function module are uncertain, for example, in one specific function implementation, the sub-function module 2 may serve as an upstream module of the sub-function module 3, and provide data for the sub-function module 3 through an output interface, and in another specific function implementation, the sub-function module 2 may serve as a downstream module of the sub-function module 1, and receive data output by the sub-function module 1.
It can be understood that, when one of the sub-function modules uploads a new code, if there is no output interface in the code library that is the same as the input interface referenced by the new code, the new code cannot acquire data, and therefore cannot operate normally, and when the output interface defined by the new code does not exist in the code library, the other sub-modules cannot acquire data output by the new code implementing function, which may also cause the system to operate normally.
The interface inspection method based on the gitlab is applied to one or more electronic devices, which are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), an interactive Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
Fig. 2 is a flowchart of a method for unifying interfaces of data streams in an iterative version development plan according to an embodiment of the present invention, which mainly solves the problem of misalignment of interfaces between huge software function modules in the whole data stream in fast iteration of intelligent driving vehicle software.
As shown in fig. 2, a method for interface unification includes:
according to the iteration version plan, various signals and specific definitions thereof output by the module are designed according to the specification of each sub-function module, and specific meaning comments of each specific signal variable are written, so that accurate and efficient selection and function development of downstream modules are facilitated.
When all the output interfaces are agreed by each module, the interface is locked to serve as a basis for comparing whether the output signal of the module conforms to the previous regulation or not, and the locked interface version generally does not change because the whole upstream and downstream needs to develop functions according to the interface version.
Then, the downstream module that needs the input of the upstream module should select the signal that needs to be input from the locked interface to keep consistent.
And uploading all the sub-function modules of the data stream to a version of test codes based on a predefined interface, so that the standard of the locked interface is met, and the upstream and downstream comparison is conveniently carried out after the subsequent formal development and uploading. And after the functional module develops the uploading code, triggering an interface checking script on the gitlab.
Fig. 3 is a flowchart of a method for checking a gitlab-based interface according to an embodiment of the present invention. The method may be applied to the implementation environment shown in fig. 1, and it should be understood that the method may also be applied to other exemplary implementation environments and specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
As shown in fig. 3, in an exemplary embodiment, the interface checking method based on gitlab at least includes steps S31 to S32, which are described in detail as follows:
s31: acquiring a new code submitted by a user, wherein the user is a software developer; it should be understood that the new code referred to herein refers to new code developed for a certain sub-function module during the software iteration process.
S32: and comparing the interface information contained in the new code with the interface information of a preset code base, and when the interface information contained in the new code is inconsistent with the interface information of the preset code base, stopping compiling and incorporating the new code and sending error reporting information to the user.
In a specific embodiment, the preset code library includes a plurality of sub-function modules, and each of the sub-function modules is provided with a respective output interface. And a section of test code is respectively stored in the preset code library corresponding to each sub-function module, and the test code comprises a statement for defining an interface of the corresponding sub-function module. The step of comparing the interface information contained in the new code with the interface information of a preset code library comprises the following steps: and comparing the statement defining the interface information in the new code with the statement defining the interface information in the test new code.
The invention carries out upstream and downstream verification of the communication interface and informs the corresponding functional module responsible person in real time while ensuring fast and continuous integrated deployment based on the CI/CD continuous integrated function of gitlab, thereby ensuring the software code quality, adapting to the speed of verification and deployment which can only accelerate all software integration currently and facilitating fast update of iterative versions.
Fig. 4 is a specific flowchart of an interface checking method according to an embodiment of the present invention, where in this embodiment, the step S32 specifically includes:
s41: and judging whether a target output interface corresponding to the names of all input interfaces in the new code exists in the interface information of the preset code base.
It can be understood that the new code can perform the subsequent operation only when the target output interfaces corresponding to the names of all the input interfaces in the new code exist in the interface information of the preset code library, so the present invention firstly checks the input interfaces of the new code.
S42: and if the interface information of the preset code library lacks a target output interface corresponding to the name of any input interface in the new code, preventing the compiling and the incorporating of the new code and sending error reporting information to the user.
The invention firstly judges whether all input signals required by the module have corresponding output signal modules, if not, the error is directly reported, the error information is specific to which interface required by which component does not exist, and if the error occurs, the code compiling and the code inputting are not allowed.
S43: and if target output interfaces corresponding to the names of all input interfaces in the new code exist in the interface information of the preset code library, respectively judging whether the content of each input interface is consistent with the content of each target output interface.
It is understood that, in the process of checking the interface, it is not only to ensure the alignment of the interface names, but also to ensure the consistency of the specific contents of the interface, so as to ensure the smooth interaction of the data, and therefore, the second part of the present invention is to check the specific implementation of the interface.
S44: and if the content of any input interface is inconsistent with the content of the target output interface, preventing the compiling and the incorporating of the new code and sending error report information to the user.
S45: and if the content of each input interface is consistent with the content of each target output interface, judging whether all output interfaces in the new code are contained in the interface information of the preset code library.
It can be understood that, in addition to the input interface of the new code needing to be consistent with the interface information of the code base, the new code also needs to ensure that the output interface is consistent with the interface information of the code base, so that the function realized by the new code can be applied by other modules.
S46: and if any output interface of the new code is not contained in the interface information of the preset code base, preventing the compiling and the incorporating of the new code and sending error reporting information to the user.
In a specific embodiment, each step of error reporting is prompted to the responsible person corresponding to the sub-function module by an email, so that the software quality and the integration verification efficiency are greatly improved.
S47: and if all output interfaces in the new code are contained in the interface information of the preset code base, compiling and merging the new code.
Fig. 5 is a logic diagram for verifying a data stream interface according to an embodiment of the present invention, and the following describes a technical solution of the present invention with reference to a specific embodiment:
in the intelligent driving process of the vehicle, the function of the intelligent driving system is strongly dependent on sensor data acquired by a vehicle body sensor and fed back to vehicle body control; among them, lane marking is particularly important, which determines the vehicle trajectory in the intelligent driving process.
Whether the intelligent driving software finally controls the vehicle to be kept in the center of a road, change the road, turn and the like depends on the signal interface of the lane line; assuming that a software functional module which receives a lane line sensor signal and sends analyzed data to the downstream is an A module, when a lane line interface is designed, the software functional module is communicated with other functional modules of a downstream receiving lane line, and according to the downstream requirement, the naming mode of the interface and the specific implementation of the internal signal are defined; for example, after communication, a lane line interface signal sent by a module a is named as a. Carlines, and a module downstream of the module, which is named as B, needs to keep the signal consistent with the former when receiving the signal, and if the signal is inconsistent, specific signal content of the lane line cannot be received.
When the checking script designed in the invention identifies that the signal names between A, B components are inconsistent, for example, a receiving part of a B function module code has situations such as A.Lines or A.Carlines, and the like, an error is directly reported because the interface names are not aligned; if the interface names are aligned, internal implementation of a. Carlines will be further compared, and if the function a assumes that the signal interface is designed with three specific contents, such as lane line confidence, left and right lane line distance, and lane line type, the signal interface of a. Carlines stored in the component B must also have the above three contents, and if the contents are not consistent, an interface check error will also be caused.
Fig. 6 is a functional block diagram of an interface inspection apparatus based on gitlab according to an embodiment of the present invention, which can be applied to the implementation environment shown in fig. 1. The apparatus may also be applied to other exemplary implementation environments, and is specifically configured in other devices, and the embodiment does not limit the implementation environment to which the apparatus is applied, and the apparatus includes:
a new code obtaining module 61, configured to obtain a new code submitted by a user, where the user is a software developer;
and the execution module 62 is configured to compare interface information included in the new code with interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, prevent compiling and importing of the new code, and send error reporting information to the user.
In another exemplary embodiment, the execution module 62 includes:
and the first judgment submodule is used for judging whether a target output interface corresponding to the names of all input interfaces in the new code exists in the interface information of the preset code base.
And the first execution submodule is used for preventing the compiling and the incorporating of the new code and sending error reporting information to the user when the target output interface corresponding to the name of any input interface in the new code is absent in the interface information of the preset code library.
In another exemplary embodiment, the execution module 62 further includes a second determination sub-module, configured to determine whether content of each input interface is consistent with content of each target output interface when the target output interface corresponding to the name of all input interfaces in the new code exists in the interface information of the preset code library.
In another exemplary embodiment, the execution module 62 further includes a second execution submodule, configured to prevent compiling and importing of the new code and send an error message to the user when the content of any of the input interfaces is inconsistent with the content of the target output interface.
In another exemplary embodiment, the execution module 62 further includes a third determining sub-module, configured to determine whether all output interfaces in the new code are included in the interface information of the preset code library when the content of each input interface is consistent with the content of each target output interface.
In another exemplary embodiment, the execution module 62 further includes a third execution sub-module, configured to prevent compiling and importing of the new code and send an error message to the user when any of the output interfaces of the new code is not included in the interface information of the preset code library.
In another exemplary embodiment, the execution module 62 further includes a fourth execution submodule for compiling and importing the new code when all output interfaces in the new code are included in the interface information of the preset code library.
It should be noted that the interface inspection apparatus based on the gitlab provided in the foregoing embodiment and the interface inspection method based on the gitlab provided in the foregoing embodiment belong to the same concept, wherein specific ways for each module and unit to perform operations have been described in detail in the method embodiment, and are not described herein again. In practical applications, the road condition refreshing apparatus provided in the above embodiment may distribute the above functions by different functional modules according to requirements, that is, divide the internal structure of the apparatus into different functional modules to complete all or part of the above described functions, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic equipment is enabled to realize the interface checking method based on the gitlab provided by the various embodiments.
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. It should be noted that the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage portion 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 708 including a hard disk and the like; and a communication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. When the computer program is executed by a Central Processing Unit (CPU) 701, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to execute the gitlab-based interface inspection method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist alone without being assembled into the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the interface inspection method based on the gitlab provided in the above embodiments.
In summary, the present invention performs upstream and downstream verification of the communication interface while ensuring fast and continuous integrated deployment based on the CI/CD continuous integration function of gitlab, and notifies the responsible person of the corresponding functional module in real time. The method has the advantages that the quality of software codes is guaranteed, the method adapts to the condition that the verification and deployment speed of all software integration can be accelerated at present, and the iterative version can be updated quickly; the method is based on the CI/CD function, the shell script and the like of the gitlab, realizes the tracking and the inspection of the whole vehicle data stream interface, solves the problem of interface misalignment caused by numerous developers and complicated tasks in rapid integration iteration, and improves the development speed and the accuracy; the invention takes the software function stabilization and the rapid iteration of the intelligent driving rapid iteration as the target, takes the whole vehicle software data flow as the guide and carries out the unified management on the interfaces of all the related functions. Subdividing all input and output signals to match input and output interfaces. And the method is integrated into the rapid integrated deployment of the gitlab CI \ CD, thereby greatly reducing the number of departments participated by people, improving the development efficiency and accuracy, and laying a solid foundation for the subsequent detailed function test and version iteration plan.
The foregoing embodiments are merely illustrative of the principles of the present invention and its efficacy, and are not to be construed as limiting the invention. Those skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (11)

1. A method for checking interfaces based on gitlab is characterized by comprising the following steps:
acquiring a new code submitted by a user, wherein the user is a software developer;
and comparing the interface information contained in the new code with the interface information of a preset code base, and when the interface information contained in the new code is inconsistent with the interface information of the preset code base, stopping compiling and incorporating the new code and sending error reporting information to the user.
2. The gitlab-based interface inspection method according to claim 1, wherein the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing the compiling and the incorporating of the new code, and sending error information to the user comprises:
judging whether target output interfaces corresponding to the names of all input interfaces in the new code exist in the interface information of the preset code base or not;
and if the interface information of the preset code library lacks a target output interface corresponding to the name of any input interface in the new code, preventing compiling and incorporating of the new code and sending error reporting information to the user.
3. The gitlab-based interface inspection method according to claim 2, wherein the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing the compiling and importing of the new code, and sending error information to the user further comprises:
if the interface information of the preset code library has target output interfaces corresponding to the names of all input interfaces in the new code, respectively judging whether the content of each input interface is consistent with the content of each target output interface;
and if the content of any input interface is inconsistent with the content of the target output interface, preventing the compiling and the incorporating of the new code and sending error report information to the user.
4. The gitlab-based interface inspection method according to claim 3, wherein the step of comparing the interface information included in the new code with the interface information of a preset code library, and when the interface information included in the new code is inconsistent with the interface information of the preset code library, preventing the compiling and importing of the new code, and sending error information to the user further comprises:
if the content of each input interface is consistent with the content of each target output interface, judging whether all output interfaces in the new code are contained in the interface information of the preset code library;
and if any output interface of the new code is not contained in the interface information of the preset code base, preventing the compiling and the incorporating of the new code and sending error reporting information to the user.
5. A gitlab-based interface inspection method according to claim 4, further comprising the steps of:
and if all output interfaces in the new code are contained in the interface information of the preset code base, compiling and merging the new code.
6. A gitlab-based interface inspection method according to claim 1, wherein said preset code library comprises a plurality of sub-function modules, each of said sub-function modules being provided with its own output interface.
7. The method according to claim 6, wherein a test code is stored in the predetermined code library for each of the sub-function modules, and the test code comprises a statement for defining an interface of the corresponding sub-function module.
8. The gitlab-based interface inspection method of claim 7, wherein the step of comparing the interface information included in the new code with the interface information of a preset code library comprises:
and comparing the statement defining the interface information in the new code with the statement defining the interface information in the new test code.
9. A gitlab-based interface inspection device, comprising:
the new code acquisition module is used for acquiring a new code submitted by a user, wherein the user is a software developer;
and the execution module is used for comparing the interface information contained in the new code with the interface information of a preset code library, and when the interface information contained in the new code is inconsistent with the interface information of the preset code library, the execution module prevents the compiling and the incorporating of the new code and sends error reporting information to the user.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the gitlab-based interface inspection method of any one of claims 1 to 8.
11. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to carry out the gitlab-based interface inspection method of any one of claims 1 to 8.
CN202211064177.9A 2022-08-31 2022-08-31 Interface inspection method, device, equipment and medium based on gitlab Pending CN115421773A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211064177.9A CN115421773A (en) 2022-08-31 2022-08-31 Interface inspection method, device, equipment and medium based on gitlab

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211064177.9A CN115421773A (en) 2022-08-31 2022-08-31 Interface inspection method, device, equipment and medium based on gitlab

Publications (1)

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

Family

ID=84199704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211064177.9A Pending CN115421773A (en) 2022-08-31 2022-08-31 Interface inspection method, device, equipment and medium based on gitlab

Country Status (1)

Country Link
CN (1) CN115421773A (en)

Similar Documents

Publication Publication Date Title
CN112104709B (en) Intelligent contract processing method, device, medium and electronic equipment
CN104378252A (en) Cloud testing service platform
CN112100079B (en) Test method and system based on simulation data calling and electronic equipment
CN110865889A (en) Method and apparatus for transferring events between components
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN110737631A (en) data analysis method and device based on Flink engine
CN111367799B (en) Method, device, medium and electronic equipment for locating source code breakdown position
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN110968497A (en) Tree-shaped interceptor-based request verification method, device, medium and electronic equipment
CN115421773A (en) Interface inspection method, device, equipment and medium based on gitlab
CN115934040A (en) Demand analysis method and device, electronic equipment and storage medium
US11841791B2 (en) Code change request aggregation for a continuous integration pipeline
CN115514632A (en) Resource template arranging method, device and equipment for cloud service and storage medium
CN114677114A (en) Approval process generation method and device based on graph dragging
CN115248680A (en) Software construction method, system, device, medium, and program product
CN111897728B (en) Interface debugging method and related equipment
CN111859403B (en) Dependency vulnerability determination method and device, electronic equipment and storage medium
CN113778451B (en) File loading method, file loading device, computer system and computer readable storage medium
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN114253599A (en) Version deployment method, version deployment device, electronic device and storage medium
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN113885841A (en) Script generation method and device, electronic equipment and readable medium
CN112506781A (en) Test monitoring method, test monitoring device, electronic device, storage medium, and program product
CN108170557B (en) Method and apparatus for outputting information
CN111176718A (en) Script online method and device, storage medium and electronic equipment

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