CN112231233A - Code test scheduling method and device, computer equipment and readable storage medium - Google Patents

Code test scheduling method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112231233A
CN112231233A CN202011305890.9A CN202011305890A CN112231233A CN 112231233 A CN112231233 A CN 112231233A CN 202011305890 A CN202011305890 A CN 202011305890A CN 112231233 A CN112231233 A CN 112231233A
Authority
CN
China
Prior art keywords
code
test
development
release
mirror image
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
CN202011305890.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.)
Ping An Pension Insurance Corp
Original Assignee
Ping An Pension Insurance 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 Ping An Pension Insurance Corp filed Critical Ping An Pension Insurance Corp
Priority to CN202011305890.9A priority Critical patent/CN112231233A/en
Publication of CN112231233A publication Critical patent/CN112231233A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a code test scheduling method, a device, computer equipment and a readable storage medium, wherein the code test scheduling method comprises the following steps: extracting development codes in development branches of a GIT (generic identification) code library, executing a development deployment process so as to test the development codes in a development environment, and loading development passing tags in the development codes passing the test; executing a merging development deployment process to test the release codes in a development environment, and loading a merging development passing label in the release codes passing the test; executing a test deployment process to test the release codes in a test environment, and loading test passing tags in the release codes passing the test; executing a production deployment process to test the release code in a production environment, and loading a production pass tag in the release code that passes the test. The invention improves the efficiency of code testing and ensures the reliability of codes in the GIT code library.

Description

Code test scheduling method and device, computer equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for scheduling code testing, a computer device, and a readable storage medium.
Background
In the current scene of software development needing development, test and operation and maintenance (namely, a production environment manager) to cooperate together, a GIT code library is usually adopted to manage all the parties; since the development, test and operation and maintenance parties all have their own environments, namely: the method comprises a development environment, a test environment and a production environment, therefore, when a management branch (i.e. a master branch) of the GIT code library acquires codes from a development branch (develop branch) and a release branch (release branch) and packages the codes to obtain a software package, the codes in the software package are usually tested by the default of the development environment, the test environment and the production environment.
However, the inventor has realized that in practice, the developed code and the released code in the GIT code library are often not fully tested in the development environment, the test environment and the production environment by the developer, the tester or the operation and maintenance person, resulting in very low reliability of the code obtained by the management branch.
Disclosure of Invention
The invention aims to provide a code test scheduling method, a code test scheduling device, a computer device and a readable storage medium, which are used for solving the problem that the reliability of codes obtained by a management branch is very low in the prior art.
In order to achieve the above object, the present invention provides a code test scheduling method for testing codes in a GIT code library, including:
extracting development codes in development branches of a GIT (generic identification) code library, executing a development deployment process so as to test the development codes in a development environment, and loading development passing tags in the development codes passing the test;
executing a merging development deployment process to test the release codes in a development environment, and loading a merging development passing label in the release codes passing the test; the release code is formed by combining the development code;
executing a test deployment process to test the release codes in a test environment, and loading test passing tags in the release codes passing the test; the release code is formed by combining the development code;
executing a production deployment process to test the release code in a production environment, and loading a production pass tag in the release code that passes the test.
In the foregoing solution, the development and deployment process includes:
carrying out mirror image processing on the development code to obtain a development mirror image code;
deploying the development mirror image code into a preset development environment;
testing the development mirror image code and judging whether the development mirror image code passes the test;
if the development mirror image code passes the test, loading a development passing label in the development code corresponding to the development mirror image code, and deleting the development mirror image code;
and if the development mirror image code does not pass the test, moving the development code corresponding to the development mirror image code to a preset failure database, and deleting the development mirror image code.
In the foregoing solution, the merging, developing and deploying process includes:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset development environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the released mirror image code passes the test, loading a merging development passing label in the released code corresponding to the released mirror image code, and deleting the released mirror image code;
and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
In the above scheme, before executing the test deployment process, the method includes:
extracting release codes in a release branch of a GIT code library, and judging whether the release codes have merged development passing tags or not; if yes, calling a test deployment process; and if not, triggering the merging development deployment process.
In the foregoing solution, the test deployment process includes:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset test environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the issued mirror image code passes the test, loading a test passing label in the issued code corresponding to the issued mirror image code, and deleting the issued mirror image code;
and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
In the above scheme, before executing the production deployment process, the method includes:
extracting a release code in a release branch of a GIT code library, and judging whether the release code has a test passing label; if so, calling a production deployment process; if not, triggering the test deployment process.
In the above scheme, the production deployment process includes:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset production environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the release mirror image code passes the test, loading a production pass tag in the release code corresponding to the release mirror image code, and deleting the release mirror image code;
if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code;
after executing the production deployment process, the method further comprises the following steps:
and uploading the release code to a block chain.
In order to achieve the above object, the present invention further provides a code testing and scheduling apparatus, including:
the development deployment module is used for extracting development codes in development branches of the GIT code library, executing a development deployment process so as to test the development codes in a development environment, and loading development passing tags in the development codes passing the test;
the merging development deployment module is used for executing a merging development deployment process so as to test the release codes in a development environment and load merging development passing tags in the release codes passing the test; the release code is formed by combining the development code;
the test deployment module is used for executing a test deployment process so as to test the release codes in a test environment and loading test passing labels in the release codes passing the test; the release code is formed by combining the development code;
and the generation deployment module is used for executing a production deployment process so as to test the release codes in a production environment and load the production passing tags in the release codes passing the test.
To achieve the above object, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor of the computer device implements the steps of the code test scheduling method when executing the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the code test scheduling method.
According to the code test scheduling method, the device, the computer equipment and the readable storage medium, the development codes in the GIT code library are automatically tested through the development environment, the release codes are tested through the development environment, the test environment and the production environment, each development code is provided with a development passing label, the release codes are provided with a combined development passing label, a test passing label and a production passing label to be used and sent to a management branch (namely a master branch) of the GIT code library or obtained by the management branch, so that the code test efficiency is improved, the reliability of the codes in the GIT code library is ensured, and the reliability of the obtained software package is further ensured.
Drawings
FIG. 1 is a flowchart of a first embodiment of a code test scheduling method according to the present invention;
FIG. 2 is a schematic diagram of an environment application of a code test scheduling method according to a second embodiment of the code test scheduling method of the present invention;
FIG. 3 is a flowchart of a specific method of a code test scheduling method according to a second embodiment of the code test scheduling method of the present invention;
FIG. 4 is a flowchart of a deployment process developed in a second embodiment of the code testing and scheduling method of the present invention;
FIG. 5 is a flowchart of a merging development deployment process in the second embodiment of the code testing and scheduling method of the present invention;
FIG. 6 is a flowchart of a test deployment process in a second embodiment of the code test scheduling method according to the present invention;
FIG. 7 is a flowchart of a production deployment process in a second embodiment of the code testing and scheduling method of the present invention;
FIG. 8 is a block diagram of a third exemplary embodiment of a code test scheduler;
fig. 9 is a schematic diagram of a hardware structure of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following examples are now provided:
the first embodiment is as follows:
referring to fig. 1, a code test scheduling method of the present embodiment is used for testing codes in a GIT code library, and includes:
s101: the method includes extracting development code in development branches of a GIT code library, executing a development deployment process to test the development code in a development environment, and loading a development pass tag in the development code that passes the test.
S103: executing a merging development deployment process to test the release codes in a development environment, and loading a merging development passing label in the release codes passing the test; and the release code is formed by combining the development code.
S105: executing a test deployment process to test the release codes in a test environment, and loading test passing tags in the release codes passing the test; and the release code is formed by combining the development code.
S107: executing a production deployment process to test the release code in a production environment, and loading a production pass tag in the release code that passes the test.
In this embodiment, by performing a test of the development environment on the development codes in the development branch, it is ensured that each development code can effectively run in the development environment, and it is ensured that each development code in the development branch of the GIT code library can be tested in the development environment, thereby ensuring the reliability of each development code.
Even if each development code passes the test of the development environment, the merged release code may not pass the test of the development environment due to the conflict between the development codes, so the release code is tested in the development environment by the merging development deployment process, so that the release code formed by merging the development codes can be operated in the development environment, and the reliability of the release code in the development environment is ensured.
The test environment of the release code is tested through the test deployment process, so that the release code can normally run in the test environment, and the reliability of the release code in the test environment is guaranteed.
The release code is tested in the production environment through the production deployment process, so that the release code can effectively run in the production environment, and the reliability of the release code in the production environment is ensured.
The development codes in the GIT code library are automatically tested through a development environment and the release codes are tested through the development environment, the test environment and the production environment by a code test scheduling method, so that each development code has a development passing label, and the release codes can be used by combining the development passing label, the test passing label and the production passing label and are sent to a management branch (namely a master branch) of the GIT code library or obtained by the management branch, thereby not only improving the efficiency of code testing, but also ensuring the reliability of the codes in the GIT code library and further ensuring the reliability of the obtained software package.
Example two:
the embodiment is a specific application scenario of the first embodiment, and the method provided by the present invention can be more clearly and specifically explained through the embodiment.
The method provided by this embodiment is specifically described below by taking, as an example, a development deployment process, a merged development deployment process, a test deployment process, and a production deployment process for executing an extracted development code in a server running a code test scheduling method. It should be noted that the present embodiment is only exemplary, and does not limit the protection scope of the embodiments of the present invention.
Fig. 2 schematically shows an environment application diagram of a code test scheduling method according to a second embodiment of the present application.
In an exemplary embodiment, the server 2 where the code test scheduling method is located is connected to the GIT code library 4 through the network 3; the server 2 may provide services through one or more networks 3, which networks 3 may include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network 3 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network 3 may include wireless links such as cellular links, satellite links, Wi-Fi links, and/or the like.
Fig. 3 is a flowchart of a specific method of a code test scheduling method according to an embodiment of the present invention, where the method specifically includes steps S201 to S208.
S201: the method includes extracting development code in development branches of a GIT code library, executing a development deployment process to test the development code in a development environment, and loading a development pass tag in the development code that passes the test.
In order to ensure that each development code in the development branch of the GIT code library can be tested in the development environment, the development environment of the development codes in the development branch is tested, so that each development code can be effectively operated in the development environment, and the reliability of each development code is ensured.
In a preferred embodiment, referring to fig. 4, the development and deployment process includes:
s11: carrying out mirror image processing on the development code to obtain a development mirror image code;
s12: deploying the development mirror image code into a preset development environment;
s13: testing the development mirror image code and judging whether the development mirror image code passes the test;
s14: if the development mirror image code passes the test, loading a development passing label in the development code corresponding to the development mirror image code, and deleting the development mirror image code;
s15: and if the development mirror image code does not pass the test, moving the development code corresponding to the development mirror image code to a preset failure database, and deleting the development mirror image code.
It should be noted that the GIT code library at least includes a development branch (develop branch) and a release branch (release branch); wherein the development branch is a branch in which developers mainly engage in development work after receiving demands. The release branch is a branch mainly used when the test is received, after the version enters a test period, the test code of the version is from a develop branch merge to a release branch to show a waiting release state, and at the moment, no new function is added, and only the bug repair of the current function is responsible. The code on the development branch is set as a development code, and the code on the release branch is set as a release code, wherein the release code is obtained by merging the development codes through a GIT code library.
S202: extracting release codes in a release branch of a GIT code library, and judging whether development codes combined into the release codes all have the development passing tags; if so, calling a merging development deployment process; if not, extracting development codes without the development passing tags in the release codes, and executing the development deployment process; and the release code is formed by combining the development code.
In this step, the development deployment process is called again for the development code which is not subjected to the development environment test in the release code, so that the development code is tested again in the development environment, and the codes in the release branch of the GIT code library are all tested in the development environment, so that the reliability of the release code is ensured.
In fig. 3, the S202 is shown with the following labels:
s21: extracting release codes in a release branch of a GIT code library, and judging whether development codes combined into the release codes all have the development passing tags;
s22: if so, calling a merging development deployment process;
s23: if not, extracting the development codes without the development passing tags in the release codes, and triggering the development deployment process so as to test the development codes in a development environment, and loading the development passing tags in the development codes passing the test.
S203: executing a merging development deployment process to test the release codes in a development environment, and loading a merging development passing label in the release codes passing the test; and the release code is formed by combining the development code.
Even if each development code passes the test of the development environment, the release codes obtained after combination may not pass the test of the development environment due to the conflict among the development codes, so that in order to ensure that the release codes formed after combination can be tested in the development environment, the step tests the release codes in the development environment through a combination development deployment process, so as to ensure that the release codes formed after combination of the development codes can be operated in the development environment, and ensure the reliability of the release codes in the development environment.
In a preferred embodiment, referring to fig. 5, the merged development deployment process includes:
s31: carrying out mirror image processing on the release code to obtain a release mirror image code;
s32: deploying the release image code to a preset development environment;
s33: testing the released mirror image code and judging whether the released mirror image code passes the test or not;
s34: if the released mirror image code passes the test, loading a merging development passing label in the released code corresponding to the released mirror image code, and deleting the released mirror image code;
s35: and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
S204: extracting release codes in a release branch of a GIT code library, and judging whether the release codes have merged development passing tags or not; if yes, calling a test deployment process; and if not, triggering the merging development deployment process.
In the step, the merging development deployment process is executed again on the release codes which are not tested in the development environment, and the test deployment process is called on the release codes which are tested in the development environment so as to ensure the test sequence of the release codes from the development environment to the test environment.
In fig. 3, the S204 is shown with the following labels:
s41: extracting release codes in a release branch of a GIT code library, and judging whether the release codes have merged development passing tags or not;
s42: if yes, calling a test deployment process;
s43: if not, triggering the merging development deployment process so as to test the release codes in the development environment, and loading the merging development passing tags in the release codes passing the test.
S205: executing a test deployment process to test the release codes in a test environment, and loading test passing tags in the release codes passing the test; and the release code is formed by combining the development code.
In order to ensure that the release code can pass the test in the test environment, the test deployment process is used for testing the test environment of the release code in the step, so that the release code can normally run in the test environment, and the reliability of the release code in the test environment is ensured.
In a preferred embodiment, referring to fig. 6, the test deployment process includes:
s51: carrying out mirror image processing on the release code to obtain a release mirror image code;
s52: deploying the release image code to a preset test environment;
s53: testing the released mirror image code and judging whether the released mirror image code passes the test or not;
s54: if the issued mirror image code passes the test, loading a test passing label in the issued code corresponding to the issued mirror image code, and deleting the issued mirror image code;
s55: and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
S206: and extracting the release codes in the release branch of the GIT code library, and judging whether the release codes have the test passing tags. If so, calling a production deployment process; if not, triggering the test deployment process.
In the step, the test deployment process is executed again on the release code which is not tested in the test environment, and the production deployment process is called on the release code which is tested in the test environment, so that the test sequence of the release code from the test environment to the production environment is ensured.
In fig. 3, the S206 is shown with the following labels:
s61: extracting a release code in a release branch of a GIT code library, and judging whether the release code has a test passing label;
s62: if so, calling a production deployment process;
s63: if not, triggering the test deployment process to test the release code in the test environment, and loading a test passing label in the release code passing the test.
S207: executing a production deployment process to test the release code in a production environment, and loading a production pass tag in the release code that passes the test.
In order to ensure that the release code can pass the test in the production environment, the release code is tested in the production environment through the production deployment process in the step, so that the release code can effectively run in the production environment, and the reliability of the release code in the production environment is ensured.
In a preferred embodiment, referring to fig. 7, the production deployment process includes:
s71: carrying out mirror image processing on the release code to obtain a release mirror image code;
s72: deploying the release image code to a preset production environment;
s73: testing the released mirror image code and judging whether the released mirror image code passes the test or not;
s74: if the release mirror image code passes the test, loading a production pass tag in the release code corresponding to the release mirror image code, and deleting the release mirror image code;
s75: and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
Preferably, after executing the production deployment process, the method further includes:
and uploading the release code to a block chain.
It should be noted that the corresponding digest information is obtained based on the issued code, and specifically, the digest information is obtained by hashing the issued code, for example, by using the sha256s algorithm. Uploading summary information to the blockchain can ensure the safety and the fair transparency of the user. The user device may download the summary information from the blockchain to verify that the release code has been tampered with. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
S208: extracting a release code in a release branch of a GIT code library, and judging whether the release code has a production passing label; if yes, loading a complete test label in the release code; if not, triggering the production deployment process.
The complete test label is loaded in the release code of the GIT code library, so that a developer, a tester and an operation and maintenance person can conveniently manage and control the code in the release branch of the GIT code library, only a generation party passing through a development environment, a test environment and a production environment can use the complete test label and send the complete test label to a management branch (namely, a master branch) of the GIT code library, the reliability of the code in the GIT code library is ensured, and the reliability of the obtained software package is further ensured.
In fig. 3, the S208 is shown with the following labels:
s81: extracting a release code in a release branch of a GIT code library, and judging whether the release code has a production passing label;
s82: if yes, loading a complete test label in the release code;
s83: if not, triggering the production deployment process to test the release codes in a production environment, and loading production passing tags in the release codes passing the test.
Example three:
referring to fig. 8, a code testing and scheduling apparatus 1 of the present embodiment includes:
the development deployment module 11 is configured to extract development codes in development branches of the GIT code library, execute a development deployment process, test the development codes in a development environment, and load development passing tags in the development codes that pass the test;
a merging development deployment module 13, configured to execute a merging development deployment process to test the release code in a development environment, and load a merging development passing tag in the release code that passes the test; the release code is formed by combining the development code;
the test deployment module 15 is configured to execute a test deployment process to test the release code in the test environment, and load a test passing tag in the release code that passes the test; the release code is formed by combining the development code;
and the generation deployment module 17 is configured to execute a production deployment process to test the release code in the production environment, and load a production pass tag in the release code that passes the test.
Optionally, the code test scheduling apparatus 1 further includes:
a development judging module 12, configured to extract release codes in a release branch of the GIT code library, and judge whether development codes merged as the release codes all have the development passing tag; if so, calling a merging development deployment process; if not, extracting development codes without the development passing tags in the release codes, and executing the development deployment process; and the release code is formed by combining the development code.
Optionally, the code test scheduling apparatus 1 further includes:
a merging development judgment module 14, configured to extract a release code in a release branch of the GIT code library, and judge whether the release code has a merging development passing tag; if yes, calling a test deployment process; and if not, triggering the merging development deployment process.
Optionally, the code test scheduling apparatus 1 further includes:
and the test judgment module 16 is configured to extract a release code in a release branch of the GIT code library, and judge whether the release code has a test passing tag. If so, calling a production deployment process; if not, triggering the test deployment process.
Optionally, the code test scheduling apparatus 1 further includes:
the generation judging module 18 is configured to extract a release code in a release branch of the GIT code library, and judge whether the release code has a production passing tag; if yes, loading a complete test label in the release code; if not, triggering the production deployment process.
In the technical scheme, the development auxiliary work is optimized by constructing extracted development codes, executing a development and deployment process, combining the development and deployment process, testing the deployment process and producing a code quality tool of the deployment process.
Example four:
in order to achieve the above object, the present invention further provides a computer device 5, where components of the code testing and scheduling apparatus 1 according to the third embodiment may be dispersed in different computer devices, and the computer device 5 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster formed by multiple application servers) that executes a program, and the like. The computer device of the embodiment at least includes but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in FIG. 9. It should be noted that fig. 9 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the memory 51 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 51 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 51 may be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device. Of course, the memory 51 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 51 is generally used for storing an operating system and various application software installed in the computer device, for example, the program code of the code testing scheduling apparatus in the third embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 52 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device. In this embodiment, the processor 52 is configured to run a program code stored in the memory 51 or process data, for example, run a code test scheduling apparatus, so as to implement the code test scheduling method of the first embodiment and the second embodiment.
Example five:
to achieve the above objects, the present invention also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor 52, implements corresponding functions. The computer readable storage medium of this embodiment is used for storing a code test scheduling apparatus, and when being executed by the processor 52, the computer readable storage medium implements the code test scheduling method of the first embodiment and the second embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A code test scheduling method is used for testing codes in a GIT code library, and is characterized by comprising the following steps:
extracting development codes in development branches of a GIT (generic identification) code library, executing a development deployment process so as to test the development codes in a development environment, and loading development passing tags in the development codes passing the test;
executing a merging development deployment process to test the release codes in a development environment, and loading a merging development passing label in the release codes passing the test; the release code is formed by combining the development code;
executing a test deployment process to test the release codes in a test environment, and loading test passing tags in the release codes passing the test; the release code is formed by combining the development code;
executing a production deployment process to test the release code in a production environment, and loading a production pass tag in the release code that passes the test.
2. The code test scheduling method of claim 1, wherein the development and deployment process comprises:
carrying out mirror image processing on the development code to obtain a development mirror image code;
deploying the development mirror image code into a preset development environment;
testing the development mirror image code and judging whether the development mirror image code passes the test;
if the development mirror image code passes the test, loading a development passing label in the development code corresponding to the development mirror image code, and deleting the development mirror image code;
and if the development mirror image code does not pass the test, moving the development code corresponding to the development mirror image code to a preset failure database, and deleting the development mirror image code.
3. The code test scheduling method of claim 1, wherein the merged development deployment process comprises:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset development environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the released mirror image code passes the test, loading a merging development passing label in the released code corresponding to the released mirror image code, and deleting the released mirror image code;
and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
4. The code test scheduling method of claim 1, wherein before executing the test deployment process, the method comprises:
extracting release codes in a release branch of a GIT code library, and judging whether the release codes have merged development passing tags or not; if yes, calling a test deployment process; and if not, triggering the merging development deployment process.
5. The code test scheduling method of claim 1, wherein the test deployment process comprises:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset test environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the issued mirror image code passes the test, loading a test passing label in the issued code corresponding to the issued mirror image code, and deleting the issued mirror image code;
and if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code.
6. The method for code test scheduling according to claim 1, wherein before executing the production deployment process, the method comprises:
extracting a release code in a release branch of a GIT code library, and judging whether the release code has a test passing label; if so, calling a production deployment process; if not, triggering the test deployment process.
7. The code test scheduling method of claim 1, wherein the production deployment process comprises:
carrying out mirror image processing on the release code to obtain a release mirror image code;
deploying the release image code to a preset production environment;
testing the released mirror image code and judging whether the released mirror image code passes the test or not;
if the release mirror image code passes the test, loading a production pass tag in the release code corresponding to the release mirror image code, and deleting the release mirror image code;
if the release mirror image code fails to pass the test, moving the release code corresponding to the release mirror image code to a preset failure database, and deleting the release mirror image code;
after executing the production deployment process, the method further comprises the following steps:
and uploading the release code to a block chain.
8. A code test scheduler, comprising:
the development deployment module is used for extracting development codes in development branches of the GIT code library, executing a development deployment process so as to test the development codes in a development environment, and loading development passing tags in the development codes passing the test;
the merging development deployment module is used for executing a merging development deployment process so as to test the release codes in a development environment and load merging development passing tags in the release codes passing the test; the release code is formed by combining the development code;
the test deployment module is used for executing a test deployment process so as to test the release codes in a test environment and loading test passing labels in the release codes passing the test; the release code is formed by combining the development code;
and the generation deployment module is used for executing a production deployment process so as to test the release codes in a production environment and load the production passing tags in the release codes passing the test.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the code test scheduling method according to any one of claims 1 to 7 are implemented by the processor of the computer device when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, the computer program stored in the computer-readable storage medium, when being executed by a processor, implementing the steps of the code test scheduling method according to any one of claims 1 to 7.
CN202011305890.9A 2020-11-20 2020-11-20 Code test scheduling method and device, computer equipment and readable storage medium Pending CN112231233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011305890.9A CN112231233A (en) 2020-11-20 2020-11-20 Code test scheduling method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011305890.9A CN112231233A (en) 2020-11-20 2020-11-20 Code test scheduling method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112231233A true CN112231233A (en) 2021-01-15

Family

ID=74123875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011305890.9A Pending CN112231233A (en) 2020-11-20 2020-11-20 Code test scheduling method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112231233A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
CN106873975A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Devops based on Docker persistently pays and automated system and method
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
CN107797914A (en) * 2016-09-07 2018-03-13 阿里巴巴集团控股有限公司 Code process method, apparatus and code delivery system
US20200210325A1 (en) * 2018-12-28 2020-07-02 Paypal, Inc. Streamlined creation of integration tests

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
CN107797914A (en) * 2016-09-07 2018-03-13 阿里巴巴集团控股有限公司 Code process method, apparatus and code delivery system
CN106873975A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Devops based on Docker persistently pays and automated system and method
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
US20200210325A1 (en) * 2018-12-28 2020-07-02 Paypal, Inc. Streamlined creation of integration tests

Similar Documents

Publication Publication Date Title
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
CN110764942B (en) Multi-kind data verification method, device, computer system and readable storage medium
US9092230B2 (en) Configuration of componentized software applications
CN111736872B (en) Gray scale release upgrading method, device, computer system and readable storage medium
CN110597531B (en) Distributed module upgrading method and device and storage medium
CN111161085B (en) Service request processing method, device, electronic equipment and computer readable medium
CN112700246B (en) Block chain-based data processing method, device, equipment and readable storage medium
CN112527484A (en) Workflow breakpoint continuous running method and device, computer equipment and readable storage medium
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112052141B (en) Data fragment verification method and device, computer equipment and readable storage medium
CN114661423A (en) Cluster configuration detection method and device, computer equipment and storage medium
CN111221904A (en) Intelligent contract deployment and execution method and device, electronic equipment and storage medium
CN112965721A (en) Android-based project compiling method and device, computer equipment and storage medium
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium
WO2009097241A1 (en) A method and system for assessing deployment and un-deployment of software installations
CN112231233A (en) Code test scheduling method and device, computer equipment and readable storage medium
CN116450165A (en) Method, system, terminal and storage medium for quickly building environment and deploying program
CN111752600B (en) Code anomaly detection method and device, computer equipment and storage medium
CN114124521B (en) Cloud primary security arrangement method and device, electronic equipment and computer readable medium
CN112564979B (en) Execution method and device of construction task, computer equipment and storage medium
CN110648219B (en) Method and device for standardizing input area of bank transaction system
CN111722946A (en) Distributed transaction processing method and device, computer equipment and readable storage medium
CN111984275A (en) System deployment method, system, terminal and storage medium based on CPU architecture type
CN112988193B (en) Code update identification method and device, computer equipment and readable storage medium

Legal Events

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