CN111737118B - Pipeline testing method and device, electronic equipment and storage medium - Google Patents

Pipeline testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111737118B
CN111737118B CN202010530998.1A CN202010530998A CN111737118B CN 111737118 B CN111737118 B CN 111737118B CN 202010530998 A CN202010530998 A CN 202010530998A CN 111737118 B CN111737118 B CN 111737118B
Authority
CN
China
Prior art keywords
test
testing
pipeline
requirement
current
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
CN202010530998.1A
Other languages
Chinese (zh)
Other versions
CN111737118A (en
Inventor
贾文泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010530998.1A priority Critical patent/CN111737118B/en
Publication of CN111737118A publication Critical patent/CN111737118A/en
Application granted granted Critical
Publication of CN111737118B publication Critical patent/CN111737118B/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/3684Test management for test design, e.g. generating new test cases
    • 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a pipeline testing method, a device, electronic equipment and a storage medium, relates to the technical field of software testing, and can be used for a cloud platform or cloud service. The specific scheme is as follows: acquiring a current test requirement submitted by a user; extracting a characteristic identifier from the current test requirement; wherein, the characteristic identification includes: emergency feature identification or common feature identification; and if the feature identifier is the emergency feature identifier, conveying the current test requirement to an emergency test assembly line, and testing the current test requirement through the emergency test assembly line. According to the method and the device for testing the emergency test requirements, the emergency test requirements can be processed rapidly, and therefore the test efficiency of the emergency test requirements can be improved.

Description

Pipeline testing method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of computers, and further relates to a software testing technology, in particular to a pipeline testing method, a pipeline testing device, electronic equipment and a storage medium.
Background
The test pipeline is used for assembling all tasks required by a test link and integrating a tool chain to perform the practice of automatic construction, deployment, test and the like. Is an important means for improving the quality of software and shortening the development period of software. The pipeline can be divided into a local self-testing pipeline of a development stage, a trunk integrated testing pipeline after a code is submitted to a trunk, a branch testing pipeline after a code library establishes a branch, an integrated testing pipeline of day-level execution and the like according to different trigger occasions. According to different emphasis points of each stage, different testing tasks such as functional testing, pressure testing, performance testing, regression testing and the like can be configured for each pipeline.
Fig. 1 is a schematic diagram of a prior art test pipeline. As shown in fig. 1, the conventional pipeline test may include, in a dimension of the test order: the system comprises a self-test pipeline, a trunk pipeline, an integrated pipeline and a branch pipeline; the self-test pipeline may include, in a dimension of the test task: code development, performance testing, variance testing, functional testing, unit testing, and code inspection; the backbone pipeline may include, in the dimension of the test task: performance testing, variance testing, functional testing, and unit testing; the integrated pipeline may include in the dimension of the test task: performance testing and pressure testing; the branch pipeline may include, in the dimension of the test task: performance testing, functional testing, and unit testing.
Therefore, when the conventional test assembly line processes the test task, the priority of the test task is not identified, and when the test requirement with high priority and high urgency degree appears, the test assembly line cannot distinguish the urgent test requirement from the common test requirement, so that the urgent test requirement cannot be rapidly processed, and the test efficiency of the urgent test requirement is seriously affected.
Disclosure of Invention
The application provides a pipeline testing method, device, equipment and storage medium, which can rapidly process urgent testing requirements, so that the testing efficiency of the urgent testing requirements can be improved.
In a first aspect, the present application provides a pipeline testing method, the method comprising:
acquiring a current test requirement submitted by a user;
extracting a characteristic identifier from the current test requirement; wherein the feature identification comprises: emergency feature identification or common feature identification;
and if the feature identifier is the emergency feature identifier, conveying the current test requirement to an emergency test assembly line, and testing the current test requirement through the emergency test assembly line.
In a second aspect, the present application provides a pipeline testing apparatus, the apparatus comprising: the device comprises an acquisition module, an extraction module and a test module; wherein,
the acquisition module is used for acquiring the current test requirement submitted by the user;
the extracting module is used for extracting the characteristic identifier from the current test requirement; wherein the feature identification comprises: emergency feature identification or common feature identification;
And the test module is used for conveying the current test requirement to an emergency test assembly line if the characteristic identifier is the emergency characteristic identifier, and testing the current test requirement through the emergency test assembly line.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the pipeline testing method described in any embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program which, when executed by a processor, implements the pipeline testing method of any embodiment of the present application.
The technical scheme that this application had solved among the prior art can't carry out fast processing to urgent test demand to seriously influence the efficiency of software testing of urgent test demand, can carry out fast processing to urgent test demand, thereby can improve the efficiency of software testing of urgent test demand.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is a schematic diagram of a prior art test pipeline;
FIG. 2 is a flow chart of a pipeline testing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a feature ID recognition system according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an emergency pipeline according to an embodiment of the present application;
FIG. 5 is a flow chart of a pipeline testing method according to a second embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a general pipeline according to a second embodiment of the present disclosure;
FIG. 7 is a flow chart of a pipeline testing method according to a third embodiment of the present application;
FIG. 8 is a schematic diagram of a pipeline testing apparatus according to a fourth embodiment of the present application;
fig. 9 is a block diagram of an electronic device for implementing a pipeline testing method of an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 2 is a schematic flow chart of a pipeline testing method according to an embodiment of the present application, where the method may be performed by a pipeline testing apparatus or an electronic device, and the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated into any intelligent device having a network communication function. As shown in fig. 2, the pipeline testing method may include the steps of:
s201, acquiring the current test requirement submitted by a user.
In a specific embodiment of the present application, an electronic device may obtain a current test requirement submitted by a user; the test requirements include at least: testing content and feature identification; wherein the feature identification may include: emergency feature identification and general test identification. The emergency feature identifier is used for indicating that the current test requirement is an emergency test requirement; the generic test identifier is used to indicate that the current test requirement is a generic test requirement. For example, when the feature identifier has a value of 1, it indicates that the current test requirement is an urgent test requirement; when the feature identifier is 0, it indicates that the current test requirement is a normal test requirement.
S202, extracting a characteristic identifier from the current test requirement; wherein, the characteristic identification includes: emergency signature or normal signature.
In a specific embodiment of the present application, the electronic device may extract the feature identifier from the current test requirement; wherein, the characteristic identification includes: emergency signature or normal signature. For example, the emergency signature may be 1; the common characteristic identification may be 0. In one embodiment, the electronic device may parse the current test requirement to obtain content corresponding to each field of the current test requirement; for example, the feature ID, whether it is an urgent test requirement, requirement information, etc., so that the feature identification can be extracted from the current test requirement.
Fig. 3 is a schematic structural diagram of a feature ID recognition system according to an embodiment of the present application. As shown in fig. 2, the feature ID recognition system may include: the system comprises a registration module, a calculation module, a storage module, a trunk identification module and a code submitting module. In order to sense the emergency degree of the requirement, an information registration function is introduced in a requirement creation stage, and a developer creating the requirement can fill in a test requirement in a registration module, wherein the test requirement at least comprises: testing content, submitting testing time and judging whether the test content is an urgent project; the test content may be a newly added test field. After the developer fills out the test requirement information, the test requirement can be submitted to the computing module; then, a calculation module calculates the text of the test requirement to obtain an MD5 value of the test requirement; in one embodiment, the calculation module may calculate the MD5 value of each test requirement, for example, the calculation module may calculate the MD5 value of the test content, the MD5 of the submitted test time, and the MD5 value of the emergency item, and then sum the three MD5 values, and create a unique feature ID for the test requirement according to the summation result of the MD5 values; for example, the feature ID may be 1000, 1001, 1002, etc.; the storage module may store the feature ID and the content corresponding to each field in a MySQL database for subsequent querying. When the test requirement is locally tested and codes are integrated into a main pipeline, a main identification module acquires the latest submitted test requirement by checking the code Git Log of the history record; for example, the test requirement with the feature ID of 1001 is obtained by querying the history of MySQL as the latest submitted test requirement; the code submitting module submits the test requirement to a first test task of the main pipeline by submitting a test code Git Commit; in the first test task of the main pipeline, a feature ID recognition function is added, whether the code which is integrated at this time belongs to urgent test requirements is judged, and the information is transmitted to all subsequent test tasks.
And S203, if the feature identifier is an emergency feature identifier, conveying the current test requirement to an emergency test assembly line, and testing the current test requirement through the emergency test assembly line.
In a specific embodiment of the present application, if the feature identifier is an emergency feature identifier, the electronic device may send the current test requirement to an emergency test pipeline, and test the current test requirement through the emergency test pipeline. In one embodiment, the urgent test pipeline includes a smaller number of pipelines than the normal test pipeline; for example, an urgent test pipeline may include at least the following pipelines: a self-test pipeline, an emergency trunk pipeline and an emergency branch pipeline; a common test pipeline may include at least the following pipelines: the system comprises a self-test pipeline, a common trunk pipeline, a common integrated pipeline and a common branch pipeline; it follows that the urgent test pipeline comprises a number of pipelines of 3; the normal test pipeline includes 4 number of pipelines, and the urgent test pipeline includes fewer pipelines than the normal test pipeline.
Further, in a pipeline included in the urgent test pipeline, at least one pipeline including a smaller number of test tasks than the number of test tasks in the normal test pipeline corresponding thereto exists. For example, in an urgent test pipeline, only the third functional test is included in the urgent branch pipeline; whereas in a normal test pipeline, a normal branch pipeline includes: performance testing, third function testing and unit testing; the number of test tasks included in the urgent branch pipeline is 1, the number of test tasks included in the normal branch pipeline is 3, and the number of test tasks included in the urgent branch pipeline is smaller than the number of test tasks included in the normal branch pipeline.
Fig. 4 is a schematic structural diagram of an emergency pipeline according to an embodiment of the present application. As shown in fig. 4, the urgent test pipeline in the present application includes at least the following pipelines: a self-test pipeline, an emergency trunk pipeline and an emergency branch pipeline; the self-test pipeline at least comprises the following test tasks: code development, performance testing, variance testing, functional testing, unit testing, and code inspection; the urgent backbone pipeline includes at least the following test tasks: performance testing, difference testing, first function testing, unit testing, and pressure testing; the urgent branch pipeline includes at least the following test tasks: and a third functional test.
In a specific embodiment of the application, for urgent test requirements, placing a pressure test of a common integrated pipeline in an urgent trunk pipeline for execution; in addition, the urgent trunk pipeline task executes the test task of coverage rate at the same time, and the test of urgent test requirements is guaranteed to be complete through the test task of coverage rate; and skipping performance tests on the urgent branch pipeline, and only returning the third functional test to release the performance tests.
The pipeline testing method provided by the embodiment of the application comprises the steps of firstly obtaining the current testing requirement submitted by a user; then extracting a characteristic identifier from the current test requirement; if the feature identifier is an emergency feature identifier, the current test requirement is conveyed to an emergency test assembly line, and the current test requirement is tested through the emergency test assembly line. That is, the present application can rapidly handle urgent test demands with a corresponding urgent test pipeline. In the existing pipeline test method, the test pipeline cannot distinguish the urgent test requirement from the common test requirement, so that the urgent test requirement cannot be rapidly processed, and the test efficiency of the urgent test requirement is seriously affected. Because the technical means for distinguishing the urgent test requirement from the common test requirement is adopted, the technical problem that the urgent test requirement cannot be rapidly processed in the prior art is solved, and the urgent test requirement can be rapidly processed by the technical scheme provided by the application, so that the test efficiency of the urgent test requirement can be improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 5 is a flow chart of a pipeline testing method according to the second embodiment of the present application. As shown in fig. 5, the pipeline testing method may include the steps of:
s501, acquiring the current test requirement submitted by a user.
S502, extracting a characteristic identifier from the current test requirement; wherein, the characteristic identification includes: emergency signature or normal signature.
S503, if the feature identifier is a common feature identifier, the current test requirement is transmitted to a common test assembly line, and the current test requirement is tested through the common test assembly line.
In a specific embodiment of the present application, if the feature identifier is a common feature identifier, the electronic device may send the current test requirement to a common test pipeline, and test the current test requirement through the common test pipeline. Compared with the prior art, the method improves the common test pipelines, classifies the test tasks in each pipeline, and divides the test tasks into separable test tasks and non-separable test tasks; the detachable test task is to split one test task into two or more test tasks, and deploy the two or more test tasks into different pipelines for testing; for example, the detachable test tasks include functional tests, and may also include unit tests; because the functional test is a detachable test task, the functional test can be split into a first functional test, a second functional test and a third functional test, and then the first functional test is deployed to a self-test pipeline for testing; the second functional test is deployed into a common trunk pipeline, and the third functional test is deployed into a common branch pipeline for testing. In addition, the non-separable test task means that a certain test task cannot be separated into two or more test tasks, and then the test can be performed only on the whole content of the test task in one or more pipelines. For example, the non-detachable test tasks include: code development, performance testing, variance testing, code inspection, and stress testing.
Fig. 6 is a schematic structural diagram of a general pipeline according to a second embodiment of the present application. As shown in fig. 6, the general test pipeline in the present application includes at least the following pipelines: the system comprises a self-test pipeline, a common trunk pipeline, a common integrated pipeline and a common branch pipeline; the self-test pipeline at least comprises the following test tasks: code development, performance testing, variance testing, functional testing, unit testing, and code inspection; the common backbone pipeline includes at least the following test tasks: performance testing, variance testing, first function testing, and unit testing; a common integrated pipeline includes at least the following test tasks: performance testing and pressure testing; the normal branch pipeline includes at least the following test tasks: performance testing, third function testing, and unit testing.
The pipeline testing method provided by the embodiment of the application comprises the steps of firstly obtaining the current testing requirement submitted by a user; then extracting a characteristic identifier from the current test requirement; if the feature identifier is an emergency feature identifier, the current test requirement is conveyed to an emergency test assembly line, and the current test requirement is tested through the emergency test assembly line. That is, the present application can rapidly handle urgent test demands with a corresponding urgent test pipeline. In the existing pipeline test method, the test pipeline cannot distinguish the urgent test requirement from the common test requirement, so that the urgent test requirement cannot be rapidly processed, and the test efficiency of the urgent test requirement is seriously affected. Because the technical means for distinguishing the urgent test requirement from the common test requirement is adopted, the technical problem that the urgent test requirement cannot be rapidly processed in the prior art is solved, and the urgent test requirement can be rapidly processed by the technical scheme provided by the application, so that the test efficiency of the urgent test requirement can be improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 7 is a flow chart of a pipeline testing method according to the third embodiment of the present application. As shown in fig. 7, the pipeline testing method may include the steps of:
s701, acquiring the current test requirement submitted by a user.
S702, extracting a characteristic identifier from the current test requirement; wherein, the characteristic identification includes: emergency signature or normal signature.
S703, if the feature identifier is a common feature identifier, taking the first test task of a common test pipeline as a current test task.
In a specific embodiment of the present application, if the feature identifier is a common feature identifier, the electronic device may use a first test task of a common test pipeline as a current test task. In one embodiment, the electronic device may take the performance test as the current test task.
S704, acquiring characteristic information of the current test task based on the current test requirement.
In a specific embodiment of the present application, the electronic device may acquire feature information of the current test task based on the current test requirement; wherein the characteristic information at least comprises one of the following: characteristic information of a code base and characteristic information of a test environment. For example, the electronic device may first obtain the code base information of the current test task based on the current test requirement, and then calculate the MD5 value of the code base information as the feature information of the current test task based on the current test requirement. Or the electronic equipment can also acquire the test environment information of the current test task based on the current test requirement; and then calculating the MD5 value of the environment information as characteristic information of the current test task based on the current test requirement. Alternatively, the electronic device may further sum the MD5 value of the code base information and the MD5 value of the environment information as feature information of the current test task based on the current test requirement.
And S705, if the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement, and the test result of the pre-stored test task based on the current test requirement is that the test passes, taking the next test task of the current test task as the current test task, and repeating the operation until the last test task of the common test pipeline is taken as the current test task.
In a specific embodiment of the present application, if the feature information of the current test task based on the current test requirement matches the feature information of the test task pre-stored in the distributed file system based on the current test requirement, and the test result of the pre-stored test task based on the current test requirement is that the test passes, the next test task of the current test task is taken as the current test task, and the above operations are repeatedly executed until the last test task of the common test pipeline is taken as the current test task. In one embodiment, if the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement, the fact that a certain test task before the current test task has completed the test of the current test requirement is indicated, so that the current test task does not need to repeatedly test the current test requirement, redundant test tasks can be simplified, and therefore the pipeline test efficiency can be improved. For example, assuming that the current test requirement is a performance test in a common trunk pipeline, if the characteristic information of the performance test based on the current test requirement matches the characteristic information of the performance test based on the current test requirement in a self-test pipeline pre-stored in the distributed file system, and the test result of the performance test in the pre-stored self-test pipeline based on the current test requirement is that the test passes, taking a difference test task of the common trunk pipeline as the current test task, and repeating the above operation until the last test task of the common test pipeline is taken as the current test task.
In the specific embodiment of the application, if the characteristic information of the current test task based on the current test requirement is not matched with the characteristic information of any one of the test tasks pre-stored in the distributed file system based on the current test requirement, the fact that any one of the test tasks before the current test task is not completely tested by the current test requirement is indicated, so that the current test requirement needs to be tested by the current test task, and the characteristic information of the current test task based on the current test requirement and the test result of the current test task on the current test requirement are stored in the distributed file system; wherein the characteristic information at least comprises one of the following: characteristic information of a code base and characteristic information of a test environment.
Further, when the characteristic information of the current test task based on the current test requirement is calculated to be matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement by the electronic device, a result of whether the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement or not can be obtained through a preset matching algorithm.
The pipeline testing method provided by the embodiment of the application comprises the steps of firstly obtaining the current testing requirement submitted by a user; then extracting a characteristic identifier from the current test requirement; if the feature identifier is an emergency feature identifier, the current test requirement is conveyed to an emergency test assembly line, and the current test requirement is tested through the emergency test assembly line. That is, the present application can rapidly handle urgent test demands with a corresponding urgent test pipeline. In the existing pipeline test method, the test pipeline cannot distinguish the urgent test requirement from the common test requirement, so that the urgent test requirement cannot be rapidly processed, and the test efficiency of the urgent test requirement is seriously affected. Because the technical means for distinguishing the urgent test requirement from the common test requirement is adopted, the technical problem that the urgent test requirement cannot be rapidly processed in the prior art is solved, and the urgent test requirement can be rapidly processed by the technical scheme provided by the application, so that the test efficiency of the urgent test requirement can be improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 8 is a schematic structural diagram of a pipeline testing apparatus according to a fourth embodiment of the present application. As shown in fig. 8, the apparatus 800 includes: an acquisition module 801, an extraction module 802, and a test module 803; wherein,
the acquiring module 801 is configured to acquire a current test requirement submitted by a user;
the extracting module 802 is configured to extract a feature identifier from the current test requirement; wherein the feature identification comprises: emergency feature identification or common feature identification;
the test module 803 is configured to, if the feature identifier is the emergency feature identifier, send the current test requirement to an emergency test pipeline, and test the current test requirement through the emergency test pipeline.
Further, the test module 803 is further configured to, if the feature identifier is the common feature identifier, send the current test requirement to a common test pipeline, and test the current test requirement through the common test pipeline.
Further, the urgent test pipeline at least comprises the following pipelines: a self-test pipeline, an emergency trunk pipeline and an emergency branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the urgent backbone pipeline comprises at least the following test tasks: the performance test, the difference test, a second function test, the unit test, and a pressure test; the urgent branch pipeline at least comprises the following test tasks: and a third functional test.
Further, the common test pipeline at least comprises the following pipelines: the system comprises a self-test pipeline, a common trunk pipeline, a common integrated pipeline and a common branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the common trunk pipeline at least comprises the following test tasks: the performance test, the variance test, the second function test, and the unit test; the common integrated pipeline at least comprises the following test tasks: the performance test and the pressure test; the common branch pipeline at least comprises the following test tasks: the performance test, the third functional test, and the unit test.
Further, the test module 803 is specifically configured to take a first test task of the common test pipeline as a current test task; acquiring characteristic information of the current test task based on the current test requirement; and if the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement, and the test result of the pre-stored test task based on the current test requirement is that the test passes, taking the next test task of the current test task as the current test task, and repeatedly executing the operation until the last test task of the common test pipeline is taken as the current test task.
Further, the test module 803 is further configured to test the current test requirement through the current test task if the characteristic information of the current test requirement based on the current test task is not matched with the characteristic information of any one of the test tasks pre-stored in the distributed file system based on the current test requirement, and store the characteristic information of the current test requirement based on the current test task and the test result of the current test task on the current test requirement in the distributed file system; wherein the characteristic information at least comprises one of the following: characteristic information of a code base and characteristic information of a test environment.
The pipeline testing device can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the pipeline testing method provided in any embodiment of the present application.
Example five
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 9, a block diagram of an electronic device according to a pipeline testing method of an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 9, the electronic device includes: one or more processors 901, memory 902, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). In fig. 9, a processor 901 is taken as an example.
Memory 902 is a non-transitory computer-readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the pipeline testing method provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute the pipeline test method provided by the present application.
The memory 902 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the fetch module 801, the fetch module 802, and the test module 803 shown in fig. 8) corresponding to the pipeline test method in the embodiments of the present application. The processor 901 performs various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 902, that is, implements the pipeline test method in the above-described method embodiment.
The memory 902 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device of the pipeline test method, and the like. In addition, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 902 optionally includes memory remotely located relative to processor 901, which may be connected to the electronic devices of the pipeline test method via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the pipeline testing method may further include: an input device 903 and an output device 904. The processor 901, memory 902, input devices 903, and output devices 904 may be connected by a bus or other means, for example in fig. 9.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the pipeline test method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output means 904 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the current test requirement submitted by a user is firstly obtained; then extracting a characteristic identifier from the current test requirement; if the feature identifier is an emergency feature identifier, the current test requirement is conveyed to an emergency test assembly line, and the current test requirement is tested through the emergency test assembly line. That is, the present application can rapidly handle urgent test demands with a corresponding urgent test pipeline. In the existing pipeline test method, the test pipeline cannot distinguish the urgent test requirement from the common test requirement, so that the urgent test requirement cannot be rapidly processed, and the test efficiency of the urgent test requirement is seriously affected. Because the technical means for distinguishing the urgent test requirement from the common test requirement is adopted, the technical problem that the urgent test requirement cannot be rapidly processed in the prior art is solved, and the urgent test requirement can be rapidly processed by the technical scheme provided by the application, so that the test efficiency of the urgent test requirement can be improved; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (14)

1. A method of pipeline testing, the method comprising:
acquiring a current test requirement submitted by a user;
extracting a characteristic identifier from the current test requirement; wherein the feature identification comprises: emergency feature identification or common feature identification;
if the feature identifier is the emergency feature identifier, the current test requirement is conveyed to an emergency test assembly line, and the current test requirement is tested through the emergency test assembly line;
Wherein the feature identification is identified by a feature ID identification system; the feature ID recognition system includes: the system comprises a registration module, a calculation module, a storage module, a trunk identification module and a code submitting module;
filling in test requirements through the registration module; wherein the test requirements include: test content, submit test time, and whether it is an urgent item;
submitting the test requirement to the calculation module, respectively calculating and summing the MD5 value of the test content, the MD5 of the submitted test time and the MD5 value of whether the test requirement is an urgent item,
creating a unique feature ID for the test requirement according to the summation result of the MD5 values;
storing the feature ID and the content corresponding to each field into a database through the storage module for subsequent inquiry;
when the test requirement is locally tested and codes are integrated into a trunk pipeline, the trunk identification module checks codes of the history record to obtain the latest submitted test requirement;
submitting the latest submitted test requirement to a first test task of the main pipeline through the code submitting module;
in the first test task of the main pipeline, a feature ID recognition function is added, whether the code which is integrated at this time belongs to urgent test requirements is judged, and judgment result information is transmitted to all subsequent test tasks.
2. The method according to claim 1, wherein the method further comprises:
and if the feature identifier is the common feature identifier, conveying the current test requirement to a common test assembly line, and testing the current test requirement through the common test assembly line.
3. The method of claim 1, wherein the urgent test pipeline comprises at least the following pipelines: a self-test pipeline, an emergency trunk pipeline and an emergency branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the urgent backbone pipeline comprises at least the following test tasks: performance testing, differential testing, second function testing, unit testing, and pressure testing; the urgent branch pipeline at least comprises the following test tasks: and a third functional test.
4. The method of claim 2, wherein the common test pipeline comprises at least the following pipelines: the system comprises a self-test pipeline, a common trunk pipeline, a common integrated pipeline and a common branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the common trunk pipeline at least comprises the following test tasks: performance testing, variance testing, second function testing, and unit testing; the common integrated pipeline at least comprises the following test tasks: performance testing and pressure testing; the common branch pipeline at least comprises the following test tasks: performance testing, third function testing, and unit testing.
5. The method of claim 2, wherein said testing said current test requirement by said common test pipeline comprises:
taking a first test task of the common test pipeline as a current test task;
acquiring characteristic information of the current test task based on the current test requirement;
if the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement, and the test result of the pre-stored test task based on the current test requirement is that the test passes, the next test task of the current test task is taken as the current test task, and the operation is repeatedly executed until the last test task of the common test assembly line is taken as the current test task.
6. The method of claim 5, wherein the method further comprises:
if the characteristic information of the current test task based on the current test requirement is not matched with the characteristic information of any one of the test tasks pre-stored in the distributed file system based on the current test requirement, testing the current test requirement through the current test task, and storing the characteristic information of the current test task based on the current test requirement and the test result of the current test task on the current test requirement into the distributed file system; wherein the characteristic information at least comprises one of the following: characteristic information of a code base and characteristic information of a test environment.
7. A pipeline testing apparatus, the apparatus comprising: the device comprises an acquisition module, an extraction module and a test module; wherein,
the acquisition module is used for acquiring the current test requirement submitted by the user;
the extracting module is used for extracting the characteristic identifier from the current test requirement; wherein the feature identification comprises: emergency feature identification or common feature identification;
the test module is used for conveying the current test requirement to an emergency test assembly line if the feature identifier is the emergency feature identifier, and testing the current test requirement through the emergency test assembly line;
wherein the feature identification is identified by a feature ID identification system; the feature ID recognition system includes: the system comprises a registration module, a calculation module, a storage module, a trunk identification module and a code submitting module;
filling in test requirements through the registration module; wherein the test requirements include: test content, submit test time, and whether it is an urgent item;
submitting the test requirement to the calculation module, respectively calculating and summing the MD5 value of the test content, the MD5 of the submitted test time and the MD5 value of whether the test requirement is an urgent item,
Creating a unique feature ID for the test requirement according to the summation result of the MD5 values;
storing the feature ID and the content corresponding to each field into a database through the storage module for subsequent inquiry;
when the test requirement is locally tested and codes are integrated into a trunk pipeline, the trunk identification module checks codes of the history record to obtain the latest submitted test requirement;
submitting the latest submitted test requirement to a first test task of the main pipeline through the code submitting module;
in the first test task of the main pipeline, a feature ID recognition function is added, whether the code which is integrated at this time belongs to urgent test requirements is judged, and judgment result information is transmitted to all subsequent test tasks.
8. The apparatus according to claim 7, wherein:
and the test module is further configured to, if the feature identifier is the common feature identifier, send the current test requirement to a common test pipeline, and test the current test requirement through the common test pipeline.
9. The apparatus of claim 7, the urgent test pipeline comprising at least the following pipelines: a self-test pipeline, an emergency trunk pipeline and an emergency branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the urgent backbone pipeline comprises at least the following test tasks: performance testing, differential testing, second function testing, unit testing, and pressure testing; the urgent branch pipeline at least comprises the following test tasks: and a third functional test.
10. The apparatus of claim 8, wherein the common test pipeline comprises at least the following pipelines: the system comprises a self-test pipeline, a common trunk pipeline, a common integrated pipeline and a common branch pipeline; the self-testing pipeline at least comprises the following testing tasks: code development, performance testing, variance testing, first function testing, unit testing, and code inspection; the common trunk pipeline at least comprises the following test tasks: performance testing, variance testing, second function testing, and unit testing; the common integrated pipeline at least comprises the following test tasks: performance testing and pressure testing; the common branch pipeline at least comprises the following test tasks: performance testing, third function testing, and unit testing.
11. The apparatus according to claim 8, wherein:
the test module is specifically configured to take a first test task of the common test pipeline as a current test task; acquiring characteristic information of the current test task based on the current test requirement; if the characteristic information of the current test task based on the current test requirement is matched with the characteristic information of the test task pre-stored in the distributed file system based on the current test requirement, and the test result of the pre-stored test task based on the current test requirement is that the test passes, the next test task of the current test task is taken as the current test task, and the operation is repeatedly executed until the last test task of the common test assembly line is taken as the current test task.
12. The apparatus according to claim 11, wherein:
the test module is further configured to test the current test requirement through the current test task if the characteristic information of the current test task based on the current test requirement is not matched with the characteristic information of any one of the test tasks pre-stored in the distributed file system based on the current test requirement, and store the characteristic information of the current test task based on the current test requirement and the test result of the current test task on the current test requirement into the distributed file system; wherein the characteristic information at least comprises one of the following: characteristic information of a code base and characteristic information of a test environment.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
CN202010530998.1A 2020-06-11 2020-06-11 Pipeline testing method and device, electronic equipment and storage medium Active CN111737118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010530998.1A CN111737118B (en) 2020-06-11 2020-06-11 Pipeline testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010530998.1A CN111737118B (en) 2020-06-11 2020-06-11 Pipeline testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111737118A CN111737118A (en) 2020-10-02
CN111737118B true CN111737118B (en) 2024-02-20

Family

ID=72648873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010530998.1A Active CN111737118B (en) 2020-06-11 2020-06-11 Pipeline testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111737118B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104185840A (en) * 2012-04-30 2014-12-03 惠普发展公司,有限责任合伙企业 Prioritization of continuous deployment pipeline tests
CN105830080A (en) * 2013-12-06 2016-08-03 高通股份有限公司 Methods and systems of using application-specific and application-type-specific models for the efficient classification of mobile device behaviors
CN110096438A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 Method for testing software and relevant apparatus
CN110287008A (en) * 2019-05-22 2019-09-27 百度(中国)有限公司 A kind of test assignment dispatching method, device and electronic equipment
CN110888801A (en) * 2019-10-23 2020-03-17 贝壳技术有限公司 Software program testing method and device, storage medium and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9612943B2 (en) * 2013-06-28 2017-04-04 Synopsys, Inc. Prioritization of tests of computer program code
US20190294536A1 (en) * 2018-03-26 2019-09-26 Ca, Inc. Automated software deployment and testing based on code coverage correlation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104185840A (en) * 2012-04-30 2014-12-03 惠普发展公司,有限责任合伙企业 Prioritization of continuous deployment pipeline tests
CN105830080A (en) * 2013-12-06 2016-08-03 高通股份有限公司 Methods and systems of using application-specific and application-type-specific models for the efficient classification of mobile device behaviors
CN110096438A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 Method for testing software and relevant apparatus
CN110287008A (en) * 2019-05-22 2019-09-27 百度(中国)有限公司 A kind of test assignment dispatching method, device and electronic equipment
CN110888801A (en) * 2019-10-23 2020-03-17 贝壳技术有限公司 Software program testing method and device, storage medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
软件测试管理体系的建设;李黎明;物流技术与应用;全文 *
软件测试需求的开发与管理;李丹;;电子产品可靠性与环境试验(05);全文 *

Also Published As

Publication number Publication date
CN111737118A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN112486820B (en) Method, apparatus, device and storage medium for testing code
EP3859533A2 (en) Method and apparatus for testing map service, electronic device, storage medium and computer program product
CN111752843B (en) Method, apparatus, electronic device and readable storage medium for determining influence surface
CN111639027B (en) Test method and device and electronic equipment
CN110706147B (en) Image processing environment determination method, device, electronic equipment and storage medium
CN111552646B (en) Method and apparatus for regression testing
CN112306880A (en) Test method, test device, electronic equipment and computer readable storage medium
CN113238943A (en) Method and device for continuous integration test
CN111522944A (en) Method, apparatus, device and storage medium for outputting information
CN110647937A (en) Method and device for training label model
CN111640103B (en) Image detection method, device, equipment and storage medium
CN112269706A (en) Interface parameter checking method and device, electronic equipment and computer readable medium
CN111984545B (en) Method and device for testing stability of detection unit, electronic equipment and storage medium
CN112183052B (en) Document repetition degree detection method, device, equipment and medium
CN111897782B (en) File control method, device, equipment and storage medium
CN112329429B (en) Text similarity learning method, device, equipment and storage medium
CN117520195A (en) Method, apparatus, device, storage medium and program product for testing interface
CN112149828A (en) Operator precision detection method and device based on deep learning framework
CN111737118B (en) Pipeline testing method and device, electronic equipment and storage medium
CN115688802B (en) Text risk detection method and device
CN116361591A (en) Content auditing method, device, electronic equipment and computer readable storage medium
CN111694686B (en) Processing method and device for abnormal service, electronic equipment and storage medium
CN113139039B (en) Dialogue data processing method, device, equipment and storage medium
CN112596814B (en) Integrated packaging method, apparatus, device, medium and program product for items
CN111865683B (en) Virtual gateway version gray level publishing method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant