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

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

Info

Publication number
CN111209197B
CN111209197B CN201911418552.3A CN201911418552A CN111209197B CN 111209197 B CN111209197 B CN 111209197B CN 201911418552 A CN201911418552 A CN 201911418552A CN 111209197 B CN111209197 B CN 111209197B
Authority
CN
China
Prior art keywords
task
integrated test
test task
test
mark
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.)
Active
Application number
CN201911418552.3A
Other languages
Chinese (zh)
Other versions
CN111209197A (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 Network Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Comba Network Systems Co Ltd filed Critical Comba Network Systems Co 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

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, a computer device and a storage medium for continuously integrating and testing application programs, wherein the method comprises the following steps: acquiring a current integrated test task being executed from a test queue, wherein the integrated test task is preset with a mark for checking whether the task is necessary or not; extracting a mark of a current integrated test task, and if the mark is a non-necessary test task, detecting whether an updated integrated test task is arranged in a test queue; and if the updated integrated test task is arranged, canceling executing the current integrated test task, otherwise, executing the current integrated test task. The application program continuous integrated test method determines unnecessary integrated test tasks, eliminates the unnecessary integrated test tasks, reduces the time for waiting for the integrated test tasks to test, and improves the efficiency of the integrated test tasks.

Description

Application 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 continuously integrating an application program.
Background
In the era of explosion of the application program industry, the application program demand is larger and larger, the complexity of the application program is higher and higher, and the continuous integrated test of the application program serves as an important gateway for guaranteeing the quality of the application program, so that the continuous integrated test of the application program becomes an indispensable process in the development of the application program.
The application program is developed iteratively, and the latest application program version inherits the functions of the previous version, so that the latest version is used for testing during the integration test. The application program continuous integration test periodically detects the application program, and when the application program is updated, the integration test flow of the new version application program is triggered.
Along with application development or application updating, each application corresponds to a corresponding test task to be executed, and a large number of test tasks need to be executed in the continuous integrated test of the application, but the test frequency in the integrated test flow is high and the time consumption is long. For example, when the speed of completing the integrated test does not keep pace with the frequency of triggering the integrated test, retention of the integrated test tasks occurs, further exacerbating the test time. Therefore, the existing continuous integration test has the problem of low efficiency.
Disclosure of Invention
Based on this, it is necessary to provide a method, a system, a computer device and a storage medium for continuously integrating an application program, aiming at the technical defects, especially the technical defects of low efficiency in continuously integrating test.
An application program continuous integration test method comprises the following steps:
acquiring a current integrated test task being executed from a test queue, wherein the integrated test task is preset with a mark for checking whether the task is necessary or not;
extracting a mark of the current integrated test task, and if the mark is a non-necessary test task, detecting whether an updated integrated test task is arranged in a test queue;
and if the updated integrated test task is arranged, canceling executing the current integrated test task, otherwise, executing the current integrated test task.
In one embodiment, the application continuous integration test method further comprises:
and if the mark of the current integrated test task is a checking task, executing the current integrated test task.
In one embodiment, before the step of obtaining the current integrated test task from the test queue, the method further comprises:
receiving a submitted integrated test task, and setting a mark for checking whether the submitted integrated test task is a task or not;
If the integrated test task is executing in the current test queue, detecting a mark of the current integrated test task;
and if the current integrated test task is the necessary test 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 being executed in the current test queue, adding the submitted integrated test task to the test queue.
In one embodiment, the step of performing the current integrated test task includes:
when the current integrated test task is an 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, and completing an integrated test task.
In one embodiment, the step of performing the current integrated 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 appointed application program to finish an integrated test task.
In one embodiment, the mark of the task to be checked contains a priority value;
after the step of extracting the signature of the current integrated test task, further comprising:
if the mark of the current integrated test task is a necessary detection task, 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 integrated test task is prior to the current integrated test task or not according to the first priority value and the second priority value;
and if the updated integrated test task is prior to the current integrated test task, suspending the current integrated test task.
In one embodiment, the mark of the task to be checked contains a priority value;
the step of adding the submitted integrated test task to a test queue comprises:
extracting a mark of the submitted integrated test task, and adding the submitted integrated test task to the tail of a test queue if the mark is a non-necessary test task;
if the mark of the submitted integrated test task is a necessary-to-check task, extracting a third priority value of the mark in the submitted integrated test task, and extracting a priority value corresponding to each integrated test task with the mark of the necessary-to-check task in the test queue;
And determining the execution sequence of the integrated test tasks according to the third priority value and the priority value corresponding to the rest of the integrated test tasks which need to be checked 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 includes: one or more of application integration packaging, unit testing, integration testing, static code analysis, and stability testing.
An application continuous integration test system, comprising:
the acquisition module is used for acquiring the current integrated test task being executed from the test queue, wherein the integrated test task is preset with a mark for checking whether the task is necessary or not;
the extraction module is used for extracting the mark of the current integrated test task, and detecting whether the updated integrated test task is arranged in the test queue if the mark is an unnecessary test task;
and the execution module is used for canceling the execution of the current integrated test task if the updated integrated test task is arranged, or else, 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, the processor implementing the steps of the application continuous integration test method of any of the embodiments described above when the computer program is executed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the application sustained integration test method of any of the above embodiments.
The method, the system, the computer equipment and the storage medium for continuously integrating the application program comprise the steps of acquiring a current integrated test task from a test queue, extracting a mark of the current integrated test task, detecting whether an updated integrated test task is arranged in the test queue if the mark is an unnecessary test task, canceling executing the current integrated test task if the updated integrated test task is arranged, otherwise executing the current integrated test task; unnecessary integrated test tasks are determined, unnecessary integrated test tasks are removed, the time for waiting for testing of the integrated test tasks 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, in which:
FIG. 1 is a diagram of an environment for implementing a method for continuous integration testing of an application program provided in one embodiment;
FIG. 2 is a flow chart of a method for application persistence integrated testing in an embodiment;
FIG. 3 is a flow diagram of submitting test tasks in one embodiment;
FIG. 4 is a schematic diagram of an architecture of an application persistence test system in an embodiment:
fig. 5 is a schematic diagram showing an internal structure of the computer device in one embodiment.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating 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 expressly stated otherwise, as understood by those skilled in the art. 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. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless defined otherwise. 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 a day per member, meaning that multiple integration may occur per day. Each integration is verified by automated build-up (including compilation, release, automated testing) to discover integration errors as early as possible.
Sustained integration is often triggered by timing after code submission, e.g., project level sustained integration may be triggered by developing each code submission, while product level sustained integration may be triggered by timing.
Each time code submitted to the version control server is automatically constructed, it is ensured that each code change does not cause continuous integration failure. 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 an updated executable program is constructed; the continuous integrated server runs various types of automated tests on the constructed executable program, including unit tests, interface tests, system-level UI automated tests, and the like.
The version control server has the latest codes, all developers need to do local construction on a local machine and then submit the codes to the version control server, so that the changes of the developers cannot cause continuous integration failure. The developer submits code to the version control library at least once a day. The developer needs to update the code from the version control server to the local machine at least once a day.
In application program development, developers often need to make some small changes to source codes, and the changes and other codes are integrated through continuous integration, so that an executable program can be generated anytime and anywhere, and the reliability of the executable program can be verified early.
When the source code is changed, the 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 shows the characteristics of high integration frequency and long time consumption. When the speed of completing the integration test is not kept up with the frequency of triggering the continuous integration, the phenomenon of retention of the integration test task in the continuous integration server can occur.
Moreover, before the developed application program is released to the market, the application program needs to be subjected to the integration test again, so that the pressure of continuous integration of the continuous integration server is increased, the test time is further prolonged, and the problem of low efficiency in the continuous integration test is solved.
As shown in fig. 1, fig. 1 is a diagram of an implementation environment of an application program continuous integration test method provided in one embodiment, in the implementation environment, including a continuous integration server 110, a version control server 120, and a computer device 130, where 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 server cluster that includes persistent integration servers 110 and version control servers 120.
A developer can submit the modification 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 the data of the source code; the server side can call an automatic compiling script through the version control server 120 to 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 notebook computer, a desktop computer, a tablet computer, a smart phone, etc. The client and the server are connected through a network. In one embodiment, the client may be a network connection between the computer device 130 and the version control server 120 to enable communication with the server. The continuous integration server 110 and the version control server 120 in the service end may be connected through a network connection, a bus connection, or other communication connection manners, which is not limited herein.
In one embodiment, as shown in fig. 2, fig. 2 is a flowchart of an application program continuous integration testing method in one embodiment, and in this embodiment, an application program continuous integration testing method is provided, where the application program continuous integration testing method may be applied to the above-mentioned server, and specifically may include the following steps:
step S210: and acquiring a current integrated test task from the test queue, wherein the integrated test task is preset with a mark for checking whether the task is necessary or not.
The test queue is a task list used in continuous integration to monitor and allocate integrated test tasks that need to be executed. The test queue records the integrated test tasks which are being tested and waiting for testing. After the code or source code of the application program is changed, the integrated test task triggered and generated 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. After the integrated test task is completed, the completed integrated 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 currently executing the integrated test task, 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 integrated test task, and if the mark is an unnecessary test task, detecting whether the updated integrated test task is arranged in the test queue.
In the step, a mark of whether the task is necessary to be checked or not in the current integrated test task is extracted, and whether the mark is a task which is unnecessary to be checked or not is judged.
The mark of the unnecessary detection task is used for marking unnecessary integrated test tasks, such as an integrated test task generated by daily automatic triggering, and the frequency of continuous integration can be improved by the daily automatic triggering integrated test task so as to discover defects in an application program as soon as possible, but the test frequency of the type of integrated test task is too high, and a large amount of continuous integrated resources are often occupied. The mark of the necessary checking task is used for marking an important integrated test task, and the important integrated test task is that continuous integrated test must be performed, such as continuous integrated test must be performed when new version application program development and application program release are performed, so as to ensure the quality of the application program.
In this step, updating the integrated test task refers to the integrated test task triggered by the application program when updating the version. The update integrated test task may be an integrated test task triggered after an update occurs to an application program corresponding to the current integrated test task.
If the update integration test task is arranged, step S230: cancel execution of the current integrated test task, otherwise step S240: the current integrated test task is performed.
In this step, if the updated integrated test task is further arranged in the integrated test task waiting for testing in the test queue, the execution of the current integrated test task is canceled, the next integrated test task is executed, the current integrated test task is redetermined, and the steps S210 and S220 are continuously executed.
If the integrated test task waiting to be tested in the test queue is not arranged with the updated integrated test task, namely, the updated integrated test task corresponding to the currently executed integrated test task does not exist, the current integrated test task is continuously executed.
Since the latest application inherits the function of the previous version due to iterative development during application, the continuous integration test is based on the latest version, and the integration task before application update is unnecessary compared with the integration task after application update, so that when the new version of application development is completed and submitted to the continuous integration test, the continuous integration test of the application of the previous version is unnecessary.
According to the application program continuous integrated test method, a current integrated test task is obtained from a test queue, a mark of the current integrated test task is extracted, if the mark is an unnecessary test task, whether an updated integrated test task is arranged in the test queue is detected, if the updated integrated test task is arranged, the execution of the current integrated test task is canceled, and otherwise, the current integrated test task is executed; unnecessary integrated test tasks are determined, unnecessary integrated test tasks are removed, 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 mark of the task to be checked contains a priority value. The priority value may be used to indicate a priority of the integrated test tasks.
After the step of extracting the signature of the current integrated test task, it may further include:
step S251: and if the mark of the current integrated test task is the necessary detection task, 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 update integrated test task also belongs to the task to be checked, extracting a priority value in a mark of the update integrated test task corresponding to the task to be checked, and taking the priority value as a second priority value; and if the updated integrated test task belongs to the unnecessary detection task, setting a second priority value of the lowest priority level for the updated integrated test task.
Step S252: and judging whether the updated integrated test task is prior to the current integrated test task or not according to the first priority value and the second priority value.
Step S253: if the update integrated test task is higher than the current integrated test task, suspending the current integrated test task, retrieving the next integrated test task of the test queue as the current integrated test task, and executing the step of extracting the mark of the current integrated test task in 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, for example, updating the integrated test task, thereby shortening the waiting test time of the integrated test task with higher priority.
And (3) 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 following steps 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 application program continuous integrated test method, the priority between the current integrated test task and the updated integrated task is compared, when the priority indicated by the updated integrated test task through the second priority value is higher, the updated integrated test task needs to be tested as soon as possible, and the waiting time of the updated integrated test task is reduced and the efficiency of the integrated test task is improved by suspending the current integrated test task and calling the next integrated test task.
In one embodiment, the application continuous integration test method may further include:
if the mark of the current integrated test task is the necessary check task, step S240: the current integrated test task is performed.
If the mark of the current integrated test task is a necessary check task, the current integrated test task is a test which needs to be continuously integrated, and the current integrated test task is executed, so that the efficiency of executing the necessary check task is ensured, and the quality of the application program corresponding to the necessary check task is ensured.
The test efficiency of optimizing and updating the integrated test tasks is described above, and the flow of submitting the test tasks will be described below.
In one embodiment, as shown in fig. 3, fig. 3 is a flowchart of submitting a test task in one embodiment, and before the step of obtaining the current integrated test task from the test queue in step S210, the method may further include: submitting a test task flow;
May include:
step S310: and receiving the submitted integrated test task, and setting a mark for checking whether the submitted integrated test task is necessary or not.
And uploading the integration test task to the server by the client to start continuous integration test on the corresponding application program. The mark of whether to check the task can be uploaded to the server together when the integrated test task is submitted, or the server requests the developer or the integrated tester to set the mark of whether to check the task. Alternatively, the server may set the flag of the necessary task for all the submitted and actively requested integrated test tasks according to a default setting, for example, or set the flag of the necessary task for the integrated test task of the actively submitted old version application program. The server receives the submitted integrated test task and configures a mark for whether the task is necessary to be checked or not.
Step S320: and if the integrated test task is executing in the current test queue, detecting the mark of the current integrated test task.
In this step, it is determined whether the current server executes the integrated test task, and if the server is currently executing the integrated test task, the current integrated test task is obtained, and the flag in the current integrated test task is identified.
Step S330: if the current integrated test task is the necessary test task, adding the submitted integrated test task to a test queue, otherwise stopping the current integrated test task.
If the integrated test task being executed is a necessary test 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 test task and ensuring the quality of an application program corresponding to the necessary test task; otherwise, stopping the executing integrated test task, adding the submitted integrated test task to a test queue, removing unnecessary integrated test tasks, maintaining the length of the test queue to avoid overlong test queue, reducing the waiting time of the integrated test task and improving the efficiency of the integrated test task.
According to the continuous integrated test method for the application program, in the process of adding the submitted integrated test task to the test queue, unnecessary integrated test tasks can be removed, the time for waiting for testing of the integrated test task is shortened, and the efficiency of the integrated test task is improved.
In one embodiment, the method may further include:
and if no integrated test task is executing in the current test queue, 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 is in an idle state, the submitted integrated test task is directly added to the test queue, the waiting execution time of the integrated test task is short, and the efficiency of continuous integrated test is high.
In one embodiment, the mark of the task to be checked contains a priority value. The priority value may be used to indicate a priority of the integrated test tasks.
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 adding the submitted integrated test task to the tail of a test queue if the mark is a non-necessary test task.
The submitted integrated test task belongs to the non-necessary test task, the default non-necessary test task has the lowest priority, and the low-priority integrated test task is executed according to the sequence of joining the test queue.
Step S332: and if the mark of the submitted integrated test task is a necessary check task, extracting a third priority value of the mark in the submitted integrated test task, and extracting the priority value corresponding to each integrated test task with the mark of the necessary check task in the test queue.
In this step, the priority of each integrated test task in the test queue is detected, and in particular, 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 value corresponding to the rest of the integrated test tasks which need to be checked in the test queue, and inserting the submitted integrated test tasks into the test queue according to the execution sequence.
According to the continuous integrated test method for the application program, the integrated test tasks are inserted into the test queue according to the priority order, so that the waiting time of the integrated test tasks with high priority is shortened, and the efficiency of the integrated test tasks is improved.
In addition, for the flag belonging to the unnecessary-inspection task, a priority value having a lower or lowest priority level may be set for it, so that the comparison of priority between the unnecessary-inspection task and the necessary-inspection task is facilitated.
In one embodiment, the integrated test tasks may include: one or more of application integration packaging, unit testing, integration testing, static code analysis, and stability testing.
In application program integration packaging, codes of all modules in an application program are integrated together, and code compiling and application program release are carried out.
Unit testing (also referred to as "commit testing") is a small proprietary test written by a developer to ensure that new code works independently, particularly for functions or modules. By "independent" is meant herein independent of or invoking other code that is not directly accessible, nor is it dependent on an external data source or other module. If such dependencies are needed to run code, these resources can be represented in a simulation. Simulation refers to the code stub that is used to the resource, which can return a value, but does not recognize any function.
The integrated test verifies whether the components and services are combined together normally, mainly for the testing of a certain function of the overall application. The functional test verifies whether the result of the application executing the function meets the expectations. Acceptance testing verifies certain characteristics of a product according to acceptable standards. Such as performance, scalability, compression resistance and capacity.
Static code analysis is used for guaranteeing code quality, static analysis can be regarded as testing of the structural end of a code quality spectrum, and dynamic testing is mainly responsible for testing functional aspects. Static analysis can ensure that the code follows the optimal coding convention, and can also find many problems including undefined behavior, portability problems, dangerous but legal construction by language misuse, code definition problems, actual layout problems of the code, etc. The static analysis can also find some problems which cannot be found by the dynamic test, and can also 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 the main purpose of the stability test is to verify the capability, find the unstable factors of the application program in the capability verification process and analyze and solve the unstable factors.
The typical flow works as follows: storing codes into a version control server by a developer; the version control server notifies 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 if there is a newly submitted code. The continuous integration server starts to build on a building server; detecting the latest submitted codes in the storage library into a local work area of the construction server; and establishing codes and testing the codes according to preset testing standards. Important results and other important files to be saved are returned to the persistent integration server. The continuously integrated server will give the end result of the build-pass/fail/unstable. "unstable" means that all functional tests pass, but code coverage may not yet meet target requirements. If the build meets the criteria of success, then the code in the temporary repository needs to be transferred to the formal repository. If the build fails, the code cannot be checked out into the formal repository (which stores only useful, tested and verified code). The persistent integration server will notify all persons registered in the server and indicating interest in the build: they can log in to the persistent integration server to view the state of the build and more additional information.
In one embodiment, the step of performing the current integrated test task may include:
when the current integrated test task is an integrated test task triggered by program code change, integrated packaging is carried out according to the changed program code, and an application program to be tested is obtained.
In the step, the trunk code and the changed program code are called for integrated packaging, and the automatic compiling script is called for code compiling to obtain the application program to be tested. Application integration packaging may be included in the integration test tasks triggered by the program code changes.
Further, before or after the application to be tested is generated, coding test can be performed to avoid bad or incompatible modified program codes or to cause the application to be unable to run.
And calling the test script to test the application program to be tested, and completing the integrated test task.
In this step, the test script is invoked to perform one or more of unit testing, integration testing, static code analysis, and stability testing, respectively.
And after the test is finished, feeding back the test result to the client. After testing, the applications meeting the test requirements may be stored in a repository of the version control server.
In one embodiment, the step of performing the current integrated test task may include:
and when the current integrated test task is the submitted integrated test task for testing the appointed application program, the appointed application program is called from the version control server.
In this step, the stored designated application program is called from the version control server repository, and the application program stored in the version control server repository may be an application program that can be normally operated or an application program that is set to have a version number.
And calling a test script to test the appointed application program, and completing the integrated test task.
In this step, the test script is invoked to perform one or more of unit testing, integration testing, static code analysis, and stability testing, respectively.
The test script can adaptively optimize and update along with the maturity of application program development, and the current-stage test script is used for testing the application program of the existing version generated in the past, so that the quality of the application program of the existing version is ensured.
In an embodiment, as shown in fig. 4, fig. 4 is a schematic structural diagram of an application program continuous integration test system in an embodiment, and in this embodiment, an application program continuous integration test system is provided, where the application program continuous integration test system may be applied to the above-mentioned server, and specifically may include an obtaining module 410, an extracting module 420, and an executing module 430, where:
And the acquiring module 410 is configured to acquire the current integrated test task being executed from the test queue, where the integrated test task is preset with a flag of whether to check the task.
The test queue is a task list used in continuous integration to monitor and allocate integrated test tasks that need to be executed. The test queue records the integrated test tasks which are being tested and waiting for testing. After the code or source code of the application program is changed, the integrated test task triggered and generated 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. After the integrated test task is completed, the completed integrated test task may be ended in the test queue.
In the obtaining module 410, 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 currently executing the integrated test task, the current integrated test task is obtained, and the mark in the current integrated test task is identified.
The extracting module 420 is configured to extract a flag of the current integrated test task, and if the flag is an unnecessary test task, detect whether an updated integrated test task is queued in the test queue.
In the extracting module 420, a flag of whether the task is necessary to be checked in the current integrated test task is extracted, and whether the flag is a task which is not necessary to be checked is determined.
The mark of the unnecessary detection task is used for marking unnecessary integrated test tasks, such as an integrated test task generated by daily automatic triggering, and the frequency of continuous integration can be improved by the daily automatic triggering integrated test task so as to discover defects in an application program as soon as possible, but the test frequency of the type of integrated test task is too high, and a large amount of continuous integrated resources are often occupied. The mark of the necessary checking task is used for marking an important integrated test task, and the important integrated test task is that continuous integrated test must be performed, such as continuous integrated test must be performed when new version application program development and application program release are performed, so as to ensure the quality of the application program.
Updating an integrated test task refers to an integrated test task that an application triggers when updating a version. In this step, the updated integrated test task may be an integrated test task triggered by the corresponding application program after updating, relative to the currently executed integrated test task.
And the execution module 430 is configured to cancel execution of the current integrated test task if there is an updated integrated test task, or else execute the current integrated test task.
In the execution module 430, if the updated integrated test task is further arranged in the integrated test task waiting to be tested in the test queue, the execution of the current integrated test task is canceled, the next integrated test task is executed, the current integrated test task is redetermined, and the process continues to the acquisition module 410.
If the integrated test task waiting to be tested in the test queue is not arranged with the updated integrated test task, namely, the updated integrated test task corresponding to the currently executed integrated test task does not exist, the current integrated test task is continuously executed.
The currently executed integrated test task is unnecessary relative to the currently executed integrated test task, and since the latest application program inherits the functions of the previous version during the iterative development of the application program, the continuous integrated test is based on the latest version, and therefore, when the development of the new version of the application program is completed and submitted to the continuous integrated test, the continuous integrated test of the application program of the previous version is not necessary.
The application program continuous integrated test system acquires a current integrated test task from a test queue, extracts a mark of the current integrated test task, detects whether an updated integrated test task is arranged in the test queue if the mark is an unnecessary test task, cancels execution of the current integrated test task if the updated integrated test task is arranged, and otherwise executes the current integrated test task; unnecessary integrated test tasks are determined, unnecessary integrated test tasks are removed, the time for waiting for testing of the integrated test tasks is shortened, and the efficiency of the integrated test tasks is improved.
For specific limitations of the application continuous integration test system, reference may be made to the above limitation of the application continuous integration test method, which is not repeated herein. The various modules in the application continuous integration test system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
As shown in fig. 5, fig. 5 is a schematic diagram of an internal structure of the 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 nonvolatile storage medium of the computer device stores an operating system, a database and a computer program, and when the computer program is executed by the processor, the processor can realize an application program continuous integration test method. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may have stored therein a computer program which, when executed by the processor, causes the processor to perform an application program continuous integration test method. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, where the computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the application continuous integration test method in any of the embodiments described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor implements the steps of the application sustained integration test method of any of the embodiments described above.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for a person skilled in the art, several improvements and modifications can be made without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (12)

1. The application program continuous integration test method is characterized by comprising the following steps of:
acquiring a current integrated test task being executed from a test queue, wherein the current integrated test task is preset with a mark for checking whether the task is necessary or not;
extracting a mark of the current integrated test task, and if the mark is a non-necessary test task, detecting whether an updated integrated test task is arranged in a test queue;
and if the updated integrated test task is arranged, canceling executing the current integrated test task, removing the current integrated test task, and otherwise, executing the current integrated test task.
2. The application continuous integration test method according to claim 1, further comprising:
and if the mark of the current integrated test task is a checking task, executing the current integrated test task.
3. The application continuous integration test method of claim 1 or 2, further comprising, before the step of obtaining the current integration test task being executed from the test queue:
Receiving a submitted integrated test task, and setting a mark for checking whether the submitted integrated test task is a task or not;
if the integrated test task is executing in the current test queue, detecting a mark of the current integrated test task;
and if the current integrated test task is the necessary test task, adding the submitted integrated test task to a test queue, otherwise, stopping the current integrated test task.
4. The application continuous integration test method of claim 3, further comprising:
and if no integrated test task is being executed in the current test queue, adding the submitted integrated test task to the test queue.
5. The application continuous integration test method of claim 1, wherein the step of executing the current integration test task comprises:
when the current integrated test task is an 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, and completing an integrated test task.
6. The method for continuous integration testing of an application program according to claim 3 or 4, wherein the step of executing the current integration testing 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 appointed application program to finish an integrated test task.
7. The method for continuously integrating and testing an application program according to claim 1, wherein the mark of the task to be tested contains a priority value;
after the step of extracting the signature of the current integrated test task, further comprising:
if the mark of the current integrated test task is a necessary detection task, 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 integrated test task is prior to the current integrated test task or not according to the first priority value and the second priority value;
and if the updated integrated test task is prior to the current integrated test task, suspending the current integrated test task.
8. The method for continuously integrating and testing an application program according to claim 3, wherein the mark of the task to be tested comprises a priority value;
The step of adding the submitted integrated test task to a test queue comprises:
extracting a mark of the submitted integrated test task, and adding the submitted integrated test task to the tail of a test queue if the mark is a non-necessary test task;
if the mark of the submitted integrated test task is a necessary-to-check task, extracting a third priority value of the mark in the submitted integrated test task, and extracting a priority value corresponding to each integrated test task with the mark of the necessary-to-check task in the test queue;
and determining the execution sequence of the integrated test tasks according to the third priority value and the priority value corresponding to the rest of the integrated test tasks which need to be checked in the test queue, and inserting the submitted integrated test tasks into the test queue according to the execution sequence.
9. The application continuous integration test method according to 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 continuous integration test system, comprising:
The acquisition module is used for acquiring the current integrated test task being executed from the test queue, wherein the current integrated test task is preset with a mark for checking whether the task is necessary or not;
the extraction module is used for extracting the mark of the current integrated test task, and detecting whether the updated integrated test task is arranged in the test queue if the mark is an unnecessary test task;
and the execution module is used for canceling the execution of the current integrated test task if the updated integrated test task is arranged, removing the current integrated test task, 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 application continuous integration test method of any one of claims 1 to 9 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the application program continuous integration test method 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 CN111209197A (en) 2020-05-29
CN111209197B true 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)

Families Citing this family (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 (4)

* 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
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
CN108111499A (en) * 2017-12-15 2018-06-01 腾讯科技(深圳)有限公司 Service process performance optimization method, device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9311223B2 (en) * 2013-05-21 2016-04-12 International Business Machines Corporation Prioritizing test cases using multiple variables
US10430320B2 (en) * 2015-09-17 2019-10-01 International Business Machines Corporation Prioritization of test cases

Patent Citations (4)

* 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
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
CN108111499A (en) * 2017-12-15 2018-06-01 腾讯科技(深圳)有限公司 Service process performance optimization method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111209197A (en) 2020-05-29

Similar Documents

Publication Publication Date Title
CN108399132B (en) Scheduling test method, device and storage medium
CN108595329B (en) Application testing method and device and computer storage medium
US8151277B2 (en) Method and system for dynamic remote injection of in-process agents into virtual machine based applications
CN106970880B (en) Distributed automatic software testing method and system
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN112241360B (en) Test case generation method, device, equipment and storage medium
US10579513B2 (en) Test run control method and apparatus
US20140208169A1 (en) Domain scripting language framework for service and system integration
US11573780B2 (en) Automated generation of status chains for software updates
CN111309602A (en) Software testing method, device and system
CN113111000A (en) Continuous integration automation test system and method, electronic device and storage medium
CN113254331A (en) Model test method, device, storage medium and program product
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN110928777B (en) Test case processing method, device, equipment and storage medium
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN111209197B (en) Application continuous integration test method, system, equipment and storage medium
CN111930625A (en) Log obtaining method, device and system based on cloud service platform
CN110971478B (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN111176653B (en) Program compiling and packaging method and device, electronic equipment and storage medium
CN111367796B (en) Application program debugging method and device
CN114328275A (en) System testing method, device, computer equipment and storage medium
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN113626307A (en) Data verification method and device based on K8S container platform
CN112558982A (en) Code detection method and device and computer equipment

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