CN113900630A - Code development method and device, electronic equipment and readable storage medium - Google Patents

Code development method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113900630A
CN113900630A CN202111142439.4A CN202111142439A CN113900630A CN 113900630 A CN113900630 A CN 113900630A CN 202111142439 A CN202111142439 A CN 202111142439A CN 113900630 A CN113900630 A CN 113900630A
Authority
CN
China
Prior art keywords
development
code
test
branch
branches
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
CN202111142439.4A
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.)
Traffic Control Technology TCT Co Ltd
Beijing MTR Construction Administration Corp
Original Assignee
Traffic Control Technology TCT Co Ltd
Beijing MTR Construction Administration Corp
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 Traffic Control Technology TCT Co Ltd, Beijing MTR Construction Administration Corp filed Critical Traffic Control Technology TCT Co Ltd
Priority to CN202111142439.4A priority Critical patent/CN113900630A/en
Publication of CN113900630A publication Critical patent/CN113900630A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Quality & Reliability (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a code development method and device, electronic equipment and a readable storage medium, and relates to the technical field of software development. The code development method comprises the steps of obtaining test branches and development branches by segmenting from trunk branches, wherein the test branches correspond to the development branches one to one. The developed development branches are merged with the corresponding test branches to obtain self-test branches, whether code conflict exists between the self-test codes and the trunk branches is checked, the developed development branches and the trunk branches are merged to complete code development under the condition that the self-test branches pass code test, so that different code development work is divided, repeated development and submission of the same development task by multiple people are avoided, meanwhile, the test environment is separated from the development environment, and the developed development branches and the trunk branches are merged only when the code conflict does not exist between the self-test codes and the trunk branches, so that the problem of code disorder conflict in the multi-person collaborative development of codes can be effectively solved.

Description

Code development method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of software development technologies, and in particular, to a code development method and apparatus, an electronic device, and a readable storage medium.
Background
Gitee is code hosting service based on Git and is a code hosting platform aiming at agile development and practice needs of small and medium-sized development teams in China. Gitee emphasizes the functions of project/task management and documentation (technical document collaboration, knowledge precipitation) which are most closely related to codes, continuous integration and the like. Given the above functionality in a native manner, Gitee can provide a more integrated, fluid use experience.
At present, when project multi-person collaborative development is carried out on a Gitee platform, the problem that codes submitted earlier are covered by codes submitted later due to different time of submitting codes by different persons often occurs, and therefore code conflict is disordered.
Disclosure of Invention
The embodiment of the application provides a code development method, a code development device, an electronic device and a readable storage medium, so as to improve the problems.
According to a first aspect of embodiments of the present application, there is provided a code development method applied to a server in communication with a client, the method including:
acquiring a first code splitting request, and splitting a trunk branch in a code development program to obtain at least one test branch and at least one development branch, wherein each test branch corresponds to each development branch one to one;
acquiring a test merging request, wherein the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents a development branch subjected to code development;
for each development branch to be merged, merging the development branch to be merged with a corresponding test branch thereof to obtain a self-test code, and performing a code test on the self-test code, wherein the code test is used for checking whether the self-test code conflicts with the trunk branch;
and under the condition that the self-test code passes the code test, merging the development branches to be merged into the trunk branches to obtain new trunk branches, and completing the code development.
In an alternative embodiment, the method further comprises:
acquiring a second code segmentation request, and segmenting each development branch to obtain at least one functional branch;
acquiring a function code merging request, wherein the function code merging request comprises at least one function branch after code development;
taking each functional branch subjected to code development as a functional branch to be merged;
and merging each functional branch to be merged to a corresponding development branch to obtain at least one development branch to be merged.
In an alternative embodiment, the step of performing a code test on the self-test code comprises:
acquiring a test record request, and generating a test sheet according to the test record request, wherein the test sheet comprises functions to be tested of the self-test codes and development branches corresponding to the self-test codes;
and acquiring a test request, and carrying out code test on the self-test code according to the test bill.
In an optional embodiment, the step of splitting the trunk branch in the code development program to obtain at least one test branch and at least one development branch includes:
updating the code development program;
and splitting the updated main branch in the code development program to obtain at least one test branch and at least one development branch.
In an optional embodiment, after the step of performing a code test on the self-test code, the method further comprises:
and sending failure information to the client under the condition that the self-test code fails the code test.
In an optional embodiment, after merging the development branch to be merged to the trunk branch and completing the step of code development, the method further includes:
and deleting the branch to be merged.
In an alternative embodiment, the method further comprises:
acquiring an online function comparison table, wherein the online function comparison table comprises versions and version numbers of a plurality of trunk branches, and each version corresponds to each version number one by one;
and distributing a new version number to the new trunk branch according to the online function comparison table.
According to a second aspect of embodiments of the present application, there is provided a code development apparatus applied to a server communicating with a client, the code development apparatus including:
the system comprises a segmentation module, a data acquisition module and a data processing module, wherein the segmentation module is used for acquiring a first code segmentation request, segmenting a trunk branch in a code development program to obtain at least one test branch and at least one development branch, and each test branch corresponds to each development branch one to one;
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test merging request, the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents a development branch after code development is carried out;
the first merging module is used for merging the development branches to be merged with the corresponding test branches of the development branches to be merged aiming at each development branch to be merged to obtain a self-test code, and performing code test on the self-test code;
and the second merging module is used for merging the development branches to be merged to the trunk branches to obtain new trunk branches and finish code development under the condition that the self-test codes pass code tests.
According to a third aspect of the embodiments of the present application, there is provided an electronic device, the electronic device includes a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the memory communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of the code development method.
According to a fourth aspect of embodiments of the present application, there is provided a readable storage medium storing a computer program which, when executed, implements the steps of the code development method described above.
The embodiment of the application provides a code development method, a device, an electronic device and a readable storage medium, wherein the code development method comprises the steps of obtaining a test branch and a development branch by splitting from a main branch, combining the developed development branch with the corresponding test branch to obtain a self-testing branch, combining the developed development branch with the main branch to complete code development under the condition that the self-testing branch passes code testing, so that different code development works are separated, repeated development and submission of the same development task by multiple persons are avoided, meanwhile, a test environment is separated from the development environment, and when the test is passed, namely when no code conflict exists between the self-testing code and the main branch, the developed development branch and the main branch are combined, so that the problem of code chaos and conflict in the multi-person collaborative code development period can be effectively solved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, several embodiments accompanied with figures are described in detail below.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of an electronic device 100 according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a code development method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating sub-steps of a method for developing code according to an embodiment of the present disclosure;
fig. 4 is a second flowchart of a code development method according to an embodiment of the present application;
fig. 5 is a third schematic flowchart of a code development method according to an embodiment of the present application;
fig. 6 is a functional module block diagram of a code development apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a code development device; 131-a cutting module; 132-an acquisition module; 133-a first merge module; 134-a second merge module; 140-a communication unit.
Detailed Description
As introduced in the background art, gite is a code hosting service based on Git launched in open source china, and is a code hosting platform provided for agile development practices of small and medium-sized development teams in China. Gitee emphasizes the functions of project/task management and documentation (technical document collaboration, knowledge precipitation) which are most closely related to codes, continuous integration and the like. Given the above functionality in a native manner, Gitee can provide a more integrated, fluid use experience.
When project multi-person collaborative development is carried out on a Gitee platform, a member A creates a code warehouse, the member A designates a member B as a code warehouse manager (the warehouse can have a plurality of managers) to manage projects together, at the moment, the member B pulls down codes and completes development, the codes are submitted and reported in error, the member A integrates projects again, and the member B can be developed smoothly and submits to be on-line. At this time, the warehouse has only two persons, and the code development can be carried out orderly. However, when the code warehouse developer reaches more than ten people, the workload of the member A is increased sharply, when the member A and the member B develop the same demand module, the member A pulls the code to develop and submit the code successfully, the member B submits the code at a time different from that of the member A, the content developed by the member A is covered by the content of the member B, and the member A loses a part of the code.
That is, when a project is developed by multiple persons in a Gitee platform, the problem that codes submitted earlier are covered by codes submitted later due to different time of submitting codes of different persons often occurs, so that code conflict is disordered.
In order to solve the above problems, an embodiment of the present application provides a code development method, in which a test branch and a development branch are obtained by splitting a trunk branch, the developed development branch and a corresponding test branch are merged to obtain a self-test branch, and the developed development branch and the trunk branch are merged to complete code development when the self-test branch passes a code test.
The scheme in the embodiment of the present application may be implemented by using various computer languages, for example, object-oriented programming languages Java, C + +, and JavaScript.
The above prior art solutions have drawbacks that are the results of practical and careful study, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present application to the above problems should be the contributions of the applicant to the present application in the course of the present application.
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a block diagram of an electronic device 100 according to an embodiment of the present disclosure. The device may include a processor 120, a memory 110, a code development apparatus 130, and a communication unit 140, where the memory 110 stores machine-readable instructions executable by the processor 120, when the electronic device 100 operates, the processor 120 and the memory 110 communicate with each other through a bus, and the processor 120 executes the machine-readable instructions and performs a code development method.
The elements of the memory 110, the processor 120 and the communication unit 140 are electrically connected to each other directly or indirectly to realize the transmission or interaction of signals.
For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The code development device 130 includes at least one software functional module that can be stored in the memory 110 in the form of software or firmware (firmware). The processor 120 is used to execute executable modules stored in the memory 110, such as software functional modules or computer programs included in the code development device 130.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The Processor 120 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and so on.
But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In the embodiment of the present application, the memory 110 is used for storing a program, and the processor 120 is used for executing the program after receiving the execution instruction. The method defined by the process disclosed in any of the embodiments of the present application can be applied to the processor 120, or implemented by the processor 120.
The communication unit 140 is used to establish a communication connection between the electronic apparatus 100 and another electronic apparatus via a network, and to transmit and receive data via the network.
In some embodiments, the network may be any type of wired or wireless network, or combination thereof. Merely by way of example, the Network may include a wired Network, a Wireless Network, a fiber optic Network, a telecommunications Network, an intranet, the internet, a Local Area Network (LAN), a Wide Area Network (WAN), a Wireless Local Area Network (WLAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a Public Switched Telephone Network (PSTN), a bluetooth Network, a ZigBee Network, a Near Field Communication (NFC) Network, or the like, or any combination thereof.
In the embodiment of the present application, the electronic device 100 may be, but is not limited to, a smart phone, a personal computer, a tablet computer, or the like having a processing function.
It will be appreciated that the configuration shown in figure 1 is merely illustrative. Electronic device 100 may also have more or fewer components than shown in FIG. 1, or a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Alternatively, the electronic device 100 may be a client or a server, and when the electronic device 100 is a client, the client may include a personal computer, a tablet computer, a smart phone, and the like. When the electronic device 100 is a server, the server may include a cloud server.
The steps of the code development method provided by the embodiment of the present application are explained in detail below based on the structural diagram of the electronic device 100 shown in fig. 1.
Referring to fig. 2, fig. 2 is a flowchart illustrating a code development method according to an embodiment of the present disclosure.
Step S1, obtaining a first code splitting request, splitting the backbone branch in the code development program to obtain at least one test branch and at least one development branch, where each test branch corresponds to each development branch.
Step S2, a test merging request is obtained, the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents a development branch after code development.
Step S3, aiming at each development branch to be merged, merging the development branch to be merged with the corresponding test branch to obtain a self-test code, and performing code test on the self-test code, wherein the code test is used for checking whether the self-test code conflicts with the main branch.
And step S4, merging the development branches to be merged into the main branches to obtain new main branches and complete the code development under the condition that the self-test codes pass the code test.
It can be understood that the code development method provided by the embodiment of the present application is applied to a server, the server adopts gite as a code management tool, and can implement a code development service for multiple people, and a code development program is installed in the server, so as to implement functions such as pre-merge, compilation, code merge, and the like. Gitlab is an open source project for a warehouse management system, and Git is used as a code management tool and is built on the basis of the open source project. Git is a distributed code management container that can hold a copy of the same code both locally and remotely.
Thus, the code development program may be obtained locally (client) or remotely (server itself).
The number of the test branches and the development branches obtained by splitting from the trunk branches can be determined according to the persons participating in the collaborative development of the code, for example, if 5 persons participate in the collaborative development of the code, 5 development branches and 5 test branches can be split from the trunk branches.
Each developer is responsible for a development branch, code development is carried out on the development branch on the client, and a test merging request is sent to the server through the client after development is completed and inspection is carried out.
And the server finds the test branch corresponding to the development branch to be merged, and merges the development branch to be merged and the test branch to obtain the self-test code. After merging, in order to judge whether the merged self-test code conflicts with the code of the trunk branch, code testing can be performed on the self-test code, and after passing the code testing, the development branches to be merged are merged to the trunk branch to obtain a new trunk branch, so that code development is completed. And under the condition that the self-testing code does not pass the code test, sending failure information to the client, modifying the code of the current development branch by a developer, solving the problem of code conflict, and then merging the code, wherein the code conflict refers to the inconsistency between the code in the self-testing branch after the development branch and the test branch are merged and the code of the main branch.
It will be appreciated that since each test branch has the same code characteristics as the trunk branch, i.e. the test branch is the same as part of the code in the trunk branch. That is to say, the test branch may be used as a substitute branch of the trunk branch, and a code test is performed in advance with the development branch after code development, so as to verify in advance whether a code conflict will occur after the development branch after code development is finally merged into the trunk branch, and if a code conflict exists, the problem is solved in advance, so as to ensure the code stability of the trunk branch through the advance verification.
The embodiment of the application provides a code development method, which is characterized in that a first code segmentation request is obtained, at least one test branch and at least one development branch are obtained by segmentation from a trunk branch in a code development program, and each test branch corresponds to each development branch one to one. And acquiring a test merging request, wherein the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents the development branch subjected to code development. And aiming at each development branch to be merged, merging the development branch to be merged with the corresponding test branch to obtain a self-test code, and performing code test on the self-test code. Under the condition that the self-test code passes the code test, the development branches to be combined are combined to the trunk branches to obtain new trunk branches and complete the code development, so that different code development works are divided, the repeated development and submission of the same development task by multiple people are avoided, meanwhile, the test environment is divided from the development environment, and when the test passes, namely when the self-test code and the trunk branches do not have code conflict, the developed development branches and the trunk branches are combined, and the problem of code disorder conflict in the multi-person collaborative development of the code can be effectively solved.
Further, if a developer performs function development based on an old backbone branch and another developer performs function development based on a new backbone branch, at this time, since two persons change codes of the same part at the same time, codes for performing function development based on the old backbone branch are inconsistent with codes of the backbone branches, and meanwhile, the business system cannot determine which developer should merge the function branches for performing code development into the backbone branches, resulting in code conflict.
In order to improve this problem, in an alternative embodiment, when at least one test branch and at least one development branch are obtained by splitting the trunk branch in step S1 shown in fig. 2, the code development program may be updated. And splitting the updated main branch in the code development program to obtain at least one test branch and at least one development branch. Each development branch is obtained based on the latest trunk branch segmentation, and the code conflict problem is improved.
Referring to fig. 3 in combination, fig. 3 is a flowchart illustrating sub-steps of a code development method according to an embodiment of the present application, and in an alternative implementation, in step S3 shown in fig. 2, the code testing for the self-test code may be implemented as follows:
and step S31, acquiring a test record request, and generating a test list according to the test record request, wherein the test list comprises the function to be tested of the self-test code and the development branch corresponding to the self-test code.
And step S32, obtaining the test request, and performing code test on the self-test code according to the test list.
At present, the test sheet is often manually recorded based on a text, but the situation that the record disappears after the text is lost is caused by the text record, and the information is not beneficial to storage and transmission. Therefore, the embodiment of the application provides a cloud test bill, and the test bill is stored in a platform server providing code management, so that the safety and the transferability of information can be effectively guaranteed.
The tester responsible for testing can be based on the function that needs the test that should promote in the test list and test, need not to test to whole codes, has improved efficiency of software testing and accuracy, and when the test is not passed, the tester can return the development branch of accomplishing the development to the developer, after solving corresponding problem, tests once more, can effectively improve the chaotic conflict problem of code.
Further, after the development branches to be merged are merged to the trunk branches and the code development is completed, the merged development branches to be merged can be deleted.
After the merging of the development branch to be merged and the trunk branch is completed, codes in the development branch to be merged are fused with codes in the trunk branch, and the development branch to be merged does not have codes any more. In order to avoid the merged development branches to be merged from interfering with the development process of the trunk branches, in the embodiment of the present application, a branch deletion interface may be invoked, and the branch deletion interface deletes the integrated development branches to be merged.
Further, after the branches to be merged are merged to the trunk branches to obtain new trunk branches, the updated trunk branches may be processed online according to an online plan, which is described in detail below.
Referring to fig. 4, fig. 4 is a second schematic flowchart of a code development method according to an embodiment of the present application.
Step S5, obtaining an online function comparison table, wherein the online function comparison table comprises versions and version numbers of a plurality of trunk branches, and each version corresponds to each version number one by one.
And step S6, distributing a new version number to the new trunk branch according to the online function comparison table.
For example, the online function lookup table stores 2 versions of trunk branches, where the version numbers are V1.1 and V1.2, respectively, and a new version number V1.3 can be allocated to a new trunk branch. Therefore, after the online operation is finished, the rollback operation can be performed according to the version number corresponding to the main branch, and the updating and maintenance of the software at the later stage are facilitated.
Further, after the trunk branch is divided into the test branch and the development branch, in order to further facilitate code development work, the development branch may be further divided into the functional branch. After the functional branches are developed, the functional branches are merged into the development branches, so that the problem of code conflict is further improved in a fine-grained manner on the basis of increasing the development efficiency. This is explained in detail below:
referring to fig. 5, fig. 5 is a third schematic flowchart of a code development method according to an embodiment of the present disclosure.
Step S100, a second code splitting request is obtained, and at least one functional branch is obtained by splitting from each development branch.
Step S200, acquiring a function code merging request, wherein the function code merging request comprises at least one function branch after code development.
And step S300, taking each function branch subjected to code development as a function branch to be merged.
Step S400, merging each functional branch to be merged to a corresponding development branch to obtain at least one development branch to be merged.
The number of the test branches and the development branches obtained by splitting from the trunk branches can be determined according to the persons participating in the collaborative development of the code, for example, if 5 persons participate in the collaborative development of the code, 5 development branches and 5 test branches can be split from the trunk branches.
Each developer is responsible for a development branch, and further, in the embodiment of the present application, the development branch may be further split to obtain at least one function branch, and it can be understood that the function branch may implement a certain function and may or may not be multiplexed. Different personnel are responsible for developing different functional branches, so that the development efficiency is improved.
After the development personnel complete the code development aiming at the functional branches, the code verification can be performed in a crossed manner, after the verification is completed, the development personnel submit the code to a responsible person in the development personnel through a client, the responsible person reconstructs a development branch environment, the functional branches after the code development are tested, under the condition that the test is passed, a functional code merging request is sent to a server, the server takes each functional branch after the code development as a functional branch to be merged based on the functional code merging request, and each functional branch to be merged is merged to the corresponding development branch to obtain at least one development branch to be merged.
After the merging is completed, the developer may send a test merging request to the server through the client, and after receiving the test merging request, the server starts to execute step S2 shown in fig. 2 until all the functional branches complete the development.
Therefore, after the trunk branch is divided into the test branch and the development branch, in order to further facilitate code development work, the development branch can be further divided into the functional branch. After the functional branches are developed, the functional branches are merged into the development branches, so that the problem of code conflict is further improved in a fine-grained manner on the basis of increasing the development efficiency.
Based on the same inventive concept, please refer to fig. 6 in combination, and fig. 6 is a functional module block diagram of a code development device according to an embodiment of the present application. The embodiment of the present application further provides a code development apparatus 130 corresponding to the code development method shown in fig. 2, where the code development apparatus 130 is applied to a server communicating with a client, and the apparatus includes:
the segmentation module 131 is configured to obtain a first code segmentation request, and segment a trunk branch in a code development program to obtain at least one test branch and at least one development branch, where each test branch corresponds to each development branch.
The obtaining module 132 is configured to obtain a test merging request, where the test merging request includes at least one development branch to be merged, and the development branch to be merged represents a development branch after code development.
The first merging module 133 is configured to merge the development branches to be merged with the corresponding test branch to obtain a self-test code, and perform a code test on the self-test code.
And a second merging module 134, configured to merge the development branches to be merged into the trunk branches to obtain new trunk branches and complete code development when the self-test code passes the code test.
The embodiment of the present application also provides a readable storage medium, in which a computer program is stored, and when the computer program is executed, the steps of the code development method are implemented.
To sum up, in the code development method, the first code splitting request is obtained, and at least one test branch and at least one development branch are obtained by splitting a trunk branch in a code development program, where each test branch corresponds to each development branch one to one. And acquiring a test merging request, wherein the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents the development branch subjected to code development. And aiming at each development branch to be merged, merging the development branch to be merged with the corresponding test branch to obtain a self-test code, and performing code test on the self-test code. Under the condition that the self-test code passes the code test, the development branches to be combined are combined to the trunk branches to obtain new trunk branches and complete the code development, so that different code development works are divided, the repeated development and submission of the same development task by multiple people are avoided, meanwhile, the test environment is divided from the development environment, and when the test passes, namely when the self-test code and the trunk branches do not have code conflict, the developed development branches and the trunk branches are combined, and the problem of code disorder conflict in the multi-person collaborative development of the code can be effectively solved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A code development method applied to a server communicating with a client, the method comprising:
acquiring a first code splitting request, and splitting a trunk branch in a code development program to obtain at least one test branch and at least one development branch, wherein each test branch corresponds to each development branch one to one;
acquiring a test merging request, wherein the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents a development branch subjected to code development;
for each development branch to be merged, merging the development branch to be merged with a corresponding test branch thereof to obtain a self-test code, and performing a code test on the self-test code, wherein the code test is used for checking whether the self-test code conflicts with the trunk branch;
and under the condition that the self-test code passes the code test, merging the development branches to be merged into the trunk branches to obtain new trunk branches, and completing the code development.
2. The code development method of claim 1, wherein the method further comprises:
acquiring a second code segmentation request, and segmenting each development branch to obtain at least one functional branch;
acquiring a function code merging request, wherein the function code merging request comprises at least one function branch after code development;
taking each functional branch subjected to code development as a functional branch to be merged;
and merging each functional branch to be merged to a corresponding development branch to obtain at least one development branch to be merged.
3. The code development method of claim 1, wherein the step of code testing the self-test code comprises:
acquiring a test record request, and generating a test sheet according to the test record request, wherein the test sheet comprises functions to be tested of the self-test codes and development branches corresponding to the self-test codes;
and acquiring a test request, and carrying out code test on the self-test code according to the test bill.
4. The code development method of claim 1, wherein the step of splitting the trunk branch into at least one test branch and at least one development branch in the code development program comprises:
updating the code development program;
and splitting the updated main branch in the code development program to obtain at least one test branch and at least one development branch.
5. The code development method of claim 1, wherein after the step of code testing the self-test code, the method further comprises:
and sending failure information to the client under the condition that the self-test code fails the code test.
6. The code development method according to claim 1, wherein after merging the branches to be merged into the trunk branch and completing the step of code development, the method further comprises:
and deleting the branch to be merged.
7. The code development method of claim 1, wherein the method further comprises:
acquiring an online function comparison table, wherein the online function comparison table comprises versions and version numbers of a plurality of trunk branches, and each version corresponds to each version number one by one;
and distributing a new version number to the new trunk branch according to the online function comparison table.
8. A code development apparatus applied to a server communicating with a client, comprising:
the system comprises a segmentation module, a data acquisition module and a data processing module, wherein the segmentation module is used for acquiring a first code segmentation request, segmenting a trunk branch in a code development program to obtain at least one test branch and at least one development branch, and each test branch corresponds to each development branch one to one;
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test merging request, the test merging request comprises at least one development branch to be merged, and the development branch to be merged represents a development branch after code development is carried out;
the first merging module is used for merging the development branches to be merged with the corresponding test branches of the development branches to be merged aiming at each development branch to be merged to obtain a self-test code, and performing code test on the self-test code;
and the second merging module is used for merging the development branches to be merged to the trunk branches to obtain new trunk branches and finish code development under the condition that the self-test codes pass code tests.
9. An electronic device, comprising a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the code development method according to any one of claims 1-7.
10. A readable storage medium, characterized in that the readable storage medium stores a computer program which, when executed, implements the steps of the code development method of any one of claims 1 to 7.
CN202111142439.4A 2021-09-28 2021-09-28 Code development method and device, electronic equipment and readable storage medium Pending CN113900630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111142439.4A CN113900630A (en) 2021-09-28 2021-09-28 Code development method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111142439.4A CN113900630A (en) 2021-09-28 2021-09-28 Code development method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113900630A true CN113900630A (en) 2022-01-07

Family

ID=79029632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111142439.4A Pending CN113900630A (en) 2021-09-28 2021-09-28 Code development method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113900630A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114840250A (en) * 2022-07-04 2022-08-02 金现代信息产业股份有限公司 Code conflict merging method, system, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114840250A (en) * 2022-07-04 2022-08-02 金现代信息产业股份有限公司 Code conflict merging method, system, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109976801B (en) Code development method, system and computer readable storage medium
CN108776643B (en) Target code merging control method and system based on version control process
Jain et al. Exploring the impact of systems architecture and systems requirements on systems integration complexity
CN108153599B (en) Project management platform, method, storage medium and electronic equipment
US5307446A (en) Knowledge acquisition system
CN113900630A (en) Code development method and device, electronic equipment and readable storage medium
CN113050929A (en) Intelligent contract development, operation and maintenance integrated platform based on HyperLegger Fabric
Sabau et al. Implementation of a continuous delivery pipeline for enterprise architecture model evolution
US10922075B2 (en) System and method for creating and validating software development life cycle (SDLC) digital artifacts
CN111966665B (en) Data migration testing method and device
US20040128653A1 (en) Methods and processes for validating reports
Corradini et al. BProVe: tool support for business process verification
Fagerström et al. Verdict machinery: On the need to automatically make sense of test results
CN102591779A (en) Establishing method for workflow-based universal software testing process model
CN115330171A (en) Business process control method and device, computer equipment and readable storage medium
CN112416791B (en) Defect information processing system and method for test object
CN113886262A (en) Software automation test method and device, computer equipment and storage medium
CN113485759A (en) Micro-service configuration information management system, method, electronic device and storage medium
CN113326113A (en) Task processing method and device, electronic equipment and storage medium
Achdian et al. Analysis of CI/CD Application Based on Cloud Computing Services on Fintech Company
Helwani et al. Acia: a methodology for identification of architectural design patterns that support continuous integration based on continuous assessment
CN113282504A (en) Incremental code coverage rate detection method and service development method and device
CN112435007A (en) Js-based code submission method, device, computer equipment and storage medium
CN112099805A (en) Method and device for issuing application, electronic equipment and storage medium
CN111090420A (en) Task function line-based software project management method and system

Legal Events

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