CN112162931A - Extraction and detection method, system, electronic equipment and storage medium - Google Patents

Extraction and detection method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112162931A
CN112162931A CN202011185067.9A CN202011185067A CN112162931A CN 112162931 A CN112162931 A CN 112162931A CN 202011185067 A CN202011185067 A CN 202011185067A CN 112162931 A CN112162931 A CN 112162931A
Authority
CN
China
Prior art keywords
test
code
target
environment
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011185067.9A
Other languages
Chinese (zh)
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011185067.9A priority Critical patent/CN112162931A/en
Publication of CN112162931A publication Critical patent/CN112162931A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/107Computer-aided management of electronic mailing [e-mailing]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention relates to a method, a system, electronic equipment and a storage medium for providing test, wherein the method comprises the following steps: when the target Git branch is detected to be updated, pulling a code on the target Git branch; deploying a test environment according to the code; executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases; and generating an offering mail based on a plurality of execution results and the target Git branch and sending the offering mail. Therefore, automatic test can be realized, the execution of the self-test link is ensured, the repeated test process of the self-test link and the test-promoting link is avoided, and the efficiency of the whole code test process is improved.

Description

Extraction and detection method, system, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to a test method, a test system, electronic equipment and a storage medium.
Background
The test is to submit the code to the tester for testing after the code development is completed. At present, before the test is carried out, a developer can test the code, and after the test is passed, the test is carried out. That is, the current code testing process may include a self-testing step (i.e., a step of testing the code by a developer) and a step of testing a code (i.e., a step of testing the code by a tester), and the self-testing step and the step of testing the code are independent of each other.
However, because the current self-testing link and the current extraction link are independent from each other, repeated tests such as smoking tests are likely to exist in the self-testing link and the extraction link, which results in the fact that redundant test processes are added in the whole code test process, thereby reducing the efficiency of the code test; meanwhile, since the developer does not necessarily perform self-test on the code before the test is carried out, the test fails in the test loop, and even the probability of rejecting re-lifting is high, so that the delivery cycle of the project is affected.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and system for performing a self-test, an electronic device, and a storage medium, in order to solve the technical problems in the prior art that a redundant test process exists in a self-test link and a test loop, and the execution of the self-test link cannot be guaranteed.
In a first aspect, an embodiment of the present invention provides a method for providing a test, including:
when the target Git branch is detected to be updated, pulling a code on the target Git branch;
deploying a test environment according to the code;
executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases;
and generating an offering mail based on a plurality of execution results and the target Git branch and sending the offering mail.
In one possible embodiment, the deploying a test environment according to the code includes:
determining a target server which is matched with the configured test environment parameters and is idle from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
In one possible embodiment, the generating and sending a submission email based on the plurality of execution results and the target Git branch includes:
determining whether a test case with execution failure exists based on a plurality of execution results;
and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
In one possible embodiment, the method further comprises:
and if the test case with execution failure exists, outputting an indication message for indicating that the code to be tested does not pass the self-test.
In one possible embodiment, the test cases at least include smoking test cases, unit test cases and regression test cases.
In a second aspect, an embodiment of the present invention provides a test system, including: the system comprises an environment deployment module, a test module and a lifting and testing module;
the environment deployment module pulls codes on the target Git branch when detecting that the target Git branch is updated; deploying a test environment according to the code;
the test module executes a plurality of test cases corresponding to the target Git branch in the test environment to obtain the execution results of the plurality of test cases;
and the test promoting module generates a test promoting mail based on the execution results and the target Git branch and sends the test promoting mail.
In one possible embodiment of the method according to the invention,
the environment deployment module is used for determining an idle target server matched with the configured test environment parameters from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
In one possible embodiment of the method according to the invention,
the test extracting module is used for determining whether a test case with execution failure exists or not based on a plurality of execution results; and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
In one possible embodiment, the method further comprises:
and the output module is used for outputting an indication message for indicating that the code to be tested does not pass the self-test if the test case with execution failure exists.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, the processor being configured to execute a test program stored in the memory to implement the test method of any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the method for providing a test according to any one of the first aspects.
According to the technical scheme provided by the embodiment of the invention, when the target Git branch is detected to be updated, the codes on the target Git branch are pulled, the test environment is deployed according to the codes, a plurality of test cases corresponding to the target Git branch are executed in the test environment, the execution results of the plurality of test cases are obtained, the extracting and testing mail is generated and sent based on the plurality of execution results and the target Git branch, and the automatic extracting and testing are realized when the target Git branch is updated.
Meanwhile, the code is automatically tested before being upgraded, so that the execution of a self-testing link is ensured, and the probability that the test fails to pass or even the repeated upgrade is rejected in the upgrading link can be reduced. Because the test mail is generated based on the execution results of the plurality of test cases, the tester can know which test processes are performed in the self-test link, so that the tester can be prevented from repeatedly executing some test processes in the test process, and the efficiency of the whole code test process is improved.
Drawings
Fig. 1 is a flowchart of an embodiment of a method for performing an analysis according to an embodiment of the present invention;
FIG. 2 is a block diagram of an embodiment of a test system according to the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method provided by the present invention is further explained with specific embodiments in the following with reference to the drawings, and the embodiments do not limit the embodiments of the present invention.
Referring to fig. 1, a flowchart of an embodiment of a method for performing an analysis according to an embodiment of the present invention is shown. As an embodiment, the method may be applied to a test system, and optionally, the test system may be deployed on a single electronic device or a device cluster, and the test system is described below by using the embodiment shown in fig. 2, which will not be described in detail here.
As shown in fig. 1, the method comprises the following steps:
and step 101, pulling the code on the target Git branch when the target Git branch is detected to be updated.
Git is an open-source, distributed version control system that can handle project version management from very small to very large versions efficiently and at high speed, and in practice, more and more developers use Git to manage project development. The Git branch is used for separating tasks, such as testing, new function development, vulnerability repair and the like, from a project development main line so as to avoid influencing the project development main line, thereby ensuring the stability and the safety of the project development process.
Based on this, as one embodiment, the automatic test flow of code may be triggered by monitoring the Git branch. Specifically, the Git address and the Git branch (hereinafter referred to as the target Git branch) to be monitored may be preset by a developer, so that when an update of the target Git branch is detected, an automatic test flow may be triggered.
In this step 101, when it is detected that the target Git branch is updated, the code on the target Git branch is pulled from the Git repository, so that the subsequent extraction flow of the pulled code is developed. It will be appreciated that the code pulled is the newly developed code.
And step 102, deploying a test environment according to the codes.
The test environment comprises a hardware environment and a software environment, wherein the hardware environment refers to an environment formed by auxiliary hardware equipment such as a server, a client, network connection equipment, a printer/scanner and the like which are necessary for testing; the software environment refers to an environment formed by an operating system, a database and other application software when the tested software/code runs. Further, under normal circumstances, the test environments required by different items and different functions are likely to be different, for example, one tested software needs to occupy a larger memory space when running, and another tested software only needs to occupy a smaller memory space when running, so in practice, the test environment corresponding to the previous tested software may be required to have a larger memory space.
Based on this, as an embodiment, a developer may configure test environment parameters in advance according to actual requirements, when the test environment is deployed by the test system, determine a server (hereinafter referred to as a target server) that is idle and matches the configured test environment parameters from a plurality of connected test servers, deploy the code obtained in the step 101 to the target server, and control the target server to run the code, thereby completing the deployment of the test environment.
Optionally, the test environment parameters include hardware environment parameters and software environment parameters, where the hardware environment parameters include but are not limited to: CPU core number, memory capacity, disk capacity, etc.; software environment parameters include, but are not limited to: jdk version, tomcat version, etc.
Optionally, the test system may deploy the code obtained in step 101 to the target server based on a jenkins pipeline workflow framework, and send a command to the target server based on the jenkins pipeline workflow framework to control the target server to run the code, thereby completing the deployment of the test environment.
As one embodiment, the proposed test system can manage a plurality of test servers, store hardware parameters and software parameters of the plurality of test servers, and monitor the status (including idle and non-idle) of each test server. Thus, the proposed test system can determine a free target server matching the configured test environment parameters from the connected multiple test servers in step 102.
And 103, executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases.
And 104, generating a test mail based on the plurality of execution results and the target Git branch and sending the test mail.
Step 103 and step 104 are explained below collectively:
as can be seen from the above steps 103 and 104, in the embodiment of the present invention, before the loop is extracted, the code to be tested (i.e., the code pulled in step 101) is automatically tested, which can ensure that the code to be tested is self-tested before the loop is extracted, so that the probability that the test fails or even the loop is rejected in the extraction loop can be reduced.
Specifically, the above-mentioned test system can support the mainstream automated test framework at present, including but not limited to: based on the fact that the test system can trigger the test based on the automated test framework in step 103, in the test process, the test system can execute a plurality of test cases corresponding to the target Git branch in the test environment by interacting with the test server, so as to obtain the execution results of the plurality of test cases. In practice, the plurality of test cases may be set by a developer and a tester together before testing. Optionally, the test case includes but is not limited to: unit test cases, smoke test cases, regression test cases, and the like.
As an embodiment, in an application, in order to effectively reduce the probability of failing to test or even rejecting re-extraction in a test extraction link, in step 104, it is first determined whether there is a test case with failed execution based on the execution results of multiple test cases, and if there is no test case with failed execution, it means that the code under test can run correctly and stably, so that a subsequent test extraction link can be performed.
In step 104, a test mail is generated and sent based on the execution results of the plurality of test cases and the target Git branch, as one embodiment. Specifically, the extracting and testing system can extract information such as the target Git branch and the change range of the target Git branch and fill the information in a preset extracting and testing template, generate a testing report based on the execution results of a plurality of testing cases, and generate an extracting and testing mail by using the extracting and testing template and the testing report and send the extracting and testing mail to corresponding testing personnel. Therefore, the test mail generated by the embodiment of the invention not only comprises the content to be tested, but also comprises the test report of the self-test link, so that the tester can know which test processes are performed in the self-test link based on the test report, and the tester can be prevented from repeatedly executing some test processes in the test process, thereby improving the efficiency of the whole code test process.
Optionally, the test report includes, but is not limited to, a type, an execution result, and the like of each test case.
In addition, if it is determined in step 104 that there is a test case with execution failure, it means that the code under test cannot run correctly and stably, and at this time, an indication message indicating that the code under test fails self-test may be output, so that the developer modifies the code under test. It can be understood that through the processing, the code which cannot run correctly can be effectively prevented from being submitted to a tester, so that unnecessary work is brought to the tester, and the project development cycle is prolonged.
According to the technical scheme provided by the embodiment of the invention, when the target Git branch is detected to be updated, the codes on the target Git branch are pulled, the test environment is deployed according to the codes, a plurality of test cases corresponding to the target Git branch are executed in the test environment, the execution results of the plurality of test cases are obtained, the extracting and testing mail is generated and sent based on the plurality of execution results and the target Git branch, and the automatic extracting and testing are realized when the target Git branch is updated.
Meanwhile, the code is automatically tested before being upgraded, so that the execution of a self-testing link is ensured, and the probability that the test fails to pass or even the repeated upgrade is rejected in the upgrading link can be reduced. Because the test mail is generated based on the execution results of the plurality of test cases, the tester can know which test processes are performed in the self-test link, so that the tester can be prevented from repeatedly executing some test processes in the test process, and the efficiency of the whole code test process is improved.
Referring to fig. 2, a block diagram of an embodiment of a test system according to an embodiment of the present invention is provided. As shown in fig. 2, the presentation system includes: an environment deployment module 21, a test module 22, and a provision module 23;
the environment deployment module 21, when detecting that a target Git branch is updated, pulls a code on the target Git branch; deploying a test environment according to the code;
the test module 22 executes a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases;
and the submission module 23 is configured to generate a submission email based on the plurality of execution results and the target Git branch, and send the submission email.
In one possible embodiment of the method according to the invention,
the environment deployment module 21 determines an idle target server matched with the configured test environment parameters from the connected plurality of test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
In one possible embodiment of the method according to the invention,
the test-promoting module 23 determines whether there is a test case with execution failure based on the plurality of execution results; and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
In a possible embodiment, it also comprises (not shown in fig. 2):
and the output module is used for outputting an indication message for indicating that the code to be tested does not pass the self-test if the test case with execution failure exists.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 300 shown in fig. 3 includes: at least one processor 301, memory 302, at least one network interface 304, and other user interfaces 303. The various components in electronic device 300 are coupled together by a bus system 305. It will be appreciated that the bus system 305 is used to enable communications among the components connected. The bus system 305 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 305 in fig. 3.
The user interface 303 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 302 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 302 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 302 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 3021 and application programs 3022.
The operating system 3021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs 3022 include various application programs such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program implementing the method of an embodiment of the present invention may be included in the application program 3022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 302, specifically, a program or an instruction stored in the application 3022, the processor 301 is configured to execute the method steps provided by the method embodiments, for example, including:
when the target Git branch is detected to be updated, pulling a code on the target Git branch;
deploying a test environment according to the code;
executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases;
and generating an offering mail based on a plurality of execution results and the target Git branch and sending the offering mail.
In one possible embodiment, the deploying a test environment according to the code includes:
determining a target server which is matched with the configured test environment parameters and is idle from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
In one possible embodiment, the generating and sending a submission email based on the plurality of execution results and the target Git branch includes:
determining whether a test case with execution failure exists based on a plurality of execution results;
and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
In one possible embodiment, the method further comprises:
and if the test case with execution failure exists, outputting an indication message for indicating that the code to be tested does not pass the self-test.
In one possible embodiment, the test cases at least include smoking test cases, unit test cases and regression test cases.
The method disclosed in the above embodiments of the present invention may be applied to the processor 301, or implemented by the processor 301. The processor 301 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 301. The processor 301 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 302, and the processor 301 reads the information in the memory 302 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 3, and may perform all the steps of the method for testing shown in fig. 1, so as to achieve the technical effect of the method for testing shown in fig. 1.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the method for providing the test performed on the electronic device side is implemented.
The processor is used for executing the extracting program stored in the memory so as to realize the following steps of the extracting method executed on the electronic equipment side:
when the target Git branch is detected to be updated, pulling a code on the target Git branch;
deploying a test environment according to the code;
executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases;
and generating an offering mail based on a plurality of execution results and the target Git branch and sending the offering mail.
In one possible embodiment, the deploying a test environment according to the code includes:
determining a target server which is matched with the configured test environment parameters and is idle from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
In one possible embodiment, the generating and sending a submission email based on the plurality of execution results and the target Git branch includes:
determining whether a test case with execution failure exists based on a plurality of execution results;
and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
In one possible embodiment, the method further comprises:
and if the test case with execution failure exists, outputting an indication message for indicating that the code to be tested does not pass the self-test.
In one possible embodiment, the test cases at least include smoking test cases, unit test cases and regression test cases.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of performing an assay, comprising:
when the target Git branch is detected to be updated, pulling a code on the target Git branch;
deploying a test environment according to the code;
executing a plurality of test cases corresponding to the target Git branch in the test environment to obtain an execution result of the plurality of test cases;
and generating an offering mail based on a plurality of execution results and the target Git branch and sending the offering mail.
2. The method of claim 1, wherein deploying the test environment according to the code comprises:
determining a target server which is matched with the configured test environment parameters and is idle from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
3. The method of claim 1, wherein generating and sending an email based on the plurality of execution results and the target Git branch comprises:
determining whether a test case with execution failure exists based on a plurality of execution results;
and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
4. The method of claim 3, further comprising:
and if the test case with execution failure exists, outputting an indication message for indicating that the code to be tested does not pass the self-test.
5. The method according to any one of claims 1 to 4, wherein the test cases at least include smoking test cases, unit test cases, and regression test cases.
6. An extraction system, comprising: the system comprises an environment deployment module, a test module and a lifting and testing module;
the environment deployment module pulls codes on the target Git branch when detecting that the target Git branch is updated; deploying a test environment according to the code;
the test module executes a plurality of test cases corresponding to the target Git branch in the test environment to obtain the execution results of the plurality of test cases;
and the test promoting module generates a test promoting mail based on the execution results and the target Git branch and sends the test promoting mail.
7. The system of claim 6,
the environment deployment module is used for determining an idle target server matched with the configured test environment parameters from a plurality of connected test servers;
and deploying the code to the target server, and controlling the target server to run the code to complete the deployment of the test environment.
8. The system of claim 6,
the test extracting module is used for determining whether a test case with execution failure exists or not based on a plurality of execution results; and if the test case with execution failure does not exist, generating a test mail based on the execution results and the target Git branch and sending the test mail.
9. An electronic device, comprising: a processor and a memory, the processor being configured to execute a test program stored in the memory to implement the test method of any one of claims 1 to 5.
10. A storage medium storing one or more programs executable by one or more processors to implement the method of any one of claims 1 to 5.
CN202011185067.9A 2020-10-29 2020-10-29 Extraction and detection method, system, electronic equipment and storage medium Pending CN112162931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011185067.9A CN112162931A (en) 2020-10-29 2020-10-29 Extraction and detection method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011185067.9A CN112162931A (en) 2020-10-29 2020-10-29 Extraction and detection method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112162931A true CN112162931A (en) 2021-01-01

Family

ID=73865169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011185067.9A Pending CN112162931A (en) 2020-10-29 2020-10-29 Extraction and detection method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112162931A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656296A (en) * 2021-08-10 2021-11-16 挂号网(杭州)科技有限公司 Code testing method and device, electronic equipment and storage medium
CN115756996A (en) * 2023-01-09 2023-03-07 苏州浪潮智能科技有限公司 Chip testing method, device and equipment and readable storage medium
CN116360800A (en) * 2023-05-29 2023-06-30 天翼云科技有限公司 Deployment method and device of code branching environment and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130152047A1 (en) * 2011-11-22 2013-06-13 Solano Labs, Inc System for distributed software quality improvement
CN106708740A (en) * 2017-01-10 2017-05-24 网易(杭州)网络有限公司 Script testing method and device
CN109358858A (en) * 2018-09-19 2019-02-19 网易(杭州)网络有限公司 Automatically dispose method, apparatus, medium and electronic equipment
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integrating automated testing method, device, equipment and medium
CN110413504A (en) * 2019-06-18 2019-11-05 江苏满运软件科技有限公司 A kind of method for testing software, device, equipment and storage medium
CN111324522A (en) * 2018-12-13 2020-06-23 北京数聚鑫云信息技术有限公司 Automatic test system and method
CN111444080A (en) * 2019-01-17 2020-07-24 北京京东尚科信息技术有限公司 Continuous testing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130152047A1 (en) * 2011-11-22 2013-06-13 Solano Labs, Inc System for distributed software quality improvement
CN106708740A (en) * 2017-01-10 2017-05-24 网易(杭州)网络有限公司 Script testing method and device
CN109358858A (en) * 2018-09-19 2019-02-19 网易(杭州)网络有限公司 Automatically dispose method, apparatus, medium and electronic equipment
CN111324522A (en) * 2018-12-13 2020-06-23 北京数聚鑫云信息技术有限公司 Automatic test system and method
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integrating automated testing method, device, equipment and medium
CN111444080A (en) * 2019-01-17 2020-07-24 北京京东尚科信息技术有限公司 Continuous testing method and device
CN110413504A (en) * 2019-06-18 2019-11-05 江苏满运软件科技有限公司 A kind of method for testing software, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656296A (en) * 2021-08-10 2021-11-16 挂号网(杭州)科技有限公司 Code testing method and device, electronic equipment and storage medium
CN115756996A (en) * 2023-01-09 2023-03-07 苏州浪潮智能科技有限公司 Chip testing method, device and equipment and readable storage medium
CN116360800A (en) * 2023-05-29 2023-06-30 天翼云科技有限公司 Deployment method and device of code branching environment and electronic equipment
CN116360800B (en) * 2023-05-29 2023-10-13 天翼云科技有限公司 Deployment method and device of code branching environment and electronic equipment

Similar Documents

Publication Publication Date Title
CN112162931A (en) Extraction and detection method, system, electronic equipment and storage medium
JP4961123B2 (en) Automated test case validation loosely coupled with respect to automated test case execution
US10019256B2 (en) Systems and methods for incremental software development
US8978015B2 (en) Self validating applications
US20190294531A1 (en) Automated software deployment and testing based on code modification and test failure correlation
US9703677B2 (en) Code coverage plugin
US10089217B2 (en) Identification of software test cases
US9417865B2 (en) Determining when to update a package manager software
US8805804B2 (en) Configuring an application program in a computer system
US20090204924A1 (en) Method, system and computer program product for failure analysis implementing automated comparison of multiple reference models
BR112019004964B1 (en) test case generator built in data integration workflow editor
US20090132999A1 (en) Secure and fault-tolerant system and method for testing a software patch
US10795793B1 (en) Method and system for simulating system failures using domain-specific language constructs
US11544048B1 (en) Automatic custom quality parameter-based deployment router
US20190073292A1 (en) State machine software tester
CN111258591A (en) Program deployment task execution method and device, computer equipment and storage medium
CN111783104B (en) Vulnerability checking method, vulnerability checking method and device for continuous integrated codes
US20210048999A1 (en) Automated generation of status chains for software updates
WO2020161994A1 (en) Dependence relationship detection device and dependence relationship detection method
KR20110067418A (en) System and method for monitoring and evaluating a self-healing system
US9734458B2 (en) Predicting outcome based on input
CN113094251A (en) Embedded system testing method and device, computer equipment and storage medium
CN113688028B (en) Code submitting method and device
Gao Quantifying flakiness and minimizing its effects on software testing
Sotiropoulos et al. The additional testsuite framework: facilitating software testing and test management

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: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd

CB02 Change of applicant information