CN111338926A - Patch testing method and device and electronic equipment - Google Patents

Patch testing method and device and electronic equipment Download PDF

Info

Publication number
CN111338926A
CN111338926A CN201811550879.1A CN201811550879A CN111338926A CN 111338926 A CN111338926 A CN 111338926A CN 201811550879 A CN201811550879 A CN 201811550879A CN 111338926 A CN111338926 A CN 111338926A
Authority
CN
China
Prior art keywords
test
patch
virtual machine
task
installation package
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
CN201811550879.1A
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201811550879.1A priority Critical patent/CN111338926A/en
Publication of CN111338926A publication Critical patent/CN111338926A/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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a patch testing method and device and electronic equipment. The method comprises the following steps: when any new patch installation package is detected, acquiring relevant information of a test environment corresponding to the new patch installation package; generating a corresponding test task according to the relevant information of the test environment; selecting at least one target virtual machine from a plurality of virtual machines which are constructed in advance, and distributing a test task to the at least one target virtual machine; and obtaining a test result obtained by executing the test task by at least one target virtual machine. According to the embodiment of the application, the test efficiency is improved, the stability of the patch pushed to the user is guaranteed, and the influence on the client side due to the poor stability of the patch is avoided.

Description

Patch testing method and device and electronic equipment
Technical Field
The application relates to the technical field of patch testing, in particular to a patch testing method and device and electronic equipment.
Background
The patch is a program for solving the issue of system bugs, and can solve the defects existing in the concrete implementation of hardware, software and protocols or system security strategies, thereby preventing an attacker from accessing or damaging the system under the unauthorized condition. Because the stability of the patch in different system environments is different, the influence on the client is different when the same patch is installed on different clients. For example, some clients can normally operate after installing patches, and some clients may have blue screens and the like which affect the normal operation of the clients. Thus requiring detection of published patches.
In the prior art, patches are generally pushed by using a software management tool, but the pushed patches are not tested again by using the pushing method, and the stability of the pushed patches cannot be guaranteed, that is, the clients cannot be guaranteed to run normally after the patches pushed by the software management tool are installed.
Disclosure of Invention
The application provides a patch testing method, a patch testing device and electronic equipment, which can solve the technical problem. The technical scheme is as follows:
in a first aspect, the present application provides a method for testing a patch, including:
when any new patch installation package is detected, acquiring relevant information of a test environment corresponding to the new patch installation package;
generating a corresponding test task according to the relevant information of the test environment;
selecting at least one target virtual machine from a plurality of virtual machines which are constructed in advance, and distributing a test task to the at least one target virtual machine;
and obtaining a test result obtained by executing the test task by at least one target virtual machine.
Further, selecting at least one target virtual machine from a plurality of virtual machines built in advance includes:
acquiring system environments respectively corresponding to a plurality of virtual machines;
and detecting whether the system environment of each virtual machine accords with the relevant information of the test environment corresponding to the test task, and determining the accorded virtual machine as a target virtual machine.
Further, when the number of virtual machines meeting the test environment related information corresponding to the test task exceeds a first predetermined value, determining the meeting virtual machine as a target virtual machine, including:
and selecting the virtual machine with the least number of virtual machine components as the target virtual machine.
Further, the test environment related information comprises at least one of: operating system, system components.
Further, the method further comprises:
and when the number of the test results received from any target virtual machine does not reach a second preset value, determining that the test task distributed to the any target virtual machine fails to test.
Further, the method further comprises:
when the number of the test results received from any target virtual machine is not less than a second preset value, extracting the test results of the target virtual machine after the target virtual machine completes the test task and restarts the system from the test results of any target virtual machine;
and determining the detailed information of the target virtual machine for executing the test task according to the label information of the test result after the system is restarted.
Further, determining the detailed information of the target virtual machine executing the test task includes:
if the value of the first description item in the label information is a third preset value, determining that the test task fails;
and if the value of the first description item in the label information is a fourth preset value, determining that the test task is successful, and pushing the patch installation package corresponding to the test task which is successful to test to the user client.
Further, upon determining that the test task failed the test, the method further comprises:
and acquiring the numerical value of the second description item in the label information, and determining the reason of the test failure according to the numerical value of the second description item.
In a second aspect, the present application provides another method for testing a patch, the method including:
when a test task is received, determining test environment related information corresponding to the test task;
determining corresponding scanning conditions according to the relevant information of the test environment;
inquiring a predetermined patch database according to the scanning conditions to obtain a storage path of a patch installation package corresponding to the test task;
and downloading the patch installation package according to the storage path, and installing the patch installation package.
Further, before receiving the test task, the method further includes:
and uploading the local system environment to the server for receiving the test task determined by the server according to the local system environment.
In a third aspect, the present application provides a device for testing a patch, the device comprising:
the patch detection module is used for acquiring the relevant information of the test environment corresponding to the new patch installation package when any new patch installation package is detected;
the task generating module is used for generating a corresponding test task according to the relevant information of the test environment;
the task allocation module is used for selecting at least one target virtual machine from a plurality of virtual machines which are constructed in advance and allocating a test task to the at least one target virtual machine;
and the result acquisition module is used for acquiring a test result obtained by executing the test task by at least one target virtual machine.
Further, the task allocation module is to:
acquiring system environments respectively corresponding to a plurality of virtual machines;
and detecting whether the system environment of each virtual machine accords with the relevant information of the test environment corresponding to the test task, and determining the accorded virtual machine as a target virtual machine.
Further, the task allocation module is to:
and when the number of the virtual machines which accord with the relevant information of the test environment corresponding to the test task exceeds a first preset value, selecting the virtual machine with the least number of the virtual machine components as a target virtual machine.
Further, the test environment related information comprises at least one of: operating system, system components.
Further, the result obtaining module is further configured to:
and when the number of the test results received from any target virtual machine does not reach a second preset value, determining that the test task distributed to the any target virtual machine fails to test.
Further, the result obtaining module is further configured to:
when the number of the test results received from any target virtual machine is not less than a second preset value, extracting the test results of the target virtual machine after the target virtual machine completes the test task and restarts the system from the test results of any target virtual machine;
and determining the detailed information of the target virtual machine for executing the test task according to the label information of the test result after the system is restarted.
Further, the result obtaining module is further configured to:
if the value of the first description item in the label information is a third preset value, determining that the test task fails;
and if the value of the first description item in the label information is a fourth preset value, determining that the test task is successful, and pushing the patch installation package corresponding to the test task which is successful to test to the user client.
Further, the result obtaining module is further configured to: and when the test task fails, acquiring the numerical value of the second description item in the label information, and determining the reason of the test failure according to the numerical value of the second description item.
In a fourth aspect, the present application provides another apparatus for testing a patch, the apparatus comprising:
the task receiving module is used for determining the relevant information of the test environment corresponding to the test task when the test task is received;
the scanning determining module is used for determining corresponding scanning conditions according to the relevant information of the test environment;
the patch determining module is used for inquiring a preset patch database according to the scanning conditions so as to obtain a storage path of the patch installation package corresponding to the test task;
and the patch installation module is used for downloading the patch installation package according to the storage path and installing the patch installation package.
Further, the task receiving module is further configured to: and uploading the local system environment to the server before receiving the test task, so as to receive the test task determined by the server according to the local system environment.
In a fifth aspect, the present application provides an electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: and executing the testing method of the patch.
In a sixth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of testing the patch described above.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
when any new patch installation package is detected, acquiring test environment related information corresponding to the new patch installation package so as to generate a corresponding test task according to the test environment related information, and after at least one target virtual machine is selected from a plurality of pre-constructed virtual machines and is distributed to the at least one target virtual machine, acquiring test results obtained by the at least one target virtual machine executing the test task respectively so as to analyze the reason of test failure according to the test results, thereby improving the test efficiency, ensuring the stability of the patch pushed to a user and avoiding the influence on a client side due to the poor stability of the patch;
when a test task is received, determining test environment related information corresponding to the test task, determining corresponding scanning conditions according to the test environment related information, so that the scanning conditions are determined to inquire the limiting conditions of a patch database, thereby quickly obtaining a storage path of a patch installation package corresponding to the test task, downloading the patch installation package according to the storage path, installing the patch installation package, achieving the purpose of completing the test of patch stability by using a virtual machine, providing data assurance for a subsequent service end to obtain a test result of the virtual machine executing the test task, and further analyzing to obtain a patch suitable for a user end.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flowchart of a method for testing a patch according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another patch testing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for testing a patch according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for testing a patch according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a test system of a C/S architecture according to a third embodiment of the present application;
fig. 6 is a schematic diagram of a component list provided in the third embodiment of the present application;
fig. 7 is a schematic structural diagram of a device for testing a patch according to a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of a device for testing a patch according to a fifth embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to a seventh embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the prior art, a software management tool is used as a general patch downloading tool, and only plays a role in pushing and providing a downloading service, and the stability of a patch provided by the software management tool, especially a patch provided by a third party, cannot be ensured. For example, if the office patch provided by microsoft is incompatible with the application program provided by other software operators and even is easy to generate a bug, the installation of the client may cause abnormal operation of the client and even a blue screen phenomenon.
The patch testing method, device, electronic equipment and computer-readable storage medium provided by the application aim to solve the above technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example one
The embodiment of the application provides a method for testing a patch, as shown in fig. 1, the method includes: step S101 to step S104.
Step S101, when any new patch installation package is detected, the relevant information of the test environment corresponding to the new patch installation package is obtained.
In this embodiment, the server detects the patch database in real time to determine whether there is a new patch installation package in the patch database. In particular, the patch database may be disposed locally at the server, or disposed at another device in communication with the server, such as a cloud database. And the server side detects the patch database, and if a new patch installation package is detected, the server side acquires the test environment related information corresponding to the installation package of the patch.
In this embodiment, the server may be an electronic device capable of serving as a server, such as a server, a PC, and a notebook.
In this embodiment, the relevant test environment information is used to determine a condition required for running the patch installation package, for example, the relevant test environment party information corresponding to the patch installation package X is: a win10 system and version number of 1.1.1.1. NET framework, therefore, if the operation condition of the virtual machine does not satisfy the information related to the test environment, the virtual machine may have a situation that the patch installation package X cannot be installed or cannot be operated after installation.
In actual application, it is assumed that two patch installation packages, namely a patch installation package 1 and a patch installation package 2, are stored in an initial patch database, and when a patch installation package 3 is downloaded to the patch database, a server detects a new patch installation package 3 and obtains test environment related information corresponding to the patch installation package 3.
In practical application, if the patch installation provided by the third party needs to be tested, an address for storing the patch installation package by the third party can be configured on the server, so that the server can download the patch installation package provided by the third party according to the address and store the patch installation package in the patch database.
And S102, generating a corresponding test task according to the relevant information of the test environment.
Specifically, the test environment-related information includes at least one of: operating system, system components. The embodiment determines the virtual machine for installing or running the new patch installation package according to the test environment related information.
In this embodiment, a database, such as a bat library, may be provided for storing the test environment related information included in all the obtained new patch installations, so that the server may determine the test task according to the database. In actual application, a test task generally corresponds to test environment related information of a patch installation package.
Step S103, selecting at least one target virtual machine from the plurality of virtual machines which are constructed in advance, and distributing the test task to the at least one target virtual machine.
In this embodiment, the plurality of pre-built virtual machines may be set on the same client terminal (e.g., a PC), or may be set on a plurality of client terminals. In practical application, a client terminal may be provided with several or even dozens of virtual machines. In actual application, one or more virtual machines can be selected as a server from a plurality of pre-constructed virtual machines so as to execute the patch testing method provided by the application.
For example, assuming that 20 virtual machines are constructed in advance, the numbers of which are respectively 1 to 20, if the virtual machine with the number of 1 is configured as a server, the server selects a target virtual machine from the remaining 19 virtual machines, and if the selected target virtual machine is the virtual machine with the number of 2, the server with the number of 1 allocates a test task to the virtual machine with the number of 2, so that the virtual machine with the number of 2 executes the test task.
And step S104, obtaining a test result obtained by executing the test task by at least one target virtual machine.
According to the method and the device, when any new patch installation package is detected, the relevant information of the test environment corresponding to the new patch installation package is obtained, so that a corresponding test task can be generated according to the relevant information of the test environment, at least one target virtual machine is selected from a plurality of pre-constructed virtual machines, the test task is distributed to the at least one target virtual machine, test results obtained by the at least one target virtual machine executing the test task are obtained, the reason of test failure can be analyzed according to the test results, the test efficiency is improved, the stability of the patch pushed to a user is guaranteed, and the influence on a client side due to the poor stability of the patch is avoided.
In one implementation, as shown in fig. 1, the selecting at least one target virtual machine among the plurality of virtual machines built in advance in step S103 includes: step S1031 (not shown in the figure) and step S1032 (not shown in the figure).
Step S1031, obtaining system environments corresponding to the multiple virtual machines respectively;
step S1032, whether the system environment of each virtual machine accords with the relevant information of the test environment corresponding to the test task or not is detected, and the accorded virtual machine is determined as the target virtual machine.
In this embodiment, the system environments corresponding to the multiple virtual machines are obtained, and the virtual machine that meets the relevant information of the test environment corresponding to the test task is selected from the system environments, and is determined as the target virtual machine. In practical applications, the number of target virtual machines meeting the same test task may be 1 or multiple.
Further, in step S1032, when the number of virtual machines meeting the test environment related information corresponding to the test task exceeds a first predetermined value, determining the meeting virtual machine as a target virtual machine, including: and selecting the virtual machine with the least number of virtual machine components as the target virtual machine.
In this embodiment, the first predetermined value is generally set to 1, and when two or more target virtual machines are detected, the current test task may be allocated to the virtual machines.
The embodiment solves the problem of low testing efficiency caused by random selection of a plurality of target virtual machines in the prior art, and prevents the problem of low testing passing rate caused by different virtual machine components.
In one implementation, as shown in fig. 2, the method includes steps S201 to S205, where the steps S201, S202, S203, and S204 are the same as or similar to the execution processes of the steps S101, S102, S103, and S104, respectively, and are not repeated herein.
Step S205, when the number of the test results received from any target virtual machine does not reach the second predetermined value, determining that the test task assigned to the any target virtual machine fails.
In the present embodiment, the second predetermined value is set to 2. In practical application, after any target virtual machine executes a test task, the server can obtain two test results, one is a virtual machine performance parameter before the target virtual machine executes the test task, and the other is a virtual machine performance parameter after the target virtual machine executes the test task, and a test user can analyze the two test results obtained by the server to determine the success or failure of the test, or even the reason of the failure. If the number of the test results received by the server from any target virtual machine is 1, it can be determined that the test result obtained by the server is the performance parameter before the target virtual machine executes the test task, and the performance parameter after the target virtual machine executes the test task cannot be obtained, which indicates that the target virtual machine cannot normally operate after executing the test task, and if a blue screen occurs, it can be determined that the test task distributed to the target virtual machine fails to be tested.
In another implementation, as shown in fig. 3, the method includes steps S301 to S307, where steps S301, S302, S303, S304, and S305 are respectively the same as or similar to the execution processes of steps S201, S202, S203, S204, and S205, and are not repeated herein. Step S306, when the number of the test results received from any target virtual machine is not less than a second preset value, extracting the test results of the target virtual machine after the target virtual machine completes the test task and restarts the system from the test results of any target virtual machine;
step S307, determining detailed information of the target virtual machine executing the test task according to the label information of the test result after restarting the system.
In this embodiment, a judgment basis is provided for determining detailed information of the target virtual machine executing the test task according to the test result after any target virtual machine completes the test task and restarts the system.
In one implementation, as shown in fig. 3, the determining, in step S307, the detailed information of the target virtual machine executing the test task includes: step S3071 (not shown in the figure) and step S3072 (not shown in the figure).
Step S3071, if the value of the first description item in the label information is a third preset value, determining that the test task fails;
step S3072, if the value of the first description item in the label information is a fourth preset value, determining that the test task is successful, and pushing the patch installation package corresponding to the test task which is successful to test to the user client.
In this embodiment, the third preset value is set to 0, and the fourth preset value is set to 1, specifically, the first description item may be a test identifier, and if the test identifier is 0, it is determined that the test fails; and if the test identifier is 1, determining that the test is successful.
In another implementation, as shown in fig. 3, when it is determined that the test task fails in step S307, the method further includes:
step S3073 (not shown in the figure), obtains the value of the second description item in the tag information, and determines the reason of the test failure according to the value of the second description item.
Specifically, the second description item may be a scan result (scan), a download result (download), an install result (instsall), or the like. For example, if the value of the scan is 0, it indicates that the target virtual machine fails to detect the patch installation package corresponding to the test task from the patch database; and if the value of the scan is 1, the target virtual machine is indicated to successfully detect the patch installation package corresponding to the test task from the patch database. If the value of the download load is 0, indicating that the target virtual machine fails to download the patch installation package corresponding to the test task from the patch database; and if the value of the download load is 1, indicating that the target virtual machine successfully downloads the patch installation package corresponding to the test task from the patch database.
According to the method and the device, the speed of determining the reason of the failure of the test task is increased by determining and acquiring the numerical value of the second description item, so that a test user can conveniently search the reason, and the test efficiency of the patch test is improved.
Example two
An embodiment of the present application provides a method for testing a patch, as shown in fig. 4, the method includes: step S401 to step S404.
Step S401, when the test task is received, the relevant information of the test environment corresponding to the test task is determined.
In this embodiment, the virtual machine serving as the client receives the test task allocated by the server, and determines test environment related information corresponding to the test task. In practical application, one virtual machine can receive one tested task at the same time, and can also receive a plurality of test tasks at the same time. In the present application, the same virtual machine is generally configured as follows: the method and the device receive a test task within the preset time, thereby ensuring that each patch can be effectively tested, and preventing the problem that the stability of the patch installation package corresponding to the test task cannot be confirmed due to the fact that a plurality of test tasks are executed simultaneously.
Step S402, determining corresponding scanning conditions according to the relevant information of the test environment.
In this embodiment, the scanning conditions may be set to scanning time, scanning times, and the like. For example, the scanning time is 60 seconds, if the virtual machine cannot scan the patch installation package in the patch database within 60 seconds, it is determined that the reason of the test failure is the scan failure, and the purpose of rapidly scanning and improving the test efficiency is achieved through the limitation of the scanning condition, so that the problem that the test is not stopped for a long time due to too long scanning period or the scanning cannot be stopped is prevented.
Step S403, querying a predetermined patch database according to the scanning condition to obtain a storage path of the patch installation package corresponding to the test task.
In the embodiment, the virtual machine searches the patch database according to the scanning conditions, so that the problem of low testing efficiency caused by long-time inquiry of the patch database and even repeated inquiry of the patch database by the virtual machine is solved.
And S404, downloading the patch installation package according to the storage path, and installing the patch installation package.
In the embodiment of the application, when a test task is received, test environment related information corresponding to the test task is determined, corresponding scanning conditions are determined according to the test environment related information, so that the scanning conditions are determined to inquire the limiting conditions of a patch database, the storage path of a patch installation package corresponding to the test task is quickly obtained, the patch installation package is downloaded according to the storage path, and the patch installation package is installed, so that the purpose of completing the test of patch stability by using a virtual machine is achieved, data assurance is provided for a subsequent server side to obtain the test result of the virtual machine executing the test task, and then the patch is analyzed to obtain the patch suitable for a user side.
In one implementation, before the test task is received in step 401, the method further includes:
and uploading the local system environment to the server for receiving the test task determined by the server according to the local system environment.
In this embodiment, the virtual machine uploads the local system environment of the virtual machine to the server in advance, so that the server allocates the test task according to the local system environment of the virtual machine, and the virtual machine receives the test task after the server determines and sends the allocated test task.
For example, after the local system environment of the virtual machine 1 is uploaded to the server, the server determines the test task, compares the test environment related information corresponding to the test task with the received local system environments uploaded by all the virtual machines, and if it is determined that the local system environment of the virtual machine 1 conforms to the test environment related information corresponding to the test task, the server sends the test task to the virtual machine 1.
EXAMPLE III
In order to describe the patch testing method provided in the present application in detail, the following is further described with reference to a testing system based on a C/S structure as shown in fig. 5.
As shown in fig. 5, in this embodiment, a server provides services to N pre-constructed virtual machines, before application, the server obtains a local system environment corresponding to each virtual machine so as to be stored in a database, after receiving a submitted test task, the server determines a target virtual machine in each pre-constructed N virtual machines by querying the database so as to send the test task, and after receiving the test task, the virtual machine completes a virtual machine test, returns a test result to the server, and outputs the test result to the server for result display, so that a test user performs analysis and judgment.
In actual application, the test task submitted to the server may be generated by the server according to the detected test environment related information of the new patch installation package, or generated by other servers according to the detected test environment related information of the new patch installation package.
In practical application, different versions of Windows environments can be created for each virtual machine, such as Windows7, vista, Windows8, Windows8.1, Windows10 (including various Windows10 large-build versions), Windows server 2003, Windows server 2012, and the like. In addition, different component environments (namely virtual machine components) can be constructed for the Windows environment manufactured by the virtual machine, namely, various software such as net/IE/Office/Flash and the like can be installed in the Windows environment. Specifically, the various types of software may be arranged as shown in FIG. 6. In practical application, the software in the component list shown in fig. 6 can be reasonably arranged and combined to improve the speed of manually simulating the user environment. In practical application, the components of the virtual machine may be configured in real time according to the test task, that is, when there is a corresponding patch to be tested, the components are selected from the component list shown in fig. 6 according to the test environment related information corresponding to the test task, so as to complete the configuration of the local system environment of the virtual machine, and achieve the purpose that fewer virtual machines cover more environments.
Example four
An embodiment of the present application provides a device for testing a patch, and as shown in fig. 7, the device for testing a patch 50 may include: a patch detection module 501, a task generation module 502, a task allocation module 503, and a result acquisition module 504, wherein,
a patch detection module 501, configured to obtain test environment related information corresponding to any new patch installation package when detecting any new patch installation package;
a task generating module 502, configured to generate a corresponding test task according to the relevant information of the test environment;
a task allocation module 503, configured to select at least one target virtual machine from a plurality of virtual machines that are pre-constructed, and allocate a test task to the at least one target virtual machine;
a result obtaining module 504, configured to obtain a test result obtained by at least one target virtual machine executing a test task respectively.
According to the method and the device, when any new patch installation package is detected, the relevant information of the test environment corresponding to the new patch installation package is obtained, so that a corresponding test task can be generated according to the relevant information of the test environment, at least one target virtual machine is selected from a plurality of pre-constructed virtual machines, the test task is distributed to the at least one target virtual machine, test results obtained by the at least one target virtual machine executing the test task are obtained, the reason of test failure can be analyzed according to the test results, the test efficiency is improved, the stability of the patch pushed to a user is guaranteed, and the influence on a client side due to the poor stability of the patch is avoided.
Further, the task allocation module 503 is further configured to obtain system environments corresponding to the multiple virtual machines, respectively; and detecting whether the system environment of each virtual machine accords with the relevant information of the test environment corresponding to the test task, and determining the accorded virtual machine as a target virtual machine.
Further, the task allocation module 503 is further configured to select the virtual machine with the minimum number of virtual machine components as the target virtual machine when the number of virtual machines meeting the test environment related information corresponding to the test task exceeds a first predetermined value.
Further, the test environment related information comprises at least one of: operating system, system components.
Further, the result obtaining module 504 is further configured to determine that the test task assigned to any target virtual machine fails to be tested when the number of the test results received from the target virtual machine does not reach the second predetermined value.
Further, the result obtaining module 504 is further configured to, when the number of the test results received from any target virtual machine is not less than a second predetermined value, extract a test result after the target virtual machine completes the test task and restarts the system from the test result of the any target virtual machine; and determining the detailed information of the target virtual machine for executing the test task according to the label information of the test result after the system is restarted.
Further, the result obtaining module 504 is further configured to determine that the test task fails to be tested if the value of the first description item in the tag information is a third preset value; and if the value of the first description item in the label information is a fourth preset value, determining that the test task is successful, and pushing the patch installation package corresponding to the test task which is successful to test to the user client.
Further, the result obtaining module 504 is further configured to, when it is determined that the test task fails to test, obtain a numerical value of a second description item in the tag information, and determine a reason for the test failure according to the numerical value of the second description item.
The testing apparatus for patches of this embodiment can execute the testing method for patches provided in this embodiment of the present application, and the implementation principles are similar, and are not described herein again.
EXAMPLE five
An embodiment of the present application provides a device for testing a patch, and as shown in fig. 8, the device 60 for testing a patch may include: a task receiving module 601, a scan determining module 602, a patch determining module 603, and a patch installing module 604, wherein,
the task receiving module 601 is configured to determine test environment related information corresponding to a test task when the test task is received;
a scan determining module 602, configured to determine a corresponding scan condition according to the relevant information of the test environment;
the patch determining module 603 is configured to query a predetermined patch database according to the scanning condition to obtain a storage path of the patch installation package corresponding to the test task;
and a patch installation module 604, configured to download the patch installation package according to the storage path, and install the patch installation package.
In the embodiment of the application, when a test task is received, test environment related information corresponding to the test task is determined, corresponding scanning conditions are determined according to the test environment related information, so that the scanning conditions are determined to inquire the limiting conditions of a patch database, the storage path of a patch installation package corresponding to the test task is quickly obtained, the patch installation package is downloaded according to the storage path, and the patch installation package is installed, so that the purpose of completing the test of patch stability by using a virtual machine is achieved, data assurance is provided for a subsequent server side to obtain the test result of the virtual machine executing the test task, and then the patch is analyzed to obtain the patch suitable for a user side.
Further, the task receiving module 601 is further configured to upload the local system environment to the server before receiving the test task, so as to receive the test task determined by the server according to the local system environment.
The testing apparatus for patches of this embodiment can execute the testing method for patches shown in the second embodiment of this application, which is similar to the first embodiment in the implementation principle, and is not described here again.
EXAMPLE six
An embodiment of the present application provides an electronic device, as shown in fig. 9, an electronic device 700 shown in fig. 9 includes: a processor 7001 and a memory 7003. Wherein the processor 7001 and the memory 7003 are coupled, such as via a bus 7002. Further, the electronic device 700 may also include a transceiver 7004. Note that the transceiver 7004 is not limited to one in practical use, and the structure of the electronic device 700 is not limited to the embodiment of the present application.
The processor 7001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 7001 may also be a combination implementing computing functionality, e.g., comprising one or more microprocessors, a combination of DSPs and microprocessors, or the like.
Bus 7002 may include a path to transfer information between the above components. The bus 7002 may be a PCI bus, an EISA bus, or the like. The bus 7002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Memory 7003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, an EEPROM, a CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such.
The memory 7003 is used for storing application program codes for executing the present scheme, and the execution is controlled by the processor 7001. The processor 7001 is used to execute application code stored in the memory 7003 to implement the actions of the test apparatus for patches provided by the embodiment shown in fig. 7.
According to the method and the device, when any new patch installation package is detected, the relevant information of the test environment corresponding to the new patch installation package is obtained, so that a corresponding test task can be generated according to the relevant information of the test environment, at least one target virtual machine is selected from a plurality of pre-constructed virtual machines, the test task is distributed to the at least one target virtual machine, test results obtained by the at least one target virtual machine executing the test task are obtained, the reason of test failure can be analyzed according to the test results, the test efficiency is improved, the stability of the patch pushed to a user is guaranteed, and the influence on a client side due to the poor stability of the patch is avoided.
EXAMPLE seven
An embodiment of the present application provides an electronic device, as shown in fig. 10, an electronic device 800 shown in fig. 10 includes: a processor 8001 and memory 8003. Processor 8001 is coupled to memory 8003, such as via bus 8002. Further, the electronic device 800 may also include a transceiver 8004. In addition, in practical applications, the transceiver 8004 is not limited to one, and the structure of the electronic device 800 does not limit the embodiment of the present application.
Processor 8001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. Processor 8001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, DSP and microprocessor combinations, and so forth.
Bus 8002 may include a path to transfer information between the aforementioned components. The bus 8002 may be a PCI bus or an EISA bus, etc. The bus 8002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
Memory 8003 may be, but is not limited to, ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 8003 is used for storing application program codes for executing the scheme of the present application, and the execution is controlled by the processor 8001. Processor 8001 is used to execute application code stored in memory 8003 to implement the actions of the test device of patches provided by the embodiment shown in fig. 8.
Example eight
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method shown in the first embodiment.
Compared with the prior art, when any new patch installation package is detected, relevant information of a test environment corresponding to the new patch installation package is acquired, so that a corresponding test task is generated according to the relevant information of the test environment, after at least one target virtual machine is selected from a plurality of pre-constructed virtual machines and is distributed to the at least one target virtual machine, test results obtained by the at least one target virtual machine executing the test task are acquired, so that the reason of test failure is analyzed according to the test results, the test efficiency is improved, the test of patch stability is completed, so that patches which pass the test are pushed to users subsequently, and the influence on clients due to poor stability of the patches is avoided.
The embodiment of the present application provides a computer-readable storage medium suitable for the method shown in the first embodiment. And will not be described in detail herein.
Example nine
The embodiment of the application provides a computer readable storage medium, on which a computer program is stored, and the program is executed by a processor to implement the method shown in the second embodiment.
Compared with the prior art, when a test task is received, relevant information of the test environment corresponding to the test task is determined, corresponding scanning conditions are determined according to the relevant information of the test environment, so that the scanning conditions are determined to inquire the limiting conditions of a patch database, the storage path of a patch installation package corresponding to the test task is quickly obtained, the patch installation package is downloaded according to the storage path, the patch installation package is installed, and therefore a server side is guaranteed to be capable of obtaining the test result of the virtual machine executing the test task, follow-up analysis is facilitated, and a patch suitable for a user side is obtained.
The embodiment of the present application provides a computer-readable storage medium suitable for the method shown in the second embodiment. And will not be described in detail herein.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for testing a patch, comprising:
when any new patch installation package is detected, acquiring relevant information of a test environment corresponding to the new patch installation package;
generating a corresponding test task according to the relevant information of the test environment;
selecting at least one target virtual machine from a plurality of pre-constructed virtual machines, and distributing the test task to the at least one target virtual machine;
and obtaining a test result obtained by the at least one target virtual machine executing the test task respectively.
2. The method of claim 1, wherein selecting at least one target virtual machine among a plurality of pre-built virtual machines comprises:
acquiring system environments respectively corresponding to the virtual machines;
and detecting whether the system environment of each virtual machine accords with the relevant information of the test environment corresponding to the test task, and determining the accorded virtual machine as a target virtual machine.
3. The method according to claim 2, wherein when the number of virtual machines that meet the test environment related information corresponding to the test task exceeds a first predetermined value, the determining the meeting virtual machine as a target virtual machine comprises:
and selecting the virtual machine with the least number of virtual machine components as the target virtual machine.
4. A method for testing a patch, comprising:
when a test task is received, determining test environment related information corresponding to the test task;
determining corresponding scanning conditions according to the relevant information of the test environment;
inquiring a preset patch database according to the scanning conditions to obtain a storage path of the patch installation package corresponding to the test task;
and downloading the patch installation package according to the storage path, and installing the patch installation package.
5. An apparatus for testing a patch, comprising:
the patch detection module is used for acquiring test environment related information corresponding to any new patch installation package when the new patch installation package is detected;
the task generating module is used for generating a corresponding test task according to the relevant information of the test environment;
the task allocation module is used for selecting at least one target virtual machine from a plurality of pre-constructed virtual machines and allocating the test task to the at least one target virtual machine;
and the result acquisition module is used for acquiring a test result obtained by the at least one target virtual machine executing the test task respectively.
6. An apparatus for testing a patch, comprising:
the task receiving module is used for determining the relevant information of the test environment corresponding to the test task when the test task is received;
the scanning determining module is used for determining corresponding scanning conditions according to the relevant information of the test environment;
the patch determining module is used for inquiring a preset patch database according to the scanning conditions so as to obtain a storage path of the patch installation package corresponding to the test task;
and the patch installation module is used for downloading the patch installation package according to the storage path and installing the patch installation package.
7. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: a test method of executing a patch according to any one of claims 1-3.
8. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: a method of testing for execution of a patch as claimed in claim 4.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for testing a patch according to any one of claims 1-3.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of testing a patch as claimed in claim 4.
CN201811550879.1A 2018-12-18 2018-12-18 Patch testing method and device and electronic equipment Pending CN111338926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811550879.1A CN111338926A (en) 2018-12-18 2018-12-18 Patch testing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811550879.1A CN111338926A (en) 2018-12-18 2018-12-18 Patch testing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111338926A true CN111338926A (en) 2020-06-26

Family

ID=71183169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811550879.1A Pending CN111338926A (en) 2018-12-18 2018-12-18 Patch testing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111338926A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796857A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 Hot patch release method, device, equipment and storage medium
CN118158721A (en) * 2024-01-31 2024-06-07 广州致远电子股份有限公司 Wireless concurrency test method, device, equipment and storage medium
CN118277282A (en) * 2024-06-03 2024-07-02 天津南大通用数据技术股份有限公司 Data testing method and system for database

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622298A (en) * 2012-03-02 2012-08-01 奇智软件(北京)有限公司 Software testing system and method
CN104035861A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for obtaining intelligent terminal software
CN105511936A (en) * 2014-09-22 2016-04-20 北京奇虎科技有限公司 Test system, method and device
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
CN107678969A (en) * 2017-10-18 2018-02-09 广东神马搜索科技有限公司 Beta version dissemination method, device, Version Control equipment and test machine
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622298A (en) * 2012-03-02 2012-08-01 奇智软件(北京)有限公司 Software testing system and method
CN104035861A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for obtaining intelligent terminal software
CN105511936A (en) * 2014-09-22 2016-04-20 北京奇虎科技有限公司 Test system, method and device
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test
CN107678969A (en) * 2017-10-18 2018-02-09 广东神马搜索科技有限公司 Beta version dissemination method, device, Version Control equipment and test machine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796857A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 Hot patch release method, device, equipment and storage medium
CN111796857B (en) * 2020-06-30 2022-11-04 苏州三六零智能安全科技有限公司 Hot patch release method, device, equipment and storage medium
CN118158721A (en) * 2024-01-31 2024-06-07 广州致远电子股份有限公司 Wireless concurrency test method, device, equipment and storage medium
CN118277282A (en) * 2024-06-03 2024-07-02 天津南大通用数据技术股份有限公司 Data testing method and system for database
CN118277282B (en) * 2024-06-03 2024-09-10 天津南大通用数据技术股份有限公司 Data testing method and system for database

Similar Documents

Publication Publication Date Title
US11659020B2 (en) Method and system for real-time modeling of communication, virtualization and transaction execution related topological aspects of monitored software applications and hardware entities
CN108763090B (en) Test environment deployment method, device, computer equipment and storage medium
CN107733708B (en) Equipment parameter configuration method and device, computer equipment and storage medium
US11550562B2 (en) Virtualization platform for creating, deploying, modifying, and relocating applications
CN110457197B (en) Service testing method, device, computer equipment and storage medium
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
US20150242200A1 (en) Re-configuration in cloud computing environments
CN109684155B (en) Monitoring configuration method, device, equipment and readable storage medium
CN111338926A (en) Patch testing method and device and electronic equipment
CN106873970B (en) Installation method and device of operating system
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN110278101B (en) Resource management method and equipment
CN112860282A (en) Upgrading method and device of cluster plug-in and server
CN114185763A (en) Dynamic allocation method, device, storage medium and electronic equipment
CN108228197B (en) Method and device for installing software in cluster
CN113900670B (en) Cluster server application deployment system
CN110069406B (en) Automatic triggering TPC-DS test method and system
CN105357267A (en) Method, device and system for obtaining server information
CN108595195B (en) Application program updating method, device, terminal and storage medium
CN115729727A (en) Fault repairing method, device, equipment and medium
CN112527543A (en) Client starting exception handling method and device, electronic equipment and storage medium
CN111752819B (en) Abnormality monitoring method, device, system, equipment and storage medium
CN112256384A (en) Service set processing method and device based on container technology and computer equipment
CN109375946B (en) Method and system for managing component package of node package manager
US11360871B1 (en) Automatic optimization and hardening of application images

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626