[go: up one dir, main page]

CN112732320A - Continuous integration method and device in software development process, electronic equipment and medium - Google Patents

Continuous integration method and device in software development process, electronic equipment and medium Download PDF

Info

Publication number
CN112732320A
CN112732320A CN202110050101.XA CN202110050101A CN112732320A CN 112732320 A CN112732320 A CN 112732320A CN 202110050101 A CN202110050101 A CN 202110050101A CN 112732320 A CN112732320 A CN 112732320A
Authority
CN
China
Prior art keywords
product
test
installation package
continuous integration
code
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.)
Granted
Application number
CN202110050101.XA
Other languages
Chinese (zh)
Other versions
CN112732320B (en
Inventor
杜祥伟
万月亮
火一莽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202110050101.XA priority Critical patent/CN112732320B/en
Publication of CN112732320A publication Critical patent/CN112732320A/en
Application granted granted Critical
Publication of CN112732320B publication Critical patent/CN112732320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • 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
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明实施例公开了一种软件开发过程的持续集成方法、装置、电子设备及介质,该方法包括:获取代码管理工具中的产品代码,并基于持续集成工具中的打包脚本将产品代码进行打包,以获得产品安装包;基于持续集成工具中的部署脚本将产品安装包部署至预设位置;基于持续集成工具中的测试脚本以及从代码管理工具中获取的测试用例,对预设位置的产品安装包进行测试;基于产品测试结果,将产品安装包发布至与产品测试结果相对应的发布区域。通过本发明实施例的技术方案,实现了开发和测试的持续集成的效果,提高了软件开发迭代的速度。

Figure 202110050101

Embodiments of the present invention disclose a continuous integration method, device, electronic device and medium for a software development process. The method includes: acquiring product codes in a code management tool, and packaging the product codes based on a packaging script in the continuous integration tool , to obtain the product installation package; deploy the product installation package to the preset location based on the deployment script in the continuous integration tool; The installation package is tested; based on the product test results, the product installation package is released to the release area corresponding to the product test results. Through the technical solutions of the embodiments of the present invention, the effect of continuous integration of development and testing is achieved, and the speed of software development iteration is improved.

Figure 202110050101

Description

Continuous integration method and device in software development process, electronic equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of software development, in particular to a continuous integration method and device in a software development process, electronic equipment and a medium.
Background
Software development needs to be completed by a research and development department, a testing department and an operation department together. As the delivery requirements of business products have increased, so has the demand for software development speed. Moreover, with the popularization of data center automation technology and configuration management tools, high requirements exist for the quality and speed of software development.
However, the work between the various departments required for software development is separate and independent, for example: and when the research and development department generates a product code according to the product requirement, the testing department is in an idle state and the like. The above process causes problems of high communication cost and long time consumption, and is difficult to meet the increasing requirement of software iteration speed.
Disclosure of Invention
The embodiment of the invention provides a continuous integration method, a continuous integration device, electronic equipment and a medium in a software development process, so as to realize the continuous integration of development and testing and improve the software development iteration speed.
In a first aspect, an embodiment of the present invention provides a method for continuously integrating a software development process, where the method includes:
acquiring a product code in a code management tool, and packaging the product code based on a packaging script in a continuous integration tool to obtain a product installation package;
deploying the product installation package to a preset position based on a deployment script in the continuous integration tool;
testing the product installation package at the preset position based on the test script in the continuous integration tool and the test case obtained from the code management tool;
and issuing the product installation package to an issuing area corresponding to the product test result based on the product test result.
In a second aspect, an embodiment of the present invention further provides an apparatus for continuously integrating a software development process, where the apparatus includes:
the installation package obtaining module is used for obtaining the product codes in the code management tool and packing the product codes based on the packing scripts in the continuous integration tool to obtain a product installation package;
the installation package deployment module is used for deploying the product installation package to a preset position based on a deployment script in the continuous integration tool;
the product testing module is used for testing the product installation package at the preset position based on a testing script in the continuous integration tool and a testing case obtained from the code management tool;
and the product release module is used for releasing the product installation package to a release area corresponding to the product test result based on the product test result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for continued integration of a software development process as described in any of the embodiments of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the continuous integration method of the software development process according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the product code in the code management tool is obtained, and the product code is packaged based on the packaging script in the continuous integration tool, so that the product installation package is obtained; deploying the product installation package to a preset position based on a deployment script in the continuous integration tool so as to conveniently perform subsequent testing on the product installation package; testing the product installation package at a preset position based on a test script in the continuous integration tool and a test case obtained from the code management tool; based on the product test result, the product installation package is published to the publishing area corresponding to the product test result, the problems that all departments of software development work independently and the communication cost is high are solved, the continuous integration effect of development and test is realized, and the software development iteration speed is increased.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a continuous integration method for a software development process according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a continuous integration method for a software development process according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a continuous integration method of a software development process according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of another method for continuously integrating software development processes according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a persistent integration apparatus for a software development process according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a method for continuously integrating a software development process according to an embodiment of the present invention, where the method is applicable to continuously integrating development and testing during software development, and the method may be executed by a continuous integration apparatus for a software development process, where the apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, and optionally, the electronic device may be a mobile terminal, and the like.
As shown in fig. 1, the method of this embodiment specifically includes the following steps:
s110, obtaining the product codes in the code management tool, and packaging the product codes based on the packaging scripts in the continuous integration tool to obtain the product installation package.
The code management tool may be platform software that implements functions of uploading, downloading, merging, and the like for codes, and may be, for example, Gitlab (open source project for warehouse management system) and the like. The product code can be code required by software development and can comprise code developed and written by various developers. The persistent integration tool may be a tool that monitors persistent repetitive work, and may be Jenkins (persistent integration tool based on Java development) or the like, for example. A packaging script may be a piece of script code that packages some specified program. The product installation package can be an installation package generated after the packaging script is executed, and is used for installing and executing the product. The product installation package can be an executable program in an exe format, and can also be a compressed package in a zip format, and the like.
Specifically, when a product code of a certain product needs to be subjected to a packaging test, the product code of the product stored in the code management tool may be acquired. When the product code of the product is detected to be completely acquired, the packaging script can be executed, and the product code is packaged to generate a product installation package for being transmitted to a test server or a test platform for subsequent test.
It should be noted that the product codes stored in the code management tool may be product codes corresponding to one or more products. For ease of management and retrieval, product codes for different products may be stored in different storage spaces in the code management tool, for example: storing the data in the storage space under the corresponding catalogue of different products, and the like.
And S120, deploying the product installation package to a preset position based on the deployment script in the continuous integration tool.
The deployment script may be a piece of script code for deploying and/or installing the product installation package. The preset location may be a location for testing a product installation package, and may be, for example, a test server or a test platform.
Specifically, the product installation package may be sent to a preset location based on a deployment script in the persistent integration tool. And, can also install the product installation package in order to obtain the product in preset position, be convenient for test this product installation package.
And S130, testing the product installation package at the preset position based on the test script in the continuous integration tool and the test case obtained from the code management tool.
The test script can be a script code for executing each test case and testing the product installation package. A test case may be a case of a set of test inputs, execution conditions, and expected results written for a requirement to test whether the product meets the requirement. The test cases may be stored in a code management tool. Optionally, in the code management tool, the test cases may be stored according to classification types, for example: and storing according to a function test, an usability test, an installability test, a GUI (Graphical User Interface) test, a compatibility test, a safety test and the like. Moreover, if the test cases corresponding to different products are different, the test cases may also be stored in correspondence with the product identifiers and the version identifiers.
Specifically, the test case corresponding to the product installation package may be obtained from the code management tool. Based on the test script in the continuous integration tool and each obtained test case, the product installation package at the preset position can be tested respectively.
Optionally, if the preset positions are multiple, different tests can be performed on the product installation packages at different preset positions. For example: the preset position comprises a function test platform and a safety test platform, and the function test can be carried out on the product installation package on the function test platform, the safety test can be carried out on the safety test platform, and the like.
It should be noted that the test cases corresponding to the product installation packages of different versions of the same product are different. For example, the 2.0 version of the product a has a function B added compared with the 1.0 version of the product a, and then the test case corresponding to the 2.0 version of the product a can be added with the test case for testing the function B compared with the 1.0 version.
And S140, based on the product test result, issuing the product installation package to an issuing area corresponding to the product test result.
Wherein the product test result may be a pass test or a fail test. The distribution area may be an area where the product installation package is distributed, and the distribution area may correspond to whether the product passes the test.
Specifically, based on the product test result, the product installation package can be released to different release areas for subsequent sale installation or redevelopment.
For example, if the product test result is that the product test result passes, the product installation package may be released to the installation area to be downloaded, so that the operator may sell and/or install the product installation package. If the product test result is that the product test result does not pass, the product installation package can be issued to a region to be redeveloped so that research personnel and testing personnel can redevelop and test the product installation package.
On the basis of the technical scheme, after the product installation package at the preset position is tested, a test report can be generated and fed back to the terminal equipment of research personnel.
The test report may be a report obtained by summarizing and analyzing a test result of each test case execution test.
Specifically, based on the test result of each test case, a test report corresponding to the product installation package may be automatically generated, and the test report may be sent to the terminal device of the research and development staff, for example: the method comprises the steps of sending the information to the terminal equipment of the research and development personnel in the form of mails or sending the information to the terminal equipment of the research and development personnel in the form of prompt messages. After the research and development personnel receive the test report, if the test result is that the test fails, the research and development personnel can modify or redevelop the product code according to the content of the test report.
On the basis of the technical scheme, the product installation package with the product test result passing can be stored in the product mirror image library so as to backup the product installation package.
According to the technical scheme of the embodiment of the invention, the product code in the code management tool is obtained, and the product code is packaged based on the packaging script in the continuous integration tool, so that the product installation package is obtained; deploying the product installation package to a preset position based on a deployment script in the continuous integration tool so as to conveniently perform subsequent testing on the product installation package; testing the product installation package at a preset position based on a test script in the continuous integration tool and a test case obtained from the code management tool; based on the product test result, the product installation package is published to the publishing area corresponding to the product test result, the problems that all departments of software development work independently and the communication cost is high are solved, the continuous integration effect of development and test is realized, and the software development iteration speed is increased.
Example two
Fig. 2 is a flowchart illustrating a continuous integration method for a software development process according to a second embodiment of the present invention, and on the basis of the foregoing embodiments, for the deployment of a product installation package, the present embodiment may refer to the technical solution of the present embodiment for a test mode. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 2, the method specifically includes the following steps:
s210, when the completion of the submission of each branch product code in the code management tool is detected, merging each branch product code based on the code management tool, and taking the merged code as a product code.
The branch product code may be part of product code that is responsible for development by different developers.
Specifically, when each developer completes development of a part of product codes in charge, the developed part of product codes can be uploaded to a code branch of the code management tool. When the uploading and submitting completion of each branch product code corresponding to the product code is detected, the merging operation in the code management tool can be called, and each branch product code is merged to obtain a complete product code.
It should be noted that, the advantage of setting different branch product codes is that each developer can be responsible for developing part of product codes respectively, so as to increase the development rate of product codes. Moreover, when the codes of all the branch products are merged, manual merging is not needed, so that the manpower resource can be saved, and errors in the code merging process can be avoided.
S220, obtaining the product codes in the code management tool, and packaging the product codes based on the packaging scripts in the continuous integration tool to obtain the product installation package.
And S230, deploying the product installation package to a preset position based on the deployment script in the continuous integration tool.
When the product installation package is deployed to the preset position, the product installation package can comprise two steps of deployment and installation. Optionally, the product installation package is deployed to the test server based on a deployment script in the persistent integration tool. And executing the product installation package, and installing the product to the test server.
Wherein, the test server can be a server for executing the product installation package test.
Specifically, based on a pre-programmed deployment script in the persistent integration tool, the product installation package may be sent and deployed to the test server for subsequent testing of the product installation package. In order to test the product corresponding to the product installation package, the product installation package may be executed to install the product to the test server. If the product installation package is an executable file in the exe format, the executable file may be run to install the product to the test server. If the product installation package is a zip-format compressed file, the compressed file can be decompressed to the test server. In this embodiment, the format and the installation manner of the product installation package are not specifically limited.
And S240, testing the product installation package at the preset position based on the test script in the continuous integration tool and the test case obtained from the code management tool.
In general, product development iterations can be developed based on product code of a last product development. When testing, the test cases can be divided into regression test cases used when testing the existing functions and new function test cases used when testing the new functions. At this time, the specific process of testing the product installation package based on the test case is as follows:
obtaining a regression test case and a new function test case from a code management tool; performing regression testing on the product installation package at a preset position based on a test script and a regression test case in the continuous integration tool; and performing new function test on the product installation package at the preset position based on the test script and the new function test case in the continuous integration tool.
Specifically, the regression test case and the new function test case corresponding to the product installation package can be obtained from the code management tool. Based on the test scripts and the regression test cases in the continuous integration tool, regression testing can be performed on the product installation package. And based on the test script in the continuous integration tool and each new function test case, performing new function test on the product installation package. The regression test is applied to the items in iteration, and the regression test is carried out on the old functions so as to verify whether the newly added functions can influence the old functions. The new function test is to test the newly added functions in the existing edition product installation package.
In order to complete the test of the product installation package at the preset position, the test case can be deployed to the preset position, so that the product installation package can be tested quickly. Packing and deploying the test case to a preset position, and then testing the product installation package, the specific steps are as follows:
step one, obtaining a test case in a code management tool, and packaging the test case based on a packaging script in a continuous integration tool to obtain a test case package.
Specifically, the test case corresponding to the product installation package may be obtained from the code management tool. The packaging script can be executed, and the test case is packaged to generate a test case package for testing the product installation package.
And step two, deploying the test case package to a preset position based on the deployment script in the continuous integration tool.
Specifically, the test case package can be sent to the same preset position as the product installation package based on the deployment script in the persistent integration tool. Moreover, the test case package can be decompressed or installed at a preset position, and other operations can be carried out, so that each complete test case can be obtained, and the product installation package can be conveniently tested.
And step three, testing the product installation package at the preset position based on the test script in the continuous integration tool and each test case in the test case package.
Specifically, each test case stored at a preset position is used for testing the product installation package. And respectively testing the product installation package at the preset position based on the test script in the continuous integration tool and each test case at the preset position.
And S250, feeding back the test process of each test case.
The test process can be the completion condition of each test case and is used for prompting the progress of the product installation package test of research personnel and testers and the sub-test results corresponding to each test case. The sub-test results may be test results corresponding to test cases.
Specifically, all test cases, test states, and sub-test results used when testing the product installation package may be recorded in the form of a table or a document. After the execution of the current test case is completed, the state corresponding to the current test case may be modified from incomplete to complete, for example: the test state of the test case can be marked in the form of characters or colors. And updating the sub-test result corresponding to the current test case according to the test result of the current test case, such as passing or failing.
For example, the names of the test cases that pass the test in the completed test cases may be displayed in green, the names of the test cases that fail the test in red, and the names of the test cases that do not pass the test in black, so that the technician can clearly and accurately determine the test progress.
Optionally, the identifier of the completed test case and the sub-test result of the completed test case are fed back; and feeding back the identification of the current test case and the identification of the uncompleted test case.
The identifiers of the test cases may be identifiers for distinguishing different test cases, may be in the form of character strings, and the like, and the identifiers of the test cases correspond to the test cases one to one.
Specifically, the identifier of the test case that has completed the test and the subtest result may be fed back, and the identifier of the current test case and the identifier of the uncompleted test case may be fed back. The content can be fed back to terminal equipment of research personnel and testing personnel, so that the research personnel and the testing personnel can obtain the current testing process in time. When the sub-test result of a certain test case is failed, the research and development personnel can correct the part corresponding to the failed test case in the product installation package, and the test personnel can also check the test case according to the test case, so that the product code and the test case can be started to check when the test is not completely finished.
It should be noted that the benefit of the test process of feeding back each test case is: the test process can be real-time and transparent. In the prior art, due to the state that the test department is separated from the research and development department, the research and development department can only wait for the test report fed back by the test department after all tests are completed, and research and development personnel modify the product code according to the test report. The test processes of the test cases are fed back in real time and transparently, so that research and development personnel can modify the product codes in real time according to the test processes without waiting for the modification of the product codes after all tests are completed, the cooperation efficiency of a research and development department and a test department is improved, and the iterative development efficiency of the products is further improved.
And S260, based on the product test result, releasing the product installation package to a release area corresponding to the product test result.
When the test is detected to be finished, determining a product test result based on the sub-test results corresponding to the test cases; if the product test result is passed, the product installation package is issued to an installation area to be downloaded; and if the product test result is that the product test result does not pass, the product installation package is issued to the area to be re-developed.
Specifically, when the test is detected to be completed, the sub-test results corresponding to each test case can be obtained, and if all the sub-test results pass, the product test result can be determined to pass; if at least one of the sub-test results is not passed, the product test result can be determined to be not passed. Or if the sub-test result passing the test exceeds the preset number or the preset proportion, determining that the product test result passes, and otherwise, determining that the product test result does not pass. If the product test result is passed, the product installation package is released to the installation area to be downloaded, so that operators and/or sales personnel can obtain the product installation package, and the product installation package is publicized, sold and the like. And if the product test result is failed, the product installation package is issued to a region to be redeveloped, so that research and development personnel modify or redevelop the product installation package.
According to the technical scheme of the embodiment of the invention, when the completion of the submission of each branch product code in the code management tool is detected, each branch product code is merged based on the code management tool, and the merged code is used as a product code, so that program codes developed by a plurality of developers can be automatically integrated; acquiring a product code in a code management tool, and packaging the product code based on a packaging script in a continuous integration tool to obtain a product installation package; deploying the product installation package to a preset position based on a deployment script in the continuous integration tool so as to conveniently perform subsequent testing on the product installation package; testing the product installation package at a preset position based on a test script in the continuous integration tool and a test case obtained from the code management tool; feeding back the test process of each test case to ensure that the test process is transparent and real-time; based on the product test result, the product installation package is published to the publishing area corresponding to the product test result, the problems that all departments of software development work independently and the communication cost is high are solved, the continuous integration effect of development and test is realized, and the software development iteration speed is increased.
EXAMPLE III
Fig. 3 is a schematic diagram of a continuous integration method for a software development process according to a third embodiment of the present invention, wherein explanations of terms that are the same as or correspond to the above-mentioned embodiments are not repeated herein.
As shown in fig. 3, the continuous integration method of the software development process is as follows:
each developer can upload the developed code to a branch (develop branch) corresponding to the code in a code hosting platform (code management tool). Wherein the code hosting platform can be a git/svn platform. When it is detected that the code in each develop branch is uploaded, the codes in each develop branch may be merged (Merge operation), and the merged code may be stored in a main branch (master branch).
And acquiring a code in the master branch, and sending the code to a packing platform which is constructed in jenkins (continuous integration tools) in advance so as to construct and pack the code, thereby obtaining a product installation package (test package). Performing regression testing, namely automatic testing, on the product installation package, and if the regression testing fails, feeding back a regression testing result to a developer; if the regression test is passed, performing a new function test on the product installation package, and if the new function test is not passed, feeding back a new function test result to a developer; and if the new function test passes, storing the product installation package into a product version mirror library of the test area, and generating a test report. And the product installation package is set as a formal package and is released to a product release area for a client to use. The client can feed back relevant problems of the product in the using process, and when the technical problems fed back by the client are received, the technical problems can be sent to the terminal equipment of the developer, so that the developer can continuously and iteratively develop the product.
Fig. 4 is a schematic diagram of another continuous integration method for a software development process according to a third embodiment of the present invention, wherein explanations of terms that are the same as or correspond to the above-mentioned embodiments are not repeated herein.
As shown in fig. 4, the continuous integration method of the software development process is as follows:
the tester can upload each test case to the code hosting platform, and the developer can upload the developed code to the code hosting platform. When the fact that the codes in the develop branches are uploaded is detected to be completed, Merge operation can be conducted on the codes in the develop branches, and the codes of the Merge operation are stored in the master branch.
And acquiring codes in the master branches of the test part and the development part, and sending the codes to a packing platform which is constructed in jenkins in advance so as to construct and pack the test cases and the development codes to obtain a test case package and a product installation package. Based on a deployment script in jenkins, the test case package and the product installation package can be deployed to a test server. On the test server, regression testing can be performed on the product installation package, and the regression testing can include function testing, performance testing and the like. On the test server, new function test can be carried out on the product installation package, iterative test can be carried out on the product test package based on a new function test case compiled by a tester aiming at the new function, the test case of the new function test can be fed back to a test part in the code hosting platform and used as a regression test case in the next test, and the purpose of case accumulation is achieved.
And when the test is finished, generating a test report according to the test result, and sending the test report to a version test report module of the test platform. If the test result is that the test is passed, the product installation package can be sent to a product version mirror library of the test platform for backup use, and the end of the test is prompted. If the test result is that the test fails, the test result can be fed back to the terminal equipment of the developer, and the test is prompted to be finished.
The test platform can also have the functions of user management, project management, task management, underlying interface service and the like. The method and the system can distribute the process, resources, personnel, servers and the like of product testing based on the test platform, and can issue test tasks to the test server based on the test platform.
The embodiment of the invention reduces the participation of personnel in each link in the software development life cycle through the code hosting tool and the continuous integration tool, can realize the full-automatic management of the software development life cycle, and improves the iteration speed and the delivery quality of the software.
According to the technical scheme, product codes are submitted in the code hosting platform through developers, test cases are submitted in the code hosting platform by testers, when the fact that the product codes are submitted completely is detected, operation of combining the codes is triggered, a construction and packaging task in jenkins is triggered, then an automatic installation and deployment task and an automatic test task in the jenkins are sequentially triggered, a test report is generated according to the automatic test task, and the product installation package is issued to a distribution area, the problem that all departments of software development work independently of one another, communication cost is high is solved, the continuous integration effect of development and testing is achieved, and the iteration speed of the software development is improved.
Example four
Fig. 5 is a schematic structural diagram of a persistent integration apparatus for a software development process according to a fourth embodiment of the present invention, where the apparatus includes: an installation package obtaining module 510, an installation package deploying module 520, a product testing module 530 and a product publishing module 540.
The installation package obtaining module 510 is configured to obtain a product code in a code management tool, and package the product code based on a packaging script in a continuous integration tool to obtain a product installation package; an installation package deployment module 520, configured to deploy the product installation package to a preset location based on a deployment script in the persistent integration tool; a product testing module 530, configured to test the product installation package at the preset location based on a test script in the persistent integration tool and a test case obtained from the code management tool; and a product publishing module 540, configured to publish the product installation package to a publishing area corresponding to the product test result based on the product test result.
Optionally, the apparatus further comprises: and the branch product code merging module is used for merging the branch product codes based on the code management tool when the completion of the submission of the branch product codes in the code management tool is detected, and taking the merged codes as product codes.
Optionally, the installation package deployment module 520 is further configured to deploy the product installation package to the test server based on the deployment script in the persistent integration tool; executing the product installation package, and installing the product to the test server.
Optionally, the product testing module 530 is further configured to obtain a regression test case and a new function test case from the code management tool; performing regression testing on the product installation package at the preset position based on the test script in the continuous integration tool and the regression test case; and performing new function test on the product installation package at the preset position based on the test script in the continuous integration tool and the new function test case.
Optionally, the product testing module 530 is further configured to obtain a test case in the code management tool, and package the test case based on the packaging script in the persistent integration tool to obtain a test case package; deploying the test case package to a preset position based on a deployment script in the continuous integration tool; and testing the product installation package at the preset position based on the test script in the continuous integration tool and each test case in the test case package.
Optionally, the apparatus further comprises: and the test process feedback module is used for feeding back the test process of each test case.
Optionally, the product release module 540 is further configured to determine a product test result based on the sub-test result corresponding to each test case when the test is completed; if the product test result is passed, the product installation package is issued to an installation area to be downloaded; and if the product test result is that the product test result does not pass, the product installation package is issued to a to-be-redeveloped area.
According to the technical scheme of the embodiment of the invention, the product code in the code management tool is obtained, and the product code is packaged based on the packaging script in the continuous integration tool, so that the product installation package is obtained; deploying the product installation package to a preset position based on a deployment script in the continuous integration tool so as to conveniently perform subsequent testing on the product installation package; testing the product installation package at a preset position based on a test script in the continuous integration tool and a test case obtained from the code management tool; based on the product test result, the product installation package is published to the publishing area corresponding to the product test result, the problems that all departments of software development work independently and the communication cost is high are solved, the continuous integration effect of development and test is realized, and the software development iteration speed is increased.
The continuous integration device for the software development process provided by the embodiment of the invention can execute the continuous integration method for the software development process provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 60 suitable for use in implementing embodiments of the present invention. The electronic device 60 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the electronic device 60 is in the form of a general purpose computing device. The components of the electronic device 60 may include, but are not limited to: one or more processors or processing units 601, a system memory 602, and a bus 603 that couples various system components including the system memory 602 and the processing unit 601.
Bus 603 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 60 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 60 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 602 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)604 and/or cache memory 605. The electronic device 60 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 606 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 603 by one or more data media interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 608 having a set (at least one) of program modules 607 may be stored, for example, in memory 602, such program modules 607 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
Electronic device 60 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), with one or more devices that enable a user to interact with electronic device 60, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 60 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 611. Also, the electronic device 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 612. As shown, the network adapter 612 communicates with the other modules of the electronic device 60 via the bus 603. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with electronic device 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 601 executes various functional applications and data processing by executing programs stored in the system memory 602, for example, implementing a continuous integration method of a software development process provided by an embodiment of the present invention.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for continuous integration of a software development process, the method comprising:
acquiring a product code in a code management tool, and packaging the product code based on a packaging script in a continuous integration tool to obtain a product installation package;
deploying the product installation package to a preset position based on a deployment script in the continuous integration tool;
testing the product installation package at the preset position based on the test script in the continuous integration tool and the test case obtained from the code management tool;
and based on the product test result, issuing the product installation package to an issuing area corresponding to the test result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1.一种软件开发过程的持续集成方法,其特征在于,包括:1. a continuous integration method for a software development process, characterized in that, comprising: 获取代码管理工具中的产品代码,并基于持续集成工具中的打包脚本将所述产品代码进行打包,以获得产品安装包;Obtain the product code in the code management tool, and package the product code based on the packaging script in the continuous integration tool to obtain a product installation package; 基于所述持续集成工具中的部署脚本将所述产品安装包部署至预设位置;Deploying the product installation package to a preset location based on the deployment script in the continuous integration tool; 基于所述持续集成工具中的测试脚本以及从所述代码管理工具中获取的测试用例,对所述预设位置的所述产品安装包进行测试;testing the product installation package in the preset location based on the test script in the continuous integration tool and the test case obtained from the code management tool; 基于产品测试结果,将所述产品安装包发布至与所述产品测试结果相对应的发布区域。Based on the product test result, the product installation package is released to a release area corresponding to the product test result. 2.根据权利要求1所述的方法,其特征在于,在所述获取代码管理工具中的产品代码之前,还包括:2. The method according to claim 1, characterized in that, before said obtaining the product code in the code management tool, further comprising: 当检测到代码管理工具中的各分支产品代码提交完成时,基于所述代码管理工具合并所述各分支产品代码,并将合并后的代码作为产品代码。When it is detected that the submission of each branch product code in the code management tool is completed, the respective branch product codes are merged based on the code management tool, and the merged code is used as the product code. 3.根据权利要求1所述的方法,其特征在于,所述基于所述持续集成工具中的部署脚本将所述产品安装包部署至预设位置,包括:3. The method according to claim 1, wherein the deploying the product installation package to a preset location based on a deployment script in the continuous integration tool comprises: 基于所述持续集成工具中的部署脚本将所述产品安装包部署至测试服务器;Deploying the product installation package to the test server based on the deployment script in the continuous integration tool; 执行所述产品安装包,将所述产品安装至所述测试服务器。Execute the product installation package to install the product to the test server. 4.根据权利要求1所述的方法,其特征在于,所述基于所述持续集成工具中的测试脚本以及从所述代码管理工具中获取的测试用例,对所述预设位置的所述产品安装包进行测试,包括:4. The method according to claim 1, wherein, based on the test script in the continuous integration tool and the test case obtained from the code management tool, the product in the preset location is Install the package for testing, including: 从所述代码管理工具中获取回归测试用例以及新功能测试用例;Obtain regression test cases and new function test cases from the code management tool; 基于所述持续集成工具中的测试脚本以及所述回归测试用例,对所述预设位置的所述产品安装包进行回归测试;Based on the test script in the continuous integration tool and the regression test case, perform regression testing on the product installation package in the preset location; 基于所述持续集成工具中的测试脚本以及所述新功能测试用例,对所述预设位置的所述产品安装包进行新功能测试。Based on the test script in the continuous integration tool and the new function test case, a new function test is performed on the product installation package in the preset location. 5.根据权利要求1所述的方法,其特征在于,所述基于所述持续集成工具中的测试脚本以及从所述代码管理工具中获取的测试用例,对所述预设位置的所述产品安装包进行测试,包括:5. The method according to claim 1, wherein, based on the test script in the continuous integration tool and the test case obtained from the code management tool, the product in the preset location is Install the package for testing, including: 获取所述代码管理工具中的测试用例,并基于所述持续集成工具中的打包脚本将所述测试用例进行打包,以获得测试用例包;Obtain the test case in the code management tool, and package the test case based on the packaging script in the continuous integration tool to obtain a test case package; 基于所述持续集成工具中的部署脚本将所述测试用例包部署至预设位置;Deploying the test case package to a preset location based on the deployment script in the continuous integration tool; 基于所述持续集成工具中的测试脚本以及所述测试用例包中的各测试用例,对所述预设位置的产品安装包进行测试。Based on the test script in the continuous integration tool and each test case in the test case package, the product installation package in the preset location is tested. 6.根据权利要求1所述的方法,其特征在于,在所述对所述预设位置的所述产品安装包进行测试之后,还包括:6. The method according to claim 1, wherein after the testing the product installation package in the preset location, the method further comprises: 反馈各测试用例的测试进程。Feedback on the testing progress of each test case. 7.根据权利要求1所述的方法,其特征在于,所述基于产品测试结果,将所述产品安装包发布至与所述产品测试结果相对应的发布区域,包括:7. The method according to claim 1, wherein the releasing the product installation package to a release area corresponding to the product testing result based on the product testing result comprises: 当检测到测试完成时,基于各测试用例所对应的子测试结果确定产品测试结果;When it is detected that the test is completed, the product test result is determined based on the sub-test results corresponding to each test case; 若所述产品测试结果为通过,则将所述产品安装包发布至待下载安装区;If the product test result is passed, the product installation package is released to the installation area to be downloaded; 若所述产品测试结果为不通过,则将所述产品安装包发布至待重新开发区。If the product test result is not passed, the product installation package is released to the area to be redeveloped. 8.一种软件开发过程的持续集成装置,其特征在于,包括:8. A continuous integration device for a software development process, comprising: 安装包获取模块,用于获取代码管理工具中的产品代码,并基于持续集成工具中的打包脚本将所述产品代码进行打包,以获得产品安装包;an installation package acquisition module, used to acquire the product code in the code management tool, and package the product code based on the packaging script in the continuous integration tool to obtain a product installation package; 安装包部署模块,用于基于所述持续集成工具中的部署脚本将所述产品安装包部署至预设位置;an installation package deployment module, configured to deploy the product installation package to a preset location based on the deployment script in the continuous integration tool; 产品测试模块,用于基于所述持续集成工具中的测试脚本以及从所述代码管理工具中获取的测试用例,对所述预设位置的所述产品安装包进行测试;a product testing module, configured to test the product installation package in the preset location based on the test script in the continuous integration tool and the test case obtained from the code management tool; 产品发布模块,用于基于产品测试结果,将所述产品安装包发布至与所述产品测试结果相对应的发布区域。A product release module, configured to release the product installation package to a release area corresponding to the product test result based on the product test result. 9.一种电子设备,其特征在于,所述电子设备包括:9. An electronic device, characterized in that the electronic device comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的软件开发过程的持续集成方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a continuous integration method for a software development process as claimed in any one of claims 1-7. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的软件开发过程的持续集成方法。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the continuous integration method for a software development process according to any one of claims 1-7 is implemented.
CN202110050101.XA 2021-01-14 2021-01-14 Continuous integration method and device for software development process, electronic equipment and medium Active CN112732320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110050101.XA CN112732320B (en) 2021-01-14 2021-01-14 Continuous integration method and device for software development process, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110050101.XA CN112732320B (en) 2021-01-14 2021-01-14 Continuous integration method and device for software development process, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112732320A true CN112732320A (en) 2021-04-30
CN112732320B CN112732320B (en) 2024-05-10

Family

ID=75593151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110050101.XA Active CN112732320B (en) 2021-01-14 2021-01-14 Continuous integration method and device for software development process, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112732320B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481030A (en) * 2022-09-21 2022-12-16 平安银行股份有限公司 Automatic testing method, device, terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032625A (en) * 2018-09-04 2018-12-18 山东浪潮云投信息科技有限公司 A kind of software continuous integrated approach and device
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integration automated testing methods, devices, equipment and media
JP2019125042A (en) * 2018-01-12 2019-07-25 株式会社日立製作所 Test execution order generation device, test execution order generation method and storage medium
CN110362469A (en) * 2019-05-28 2019-10-22 中国平安人寿保险股份有限公司 Based on modular testing use-case control method, device, terminal and storage medium
US20200104243A1 (en) * 2018-09-28 2020-04-02 Arm Limited Automated test coverage of computing systems
CN111324522A (en) * 2018-12-13 2020-06-23 北京数聚鑫云信息技术有限公司 Automatic test system and method
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019125042A (en) * 2018-01-12 2019-07-25 株式会社日立製作所 Test execution order generation device, test execution order generation method and storage medium
CN109032625A (en) * 2018-09-04 2018-12-18 山东浪潮云投信息科技有限公司 A kind of software continuous integrated approach and device
US20200104243A1 (en) * 2018-09-28 2020-04-02 Arm Limited Automated test coverage of computing systems
CN111324522A (en) * 2018-12-13 2020-06-23 北京数聚鑫云信息技术有限公司 Automatic test system and method
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integration automated testing methods, devices, equipment and media
CN110362469A (en) * 2019-05-28 2019-10-22 中国平安人寿保险股份有限公司 Based on modular testing use-case control method, device, terminal and storage medium
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王吉茂 等: "软件测试用例执行优化研究", 计算机工程与设计, vol. 34, no. 12, 16 December 2013 (2013-12-16), pages 4242 - 4246 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481030A (en) * 2022-09-21 2022-12-16 平安银行股份有限公司 Automatic testing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112732320B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN109960643B (en) Code testing method and device
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
CN108287694A (en) Application builds method, system, computer equipment and storage medium
WO2020140820A1 (en) Software testing method, system, apparatus, device, medium, and computer program product
US8091066B2 (en) Automated multi-platform build and test environment for software application development
US20080120602A1 (en) Test Automation for Business Applications
CN108334437A (en) It is a kind of that acceptance method is delivered based on the software continuous of continuous integrating and automatic test
WO2016177124A1 (en) Method and device for implementing continuous integration test
CN111290941B (en) Testing method, device, computing equipment and medium for multiple interfaces
US8145942B2 (en) Methods and systems for troubleshooting remote systems through recreation of remote system scenarios
CN115576539A (en) Continuous integration method, device, equipment and medium of software data
CN114297056A (en) An automated testing method and system
CN109977012A (en) Joint debugging test method, device, equipment and the computer readable storage medium of system
US8661414B2 (en) Method and system for testing an order management system
EP2913757A1 (en) Method, system, and computer software product for test automation
CN113254350A (en) Flink operation testing method, device, equipment and storage medium
CN112732320B (en) Continuous integration method and device for software development process, electronic equipment and medium
CN115809076A (en) ECU software automation integration method and system
CN112527312B (en) Test method and test device for embedded system
CN111400191B (en) Webpage security testing method and device and computer readable storage medium
KR102024275B1 (en) Test program development system and its method using script
CN107992420A (en) Put forward the management method and system of survey project
CN112181855A (en) An API-based automated testing method, device and computer equipment
CN119166531A (en) Disk array card firmware integration test method, terminal and storage medium
CN114510428B (en) Automated Testing Methods and Systems for Software Development

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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Continuous integration methods, devices, electronic equipment, and media for the software development process

Granted publication date: 20240510

Pledgee: Ping An Bank Ltd. Beijing branch

Pledgor: RUN TECHNOLOGIES Co.,Ltd. BEIJING

Registration number: Y2025980030334

PP01 Preservation of patent right

Effective date of registration: 20251217

Granted publication date: 20240510