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

Code test scheduling method, apparatus, 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
deployment process
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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of 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

本发明涉及计算机技术领域,公开了一种代码测试调度方法、装置、计算机设备及可读存储介质,包括:提取GIT代码库的开发分支中的开发代码,执行开发部署进程,以在开发环境中对所述开发代码进行测试,及在通过测试的开发代码中加载开发通过标签;执行合并开发部署进程,以在开发环境中对所述发布代码进行测试,及在通过测试的发布代码中加载合并开发通过标签;执行测试部署进程,以在测试环境中对所述发布代码进行测试,及在通过测试的发布代码中加载测试通过标签;执行生产部署进程,以在生产环境中对所述发布代码进行测试,及在通过测试的发布代码中加载生产通过标签。本发明提高了代码测试的效率,保证了GIT代码库中代码的可靠性。

Figure 202011305890

The invention relates to the technical field of computers, and discloses a code test scheduling method, device, computer equipment and readable storage medium, comprising: extracting development codes in a development branch of a GIT code base, and executing a development deployment process to execute a development deployment process in a development environment. Test the development code, and load the development pass tag in the development code that passed the test; perform a merge development deployment process to test the release code in the development environment, and load the merge in the release code that passed the test. develop pass tags; execute a test deployment process to test the release code in a test environment, and load test pass tags in the tested release code; execute a production deployment process to test the release code in a production environment Do the tests, and load the production pass tag in the release code that passes the test. The invention improves the efficiency of code testing and ensures the reliability of the codes in the GIT code base.

Figure 202011305890

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.一种代码测试调度方法,用于对GIT代码库中的代码进行测试,其特征在于,包括:1. a code test scheduling method is used to test the code in the GIT code base, it is characterized in that, comprises: 提取GIT代码库的开发分支中的开发代码,执行开发部署进程,以在开发环境中对所述开发代码进行测试,及在通过测试的开发代码中加载开发通过标签;Extract the development code in the development branch of the GIT code base, execute the development and deployment process to test the development code in the development environment, and load the development pass tag in the development code that passed the test; 执行合并开发部署进程,以在开发环境中对所述发布代码进行测试,及在通过测试的发布代码中加载合并开发通过标签;其中,所述发布代码由所述开发代码合并而成;Execute the merged development deployment process to test the release code in the development environment, and load the merged development pass tag in the release code that has passed the test; wherein, the release code is formed by merging the development code; 执行测试部署进程,以在测试环境中对所述发布代码进行测试,及在通过测试的发布代码中加载测试通过标签;其中,所述发布代码由所述开发代码合并而成;Execute a test deployment process to test the release code in a test environment, and load a test pass tag in the release code that has passed the test; wherein the release code is formed by merging the development code; 执行生产部署进程,以在生产环境中对所述发布代码进行测试,及在通过测试的发布代码中加载生产通过标签。A production deployment process is performed to test the release code in a production environment and to load a production pass tag in the release code that passes the test. 2.根据权利要求1所述的代码测试调度方法,其特征在于,所述开发部署进程包括:2. The code test scheduling method according to claim 1, wherein the development and deployment process comprises: 对所述开发代码进行镜像处理得到开发镜像代码;Performing mirror processing on the development code to obtain a development mirror code; 将所述开发镜像代码部署到预设的开发环境中;deploying the development image code to a preset development environment; 对所述开发镜像代码进行测试,并判断所述开发镜像代码是否通过测试;Test the development mirror code, and judge whether the development mirror code passes the test; 若所述开发镜像代码通过测试,则在所述开发镜像代码对应的开发代码中加载开发通过标签,并删除所述开发镜像代码;If the development mirror code passes the test, load the development pass label in the development code corresponding to the development mirror code, and delete the development mirror code; 若所述开发镜像代码未通过测试,则将所述开发镜像代码对应的开发代码移动至预设的失败数据库,并删除所述开发镜像代码。If the development mirror code fails the test, the development code corresponding to the development mirror code is moved to a preset failure database, and the development mirror code is deleted. 3.根据权利要求1所述的代码测试调度方法,其特征在于,所述合并开发部署进程包括:3. The code test scheduling method according to claim 1, wherein the merged development and deployment process comprises: 对所述发布代码进行镜像处理得到发布镜像代码;Performing mirror processing on the release code to obtain release mirror code; 将所述发布镜像代码部署到预设的开发环境中;deploying the release image code to a preset development environment; 对所述发布镜像代码进行测试,并判断所述发布镜像代码是否通过测试;Test the release mirror code, and determine whether the release mirror code passes the test; 若所述发布镜像代码通过测试,则在所述发布镜像代码对应的发布代码中加载合并开发通过标签,并删除所述发布镜像代码;If the published image code passes the test, load the merged development pass tag in the published code corresponding to the published image code, and delete the published image code; 若所述发布镜像代码未通过测试,则将所述发布镜像代码对应的发布代码移动至预设的失败数据库,并删除所述发布镜像代码。If the release mirror code fails the test, the release code corresponding to the release mirror code is moved to a preset failure database, and the release mirror code is deleted. 4.根据权利要求1所述的代码测试调度方法,其特征在于,执行测试部署进程之前,包括:4. The code test scheduling method according to claim 1, characterized in that, before executing the test deployment process, comprising: 提取GIT代码库的发布分支中发布代码,判断所述发布代码中是否具有合并开发通过标签;若是,则调用测试部署进程;若否,则触发所述合并开发部署进程。Extract the release code in the release branch of the GIT code base, and determine whether the release code has a merge development pass tag; if so, call the test deployment process; if not, trigger the merge development deployment process. 5.根据权利要求1所述的代码测试调度方法,其特征在于,所述测试部署进程包括:5. The code test scheduling method according to claim 1, wherein the test deployment process comprises: 对所述发布代码进行镜像处理得到发布镜像代码;Performing mirror processing on the release code to obtain release mirror code; 将所述发布镜像代码部署到预设的测试环境中;deploying the release image code to a preset test environment; 对所述发布镜像代码进行测试,并判断所述发布镜像代码是否通过测试;Test the release mirror code, and determine whether the release mirror code passes the test; 若所述发布镜像代码通过测试,则在所述发布镜像代码对应的发布代码中加载测试通过标签,并删除所述发布镜像代码;If the release image code passes the test, load a test pass label in the release code corresponding to the release image code, and delete the release image code; 若所述发布镜像代码未通过测试,则将所述发布镜像代码对应的发布代码移动至预设的失败数据库,并删除所述发布镜像代码。If the release mirror code fails the test, the release code corresponding to the release mirror code is moved to a preset failure database, and the release mirror code is deleted. 6.根据权利要求1所述的代码测试调度方法,其特征在于,执行生产部署进程之前,包括:6. The code test scheduling method according to claim 1, characterized in that, before executing the production deployment process, comprising: 提取GIT代码库的发布分支中发布代码,判断所述发布代码中是否具有测试通过标签;若是,则调用生产部署进程;若否,则触发所述测试部署进程。Extract the release code in the release branch of the GIT code base, and determine whether the release code has a test pass label; if so, call the production deployment process; if not, trigger the test deployment process. 7.根据权利要求1所述的代码测试调度方法,其特征在于,所述生产部署进程包括:7. The code test scheduling method according to claim 1, wherein the production deployment process comprises: 对所述发布代码进行镜像处理得到发布镜像代码;Performing mirror processing on the release code to obtain release mirror code; 将所述发布镜像代码部署到预设的生产环境中;deploying the release image code to a preset production environment; 对所述发布镜像代码进行测试,并判断所述发布镜像代码是否通过测试;Test the release mirror code, and determine whether the release mirror code passes the test; 若所述发布镜像代码通过测试,则在所述发布镜像代码对应的发布代码中加载生产通过标签,并删除所述发布镜像代码;If the release image code passes the test, load a production pass label in the release code corresponding to the release image code, and delete the release image code; 若所述发布镜像代码未通过测试,则将所述发布镜像代码对应的发布代码移动至预设的失败数据库,并删除所述发布镜像代码;If the release mirror code fails the test, move the release code corresponding to the release mirror code to a preset failure database, and delete the release mirror code; 在执行生产部署进程之后,还包括:After executing the production deployment process, also include: 将所述发布代码上传至区块链中。Upload the release code to the blockchain. 8.一种代码测试调度装置,其特征在于,包括:8. A code test scheduling device, characterized in that, comprising: 开发部署模块,用于提取GIT代码库的开发分支中的开发代码,执行开发部署进程,以在开发环境中对所述开发代码进行测试,及在通过测试的开发代码中加载开发通过标签;The development and deployment module is used to extract the development code in the development branch of the GIT code base, execute the development and deployment process, to test the development code in the development environment, and load the development pass label in the development code that has passed the test; 合并开发部署模块,用于执行合并开发部署进程,以在开发环境中对所述发布代码进行测试,及在通过测试的发布代码中加载合并开发通过标签;其中,所述发布代码由所述开发代码合并而成;The merged development deployment module is used to execute the merged development deployment process, so as to test the released code in the development environment, and load the merged development passed tag in the released code that has passed the test; wherein, the released code is executed by the developer code merged; 测试部署模块,用于执行测试部署进程,以在测试环境中对所述发布代码进行测试,及在通过测试的发布代码中加载测试通过标签;其中,所述发布代码由所述开发代码合并而成;A test deployment module, configured to execute a test deployment process to test the release code in a test environment, and load a test pass tag in the release code that has passed the test; wherein the release code is merged by the development code to form to make; 生成部署模块,用于执行生产部署进程,以在生产环境中对所述发布代码进行测试,及在通过测试的发布代码中加载生产通过标签。A deployment module is generated for executing a production deployment process to test the release code in a production environment, and load a production pass tag in the release code that passes the test. 9.一种计算机设备,其包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述计算机设备的处理器执行所述计算机程序时实现权利要求1至7任一项所述代码测试调度方法的步骤。9. A computer device comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor of the computer device implements claim 1 when executing the computer program Steps of the code test scheduling method described in any one of to 7. 10.一种计算机可读存储介质,所述可读存储介质上存储有计算机程序,其特征在于,所述可读存储介质存储的所述计算机程序被处理器执行时实现权利要求1至7任一项所述代码测试调度方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program stored in the readable storage medium is executed by a processor, any one of claims 1 to 7 is implemented. A step of the described code test scheduling method.
CN202011305890.9A 2020-11-20 2020-11-20 Code test scheduling method, apparatus, 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, apparatus, 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, apparatus, 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, apparatus, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112231233A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237431A (en) * 2022-08-12 2022-10-25 中国工商银行股份有限公司 Application delivery method and device
CN115658480A (en) * 2022-10-13 2023-01-31 东风商用车有限公司 Loosely-coupled script management method, device, equipment and storage medium

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237431A (en) * 2022-08-12 2022-10-25 中国工商银行股份有限公司 Application delivery method and device
CN115658480A (en) * 2022-10-13 2023-01-31 东风商用车有限公司 Loosely-coupled script management method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
CN112052141B (en) Data fragment verification method and device, computer equipment and readable storage medium
CN110597531B (en) Distributed module upgrading method and device and storage medium
US9092230B2 (en) Configuration of componentized software applications
CN111694592A (en) Management method and system for project version release
US20190384694A1 (en) Reproduction of testing scenarios in a continuous integration environment
CN112527484A (en) Workflow breakpoint continuous running method and device, computer equipment and readable storage medium
CN112364049A (en) Data synchronization script generation method, system, terminal and storage medium
CN112564979B (en) Execution method and device of construction task, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN113703821A (en) Cloud mobile phone updating method, device, equipment and storage medium
CN110661853A (en) Data proxy method, device, computer equipment and readable storage medium
CN110895472A (en) Method and device for identifying service change
CN114661423A (en) Cluster configuration detection method and device, computer equipment and storage medium
CN111161085A (en) Service request processing method and device, electronic equipment and computer readable medium
CN111722946A (en) Distributed transaction processing method and device, computer equipment and readable storage medium
CN112231233A (en) Code test scheduling method, apparatus, computer equipment and readable storage medium
CN114911590A (en) Task scheduling method and device, computer equipment and readable storage medium
CN114527974B (en) Method and device for realizing business function of software product and computer equipment
CN116599881B (en) Methods, apparatus, equipment and storage media for cloud platform tenant modeling and testing
CN118012453A (en) Software deployment method, device, electronic device, storage medium and program product
CN116382718A (en) Code offline deployment method, device, computer equipment and storage medium
CN110648219B (en) Method and device for standardizing input area of bank transaction system
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium and program product
KR102741697B1 (en) Method of analyzing the code of smart contracts on the block-chain and server performing the same

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210115

WD01 Invention patent application deemed withdrawn after publication