CN111435306A - Code management method and device - Google Patents

Code management method and device Download PDF

Info

Publication number
CN111435306A
CN111435306A CN201910025884.9A CN201910025884A CN111435306A CN 111435306 A CN111435306 A CN 111435306A CN 201910025884 A CN201910025884 A CN 201910025884A CN 111435306 A CN111435306 A CN 111435306A
Authority
CN
China
Prior art keywords
test
code
state
node
integration
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
CN201910025884.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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910025884.9A priority Critical patent/CN111435306A/en
Publication of CN111435306A publication Critical patent/CN111435306A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a code management method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring code integration application information of a user; determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node; obtaining a test result of each test node, and determining whether the test state of the code passes the test according to the test result of each test node; and when the test state of the code is passed, applying for providing the code integration authority for the user. The implementation mode can automatically realize code information centralized management, code test management and code integration.

Description

Code management method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing codes.
Background
With the increasing demand of products, the issue quality, issue frequency and issue efficiency of client versions of internet enterprises, version management, data analysis, and whether fast iteration of products and technologies can be effectively supported are important. The current enterprise version management mostly depends on code management, branch is pulled through codes, the management is carried out by marking, the information related to the version is stored in the code submission information in a scattered manner, the information related to the code is stored on a code server, different links are needed, and different authorities can refer to the information.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: under a common condition, a version manager records and stores relevant information of a client code version through an Excel table, the information is not complete enough, a historical version is not traceable, and the information cannot be deposited into an organization process asset. The Excel table is stored in different servers, related data cannot be managed in a centralized mode, updating is not timely, and accuracy and integrity of the data cannot be guaranteed. The system of fracture, non-automatic work flow, a large amount of repeated manual operations, it is extravagant serious, very easily because the mistake that human factor leads to takes place.
Therefore, a code management method and apparatus capable of automatically implementing centralized management of code information, code test management and code integration is needed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for managing a code version, which can automatically implement centralized management of code information, code test management, and code integration.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for managing a code, including:
acquiring code integration application information of a user;
determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node;
obtaining a test result of each test node, and determining whether the test state of the code passes the test according to the test result of each test node;
and when the test state of the code is passed, applying for providing the code integration authority for the user.
Optionally, the code management method further includes:
after code integration application information of a user is acquired, generating a management record of the code integration application according to the code integration application information, wherein the management record of the code integration application comprises: the state of the code;
after determining whether the test state of the code passes the test according to the test result of each test node, updating the state of the code in the management record as a test passing state or a test failing state;
after the application provides the code integration authority for the user, determining whether the authorization is successful or not, and updating the state of the code in the management record to be the authorization success or the authorization failure;
after the authorization is successful, determining whether a code is integrated, and updating a status of the code in the management record as integrated or not integrated.
Optionally, the applying for providing the code integration right for the user includes:
creating an application task for providing the code integration authority for the user;
adding the application task into a pre-configured task queue pool;
and acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide code integration authority for the user.
Optionally, the determining, according to the test result of each test node, whether the test state of the code passes the test includes:
and when the test results of all the test nodes are passed, determining that the test state of the code is passed, otherwise, determining that the test state of the code is failed.
Optionally, the management record of the code integration application further includes: the ID of the management record, the attribute information of the code and the modification information, wherein the modification information is initially empty;
the code management method further comprises the following steps:
after the test state of the code is determined to be passed according to the test result of each test node, if the change of the attribute information of the code and/or the modification information is not detected to be empty, updating the test result of at least one test node to be not passed;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
Optionally, the code management method further includes:
after the code is determined to pass the test according to the test result of each test node, if the change of the test result of any test node is detected, updating the test result of at least one test node to fail;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is also provided a code management apparatus including:
the acquisition module is used for acquiring code integration application information of a user;
the determining module is used for determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node;
the verification module is used for acquiring the test result of each test node and determining whether the test state of the code passes the test according to the test result of each test node;
and the authorization module is used for applying for providing the code integration authority for the user when the test state of the code is passed.
Optionally, the code management apparatus further includes: the management record module is used for generating a management record of the code integration application according to the code integration application information after acquiring the code integration application information of a user, and the management record of the code integration application comprises: the state of the code;
after determining whether the test state of the code passes the test according to the test result of each test node, updating the state of the code in the management record as a test passing state or a test failing state;
after the application provides the code integration authority for the user, determining whether the authorization is successful or not, and updating the state of the code in the management record to be the authorization success or the authorization failure;
after the authorization is successful, determining whether a code is integrated, and updating a status of the code in the management record as integrated or not integrated.
Optionally, the authorization module is further configured to create an application task for providing the user with code integration authority;
adding the application task into a pre-configured task queue pool;
and acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide code integration authority for the user.
Optionally, the verification module is further configured to determine that the test state of the code is passed when the test results of all the test nodes are passed, and otherwise determine that the test state of the code is failed.
Optionally, the management record of the code integration application further includes: the ID of the management record, the attribute information of the code and the modification information, wherein the modification information is initially empty;
the management recording module is further configured to, after the test state of the code is determined to pass according to the test result of each test node, update the test result of at least one test node to fail if it is detected that the attribute information of the code is changed and/or the modification information is not empty;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
Optionally, the management recording module is further configured to, after determining that the test state of the code passes the test according to the test result of each test node, if it is detected that the test result of any test node changes, update the test result of at least one test node as failing;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node. .
To achieve the above object, according to another aspect of the embodiments of the present invention, there is also provided an electronic device for managing codes, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a method of managing code.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is also provided a computer-readable medium on which a computer program is stored, characterized in that the program implements a management method of a code when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: based on the code management method and the device provided by the invention, the centralized management of the code version information, the traceability of version calendar, version state and historical version and the centralized management of multiple versions are realized; automatic inspection of the test report is realized, and the practicality brought by manual inspection is reduced; realizing the automation of acquisition of version information and unifying the documentation management; the automation of opening and withdrawing of the code integration authority is realized, and the personnel consumption and the error occurrence of the piping are reduced; index data in the process of visualization development provides real data analysis for users, so that problems can be found in time, and management value and decision basis are provided for a management layer.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a code management method provided by an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of determining a test status of a code according to the present invention;
FIG. 3 is a flowchart illustrating an implementation manner of applying for providing a code integration right to a user according to an embodiment of the present invention;
fig. 4 is a schematic diagram of main modules of a code management apparatus provided in an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a schematic block diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An embodiment of the present invention provides a method for managing codes, and as shown in fig. 1, the method includes steps S101 to S104.
In step S101, code integration application information of a user is acquired. In the present invention, the code integration application information may generally include: attribute information of the code, for example, a version number of the code, a corresponding requirement number, an application platform (android system or iOS system) of the code, and a function of the code, i.e., what function module the code is, such as a shopping cart function module.
The specific way of obtaining the code integration application information of the user can be to provide an application page for the user through a web front-end page, and the user can input the corresponding code integration application information through the application page. The user is usually a code developer, applies for the test of the code by the method of the invention, and obtains the authority of code integration after the test is passed, thereby integrating the code version in the code version management system Gitlab operating code version.
In step S102, a test flow of the code is determined according to the code integration application information, where the test flow includes at least one test node, and a test notification is sent to each test node. Before the codes are integrated and on-line, the codes need to pass through a testing process, and can be integrated and on-line only after the codes pass through testing. In the invention, the test node is each test link in the test flow, such as the links of code test verification, product walk-through, UI walk-through, buried point test and the like, and the test of each link is executed by the tester at the corresponding post.
For different types of codes, the test flow may be different before integration, so that in this step, the test flow of the code is determined according to the code integration application information, that is, the test flow that the code type needs to pass through may be determined according to the attribute information of the code provided by the user, or the test flow may be designated by the user when inputting the code integration application information.
When the test flow which the code needs to pass through is determined, namely each test node in the test flow is determined, a test notice of the code is sent to each test node so as to inform the staff at the corresponding post to test the corresponding node of the code.
Then, in step S103, a test result of each test node is obtained, and whether the test state of the code is a test pass or not is determined according to the test result of each test node. The step can be realized by a state machine, and the test state of the code is triggered to be automatically updated according to the test result of each test node.
Further, in step S104, when the test status of the code is pass, the user is applied for providing the code integration authority. Therefore, the centralized management of code information, the test management of codes and the integration of codes are realized automatically.
In one embodiment of the method of the present invention, after obtaining the code integration application information of the user, a management record of the code integration application is generated according to the code integration application information, where the management record of the code integration application includes: the status of the code.
And after determining whether the test state of the code is a test pass or a test fail according to the test result of each test node, updating the state of the code in the management record to be a test pass or a test fail.
After applying for providing the code integration authority for the user, determining whether the authorization is successful or not, and updating the state of the code in the management record to be the authorization success or the authorization failure.
After the authorization is successful, it is determined whether the code has been integrated, and the state of the code in the management record is updated to be integrated or not.
And different states of the codes are automatically updated in time by integrating the management records of the applications through the stored codes.
In the present invention, the management record of the code integration application further includes: the ID of the management record and the attribute information of the code, i.e. after the management record is created, the system assigns a unique ID. The code library in the code management system is managed by the management record of the code integration application. And acquiring the requirement related information of the requirement corresponding to the code in the requirement management system through the attribute information of the code, so that the requirement related information is recorded in the management record of the code integration application through the association of the unique ID identification of the system and the requirement management system of the service.
After the codes are integrated, a packaging task needs to be created through a packaging management module, information such as a packaging result, version information, integration information and packaging times of the corresponding codes is obtained through attribute information of the codes, the unique ID identification of the system is associated with the packaging system, and relevant information of the packaging system is recorded in a management record of the code integration application.
And after the packaging is finished, transmitting the related parameters to a publishing system to publish if the publishing conditions are met. The issuing process data is obtained through the attribute information of the codes, the system association can be issued through the unique ID identification of the system, and the issuing process data related to the requirements is recorded in the management record of the code integration application.
In the invention, a code version calendar can be created, and when each code version is released and marked, other time nodes are marked, and the version calendar contains information of different versions, such as version numbers, start and end times and the like, which can be obtained by associating with the code attribute information version numbers in the management records.
And performing associated storage through the unique ID identification of the version management system by acquiring all information of the modules and the system. Therefore, multi-dimensional visual display of various index data in the whole process of code development can be realized according to the requirements of a user, real data analysis is provided for the user, the user can find problems in time conveniently, and management value and decision basis are provided for a management layer.
In one embodiment of the present invention, determining whether the test status of the code is a test pass or not according to the test result of each test node includes:
and when the test results of all the test nodes are passed, determining the test state of the code as passed, otherwise, determining the test state of the code as failed. Namely, the test state of the code is determined to be failed as long as the test result of one link in the test flow is failed.
In one embodiment of the invention, the management record of the code integration application further includes: and modifying information, the modifying information being initially null.
After the test state of the code is determined to be passed according to the test result of each test node, if the change and/or modification information of the attribute information of the code is detected not to be empty, the test result of at least one test node is updated to be failed, and then the step of determining whether the test state of the code is passed according to the test result of each test node is executed.
That is, since there is a link in the test flow that the test result is failed, that is, the test status of the code is determined to be failed.
The present embodiment is directed to a scenario in which a user who is a code developer needs to modify attribute information of a code or modify the code itself after submitting a code integration application. At this time, the user needs to modify the management record of the code integration application, for example, modify the attribute information of the code in the management record, or fill in the modification information in the management record so that the modification information is not empty. If the system detects that the attribute information of the code is changed and/or the modification information is not empty, the system determines that the user modifies the attribute information of the code or modifies the code, and then updates the test state of the code to fail and needs to retest the code.
In an embodiment of the present invention, after determining that the test state of the code is a pass test according to the test result of each test node, if a change in the test result of any test node is detected, the test result of at least one test node is updated to be a fail test.
And then executing the step of determining whether the test state of the code passes the test according to the test result of each test node. That is, since there is a link in the test flow that the test result is failed, that is, the test status of the code is determined to be failed.
The implementation mode aims at the scene that the testing personnel as a certain link of the testing process modifies the testing result of the testing link after the code testing is passed. If the system detects that the test result of any test node is changed, the test state of the code is updated to be failed, and the code needs to be retested.
As shown in fig. 2, in a specific application scenario provided by the present invention, a test flow includes 5 test nodes, which are respectively a verification result, a product walk-through, a leave-behind problem number determination, a leave-behind problem determination, a UI walk-through, a buried point test, and whether a corresponding server function is on-line confirmed, where the test nodes are respectively tested by a test operator, a product operator, a UI operator, and a buried point test operator in respective links. In step S103, a test result of each test node is obtained, and a process of determining whether a test state of the code passes or not is determined according to the test result of each test node in the application scenario, specifically, a verification result of the above 5 nodes is obtained, if the result is empty, it indicates that the code has not been tested by the sponsor in the link, and the code is notified by an email, when the test results of all nodes pass or are completed (the left-over problem is 0, or the left-over problem is confirmed), it is determined that the code passes the test, if the test result of any node has a problem, it is determined that the code is in a test state, that is, the test does not pass, and at this time, the email notifies the development sponsor, that is, the user.
In one embodiment of the invention, as shown in fig. 3, the application for providing the user with the code integration right includes the following processes: firstly, an application task for providing the code integration authority for the user is created, and then the application task is added into a pre-configured task queue pool. And finally, acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide code integration authority for the user. Namely, the code version management system Gitlab interface is called from the task queue pool distributed consumption tasks, and the authority is opened. And when the opening authority condition is met, performing an authorization function downwards. Since authorization may be in a centralized burst and there are many authorization tasks, a distributed scheme is adopted and parallel processing is performed.
In the invention, when the authorization is successful and the codes are integrated, the system automatically identifies the integrated application corresponding to the integrated codes, updates the management record state of the application and closes the authority of the user.
An embodiment of the present invention further provides a device for managing codes, as shown in fig. 4, where the device 400 includes: an acquisition module 401, a determination module 402, a verification module 403, and an authorization module 404.
The obtaining module 401 is configured to obtain the code integration application information of the user.
The determining module 402 is configured to determine a test procedure of a code according to the code integration application information, where the test procedure includes at least one test node, and send a test notification to each test node.
The verification module 403 is configured to obtain a test result of each test node, and determine whether the test state of the code passes the test according to the test result of each test node.
The authorization module 404 is configured to apply for providing the user with the code integration right when the test status of the code is pass.
In the present invention, the apparatus 400 further comprises: the management record module is used for generating a management record of the code integration application according to the code integration application information after acquiring the code integration application information of a user, and the management record of the code integration application comprises: the status of the code.
The management record module is further configured to update the state of the code in the management record as a test pass or fail after determining whether the test state of the code passes the test according to the test result of each test node.
The management record module is also used for determining whether the authorization is successful or not after the application provides the code integration authority for the user, and updating the state of the code in the management record to be successful in authorization or failed in authorization.
The management record module is also used for determining whether codes are integrated or not after the authorization is successful, and updating the state of the codes in the management record to be integrated or not.
In the invention, the authorization module is further used for creating an application task for providing the code integration authority for the user, adding the application task into a pre-configured task queue pool, and finally acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide the code integration authority for the user.
In the present invention, the verification module is further configured to determine that the test state of the code is passed when the test results of all the test nodes are passed, and otherwise determine that the test state of the code is failed.
In the present invention, the management record of the code integration application further includes: the ID of the management record, the attribute information of the code, and the modification information, which is initially empty.
The management recording module is further configured to, after the test state of the code is determined to be passed according to the test result of each test node, update the test result of at least one test node to be failed if it is detected that the attribute information of the code is changed and/or the modification information is not null.
And then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
In the present invention, the management recording module is further configured to, after determining that the test state of the code passes the test according to the test result of each test node, update the test result of at least one test node as failing if detecting that the test result of any test node changes.
And then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
Based on the code management method and the device provided by the invention, the centralized management of the code version information, the traceability of version calendar, version state and historical version and the centralized management of multiple versions are realized; automatic inspection of the test report is realized, and the practicality brought by manual inspection is reduced; realizing the automation of acquisition of version information and unifying the documentation management; the automation of opening and withdrawing of the code integration authority is realized, and the personnel consumption and the error occurrence of the piping are reduced; index data in the process of visualization development provides real data analysis for users, so that problems can be found in time, and management value and decision basis are provided for a management layer.
Fig. 5 shows an exemplary system architecture 500 of a management apparatus to which the management method of the code or the code of the embodiment of the present invention can be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server that provides various services.
It should be noted that the code management method provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, a code management apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
To the I/O interface 605, AN input section 606 including a keyboard, a mouse, and the like, AN output section 607 including a network interface card such as a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 608 including a hard disk, and the like, and a communication section 609 including a network interface card such as a L AN card, a modem, and the like, the communication section 609 performs communication processing via a network such as the internet, a drive 610 is also connected to the I/O interface 605 as necessary, a removable medium 611 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted into the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, 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 or 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 invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, 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 invention. In this regard, 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 which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a verification module, an authorization module, and a determination module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring code integration application information of a user;
determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node;
obtaining a test result of each test node, and determining whether the test state of the code passes the test according to the test result of each test node;
and when the test state of the code is passed, applying for providing the code integration authority for the user.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for managing code, comprising:
acquiring code integration application information of a user;
determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node;
obtaining a test result of each test node, and determining whether the test state of the code passes the test according to the test result of each test node;
and when the test state of the code is passed, applying for providing the code integration authority for the user.
2. The method of claim 1, further comprising:
after code integration application information of a user is acquired, generating a management record of the code integration application according to the code integration application information, wherein the management record of the code integration application comprises: the state of the code;
after determining whether the test state of the code passes the test according to the test result of each test node, updating the state of the code in the management record as a test passing state or a test failing state;
after the application provides the code integration authority for the user, determining whether the authorization is successful or not, and updating the state of the code in the management record to be the authorization success or the authorization failure;
after the authorization is successful, determining whether a code is integrated, and updating a status of the code in the management record as integrated or not integrated.
3. The method of claim 1, wherein applying for providing the user with code integration rights comprises:
creating an application task for providing the code integration authority for the user;
adding the application task into a pre-configured task queue pool;
and acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide code integration authority for the user.
4. The method of claim 1, wherein the determining whether the test status of the code is a test pass according to the test result of each of the test nodes comprises:
and when the test results of all the test nodes are passed, determining that the test state of the code is passed, otherwise, determining that the test state of the code is failed.
5. The method of claim 4, wherein the managing the code integration application further comprises: the ID of the management record, the attribute information of the code and the modification information, wherein the modification information is initially empty;
the method further comprises the following steps:
after the test state of the code is determined to be passed according to the test result of each test node, if the change of the attribute information of the code and/or the modification information is not detected to be empty, updating the test result of at least one test node to be not passed;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
6. The method of claim 4, further comprising:
after the code is determined to pass the test according to the test result of each test node, if the change of the test result of any test node is detected, updating the test result of at least one test node to fail;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
7. An apparatus for managing a code, comprising:
the acquisition module is used for acquiring code integration application information of a user;
the determining module is used for determining a test flow of the code according to the code integration application information, wherein the test flow comprises at least one test node and sends a test notification to each test node;
the verification module is used for acquiring the test result of each test node and determining whether the test state of the code passes the test according to the test result of each test node;
and the authorization module is used for applying for providing the code integration authority for the user when the test state of the code is passed.
8. The apparatus of claim 7, further comprising: the management record module is used for generating a management record of the code integration application according to the code integration application information after acquiring the code integration application information of a user, and the management record of the code integration application comprises: the state of the code;
after determining whether the test state of the code passes the test according to the test result of each test node, updating the state of the code in the management record as a test passing state or a test failing state;
after the application provides the code integration authority for the user, determining whether the authorization is successful or not, and updating the state of the code in the management record to be the authorization success or the authorization failure;
after the authorization is successful, determining whether a code is integrated, and updating a status of the code in the management record as integrated or not integrated.
9. The apparatus of claim 7, wherein the authorization module is further configured to create an application task for providing the user with code integration rights;
adding the application task into a pre-configured task queue pool;
and acquiring the application task from the task queue pool and executing the application task to call a code integration authorization interface of the code version management system and provide code integration authority for the user.
10. The apparatus of claim 7, wherein the verification module is further configured to determine the test status of the code as passed when the test results of all the test nodes are passed, and otherwise determine the test status of the code as failed.
11. The apparatus of claim 10, wherein the management record of the code integration application further comprises: the ID of the management record, the attribute information of the code and the modification information, wherein the modification information is initially empty;
the management recording module is further configured to, after the test state of the code is determined to pass according to the test result of each test node, update the test result of at least one test node to fail if it is detected that the attribute information of the code is changed and/or the modification information is not empty;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
12. The apparatus according to claim 10, wherein the management record module is further configured to, after determining that the test status of the code passes according to the test result of each of the test nodes, if a change in the test result of any of the test nodes is detected, update the test result of at least one of the test nodes to fail;
and then executing the step of determining whether the test state of the code passes the test according to the test result of each test node.
13. An electronic device for managing codes, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910025884.9A 2019-01-11 2019-01-11 Code management method and device Pending CN111435306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910025884.9A CN111435306A (en) 2019-01-11 2019-01-11 Code management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910025884.9A CN111435306A (en) 2019-01-11 2019-01-11 Code management method and device

Publications (1)

Publication Number Publication Date
CN111435306A true CN111435306A (en) 2020-07-21

Family

ID=71580255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910025884.9A Pending CN111435306A (en) 2019-01-11 2019-01-11 Code management method and device

Country Status (1)

Country Link
CN (1) CN111435306A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596778A (en) * 2020-12-16 2021-04-02 福州智永信息科技有限公司 Application version management method and terminal
CN113204330A (en) * 2021-06-01 2021-08-03 李麟 Program development design method and system based on artificial intelligence

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596778A (en) * 2020-12-16 2021-04-02 福州智永信息科技有限公司 Application version management method and terminal
CN113204330A (en) * 2021-06-01 2021-08-03 李麟 Program development design method and system based on artificial intelligence
CN113204330B (en) * 2021-06-01 2024-03-26 李麟 Program development design method and system based on artificial intelligence

Similar Documents

Publication Publication Date Title
US9600275B2 (en) Smart source code review system
US20180101371A1 (en) Deployment manager
US10146671B2 (en) Testing of software upgrade
US11755461B2 (en) Asynchronous consumer-driven contract testing in micro service architecture
US10127218B2 (en) Object templates for data-driven applications
US20110161931A1 (en) Automated stream-based change flows within a software configuration management system
US11423343B2 (en) Dynamic construction of cloud services
US9141517B2 (en) Public solution model test automation framework
US20210072969A1 (en) Automatic upgrade of robotic process automation using a computer
US10747852B1 (en) License compliance analysis platform
CN108733671B (en) Method and device for archiving data history
CN109491646B (en) Message entry method and device, electronic equipment and readable medium
WO2020123923A1 (en) Automated testing for metadata-driven custom applications
US11200049B2 (en) Automated test authorization management
US20170364390A1 (en) Automating enablement state inputs to workflows in z/osmf
US20120102075A1 (en) Management of configuration data structures in multi-layer data models
CN110851355B (en) Front-end engineering implementation method and device, storage medium and electronic equipment
CN111435306A (en) Code management method and device
US8739132B2 (en) Method and apparatus for assessing layered architecture principles compliance for business analytics in traditional and SOA based environments
CN112579402B (en) Method and device for positioning faults of application system
US11893383B2 (en) Configuration properties management for software
US20170187582A1 (en) Monitoring and Management of Software as a Service in Micro Cloud Environments
US20120192144A1 (en) Migrating unified modeling language models across unified modeling language profiles
CN108037949B (en) Installation package multi-channel packaging method and device, computer equipment and storage medium
US20230086564A1 (en) System and method for automatic discovery of candidate application programming interfaces and dependencies to be published

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