CN106407100A - Method and apparatus for realizing continuous integration testing - Google Patents
Method and apparatus for realizing continuous integration testing Download PDFInfo
- Publication number
- CN106407100A CN106407100A CN201510454985.XA CN201510454985A CN106407100A CN 106407100 A CN106407100 A CN 106407100A CN 201510454985 A CN201510454985 A CN 201510454985A CN 106407100 A CN106407100 A CN 106407100A
- Authority
- CN
- China
- Prior art keywords
- test
- software
- smoke
- testing
- integration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by 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
The invention discloses a method and an apparatus for realizing continuous integration testing. The method comprises the steps of performing smoke testing on a basic function of software needed to be subjected to integration testing; and after the smoke testing succeeds, performing the integration testing on the software. According to the method, the basic function of the software needed to be subjected to the integration testing is subjected to the smoke testing, so that the influence on testing of test cases of the integration testing and execution of related test script execution tasks of the test cases due to exception of the basic function is avoided, and the working efficiency of the continuous integration testing is improved.
Description
Technical Field
The present invention relates to testing technologies, and in particular, to a method and an apparatus for implementing a persistent integration test.
Background
In the software development process, the software needs to be manually processed in updating, compiling, packaging, distributing, starting, automatic testing and the like, and much manpower and time resources are occupied. The continuous integration technology decomposes the software development process into a plurality of steps, integrates the steps by using a continuous integration tool to complete the automatic construction of the software development, tests the test cases of the software after the automatic construction is completed, then discovers errors in the integrated software and reduces the consumption of manpower and time resources in the software development process through manual processing.
Existing persistent integration technologies are mainly used for: the modified program is automatically compiled, and the successfully compiled program is tested; the problem of low utilization rate of a test environment or an agent machine is solved. However, for large-scale software development projects, due to complex functions, many tests are involved, if continuous integration is adopted to directly perform automatic construction and test case testing, if software has a problem of basic functions, the tests of the integrated test cases in all test environments are abnormal due to the problem of the basic functions, the tests of the software test cases cannot be performed after the automatic construction is completed, the execution tasks of the related test scripts of all subsequent test cases cannot be performed, and the testing efficiency of the continuous integration is greatly reduced.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device for realizing continuous integration test, which can improve the working efficiency of the continuous integration test.
In order to achieve the object of the present invention, the present invention provides a method for implementing a persistent integration test, comprising:
performing smoke test on the basic function of the software needing to be subjected to the integration test;
and after the smoke test is successful, performing integrated test on the software.
Further, the smoking test specifically includes:
updating the software needing integration test and compiling codes;
packaging the software needing the integration test after the code is compiled;
distributing the packaged software to a corresponding testing environment of the smoking test according to the smoking test requirement;
and starting and running the basic functions of each packaged software in the test environment distributed to the smoking test so as to complete the smoking test.
Further, before distributing the packaged software to the test environment of the corresponding smoking test, the method further comprises:
determining whether the packaged software is distributed to two or more test environments for smoking test according to the smoking test requirement;
and when the packaged software needs to be distributed to two or more testing environments for smoking test, calling a distribution task to distribute the packaged software to the corresponding testing environments for smoking test.
Further, the continuous integration test is a test based on Jenkins continuous integration tool.
On the other hand, the present application further provides a device for implementing a continuous integration test, including: a smoke test unit and an integrated test unit; wherein,
the smoke test unit is used for performing smoke test on the basic functions of the software which needs to be subjected to the integrated test;
and the integrated test unit is used for performing integrated test on the software after the smoking test is successful.
Further, the smoke test unit is particularly useful for,
updating the software needing integration test and compiling codes;
packaging the software needing the integration test after the code is compiled;
distributing the packaged software to a corresponding testing environment of the smoking test according to the smoking test requirement;
and starting and running the basic functions of each packaged software in the test environment distributed to the smoking test so as to complete the smoking test.
Further, the device also comprises a distribution unit which is used for distributing the packaged software to the corresponding testing environment of the smoking test,
determining whether the packaged software is distributed to two or more test environments for smoking test according to the smoking test requirement;
and when the packaged software needs to be distributed to two or more testing environments for smoking test, calling a distribution task to distribute the packaged software to the corresponding testing environments for smoking test.
Further, the continuous integration test is a test based on Jenkins continuous integration tool.
Compared with the prior art, the technical scheme of the application comprises the following steps: performing smoke test on the basic function of the software needing to be subjected to the integration test; and after the smoke test is successful, performing integrated test on the software. The method carries out the smoke test through the basic function of the software which needs to carry out the integration test, avoids the influence of the basic function abnormality on the test case test of the integration test and the execution of the test case related test script execution task, and improves the working efficiency of the continuous integration test.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of implementing a continuous integration test of the present invention;
FIG. 2 is a structural diagram of an apparatus for implementing the continuous integration test according to the present invention;
FIG. 3 is a flowchart of a method according to a first embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a flowchart of a method for implementing persistent integration test according to the present invention, as shown in fig. 1, including:
step 100, performing smoking test on the basic functions of software needing integration test;
the smoking test specifically comprises:
updating the software needing integration test and compiling codes;
packaging the software needing the integration test after the code is compiled;
distributing the packaged software to a corresponding testing environment of the smoking test according to the smoking test requirement;
starting and operating the basic functions of each packaged software distributed in the testing environment of the smoking test, wherein the smoking test is successful when the basic functions are normal; otherwise, the smoking test fails.
It should be noted that the software requiring the integration test is updated, compiled and packaged, and belongs to the conventional technical means of those skilled in the art; the smoke test requirement is the content of analysis and arrangement of the smoke test performed by the technicians in the field, and belongs to the conventional technical means of the technicians in the field; the smoke test process needs to perform script editing for the basic functions of the software, and the script editing for the basic functions of the software belongs to the conventional technical means of the technicians in the field.
In addition, if the smoking test fails, the technician performs error correction on the software according to the smoking test result, and performs a new round of smoking test according to the smoking test steps after the error correction is completed.
Before distributing the packaged software to the corresponding testing environment of the smoking test, the method of the invention also comprises the following steps:
determining whether the packaged software is distributed to two or more test environments for smoking test according to the smoking test requirement;
and when the packaged software needs to be distributed to two or more testing environments for smoking test, calling a distribution task to distribute the packaged software to the corresponding testing environments for smoking test.
It should be noted that, if only the packaged software needs to be allocated to a smoking test environment, it is not necessary to invoke a distribution task to allocate, and the software is directly configured to the smoking test environment.
And step 101, after the smoking test is successful, performing an integrated test on the software.
It should be noted that the integration test of software is a conventional technical means for those skilled in the art, and is not described herein.
The method disclosed by the invention is realized on the basis of a Jenkins continuous integration tool. Here, Jenkins is an open source software project, and aims to provide an open and easy-to-use software platform, so that continuous integration of software becomes possible. Through Jenkins, a designated time or a code can be set to trigger a task when being updated, and each subtask decomposed in the continuous integration test can be effectively organized, so that the automatic test of the continuous integration test becomes possible, and the execution efficiency of the automatic test is greatly improved.
The method carries out the smoke test through the basic function of the software which needs to carry out the continuous integration test, avoids the influence on the test case test of the integration test and the execution of the test script execution task related to the test case caused by the abnormal basic function, and improves the working efficiency of the continuous integration test.
Fig. 2 is a structural diagram of an apparatus for implementing the persistent integration test according to the present invention, as shown in fig. 2, including: a smoke test unit and an integrated test unit; wherein,
the smoke test unit is used for performing smoke test on the basic functions of the software which needs to be subjected to the integrated test;
and the integrated test unit is used for performing integrated test on the software after the smoking test is successful.
The smoke test unit is particularly useful for,
updating the software needing integration test and compiling codes;
packaging the software needing the integration test after the code is compiled;
distributing the packaged software to a corresponding testing environment of the smoking test according to the smoking test requirement;
and starting and running the basic functions of each packaged software in the test environment distributed to the smoking test so as to complete the smoking test.
The device of the invention also comprises a distribution unit which is used for distributing the packaged software to the corresponding testing environment of the smoking test,
determining whether the packaged software is distributed to two or more test environments for smoking test according to the smoking test requirement;
and when the packaged software needs to be distributed to two or more testing environments for smoking test, calling a distribution task to distribute the packaged software to the corresponding testing environments for smoking test.
The continuous integration test is a continuous integration test based on Jenkins continuous integration tools.
The process of the present invention is illustrated in clear detail below by means of specific examples, which are only intended to illustrate the invention and are not intended to limit the scope of the process of the invention.
Example 1
The sustained integration test of the present embodiment is a test performed based on Jenkins sustained integration tool, and fig. 3 is a flowchart of a method according to a first embodiment of the present invention, as shown in fig. 3, including:
step 300, detecting a code of software needing integration test from a code svn server to a local compiling environment; here, SVN is a abbreviation of Subversion, and is an open source code version control system, and compared with converged communication (RCS) and CVS (CVS is a C/S system, and is a common code version control software). Many version control services on the internet have migrated from CVS to Subversion.
It should be noted that, according to the setting of Jenkins persistent integration tool, step 300 triggers execution when a code update of the software requiring persistent integration test is submitted to the code svn server or a preset time for executing the persistent integration test is reached.
Step 301, performing code compilation on the codes detected to the local compilation environment;
in the step, if the code compiling is wrong, the error is continuously integrated to inform and feed back error information; after the code compiling error is resolved and updated to the code svn server, step 300 is executed again, and this part of the processing is a conventional technical means for those skilled in the art. If the code is compiled without errors, recording the version information of the software;
step 302, packaging the software which needs to be integrated and tested after the code is compiled; the packaged software can be conveniently distributed to a test environment for use; here, the address and path of the packaged software need to be recorded to perform subsequent distribution of the packaged software to the corresponding testing environment of the smoking test.
Step 303, calling an automatic test tool module, and transmitting a smoking test mode to the automatic test tool through a Jenkins continuous integration tool; the automatic testing tool firstly judges that the smoking test is currently performed, and reads a configuration file of a testing environment of the smoking test based on the smoking test to obtain a required testing environment;
step 304, distributing the packaged software to a corresponding testing environment of the smoking test according to the smoking test requirement;
the method specifically comprises the following steps:
if only one test environment is needed according to the smoking test requirement, the code compiling environment is configured to be the smoking test environment after the completion of the packaging under the code compiling environment, and the packaged software is directly distributed to the code compiling environment; the software is directly started in the compiling environment, so that the testing efficiency can be improved to a certain extent;
and if the packaged software needs to be distributed to two or more testing environments for smoking testing according to the smoking testing requirement, calling a distribution task to distribute the packaged software to the corresponding testing environments for smoking testing.
305, starting and executing the packaged software in the test environment by the automatic test tool; here, if the basic functions in the smoking test are all normal, the smoking test is successful; otherwise, the smoking test fails.
It should be noted that when the smoking test fails, the problem of basic function abnormality is notified to the technician through the persistent integration system, and after the problem is solved, the code of the software in the code svn server is updated, and the smoking test is started from step 300 according to the process of the smoking test.
Step 306, after the smoking test is successful, performing an integration test on the software;
specifically, an automatic test tool is called, an integrated test mode is transmitted to the automatic test tool through a Jenkins continuous integration tool, and the automatic test tool reads a test environment configuration file of the integrated test to acquire required test environment information;
the automatic testing tool distributes the packaging software to the acquired integrated testing environment; here, the acquired integrated test environment is a conventional technical means for those skilled in the art;
the automatic test tool starts an integrated test environment, runs software in the test environment, and completes the test of the software integrated test case and the execution of the test script execution task related to the test case.
In the embodiment, the basic functions of the software are tested through the smoking test, so that the environmental damage caused by the abnormal basic functions in the software integration test process is avoided, the integration test can complete the execution of the test steps related to the test cases, the purpose of the integration test is achieved, and the working efficiency of the continuous integration test is improved.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (8)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510454985.XA CN106407100A (en) | 2015-07-29 | 2015-07-29 | Method and apparatus for realizing continuous integration testing |
| PCT/CN2016/076617 WO2016177124A1 (en) | 2015-07-29 | 2016-03-17 | Method and device for implementing continuous integration test |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510454985.XA CN106407100A (en) | 2015-07-29 | 2015-07-29 | Method and apparatus for realizing continuous integration testing |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106407100A true CN106407100A (en) | 2017-02-15 |
Family
ID=57218464
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510454985.XA Pending CN106407100A (en) | 2015-07-29 | 2015-07-29 | Method and apparatus for realizing continuous integration testing |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106407100A (en) |
| WO (1) | WO2016177124A1 (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107239402A (en) * | 2017-06-12 | 2017-10-10 | 深圳易嘉恩科技有限公司 | Sustainable integrated method of testing based on XBRL platforms |
| CN108572912A (en) * | 2017-09-22 | 2018-09-25 | 北京金山云网络技术有限公司 | A continuous integration method, device, electronic equipment and storage medium |
| CN109032625A (en) * | 2018-09-04 | 2018-12-18 | 山东浪潮云投信息科技有限公司 | A kind of software continuous integrated approach and device |
| CN109240918A (en) * | 2018-08-20 | 2019-01-18 | 中国平安人寿保险股份有限公司 | Big data smoke test method, apparatus, computer equipment and storage medium |
| CN109408391A (en) * | 2018-11-06 | 2019-03-01 | 北京京航计算通讯研究所 | Software System Integrated Testing system based on continuous integrating technology |
| CN109683899A (en) * | 2017-10-18 | 2019-04-26 | 中移(苏州)软件技术有限公司 | A kind of software integrating method and device |
| CN111338947A (en) * | 2020-02-24 | 2020-06-26 | 拉扎斯网络科技(上海)有限公司 | Test method, test device, storage medium and electronic equipment |
| CN112148583A (en) * | 2019-06-27 | 2020-12-29 | 北京车和家信息技术有限公司 | Software testing method and system |
| CN113111009A (en) * | 2021-05-13 | 2021-07-13 | 上海有大信息科技有限公司 | Software testing device and testing method |
| CN113495548A (en) * | 2020-04-02 | 2021-10-12 | 广州汽车集团股份有限公司 | Test scheduling system and method |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108614699A (en) * | 2016-12-20 | 2018-10-02 | 航天信息股份有限公司 | A kind of method and system of the continuous integrating Android projects in windows systems |
| CN107301074A (en) * | 2017-06-26 | 2017-10-27 | 中广热点云科技有限公司 | Method and system of automatic packing APK installation kits on the server |
| CN107656873A (en) * | 2017-10-23 | 2018-02-02 | 扬州航盛科技有限公司 | Automatization test system and method for testing based on the vehicle-mounted softwares of Linux |
| CN109324975B (en) * | 2018-10-08 | 2021-06-22 | 四川长虹电器股份有限公司 | Continuous integration method based on mobile cloud measurement platform |
| CN109614321A (en) * | 2018-11-24 | 2019-04-12 | 卡斯柯信号有限公司 | A system for continuous integration and delivery of ATS software |
| CN109814901A (en) * | 2018-12-29 | 2019-05-28 | 中兴智能交通股份有限公司 | A kind of O&M method that automatically dispose application may be implemented |
| CN109766091A (en) * | 2018-12-29 | 2019-05-17 | 北京航天云路有限公司 | A kind of method and system of continuous integrating |
| CN111240989B (en) * | 2020-01-17 | 2021-05-28 | 众能联合数字技术有限公司 | Interface automation testing framework and method |
| CN111639036A (en) * | 2020-06-08 | 2020-09-08 | 成都信息工程大学 | Continuous integration test development method and system based on AI test |
| CN111767218B (en) * | 2020-06-24 | 2023-11-10 | 北京思特奇信息技术股份有限公司 | Automatic test method, equipment and storage medium for continuous integration |
| CN116541312B (en) * | 2023-07-06 | 2023-09-22 | 广汽埃安新能源汽车股份有限公司 | Continuous integration test method and system for automobile software |
| CN118884933A (en) * | 2024-08-07 | 2024-11-01 | 陕汽集团商用车有限公司 | A continuous integration test system and method for new energy vehicle controller |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101145964A (en) * | 2007-07-27 | 2008-03-19 | 中兴通讯股份有限公司 | A network management system automatic smoke test method and system |
| CN102981946B (en) * | 2011-09-07 | 2015-12-16 | 阿里巴巴集团控股有限公司 | ETL smoke test method |
| US9021458B1 (en) * | 2014-06-25 | 2015-04-28 | Chef Software, Inc. | Vertically integrated continuous delivery of an application |
-
2015
- 2015-07-29 CN CN201510454985.XA patent/CN106407100A/en active Pending
-
2016
- 2016-03-17 WO PCT/CN2016/076617 patent/WO2016177124A1/en not_active Ceased
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107239402A (en) * | 2017-06-12 | 2017-10-10 | 深圳易嘉恩科技有限公司 | Sustainable integrated method of testing based on XBRL platforms |
| CN108572912A (en) * | 2017-09-22 | 2018-09-25 | 北京金山云网络技术有限公司 | A continuous integration method, device, electronic equipment and storage medium |
| CN109683899A (en) * | 2017-10-18 | 2019-04-26 | 中移(苏州)软件技术有限公司 | A kind of software integrating method and device |
| CN109683899B (en) * | 2017-10-18 | 2022-04-08 | 中移(苏州)软件技术有限公司 | Software integration method and device |
| CN109240918A (en) * | 2018-08-20 | 2019-01-18 | 中国平安人寿保险股份有限公司 | Big data smoke test method, apparatus, computer equipment and storage medium |
| CN109032625A (en) * | 2018-09-04 | 2018-12-18 | 山东浪潮云投信息科技有限公司 | A kind of software continuous integrated approach and device |
| CN109408391A (en) * | 2018-11-06 | 2019-03-01 | 北京京航计算通讯研究所 | Software System Integrated Testing system based on continuous integrating technology |
| CN112148583A (en) * | 2019-06-27 | 2020-12-29 | 北京车和家信息技术有限公司 | Software testing method and system |
| CN111338947A (en) * | 2020-02-24 | 2020-06-26 | 拉扎斯网络科技(上海)有限公司 | Test method, test device, storage medium and electronic equipment |
| CN113495548A (en) * | 2020-04-02 | 2021-10-12 | 广州汽车集团股份有限公司 | Test scheduling system and method |
| CN113111009A (en) * | 2021-05-13 | 2021-07-13 | 上海有大信息科技有限公司 | Software testing device and testing method |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2016177124A1 (en) | 2016-11-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106407100A (en) | Method and apparatus for realizing continuous integration testing | |
| CN109960643B (en) | Code testing method and device | |
| CN102880546B (en) | Software integration testing method and system based on extensible markup language (XML) database | |
| CN100451989C (en) | Software testing system and testing method | |
| CN106933609B (en) | Android application program installation package generation method and device | |
| US20150100832A1 (en) | Method and system for selecting and executing test scripts | |
| US20150100829A1 (en) | Method and system for selecting and executing test scripts | |
| US20150100830A1 (en) | Method and system for selecting and executing test scripts | |
| CN106817241A (en) | A kind of updating management method, upgrade method and device | |
| US20150100831A1 (en) | Method and system for selecting and executing test scripts | |
| CN110096424B (en) | Test processing method and device, electronic equipment and storage medium | |
| CN105786691A (en) | Automatic integration testing device, method and system of mobile terminal | |
| CN111399861A (en) | Software automation deployment method and system | |
| CN106547688A (en) | Product automation method of testing and its system based on Windows | |
| CN102955698A (en) | Processing method and device based on multi-terminal software development | |
| CN107015902B (en) | Test method and test equipment | |
| CN107491390A (en) | The method and device of replacement test environment configuration information | |
| CN113934640A (en) | A method and system for automated software testing | |
| CN114924971A (en) | Test environment deployment method and device | |
| CN106452937A (en) | Router automatic test method and test apparatus | |
| CN107168758A (en) | The code compilation inspection method and device of many code libraries | |
| CN109992494A (en) | A kind of automatic test execution method and apparatus | |
| CN109542444B (en) | JAVA application monitoring method, device, server and storage medium | |
| CN107179982B (en) | A cross-process debugging method and device | |
| CN107807869A (en) | A kind of test system and method for testing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170215 |
|
| WD01 | Invention patent application deemed withdrawn after publication |