CN111209197A - Application program continuous integration test method, system, equipment and storage medium - Google Patents

Application program continuous integration test method, system, equipment and storage medium Download PDF

Info

Publication number
CN111209197A
CN111209197A CN201911418552.3A CN201911418552A CN111209197A CN 111209197 A CN111209197 A CN 111209197A CN 201911418552 A CN201911418552 A CN 201911418552A CN 111209197 A CN111209197 A CN 111209197A
Authority
CN
China
Prior art keywords
task
test
test task
integration
integrated test
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
CN201911418552.3A
Other languages
Chinese (zh)
Other versions
CN111209197B (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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China 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 Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN201911418552.3A priority Critical patent/CN111209197B/en
Publication of CN111209197A publication Critical patent/CN111209197A/en
Application granted granted Critical
Publication of CN111209197B publication Critical patent/CN111209197B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application provides a method, a system, computer equipment and a storage medium for continuously integrating and testing application programs, wherein the method comprises the following steps: acquiring a current integrated test task which is being executed from a test queue, wherein the integrated test task is preset with a mark for judging whether the task is necessary to be checked; extracting a mark of the current integrated test task, and if the mark is a non-necessity check task, detecting whether the updated integrated test task is arranged in the test queue; if the updated integration test task is arranged, the current integration test task is cancelled, otherwise, the current integration test task is executed. The continuous integration test method for the application program determines unnecessary integration test tasks, removes the unnecessary integration test tasks, reduces the time for the integration test tasks to wait for testing, and improves the efficiency of the integration test tasks.

Description

Application program continuous integration test method, system, equipment and storage medium
Technical Field
The present application relates to the field of application program testing technologies, and in particular, to a method, a system, a computer device, and a storage medium for testing continuous integration of an application program.
Background
In the era of the explosion of the application program industry, the application program demand is getting larger and larger, the complexity of the application program is also getting higher and higher, and the continuous integration test of the application program is used as an important level for guaranteeing the quality of the application program and becomes an essential process in the development of the application program.
The application program is developed iteratively, and the latest application program version inherits the function of the previous version, so that the latest version is tested as the standard during the integrated test. The continuous integration test of the application program detects the application program periodically, and when the application program is updated, an integration test flow of a new version of the application program is triggered.
With the development of the application program or the update of the application program, each application program is to be executed corresponding to a corresponding test task, and a large number of test tasks need to be executed in the continuous integration test of the application program, which results in high test frequency and long time consumption in the integration test process. For example, integration test task retention occurs when the speed of completion of the integration test does not keep up with the frequency of triggering the integration test, further aggravating the test over-time. Therefore, the existing continuous integration test has the problem of low efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a method, a system, a computer device and a storage medium for testing continuous integration of an application program, aiming at the above technical defects, especially the technical defect of low efficiency in the continuous integration test.
An application program continuous integration test method comprises the following steps:
acquiring a current integrated test task which is being executed from a test queue, wherein the integrated test task is preset with a mark for judging whether the task is necessary to be checked;
extracting a mark of the current integrated test task, and if the mark is a non-necessity check task, detecting whether the updated integrated test task is arranged in a test queue;
if the updated integration test task is arranged, the current integration test task is cancelled, otherwise, the current integration test task is executed.
In one embodiment, the method for testing the continuous integration of the application program further comprises the following steps:
and if the current integrated test task is marked as a necessary inspection task, executing the current integrated test task.
In one embodiment, before the step of obtaining the current integration test task from the test queue, the method further includes:
receiving a submitted integrated test task, and setting a mark for judging whether the submitted integrated test task needs to be checked or not;
if the integrated test task is executing in the current test queue, detecting the mark of the current integrated test task;
and if the current integrated test task is a necessary inspection task, adding the submitted integrated test task to a test queue, otherwise, stopping the current integrated test task.
In one embodiment, the method further comprises:
and if no integrated test task is executed in the current test queue, adding the submitted integrated test task to the test queue.
In one embodiment, the step of executing the current integration test task includes:
when the current integrated test task is the integrated test task triggered by the change of the program code, carrying out integrated packaging according to the changed program code to obtain an application program to be tested;
and calling a test script to test the application program to be tested to complete an integrated test task.
In one embodiment, the step of executing the current integration test task includes:
when the current integrated test task is a submitted integrated test task for testing a specified application program, calling the specified application program from a version control server;
and calling a test script to test the specified application program to complete an integrated test task.
In one embodiment, the mark of the necessary inspection task comprises a priority value;
after the step of extracting the mark of the current integration test task, the method further comprises the following steps:
if the mark of the current integrated test task is a task which needs to be checked, respectively extracting a first priority value in the mark of the current integrated test task and a second priority value of the mark of the updated integrated test task;
judging whether the updated integration test task is prior to the current integration test task according to the first priority value and the second priority value;
and if the updated integration test task has priority over the current integration test task, suspending the current integration test task.
In one embodiment, the mark of the necessary inspection task comprises a priority value;
the step of adding the submitted integrated test task to a test queue includes:
extracting the mark of the submitted integrated test task, and if the mark is a non-necessity inspection task, adding the submitted integrated test task to the tail of the test queue;
if the submitted integrated test task is marked as a necessary inspection task, extracting a third priority value marked in the submitted integrated test task and extracting the priority value corresponding to each integrated test task with the mark of the necessary inspection task in the test queue;
and determining the execution sequence of the integrated test tasks according to the third priority value and the priority values corresponding to the rest of the necessary integrated test tasks in the test queue, and inserting the submitted integrated test tasks into the test queue according to the execution sequence.
In one embodiment, the integrated test task comprises: one or more of application integration packaging, unit testing, integration testing, static code analysis, and stability testing.
An application persistence integration test system, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a current integrated test task which is being executed from a test queue, and the integrated test task is preset with a mark for judging whether the task needs to be checked;
the extracting module is used for extracting the mark of the current integrated test task, and if the mark is a non-necessity check task, detecting whether the updated integrated test task is arranged in the test queue;
and the execution module is used for canceling the execution of the current integrated test task if the updated integrated test task is arranged, and otherwise, executing the current integrated test task.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for testing continued integration of an application program according to any of the above embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for testing continued integration of an application according to any one of the above embodiments.
The method, the system, the computer equipment and the storage medium for continuously integrating and testing the application programs acquire the current integrated test task from the test queue, extract the mark of the current integrated test task, detect whether the updated integrated test task is arranged in the test queue if the mark is an unnecessary task, cancel the execution of the current integrated test task if the updated integrated test task is arranged, or execute the current integrated test task if the updated integrated test task is arranged; unnecessary integrated test tasks are determined, the unnecessary integrated test tasks are removed, the time for the integrated test tasks to wait for testing is shortened, and the efficiency of the integrated test tasks is improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice.
Drawings
The foregoing and/or additional aspects and advantages will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a diagram of an implementation environment of a method for testing persistent integration of an application provided in one embodiment;
FIG. 2 is a flow diagram of a method for testing continued integration of an application, under an embodiment;
FIG. 3 is a flow diagram of submitting a test task in one embodiment;
FIG. 4 is a block diagram of an embodiment of a system for persistent integration testing of applications:
FIG. 5 is a diagram showing an internal configuration of a computer device according to an embodiment.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Continuous integration is an application development practice, i.e., team development members often integrate their work, usually at least once per member per day, meaning that multiple integrations may occur per day. Each integration is verified by automated build (including compile, release, automated testing) to discover integration errors as early as possible.
Persistent integration is often triggered by timing after code submission, e.g., persistent integration at the project level may be triggered by development each time code submission, while persistent integration at the product level may be triggered by timing.
The code submitted to the version control server is automatically constructed each time, so that the continuous integration failure cannot be caused by each code change. The version control server is provided with the latest codes, and the continuous integration server downloads the latest codes from the version control server; after the codes are updated, the version control server calls an automatic compiling script to compile the codes and construct an updated executable program; and the continuous integration server runs various types of automatic tests on the built executable program, including unit tests, interface tests, system-level UI automatic tests and the like.
The latest code exists on the version control server, and all developers need to build locally on the local machine and then submit to the version control server, so that the change of the developers does not cause continuous integration failure. Developers submit code to the version control library at least once a day. Developers need to update code from the version control server to the local machine at least once a day.
In application program development, developers often need to make small changes to source codes, and the changes are integrated with other codes through continuous integration, so that executable programs can be generated anytime and anywhere, and the reliability of the executable programs can be verified early.
When the source code is changed, continuous integration can be triggered, and as the application program is developed iteratively, the source code is changed along with the development of the application program, the continuous integration has the characteristics of high integration frequency and long time consumption. When the speed of completing the integration test cannot keep up with the frequency of triggering the continuous integration, the phenomenon that the integration test task in the continuous integration server is detained can occur.
In addition, before the developed application program is released to the market, the integration test needs to be performed again, the pressure of continuous integration by the continuous integration server is increased, and the problems that the test takes too long time and the efficiency is low in the continuous integration test are further aggravated.
As shown in fig. 1, fig. 1 is a diagram of an implementation environment of a method for testing persistent integration of an application program provided in an embodiment, in which the implementation environment includes a persistent integration server 110, a version control server 120, and a computer device 130, and the computer device 130 refers to a local machine of a developer. The clients are installed in computer devices 130 and the servers run on a cluster of servers that includes persistent integration servers 110 and version control servers 120.
A developer can submit changes to the source code in the local client to the server through the computer device 130, and the version control server 120 under the server manages data of the source code; the server side can call an automatic compiling script through the version control server 120, compile codes and construct an updated executable application program; the server may also test the built executable application through the persistent integration server 110.
The persistent integration server 110 and the version control server 120 may be server devices, and the computer device 130 may be a laptop, a desktop, a tablet, a smartphone, or the like. The client and the server are connected through a network. In one embodiment, the client may communicate with the server over a network connection between the computer device 130 and the version control server 120. The persistent integration server 110 and the version control server 120 in the server may be connected through a network, a bus, or other communication connection, which is not limited herein.
In an embodiment, as shown in fig. 2, fig. 2 is a flowchart of an application persistent integration testing method in an embodiment, where this embodiment proposes an application persistent integration testing method, which may be applied to the server, and specifically includes the following steps:
step S210: and acquiring the current integrated test task from the test queue, wherein the integrated test task is preset with a mark for judging whether the task is necessary to be checked.
The test queue is a task list for monitoring and deploying integrated test tasks to be performed in the continuous integration. The integrated test tasks under test and waiting for test are recorded in the test queue. After the code or source code of the application program is changed, the triggered generated integrated test task can be added into a test queue to wait for execution. Or the test queue directly receives the integrated test task of a certain application program issued by the client. When the integration test task is completed, the completed integration test task may be ended in the test queue.
In this step, a test queue capable of monitoring the integrated test task is used to determine whether the current server executes the integrated test task, and if the server is executing the integrated test task currently, the current integrated test task is obtained and the mark in the current integrated test task is identified.
Step S220: and extracting the mark of the current integration test task, and if the mark is a non-necessity check task, detecting whether the update integration test task is arranged in the test queue.
In this step, a flag indicating whether the task needs to be checked in the current integrated test task is extracted, and whether the flag is a task that does not need to be checked is judged.
The marking of the unneeded inspection task is used for marking unnecessary integrated test tasks, such as integrated test tasks generated by daily automatic triggering, and the daily automatic triggering integrated test tasks can improve the frequency of continuous integration so as to discover defects existing in the application program as soon as possible, but the test frequency of the type of integrated test tasks is too high, and a large amount of continuously integrated resources are often occupied. The marking of the essential inspection task is used for marking important integrated test tasks, and the important integrated test tasks are tests which must be continuously integrated, such as tests which must be continuously integrated when a new version of application program is developed and the application program is released, so that the quality of the application program is ensured.
In this step, updating the integration test task refers to an integration test task triggered when the version of the application program is updated. The update integration test task may be an integration test task triggered after an application corresponding to the current integration test task is updated.
If the update integration test task is arranged, step S230: cancel execution of the current integration test task, otherwise step S240: the current integrated test task is executed.
In this step, if an updated integrated test task is still arranged in the integrated test tasks to be tested in the test queue, the current integrated test task is cancelled, the next integrated test task is executed, the current integrated test task is determined again, and the steps S210 and S220 are continuously executed.
And if the updated integrated test tasks are not arranged in the integrated test tasks to be tested in the test queue, namely the updated integrated test tasks corresponding to the currently executed integrated test tasks do not exist, continuously executing the current integrated test tasks.
Since the latest application program is developed iteratively during the application program, inherits the function of the previous version, the continuous integration test is based on the latest version, and the integration task before the application program is updated is unnecessary compared with the integration task after the application program is updated, so that when the application program of the new version is developed and submitted to the continuous integration test, the continuous integration test of the application program of the previous version is unnecessary.
The continuous integration test method of the application program comprises the steps of obtaining a current integration test task from a test queue, extracting a mark of the current integration test task, detecting whether an updating integration test task is arranged in the test queue if the mark is a non-necessity check task, cancelling the execution of the current integration test task if the updating integration test task is arranged, and executing the current integration test task if the updating integration test task is arranged; unnecessary integrated test tasks are determined, the unnecessary integrated test tasks are removed, the time for the integrated test tasks to wait for testing is shortened, and the efficiency of the integrated test tasks is improved.
In one embodiment, the flag for the requisition task includes a priority value. The priority value may be used to indicate a degree of priority of the integrated test task.
After the step of extracting the mark of the current integration test task, the method further comprises the following steps:
step S251: and if the mark of the current integrated test task is a task to be checked, respectively extracting a first priority value in the mark of the current integrated test task and updating a second priority value of the mark of the integrated test task.
When the updated integrated test task also belongs to the necessary inspection task, extracting a priority value in a mark of the necessary inspection task corresponding to the updated integrated test task, and taking the priority value as a second priority value; and if the updated integrated test task belongs to the unneeded test task, setting a second priority value of the lowest priority level for the updated integrated test task.
Step S252: and judging whether the updated integration test task is prior to the current integration test task according to the first priority value and the second priority value.
Step S253: if the updated integration test task is prior to the current integration test task, suspending the current integration test task, calling the next integration test task of the test queue and taking the next integration test task as the current integration test task, and executing the step of extracting the mark of the current integration test task in the step S220.
And identifying the integrated test task with higher priority in the test queue, suspending the integrated test task with lower priority, and adjusting to execute the integrated test task with higher priority as soon as possible, such as updating the integrated test task and shortening the waiting test time of the integrated test task with higher priority.
And calling the next integrated test task of the test queue and taking the next integrated test task as the current integrated test task, and circularly executing the step S220 and the steps after the step S so as to adjust the order of the integrated test tasks with higher priority as soon as possible.
In addition, when the updated integrated test task with higher priority is called and the updated integrated test task is completed, the suspended integrated test task is restarted, and the suspended or cancelled integrated test task with lower priority in the original test queue is recovered.
According to the method for continuously integrating and testing the application programs, the priorities between the current integration test task and the updated integration test task are compared, when the updated integration test task is higher in priority represented by the second priority value, the updated integration test task needs to be tested as soon as possible, the current integration test task is suspended, and the next integration test task is called, so that the waiting time for updating the integration test task is shortened, and the efficiency of the integration test task is improved.
In one embodiment, the application program persistent integration testing method may further include:
if the mark of the current integration test task is the task to be checked, step S240: the current integrated test task is executed.
If the current integrated test task is marked as a necessary inspection task, the current integrated test task is a test which needs to be continuously integrated, the current integrated test task is executed, the efficiency of executing the necessary inspection task is guaranteed, and the quality of an application program corresponding to the necessary inspection task is guaranteed.
The test efficiency of optimizing and updating the integrated test task is explained above, and the flow of submitting the test task is explained below.
In an embodiment, as shown in fig. 3, fig. 3 is a flowchart of submitting a test task in an embodiment, and before the step of obtaining the current integration test task from the test queue in step S210, the method may further include: submitting a test task flow;
the method can comprise the following steps:
step S310: and receiving the submitted integrated test task, and setting a mark for judging whether the task is necessary to be checked on the submitted integrated test task.
And the client uploads the integration test task to the server to start continuous integration test on the corresponding application program. The flag of whether the task needs to be checked can be uploaded to the server side together when the integrated test task is submitted, or the server side requests a developer or an integrated tester to set the flag of whether the task needs to be checked. Or, the mark of the submitted integrated test task may also be set by the server according to a default setting, for example, the mark of the necessary inspection task is set for all the submitted integrated test tasks that actively request for testing, or the mark of the necessary inspection task is set for the integrated test tasks of the actively submitted old version application program. The server receives the submitted integrated test task and configures the integrated test task with a mark of whether the task needs to be checked.
Step S320: and if the integrated test task in the current test queue is executing, detecting the mark of the current integrated test task.
In this step, whether the current server executes the integration test task is determined, and if the server is executing the integration test task currently, the current integration test task is obtained, and the mark in the current integration test task is identified.
Step S330: and if the current integrated test task is a necessary inspection task, adding the submitted integrated test task to the test queue, otherwise, stopping the current integrated test task.
If the executing integrated test task is a necessary inspection task, adding the submitted integrated test task to a test queue, waiting for the server to execute the submitted integrated test task, ensuring the efficiency of executing the necessary inspection task and ensuring the quality of the application program corresponding to the necessary inspection task; otherwise, stopping the executing integrated test task, adding the submitted integrated test task to the test queue, removing unnecessary integrated test tasks, maintaining the length of the test queue to avoid overlong test queue, reducing the time of the integrated test task waiting for test, and improving the efficiency of the integrated test task.
According to the method for continuously integrating the application programs, unnecessary integrated test tasks can be removed in the process of adding the submitted integrated test tasks to the test queue, the time for waiting for testing of the integrated test tasks is shortened, and the efficiency of the integrated test tasks is improved.
In one embodiment, the method may further include:
and if no integrated test task in the current test queue is executed, adding the submitted integrated test task to the test queue.
If the integrated test task is monitored through the test queue, the fact that no integrated test task is currently executed is found, the server side is in an idle state, the submitted integrated test task is directly added to the test queue, the integrated test task is short in waiting execution time, and the efficiency of continuous integrated test is high.
In one embodiment, the flag for the requisition task includes a priority value. The priority value may be used to indicate a degree of priority of the integrated test task.
The step of adding the submitted integrated test task to the test queue in step S330 may include:
step S331: and extracting the mark of the submitted integrated test task, and if the mark is a non-necessity check task, adding the submitted integrated test task to the tail of the test queue.
The submitted integrated test tasks belong to the unneeded test tasks, the priority of the acquiescent unneeded test tasks is the lowest, and the integrated test tasks with low priority are waited to be executed according to the sequence of adding the integrated test tasks into the test queue.
Step S332: if the submitted integrated test task is marked as a necessary inspection task, extracting a third priority value marked in the submitted integrated test task and extracting the priority value corresponding to each integrated test task with the mark of the necessary inspection task in the test queue.
In this step, the priority of each integrated test task in the test queue is detected, and particularly, the integrated test task as a necessary test task is detected.
Step S333: and determining the execution sequence of the integrated test tasks according to the third priority value and the priority values corresponding to the rest of the necessary integrated test tasks in the test queue, and inserting the submitted integrated test tasks into the test queue according to the execution sequence.
According to the continuous integration test method for the application program, the integration test tasks are inserted into the test queue according to the priority order, the time for waiting execution of the integration test tasks with high priority is shortened, and the efficiency of the integration test tasks is improved.
In addition, the mark belonging to the non-essential task can be set with a priority value with a lower or lowest priority level so as to compare the priority between the non-essential task and the essential task.
In one embodiment, the integration test task may include: one or more of application integration packaging, unit testing, integration testing, static code analysis, and stability testing.
In the integrated packaging of the application program, codes of all modules in the application program are integrated together, and the code compiling and the application program releasing are carried out.
Unit testing (also known as "commit testing"), is a small, specialized test written by developers to ensure that new code works independently, particularly for functions or modules. By "independent" is meant herein that it does not rely on or invoke other code that is not directly accessible, nor does it rely on external data sources or other modules. If such dependencies are required for the running code, then these resources can be represented in an analogous manner. Emulation refers to code stubs that are used to transfer values to a resource, but do not recognize any functions.
The integration test verifies whether the combination of the components and the services is normal or not, and mainly aims at testing a certain function of the whole application program. The functional test verifies whether the result of the application executing the function is in accordance with the expectation. Acceptance testing verifies certain characteristics of the product according to acceptable standards. Such as performance, scalability, crush resistance and capacity.
Static code analysis is used for guaranteeing the quality of the code, the static analysis can be regarded as testing of a structure end of a code quality spectrum, and dynamic testing is mainly responsible for testing in the aspect of functions. Static analysis can ensure that code follows the best coding convention and can also discover many problems, including undefined behavior, portability problems, dangerous but legitimate constructions resulting from language misuse, code clarity problems, actual layout problems of the code, and so on. Static analysis can also find some problems that cannot be found by dynamic testing, and can help simplify the script, so that the script is easier to maintain and more efficient.
The stability test is used for verifying whether the application program can stably run for a long time under a certain load, and mainly aims to verify the capability, find unstable factors of the application program in the capability verification process and analyze and solve the unstable factors.
A typical flow works as follows: the developer stores the code into a version control server; the version control server informs the persistent integration server of the newly submitted code, or the persistent integration server periodically checks a repository in the version control server to see whether the newly submitted code exists. The continuous integration server starts to build on the building server; detecting the latest submitted code in the repository to a native work area of the construction server; and establishing a code and testing the code according to a preset test standard. Important results are passed back to the persistent integration server along with other important files that need to be saved. The persistent integration server will give the final result of the build-pass/fail/unstable. "unstable" means that all functional tests pass, but the code coverage may not yet meet the target requirements. If the build meets the criteria of success, the code in the temporary repository needs to be transferred to the formal repository. If the build fails, the code cannot be checked out to the formal repository (which only stores useful, tested and verified code). The persistent integration server will notify all people registered in the server and representing interest in the build: they can log on to the persistent integration server to view the status of the build and more additional information.
In one embodiment, the step of executing the current integration test task may include:
and when the current integration test task is the integration test task triggered by the program code change, performing integration packaging according to the changed program code to obtain the application program to be tested.
In the step, the trunk code and the changed program code are called to carry out integrated packaging, the automatic compiling script is called to carry out code compiling, and the application program to be tested is obtained. The integration test task triggered by the program code change can include application integration packaging.
Further, before or after the application program to be tested is generated, the coding test can be carried out, and the condition that the changed program codes are bad or incompatible or the application program cannot run is avoided.
And calling the test script to test the application program to be tested to complete the integrated test task.
In this step, the test script is called to perform one or more of a unit test, an integration test, a static code analysis, and a stability test, respectively.
And after the test is finished, feeding back the test result to the client. After testing, the applications that meet the testing requirements may be stored in a repository of the version control server.
In one embodiment, the step of executing the current integration test task may include:
and when the current integration test task is the submitted integration test task for testing the specified application program, calling the specified application program from the version control server.
In this step, the stored specified application program is called from the version control server repository, and the application program stored in the version control server repository may be a normally operable application program or an application program with a set version number.
And calling the test script to test the specified application program to complete the integrated test task.
In this step, the test script is called to perform one or more of a unit test, an integration test, a static code analysis, and a stability test, respectively.
The test script can be adaptively optimized and updated along with the maturity of the application program development, and the test script at the current stage is used for testing the previously generated application program with the existing version, so that the quality of the application program with the existing version is guaranteed.
In an embodiment, as shown in fig. 4, fig. 4 is a schematic structural diagram of an application persistent integration testing system in an embodiment, and in this embodiment, an application persistent integration testing system is provided, which may be applied to the server, and specifically includes an obtaining module 410, an extracting module 420, and an executing module 430, where:
an obtaining module 410, configured to obtain a current integration test task being executed from the test queue, where the integration test task is preset with a flag indicating whether a task needs to be checked.
The test queue is a task list for monitoring and deploying integrated test tasks to be performed in the continuous integration. The integrated test tasks under test and waiting for test are recorded in the test queue. After the code or source code of the application program is changed, the triggered generated integrated test task can be added into a test queue to wait for execution. Or the test queue directly receives the integrated test task of a certain application program issued by the client. When the integration test task is completed, the completed integration test task may be ended in the test queue.
In the obtaining module 410, a test queue capable of monitoring the integration test task is utilized to determine whether the current server executes the integration test task, and if the server is currently executing the integration test task, the current integration test task is obtained, and a flag in the current integration test task is identified.
The extracting module 420 is configured to extract the flag of the current integration test task, and if the flag is an unnecessary task, detect whether an updated integration test task is queued in the test queue.
In the extracting module 420, a flag indicating whether the task needs to be checked in the current integrated test task is extracted, and whether the flag is a task that does not need to be checked is determined.
The marking of the unneeded inspection task is used for marking unnecessary integrated test tasks, such as integrated test tasks generated by daily automatic triggering, and the daily automatic triggering integrated test tasks can improve the frequency of continuous integration so as to discover defects existing in the application program as soon as possible, but the test frequency of the type of integrated test tasks is too high, and a large amount of continuously integrated resources are often occupied. The marking of the essential inspection task is used for marking important integrated test tasks, and the important integrated test tasks are tests which must be continuously integrated, such as tests which must be continuously integrated when a new version of application program is developed and the application program is released, so that the quality of the application program is ensured.
Updating an integrated test task refers to an integrated test task that an application triggers when a version is updated. In this step, the update integrated test task may be an integrated test task triggered after the update of the corresponding application program, relative to the currently executed integrated test task.
The execution module 430 is configured to cancel executing the current integration test task if the updated integration test task exists, and otherwise execute the current integration test task.
In the execution module 430, if an updated integrated test task is still arranged in the integrated test tasks to be tested in the test queue, the current integrated test task is cancelled, the next integrated test task is executed, the current integrated test task is determined again, and the process continues to jump to the obtaining module 410.
And if the updated integrated test tasks are not arranged in the integrated test tasks to be tested in the test queue, namely the updated integrated test tasks corresponding to the currently executed integrated test tasks do not exist, continuously executing the current integrated test tasks.
The currently executed integration test task is unnecessary relative to the currently executed integration test task, and since the latest application inherits the functions of the previous version due to the iterative development of the application, the continuous integration test is based on the latest version, so that when the development of the application of the new version is completed and submitted to the continuous integration test, the continuous integration test of the application of the previous version is unnecessary.
The application program continuous integration test system acquires a current integration test task from a test queue, extracts a mark of the current integration test task, detects whether an update integration test task is arranged in the test queue if the mark is a non-necessity check task, cancels the execution of the current integration test task if the update integration test task is arranged, and executes the current integration test task if the update integration test task is arranged; unnecessary integrated test tasks are determined, the unnecessary integrated test tasks are removed, the time for the integrated test tasks to wait for testing is shortened, and the efficiency of the integrated test tasks is improved.
For specific limitations of the application program persistent integration test system, reference may be made to the above limitations of the application program persistent integration test method, which will not be described herein again. The modules in the application program continuous integration test system can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
As shown in fig. 5, fig. 5 is a schematic diagram of an internal structure of a computer device in one embodiment. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and a computer program, and the computer program can enable the processor to realize the continuous integration testing method of the application program when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The computer device may have a memory having stored therein a computer program that, when executed by a processor, causes the processor to perform a method for persistence integration testing of an application. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, the computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the method for testing persistent integration of an application program in any of the above embodiments.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for continuous integration testing of an application program according to any one of the above embodiments.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (12)

1. A continuous integration test method for an application program is characterized by comprising the following steps:
acquiring a current integrated test task which is being executed from a test queue, wherein the current integrated test task is preset with a mark for judging whether the task is necessary to be checked;
extracting a mark of the current integrated test task, and if the mark is a non-necessity check task, detecting whether the updated integrated test task is arranged in a test queue;
if the updated integration test task is arranged, the current integration test task is cancelled, otherwise, the current integration test task is executed.
2. The method for testing the continuous integration of an application program according to claim 1, further comprising:
and if the current integrated test task is marked as a necessary inspection task, executing the current integrated test task.
3. The method for continuous integration testing of application programs according to claim 1 or 2, further comprising, before the step of obtaining the current integration test task from the test queue:
receiving a submitted integrated test task, and setting a mark for judging whether the submitted integrated test task needs to be checked or not;
if the integrated test task is executing in the current test queue, detecting the mark of the current integrated test task;
and if the current integrated test task is a necessary inspection task, adding the submitted integrated test task to a test queue, otherwise, stopping the current integrated test task.
4. The method for testing the continuous integration of an application program according to claim 3, further comprising:
and if no integrated test task is executed in the current test queue, adding the submitted integrated test task to the test queue.
5. The method for continuous integration testing of application programs according to claim 1, wherein said step of executing the current integration testing task comprises:
when the current integrated test task is the integrated test task triggered by the change of the program code, carrying out integrated packaging according to the changed program code to obtain an application program to be tested;
and calling a test script to test the application program to be tested to complete an integrated test task.
6. The method for continuous integration test of application programs according to claim 3 or 4, wherein the step of executing the current integration test task comprises:
when the current integrated test task is a submitted integrated test task for testing a specified application program, calling the specified application program from a version control server;
and calling a test script to test the specified application program to complete an integrated test task.
7. The method according to claim 1, wherein the flag of the task to be inspected contains a priority value;
after the step of extracting the mark of the current integration test task, the method further comprises the following steps:
if the mark of the current integrated test task is a task which needs to be checked, respectively extracting a first priority value in the mark of the current integrated test task and a second priority value of the mark of the updated integrated test task;
judging whether the updated integration test task is prior to the current integration test task according to the first priority value and the second priority value;
and if the updated integration test task has priority over the current integration test task, suspending the current integration test task.
8. The method according to claim 3, wherein the tag of the task to be inspected contains a priority value;
the step of adding the submitted integrated test task to a test queue includes:
extracting the mark of the submitted integrated test task, and if the mark is a non-necessity inspection task, adding the submitted integrated test task to the tail of the test queue;
if the submitted integrated test task is marked as a necessary inspection task, extracting a third priority value marked in the submitted integrated test task and extracting the priority value corresponding to each integrated test task with the mark of the necessary inspection task in the test queue;
and determining the execution sequence of the integrated test tasks according to the third priority value and the priority values corresponding to the rest of the necessary integrated test tasks in the test queue, and inserting the submitted integrated test tasks into the test queue according to the execution sequence.
9. The method of claim 1, wherein the integration test task comprises: one or more of application integration packaging, unit testing, integration testing, static code analysis, and stability testing.
10. An application persistence integration testing system, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a current integrated test task which is being executed from a test queue, and the integrated test task is preset with a mark for judging whether the task needs to be checked;
the extracting module is used for extracting the mark of the current integrated test task, and if the mark is a non-necessity check task, detecting whether the updated integrated test task is arranged in the test queue;
and the execution module is used for canceling the execution of the current integrated test task if the updated integrated test task is arranged, and otherwise, executing the current integrated test task.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for continuous integration testing of application programs according to any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for application persistence integration testing of any one of claims 1 to 9.
CN201911418552.3A 2019-12-31 2019-12-31 Application continuous integration test method, system, equipment and storage medium Active CN111209197B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911418552.3A CN111209197B (en) 2019-12-31 2019-12-31 Application continuous integration test method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911418552.3A CN111209197B (en) 2019-12-31 2019-12-31 Application continuous integration test method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111209197A true CN111209197A (en) 2020-05-29
CN111209197B CN111209197B (en) 2023-08-04

Family

ID=70789462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911418552.3A Active CN111209197B (en) 2019-12-31 2019-12-31 Application continuous integration test method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111209197B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835742A (en) * 2020-06-24 2021-12-24 迈普通信技术股份有限公司 Continuous integration method and software development system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4942569A (en) * 1988-02-29 1990-07-17 Kabushiki Kaisha Toshiba Congestion control method for packet switching apparatus
US20140351793A1 (en) * 2013-05-21 2014-11-27 International Business Machines Corporation Prioritizing test cases using multiple variables
CN104461873A (en) * 2014-11-19 2015-03-25 青岛海信电器股份有限公司 Testing method and device of application programs
CN104734902A (en) * 2013-12-23 2015-06-24 展讯通信(上海)有限公司 Testing system and server end thereof
US20170083432A1 (en) * 2015-09-17 2017-03-23 International Business Machines Corporation Prioritization of test cases
CN108111499A (en) * 2017-12-15 2018-06-01 腾讯科技(深圳)有限公司 Service process performance optimization method, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4942569A (en) * 1988-02-29 1990-07-17 Kabushiki Kaisha Toshiba Congestion control method for packet switching apparatus
US20140351793A1 (en) * 2013-05-21 2014-11-27 International Business Machines Corporation Prioritizing test cases using multiple variables
CN104734902A (en) * 2013-12-23 2015-06-24 展讯通信(上海)有限公司 Testing system and server end thereof
CN104461873A (en) * 2014-11-19 2015-03-25 青岛海信电器股份有限公司 Testing method and device of application programs
US20170083432A1 (en) * 2015-09-17 2017-03-23 International Business Machines Corporation Prioritization of test cases
CN108111499A (en) * 2017-12-15 2018-06-01 腾讯科技(深圳)有限公司 Service process performance optimization method, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835742A (en) * 2020-06-24 2021-12-24 迈普通信技术股份有限公司 Continuous integration method and software development system

Also Published As

Publication number Publication date
CN111209197B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
US10642599B1 (en) Preemptive deployment in software deployment pipelines
CN108399132B (en) Scheduling test method, device and storage medium
US9940225B2 (en) Automated error checking system for a software application and method therefor
CN106970880B (en) Distributed automatic software testing method and system
US8978015B2 (en) Self validating applications
US20160239402A1 (en) Software commit risk level
CN112241360B (en) Test case generation method, device, equipment and storage medium
US20210048999A1 (en) Automated generation of status chains for software updates
CN112395202B (en) Interface automation test method and device, computer equipment and storage medium
CN113111000A (en) Continuous integration automation test system and method, electronic device and storage medium
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN112100070A (en) Version defect detection method and device, server and storage medium
CN109471799B (en) Method, device, storage medium and terminal for deploying demand environment
CN111694734A (en) Software interface checking method and device and computer equipment
CN111309602A (en) Software testing method, device and system
CN111209197B (en) Application continuous integration test method, system, equipment and storage medium
CN116009984A (en) Security arrangement and automatic response processing method and device and electronic equipment
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN115167896A (en) Method and device for updating software version, storage medium and electronic equipment
CN111367796B (en) Application program debugging method and device
JP2019056986A (en) Verification device and verification method
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN110968327B (en) Service system and deployment method thereof
CN112015436A (en) Short message platform deployment method and device, computing equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 510663 Shenzhou Road 10, Science City, Guangdong, Guangzhou

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Science City, Guangdong, Guangzhou

Applicant before: COMBA TELECOM SYSTEMS (CHINA) Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant