Software integration test system based on continuous integration technologyTechnical Field
The invention belongs to the technical field of software continuous integration and software engineering, and particularly relates to a software integration test system based on a continuous integration technology.
Background
The traditional software testing tool is mainly used in the following way: software testers manually open a desktop version testing tool, a testing project is established, a tested file is imported, testing rule configuration is carried out, the floating license is waited to be released, the tool is waited to finish analysis work, and finally a testing result is output. If a plurality of software testing tools are used for software testing, the tester needs to repeat the above operation process continuously. With the rapid development of information technology, users have higher and higher requirements on convenient, reliable and safe application systems, and meanwhile, software testing tools have the characteristics of diversification and complication, the traditional software tools are complex and inefficient in use mode and difficult to carry out centralized and effective verification testing on software, so that the quality guarantee effect of the software testing tools in the whole software development process is relatively limited
The following problems exist in the process of using the software testing tool by the current software development enterprises:
1) tools are used dispersedly, the testing tools used in enterprises are various in types and distributed in deployment, a plurality of testing tools need to be operated for many times during testing, and one-stop flow testing of software cannot be realized;
2) the tool is complicated to use, the software testing tool is generally high in specialty, and the tool is generally relatively complex in use and operation, for example, complicated configuration and introduction work is needed;
3) the automation degree is low, in the software testing industry, the automation use degree of a software testing tool is low, and a large amount of repetitive tool operations are still completed by manual means.
4) The license quantity conflicts, and due to the reason of cost limitation, the quantity of the licenses of the commercial test tools purchased by enterprises is limited, so that the test tools are easy to use conflicts, and tool analysis and test cannot be performed on the software in time.
Disclosure of Invention
Technical problem to be solved
The technical problem to be solved by the invention is as follows: how to solve the research and development test tool of current software research and development enterprise's dispersed use mode, use loaded down with trivial details, degree of automation is low, license quantity conflict scheduling problem, promote instrument use and software test efficiency.
(II) technical scheme
In order to solve the above technical problem, the present invention provides a software integration test system based on a continuous integration technology, the system comprising: the device comprises a test parameter setting module, a code hosting module, a continuous integration module, a test tool integration module and a test result publishing module; wherein,
the test parameter setting module is used for receiving various externally input test parameter information;
the code hosting module is used for pushing codes and generating code pushing identifiers;
the continuous integration module is used for detecting a code pushing identifier of the code hosting module, checking whether the code is pushed and updated or not, simultaneously reading a test parameter input by the test parameter setting module as an operation parameter of the test tool, calling the test tool of the test tool integration module in a command line interface mode to perform software test, and storing a test result to a specified position after the test tool is operated;
the test tool integration module is used for integrating the test tool, and performing source program set search, test engineering establishment, test tool execution and test result generation in the integration calling of the continuous integration module on the test tool;
the test result issuing module is used for issuing various test results generated by the test tool, before the test results are issued, the type and the format of the test tool are firstly identified, then text analysis is carried out according to the type and the format of the test tool, and finally the analyzed test results are displayed.
Wherein, the test parameter setting module comprises: a test parameter setting unit;
the test parameter setting unit is used for receiving various externally input test parameter information, and the test parameters comprise a test triggering mode, test tool selection, test rule selection and test type selection.
Wherein the code hosting module comprises: the system comprises a code pushing unit and a pushing identifier generating unit;
the code pushing unit is used for pushing an externally input code to the server warehouse for pulling a subsequent continuous integration module;
the push identification generation unit is used for generating a push identification after an externally input code is pushed to the server warehouse.
Wherein the persistent integration module comprises: the device comprises a test parameter reading unit, a pushing identification recognition unit, a code pulling unit, a test tool calling unit and a test result storage unit;
the test parameter reading unit is used for reading various test parameters input by the test parameter setting module and using the test parameters as the running parameters of the test tool;
the push identification recognition unit is used for recognizing a push identification generated by a code push behavior driver in the code hosting module;
the code pulling unit is used for acquiring a code of a source program from the code hosting module after the push identifier is identified;
the test tool calling unit is used for carrying out parameterized calling on different types of test tools in the test tool integrated module in a command line interaction mode;
the test result storage unit is used for storing the test result of the test tool to the designated storage space and then analyzing and issuing the test result by the test result issuing module.
Wherein the test tool integration module comprises: the system comprises a source program set searching unit, a test engineering establishing unit, a test tool executing unit and a test result generating unit;
the source program set searching unit is used for searching files which can be used for analysis from the codes of the source program acquired by the code pulling unit and removing uploaded explanatory files and other non-program files;
the test engineering establishing unit is used for establishing engineering projects in a test tool on the basis of the file set to be analyzed and various test parameters read by the test parameter reading unit;
the test tool execution unit is used for executing command line instructions of the test tool and operating the test tool to perform various different types of test actions;
the test result generating unit is used for summarizing various test results generated after the test tool tests the code of the source program.
Wherein, the test result publishing module comprises: the device comprises a test tool identification unit, a text format identification unit, a text analysis unit and a result display unit;
the test tool identification unit is used for identifying the type of a test tool generating a test result and selecting an analysis template suitable for the type of the test tool according to the type of the test tool;
the text format recognition unit is used for recognizing the text format of the test result and selecting an analyzer suitable for the text format according to the text format;
the text analysis unit is used for analyzing the test result generated by the test tool and converting the test result into a fixed format which can be displayed;
and the result display unit is used for displaying the analyzed test result.
(III) advantageous effects
By adopting the technical measures, the technical scheme of the invention can effectively solve the problems of scattered use of the existing software testing tool, complex use of the tool, low automation degree and conflict of tool licenses. Specifically, the method comprises the following steps:
(1) according to the technical scheme, the testing tools are intensively called in a continuous integration mode, a tester only needs to operate once when testing the software of the same project, and the tester does not originally operate multiple testing tools for multiple times, so that the tool using mode tends to be centralized, and the software testing efficiency is improved.
(2) According to the technical scheme, the calling of the tool is automatically called in a script mode, so that a large amount of operation and detailed configuration work performed by a tester when the tool is operated are reduced, and the complexity of the tester when the tool is operated is reduced.
(3) The technical scheme establishes a whole set of automatic tool calling process of submitting codes from a tester, automatically identifying code changes, calling a test tool to perform automatic testing and automatically issuing a test result, and realizes high automation of the use mode of the test tool.
(4) According to the technical scheme, the tool is called in a script mode, automatic queuing can be carried out when a plurality of test requests are generated simultaneously, time-sharing multiplexing of a limited number of licenses is achieved, and the problem of license conflict of the test tool is solved.
Drawings
Fig. 1 is a schematic structural diagram of a system according to the present invention;
FIG. 2 is a flow chart of a system according to an embodiment of the present invention;
FIG. 3 is a flowchart of a code hosting module in the system according to the present invention;
FIG. 4 is a flow chart of a module for continuous integration in the system according to the present invention;
FIG. 5 is a flow chart of a test tool integration module in the system according to the present invention;
fig. 6 is a flowchart of a test result issuing module in the system according to the technical solution of the present invention.
Detailed Description
In order to make the objects, contents, and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
In order to solve the problems in the prior art, the present invention provides a software integration test system based on a continuous integration technology, as shown in fig. 1, the system includes: the device comprises a test parameter setting module, a code hosting module, a continuous integration module, a test tool integration module and a test result publishing module; wherein,
the test parameter setting module is used for receiving various externally input test parameter information;
the code hosting module is used for pushing codes and generating code pushing identifiers;
the continuous integration module is used for detecting a code pushing identifier of the code hosting module, checking whether the code is pushed and updated or not, simultaneously reading a test parameter input by the test parameter setting module as an operation parameter of the test tool, calling the test tool of the test tool integration module in a command line interface mode to perform software test, and storing a test result to a specified position after the test tool is operated;
the test tool integration module is used for integrating the test tool, and performing source program set search, test engineering establishment, test tool execution and test result generation in the integration calling of the continuous integration module on the test tool;
the test result issuing module is used for issuing various test results generated by the test tool, before the test results are issued, the type and the format of the test tool are firstly identified, then text analysis is carried out according to the type and the format of the test tool, and finally the analyzed test results are displayed.
Wherein, the test parameter setting module comprises: a test parameter setting unit;
the test parameter setting unit is used for receiving various externally input test parameter information, and the test parameters comprise a test triggering mode, test tool selection, test rule selection and test type selection.
Wherein the code hosting module comprises: the system comprises a code pushing unit and a pushing identifier generating unit;
the code pushing unit is used for pushing an externally input code to the server warehouse for pulling a subsequent continuous integration module;
the push identification generation unit is used for generating a push identification after an externally input code is pushed to the server warehouse.
Wherein the persistent integration module comprises: the device comprises a test parameter reading unit, a pushing identification recognition unit, a code pulling unit, a test tool calling unit and a test result storage unit;
the test parameter reading unit is used for reading various test parameters input by the test parameter setting module and using the test parameters as the running parameters of the test tool;
the push identification recognition unit is used for recognizing a push identification generated by a code push behavior driver in the code hosting module;
the code pulling unit is used for acquiring a code of a source program from the code hosting module after the push identifier is identified;
the test tool calling unit is used for carrying out parameterized calling on different types of test tools in the test tool integrated module in a command line interaction mode;
the test result storage unit is used for storing the test result of the test tool to the designated storage space and then analyzing and issuing the test result by the test result issuing module.
Wherein the test tool integration module comprises: the system comprises a source program set searching unit, a test engineering establishing unit, a test tool executing unit and a test result generating unit;
the source program set searching unit is used for searching files which can be used for analysis from the codes of the source program acquired by the code pulling unit and removing uploaded explanatory files and other non-program files;
the test engineering establishing unit is used for establishing engineering projects in a test tool on the basis of the file set to be analyzed and various test parameters read by the test parameter reading unit;
the test tool execution unit is used for executing command line instructions of the test tool and operating the test tool to perform various different types of test actions;
the test result generating unit is used for summarizing various test results generated after the test tool tests the code of the source program.
Wherein, the test result publishing module comprises: the device comprises a test tool identification unit, a text format identification unit, a text analysis unit and a result display unit;
the test tool identification unit is used for identifying the type of a test tool generating a test result and selecting an analysis template suitable for the type of the test tool according to the type of the test tool;
the text format recognition unit is used for recognizing the text format of the test result and selecting an analyzer suitable for the text format according to the text format;
the text analysis unit is used for analyzing the test result generated by the test tool and converting the test result into a fixed format which can be displayed;
and the result display unit is used for displaying the analyzed test result.
In addition, the present invention also provides a software integration testing method based on the continuous integration technology, the method is implemented based on a software integration testing system, as shown in fig. 1, the system includes: the device comprises a test parameter setting module, a code hosting module, a continuous integration module, a test tool integration module and a test result publishing module;
as shown in fig. 2, the method comprises the steps of:
step 1: the test parameter setting module receives various externally input test parameter information;
step 2: the code hosting module pushes codes and generates a code pushing identifier;
and step 3: the continuous integration module detects a code pushing identifier of the code hosting module, checks whether the code is pushed and updated, simultaneously reads test parameters input by the test parameter setting module as running parameters of a test tool, and then calls the test tool of the test tool integration module to perform software test in a command line interface mode;
and 4, step 4: the test tool integration module integrates the test tool, and source program set searching, test engineering establishment, test tool execution and test result generation are carried out in the integration calling of the continuous integration module to the test tool;
and 5: the continuous integration module stores the test result to a specified position after the test tool finishes running;
step 6: the test result issuing module issues various test results generated by the test tool, before the test results are issued, the type and the format of the test tool are firstly identified, then text analysis is carried out according to the type and the format of the test tool, and finally the analyzed test results are displayed.
Wherein, the test parameter setting module comprises: a test parameter setting unit;
in the step 1, the test parameter setting unit receives various externally input test parameter information, and the test parameters include a test trigger mode, a test tool selection, a test rule selection and a test type selection.
Wherein, as shown in fig. 3, the code hosting module comprises: the system comprises a code pushing unit and a pushing identifier generating unit;
the step 2 comprises the following steps:
step 201: the code pushing unit pushes an externally input code to the server warehouse for a subsequent continuous integration module to pull;
step 202: the push identification generation unit generates a push identification after the code input from the outside is pushed to the server warehouse.
Wherein, as shown in fig. 4, the persistent integration module includes: the device comprises a test parameter reading unit, a pushing identification recognition unit, a code pulling unit and a test tool calling unit;
the step 3 comprises the following steps:
step 301: the test parameter reading unit reads various test parameters input by the test parameter setting module and uses the test parameters as the running parameters of the test tool;
step 302: the push identification recognition unit recognizes a push identification generated by a code push behavior driver in the code hosting module;
step 303: the code pulling unit acquires the code of the source program from the code hosting module after recognizing the push identification;
step 304: the test tool calling unit carries out parameterized calling on different types of test tools in the test tool integrated module through a command line interaction mode.
Wherein, as shown in fig. 5, the test tool integration module includes: the system comprises a source program set searching unit, a test engineering establishing unit, a test tool executing unit and a test result generating unit;
the step 4 comprises the following steps:
step 401: the source program set searching unit searches files which can be used for analysis from the codes of the source program acquired by the code pulling unit and eliminates uploaded explanatory files and other non-program files;
step 402: the test engineering establishing unit establishes engineering projects in the test tool on the basis of the file set to be analyzed and various test parameters read by the test parameter reading unit;
step 403: the test tool execution unit executes the command line instruction of the test tool and operates the test tool to perform various different types of test actions;
step 404: the test result generation unit summarizes various test results generated after the test tool tests the codes of the source program.
Wherein the persistent integration module further comprises: a test result storage unit;
the step 5 comprises the following steps:
step 501: the test result storage unit stores the test result of the test tool in the designated storage space, and the test result issuing module performs analysis and issuing subsequently.
As shown in fig. 6, the test result issuing module includes: the device comprises a test tool identification unit, a text format identification unit, a text analysis unit and a result display unit;
the step 6 comprises the following steps:
step 601: the test tool identification unit identifies the type of the test tool generating the test result and selects an analysis template suitable for the type of the test tool according to the type of the test tool;
step 602: the text format recognition unit recognizes the text format of the test result and selects an analyzer suitable for the text format according to the text format;
step 603: the text analysis unit analyzes the test result generated by the test tool and converts the test result into a fixed format which can be displayed;
step 604: and the result display unit displays the analyzed test result.
Example 1
In this embodiment, a software integration testing method based on the continuous integration technology is provided based on the above system, and as shown in fig. 2, a specific flow of the method includes the following steps:
s1: submitting code through a code hosting module;
s2: setting parameters through a test parameter setting module;
s3: the continuous integration module reads the test parameters from the test parameter setting module, pulls the codes from the code hosting module, calls the test tool integration module to execute software test, and summarizes and sends the test results to the test result publishing module;
s4: the test tool integration module executes a software test task and generates a software test result;
s5: and the test result issuing module acquires the test result output by the continuous integration module for analysis and display.
As shown in fig. 3, the specific steps of the process of the code hosting module include:
s301: the code pushing unit receives an externally pushed code and pushes the code to the server warehouse;
s302: the pushing identification generating unit generates a code pushing identification according to the code pushing event.
As shown in fig. 4, the specific steps of the process of the persistent integration module include:
s401: the pushing identification recognition unit detects whether the pushing identification is effective, if the code pushing is not found, the process is ended, and if the code pushing is found, the process is shifted to S402;
s402: the code pulling unit pulls the source code program from the code hosting module;
s403: the test parameter reading unit reads various test parameters from the test parameter setting module;
s404: the test parameter reading unit configures a test tool according to the test parameters;
s405: the test tool calling unit calls a test tool to perform software test;
s406: the test result storage unit acquires the test result of the test tool and stores the test result to the specified position.
As shown in fig. 5, the specific steps of the process of the test tool integration module include:
s501: the source program set searching unit searches a source program set, selects effective codes in the source program set, and rejects illustrative files and non-program files in the source program set;
s502: the test engineering establishing unit establishes a test engineering according to the source program set obtained by searching;
s503: the test tool execution unit drives a tool to perform software test in a command line mode;
s504: the test result generating unit generates a software test result and sends the software test result to the continuous integration module.
As shown in fig. 6, the specific steps of the test result issuing module include:
s601: the test tool identification unit identifies a test tool and selects an analysis template according to the test tool;
s602: the text format recognition unit recognizes the test result format and selects an analyzer according to the test result format;
s603: the result analysis unit analyzes the test result;
s604: and the result display unit displays the analyzed test result.
In summary, the present invention belongs to the technical field of software continuous integration and software engineering, and in particular relates to a software integration testing method based on a continuous integration technology, aiming at solving the problems of dispersed usage mode, tedious usage process, low automation degree, license conflict, etc. of the current software testing tool. The software integration test system provided by the invention comprises: the test parameter setting module is used for receiving various externally input parameter information; the code hosting module provides functions of code pushing, code pushing identification generation and the like; the continuous integration module is used for detecting the pushing identification of the code hosting module, checking whether the code is updated or not, reading the input test parameters as the running parameters of the test tool, calling the test tool to perform software test, and storing the test result to a specified position after the test tool is run; the test tool integration module is used for calling a test tool in a command line interface mode, and the specific process comprises source program set searching, test engineering establishment, test tool execution and test result generation; the test result issuing module is used for issuing various test results generated by the test tool, the test result issuing firstly needs to identify the type and the format of the test tool, then carries out text analysis according to the type and the format of the test tool, and finally displays the analyzed test result. The technical scheme carries out centralized automatic scheduling management on the software testing tool, and can effectively solve the problems of dispersed use mode, complicated use process, low automation degree and license conflict of the existing software testing tool.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.