CN107577597B - Installation package automatic testing method, device, equipment and storage medium - Google Patents

Installation package automatic testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN107577597B
CN107577597B CN201710684411.0A CN201710684411A CN107577597B CN 107577597 B CN107577597 B CN 107577597B CN 201710684411 A CN201710684411 A CN 201710684411A CN 107577597 B CN107577597 B CN 107577597B
Authority
CN
China
Prior art keywords
installation package
difference information
system snapshot
tested
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710684411.0A
Other languages
Chinese (zh)
Other versions
CN107577597A (en
Inventor
陈博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710684411.0A priority Critical patent/CN107577597B/en
Publication of CN107577597A publication Critical patent/CN107577597A/en
Application granted granted Critical
Publication of CN107577597B publication Critical patent/CN107577597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to an installation package automatic test method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring an installation package to be tested and an initial system snapshot of a current system; comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot; comparing the difference information with the difference information in a preset system snapshot comparison test template to obtain a comparison result; and responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test. According to the automatic test method for the installation package, the snapshot technology is adopted, the system snapshots before and after the installation package runs are compared to obtain the difference information, the difference information is compared with the system snapshot to compare with the test template, whether the installation package can pass the test can be quickly confirmed, the installation package to be tested can be completely and comprehensively tested (for example, the UI, the file system, the registry and the like of the installation package to be tested) and the coverage range is large.

Description

Installation package automatic testing method, device, equipment and storage medium
Technical Field
The invention relates to the field of program installation package detection, in particular to an installation package automatic testing method, an installation package automatic testing device, computer equipment and a storage medium.
Background
With the development of internet technology, the types of applications installed on a terminal are increasing, and the applications are generally distributed in an installation package manner. The installation package is a propagation carrier of software products, and is particularly important for quality detection of the software products.
At present, the common installation package detection methods are mainly divided into manual detection and conventional automatic detection. The manual detection method is mainly characterized in that an installation program is executed by operating an installation package, and then testers check whether information such as system files, registries, firewalls and the like conforms to expected changes one by one. The conventional automatic detection method mainly comprises the steps of compiling scripts, utilizing a computer program to automatically detect information such as system files, registries and firewalls after an installation package is operated, and analyzing changes of the information such as the system files, the registries and the firewalls after an application program is installed so as to verify the quality of the installation package.
The manual detection method has the disadvantages of long time consumption, low test efficiency and easy omission and error. The conventional automatic detection method has long script development time period and limited test coverage. Therefore, both manual detection and conventional automatic detection have the problems of long time consumption and small test coverage.
Disclosure of Invention
Based on this, it is necessary to provide an installation package automated testing method, apparatus, device and storage medium for solving the problems of long time consumption and small testing coverage of the existing testing method.
An embodiment of the invention provides an installation package automatic testing method, which comprises the following steps:
acquiring an installation package to be tested and an initial system snapshot of a current system;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with difference information in a preset system snapshot comparison test template to obtain a comparison result;
and responding to the event that the comparison result meets the preset condition, and judging that the installation package to be tested passes the test.
One embodiment of the present invention provides an installation package automatic test system, including:
the information acquisition module is used for acquiring an installation package to be tested and an initial system snapshot of a current system;
the difference information obtaining module is used for comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
the comparison result acquisition module is used for comparing the difference information with the difference information in a preset system snapshot comparison test template to acquire a comparison result;
and the test determining module is used for responding to the event that the comparison result meets the preset condition and judging that the installation package to be tested passes the test.
An embodiment of the present invention further provides an apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the following steps:
acquiring an installation package to be tested and an initial system snapshot of a current system;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with difference information in a preset system snapshot comparison test template to obtain a comparison result;
and responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test.
An embodiment of the present invention also provides a storage medium having stored thereon a computer program that, when executed by a processor, performs the steps of:
acquiring an installation package to be tested and an initial system snapshot of a current system;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with difference information in a preset system snapshot comparison test template to obtain a comparison result;
and responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test.
The embodiment of the invention adopts a snapshot technology to respectively shoot system snapshots of an installation package to be tested before and after installation, and compare the system snapshots of the installation package to be tested before and after installation, can quickly list out modifications generated to the system during the operation of the installation package and integrate the modifications into difference information, and then compare the difference information with a system snapshot comparison test template to quickly confirm whether the installation package can pass the test, can effectively improve the test speed of the installation package, and can completely and comprehensively test the installation package to be tested (for example, tests such as UI, a file system, a registry and the like on the installation package to be tested), so that the coverage is large. In addition, by adopting a snapshot technology, the obtained difference information is very accurate, and the accuracy of the test is greatly improved.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram illustrating an installation package automated testing method of the present invention in one embodiment;
FIG. 2 is a flow chart illustrating an installation package automated testing method according to one embodiment of the present invention;
FIG. 3 is a flow chart illustrating an installation package automated testing method according to one embodiment of the present invention;
FIG. 4 is a flow chart illustrating an installation package automated testing method according to one embodiment of the present invention;
FIG. 5 is a flow chart illustrating an installation package automated testing method according to one embodiment of the present invention;
FIG. 6 is a schematic diagram of an installation package automatic test device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an installation package automatic test device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus of the present invention in one embodiment.
Detailed Description
The present invention will be described in further detail with reference to preferred embodiments and the accompanying drawings. It is to be understood that the following examples are illustrative only and are not intended to limit 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. It should be noted that, for the convenience of description, only some but not all of the matters related to the present invention are shown in the drawings.
Fig. 1 is a schematic flow chart of an installation package automation test method in an embodiment of the present invention, and as shown in fig. 1, the installation package automation test method in the embodiment of the present invention includes the following steps:
step S110, obtaining an installation package to be tested and an initial system snapshot of the current system.
In particular, a Snapshot (Snapshot) refers to a mirror image of a data set at a particular time, and is a point-in-time based data copy technique, and thus also referred to as point-in-time copy, that is a fully usable copy of the data set. The definition of a snapshot by the storage network industry association is for a fully available copy of a given data set that includes a mapping of the corresponding data at some point in time (the point in time at which the copy began). A snapshot may be a copy (duplicate) of the data it represents, or a replica (duplicate) of the data. The snapshot can record and store data information at a certain moment, if certain faults occur later and data recovery is needed, the data can be recovered to the state of the previous time point through the snapshot, all data information at a certain time point can be stored and backed up by utilizing the snapshot technology, and normal operation of a service is not influenced. In this embodiment, before the installation package test, a snapshot technique is used to shoot the computer system to obtain an initial system snapshot, and the system state before the installation package runs is recorded, where the system state includes system internal file information, registry information, firewall information, and the like. In addition, the installation package to be tested can be any program installation package, such as a chat tool installation package, an office software installation package, a drawing software installation package and the like.
And step S120, comparing the initial system snapshot with the final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot.
Specifically, the installation package to be tested is run and installed, and after the installation package is installed, the system state changes, which are generated by running the installation package, so in this embodiment, after the installation package to be tested is installed, the computer system is photographed by using a snapshot technology to obtain a final system snapshot. In this embodiment, the difference information is generated by running the installation package to be tested, and includes file change information, registry change information, firewall rule change information, system service add/delete change information, and the like.
Step S130, comparing the difference information with the difference information in the preset system snapshot comparison test template, and obtaining a comparison result.
In this embodiment, the system snapshot comparison test template mainly stores some difference information, where the difference information is some system files generated by the to-be-tested installation package during installation and running. Specifically, in one embodiment, when a certain installation package is tested for the first time, system snapshots of the installation package before and after operation are respectively recorded, then the system snapshots of the installation package before and after operation are compared to obtain difference information, and then the difference information is manually analyzed to screen out the difference information which meets expected changes. And finally, generating a system snapshot comparison test template according to the screened difference information which accords with the expected change. When the same type of installation package is tested in the later stage, the template can be directly used as a standard, whether the test is passed or not is automatically judged, and the test result is conveniently and quickly determined. In addition, the difference information is compared with the difference information in the system snapshot comparison test template to obtain a comparison result.
Step S140, in response to the event that the comparison result meets the expected condition, determining that the installation package to be tested passes the test.
In this embodiment, in response to an event that the comparison result meets the expected condition, that is, when the comparison result meets the expected condition, it is determined that the to-be-tested installation package passes the test.
In one embodiment, the event that the alignment result satisfies the expected condition includes:
and responding to an event that the difference information is consistent with the difference information in the system snapshot comparison test template, and judging that the comparison result meets an expected condition.
Specifically, when the difference information is consistent with the difference information in the system snapshot comparison test template, it is determined that the result of the comparison between the difference information and the difference information in the system snapshot comparison test template satisfies the expected condition. That is, the expected condition may be that the difference information is identical to the difference information in the system snapshot versus the test template. And when the difference information of the installation package to be tested is completely consistent with the difference information in the system snapshot comparison test template, judging that the installation package passes the test.
As an optional implementation manner, a tester may manually perform test level-by-level setting on all or part of difference information in the system snapshot comparison template, where the test levels are divided into two types: "error" and "warning". The error level indicates that the difference information has a large influence on the quality of the installation package to be tested and is information which must be completely matched with the snapshot comparison template; the warning level shows that the quality influence of the difference information on the installation package to be tested is small, and the difference information does not need to be completely matched with the information of the snapshot comparison template. For the error-level difference information test, once the difference information generated by the installation package to be tested is not completely matched with the difference information in the system snapshot comparison test template, the test is judged to be not expected, namely the test is not passed. For the "warning" level difference information test, even if a mismatch occurs, the test result is considered to be substantially satisfactory, the test is not determined to fail, but is determined to be "substantially pass", and warning information is output to the tester. If all the tests at the "error" and "warning" levels pass, the test result is determined to be in accordance with the full expectation, and the test result is "full pass". By adopting the mode, the problem of the installation package to be tested can be conveniently and quickly confirmed by a tester according to the test result, and the severity of the problem can be judged.
For example, in one exemplary application scenario, after the installation of the installation package under test is completed, shortcuts are created in the desktop and the start menu bar. From the perspective of a user, the click frequency of the shortcut on the desktop is far higher than that of the shortcut in the starting menu, so that if the desktop shortcut is lost, the user experience is seriously influenced, and the shortcut in the starting menu bar is lost, which is a defect but is harmless and elegant. In view of this, when configuring the snapshot comparison template, the tester will generate the desktop shortcut as a "wrong" level test item, and will generate the start menu shortcut as a "warning" level test item.
1. If the desktop shortcut and the starting menu shortcut are generated correctly, judging that the installation package to be tested passes through completely, and issuing the installation package to be tested;
2. if the desktop shortcut is normally generated but the shortcut in the starting menu bar is not correctly generated, judging that the desktop shortcut is basically passed, and the installation package to be tested can be issued, but outputting warning information to a tester;
3. if the desktop shortcut is not correctly generated, but the shortcut in the menu bar is normally generated, judging that the test does not pass, outputting error information to a tester, and requiring a developer to modify the installation package to be tested again;
4. if the desktop shortcut and the starting menu shortcut are not correctly generated, the installation package cannot be released, error information is output to a tester, and a developer is required to modify the installation package to be tested again.
The embodiment of the invention adopts a snapshot technology to respectively shoot system snapshots of an installation package to be tested before and after installation, and compare the system snapshots of the installation package to be tested before and after installation, can quickly list out modifications generated to the system during the operation of the installation package and integrate the modifications into difference information, and then compare the difference information with a system snapshot comparison test template to quickly confirm whether the installation package can pass the test, can effectively improve the test speed of the installation package, and can completely and comprehensively test the installation package to be tested (for example, tests such as UI, a file system, a registry and the like on the installation package to be tested), so that the coverage is large. In addition, by adopting a snapshot technology, the obtained difference information is very accurate, and the accuracy of the test is greatly improved.
In one embodiment, as shown in fig. 2, the method for automatically testing an installation package further includes:
and S150, responding to the event that the comparison result does not meet the expected condition, judging that the installation package to be tested does not pass the test, and outputting the difference item information which is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
Specifically, when the difference information is not completely consistent with the difference information of the error level in the system snapshot comparison test template, it is determined that the installation package to be tested does not pass the test, and a difference item in the difference information, which is inconsistent with the difference information in the system snapshot comparison test template, is output. The tester can conveniently check the information of the difference items, and the later redevelopment or modification of the installation package is facilitated.
In one embodiment, as shown in fig. 3, the method further includes a step of establishing a system snapshot comparison test template, where the step of establishing the system snapshot comparison test template includes:
step S160, in response to receiving the event that the difference information satisfies the expected change instruction, establishing a system snapshot comparison test template according to the difference information.
Specifically, meeting the expected change refers to a change that must occur when a certain installation package to be tested is run. For example, in the installation process of the installation package to be tested, a log.txt file is written into the C disk, and the log.txt file can be found in the difference information of the C disk by comparing the initial system snapshot with the final system snapshot, so that the difference information log.txt file in the C disk is the difference information expected to change. Usually, when a certain installation package to be tested is tested for the first time, a system snapshot comparison test template does not exist in the system, the difference information can be analyzed through a manual analysis method, when all the difference information meets the expected change, an operator can send a corresponding instruction (namely an expected change instruction) to the computer, and when the computer system receives the instruction (namely, in response to an event that the received difference information meets the expected change instruction), the system snapshot comparison test template can be established according to the difference information meeting the expected change, so that the installation packages of the same type can be tested again. For example, when the user selects "yes", the computer receives the "yes" instruction and then establishes the difference information as a system snapshot comparison test template.
It should be understood that the above-mentioned manner of sending the command may be various, and may be set according to the requirement, and is not limited herein.
In one embodiment, as shown in fig. 4, the method further includes:
step S161, in response to the event that the difference information meeting the expected change instruction is not received, obtaining the difference information meeting the expected change manually configured by the operator, and establishing the system snapshot comparison test template according to the difference information meeting the expected change.
Specifically, the difference information refers to some files generated by the system after the installation package to be tested is operated and installed. When the difference information which is not received meets the expected change instruction, the difference information does not meet the expected change, namely at least one difference information does not meet the expected change. In this case, the operator may analyze the installation packages to be tested, analyze difference information generated after the installation and operation of the installation packages to be tested one by one, manually configure (i.e., select) the difference information meeting the expected change in combination with the characteristics of the installation packages to be tested, and establish a system snapshot comparison test template according to the difference information meeting the expected change. And the system snapshot comparison test template is established by manually configuring the difference information meeting the expected change, so that the operation is convenient. In addition, after the system snapshot comparison test template is established, the same type (or same) installation package can be conveniently tested at the later stage.
In one embodiment, as shown in fig. 3, after the step of determining that the installation package to be tested passes the test, the method further includes:
and step S170, restoring the system according to the initial system snapshot.
In one embodiment, as shown in fig. 3, after the step of determining that the to-be-tested installation package fails the test, and outputting the difference item in the difference information that is inconsistent with the difference information in the system snapshot comparison test template, the method further includes:
and step S170, restoring the system according to the initial system snapshot.
In one embodiment, as shown in fig. 3, after the step of establishing the system snapshot comparison test template, the method further includes:
and step S170, restoring the system according to the initial system snapshot.
Specifically, after the test of the installation package to be tested is completed, the system corresponding to the initial system snapshot is restored according to the initial system snapshot, that is, the system is restored to the state before the test of the installation package. Therefore, on one hand, the destructive change of the installation package to be tested to the system can be reduced, and on the other hand, the consistency of the system environment when the test is started for multiple times can be ensured.
To facilitate understanding of the present solution, a detailed embodiment is provided, and as shown in fig. 5, the method for automatically testing the installation package includes the following specific steps:
step 510, taking a system snapshot a, taking and storing a system state (such as a system file, a registry, a service, and the like) before the installation package to be tested runs by using a snapshot technology, recording the system snapshot a, and performing subsequent snapshot comparison and system restoration based on the system snapshot a. In the actual operation process, due to the particularity of the installation package test and the consideration of the snapshot shooting performance, when the system snapshot is shot, a tester can set an exclusion item in the snapshot test tool, and the exclusion item cannot appear in a difference information list generated by snapshot comparison.
And 511, operating the installation package to be tested and executing installation, wherein the installation package to be tested can change the system to generate some system changes, including file change information, registry change information, firewall rule change information, system service addition and deletion change information and the like.
And step 512, shooting the system snapshot B, wherein in the actual operation process, when the system snapshot B is shot, the shooting range and the parameter setting in the shooting process are the same as those of the shooting system snapshot A. The system snapshot B is taken for comparison with the system snapshot a.
And 513, comparing the system snapshot a and the system snapshot B, finding out a difference item between the two, and generating a difference item list. Specifically, the system snapshot a and the system snapshot B are analyzed and compared, and the difference items are listed. Because the shooting time nodes of the system snapshot A and the system snapshot B are respectively before and after the execution of the installation package to be tested, most of the difference items are caused by the installation package, and only a little difference is generated by the operation system itself or other software activities. In actual operation, in order to exclude some interference items, when the tester uses the snapshot comparison test tool, some common interference items (such as antivirus logs) may be added to the exclusion list, and the excluded items will not be displayed in the difference item list.
In step 514, it is determined that there is a snapshot comparison test template for the standardized system? If yes, go to step 515; if not, go to step 518.
Step 515, compare the list of difference items with the standardized system snapshot comparison test template.
Step 516, determine whether the comparison result between the difference item list and the snapshot of the standardized system matches the expected condition? If yes, go to step 517; if not, step 524 is performed.
Step 517, the installation package passes the test, and step 524 is executed.
Step 518, the list of difference items is manually analyzed. Specifically, a standardized template is typically generated when a certain installation package is tested for the first time. The tester needs to select some difference items which need to be changed from the difference item list generated for the first time, remove some redundant interference items, and save the modified difference item list as a standard system snapshot comparison test template. When the installation package test is run again in future, the testing tool automatically takes the template as a change standard so as to judge whether the test passes or not.
In step 519, determine if the difference item information in the difference item list conforms to the expected change? If yes, go to step 520; if not, go to step 521.
Step 520, generating a standardized system snapshot comparison test template, and executing step 525.
Step 521, judging whether to modify the installation package again; if so, go to step 522; if not, go to step 523.
Step 522, revise the installation package, then go to step 510.
Step 523, manually configuring the difference items meeting the expected conditions, and executing step 520.
Step 524, test fail, list the difference items that do not meet the expected conditions, run step 525. Specifically, during testing, the test tool automatically compares the obtained difference item list with the standardized system snapshot comparison test template. If some changed items are not generated, or the specific values of the changed items are incorrect, or redundant changed items are generated, the test is not passed, and the changed items which do not meet the expected conditions are reported to a tester for further confirmation.
And step 525, restoring the system according to the system snapshot A. Specifically, after each test is completed, the test tool based on the system snapshot comparison restores the system according to the system snapshot a regardless of whether the test passes or not. By the recovery means, the test environment can be recovered to the state before the installation package is executed, so that on one hand, the test environment can be ensured to be consistent with the test environment at this time when the next test is carried out. On the other hand, the damage of the installation package to be tested to the system can be repaired, for example, if the installation package to be tested performs some destructive changes (for example, some registry entries are deleted by mistake), the repair can be quickly obtained in this way.
In one embodiment, an installation package automatic detection method based on system snapshot comparison is combined with Jenkins. Jenkins is a continuous integration tool developed based on Java, and is used for monitoring continuous and repeated work, and the functions comprise: persistent software version release/test projects and monitoring work performed by external calls. Specifically, the automatic detection of the installation package is used as a link of Jenkins continuous integration. After a tester generates a standardized system snapshot comparison template, Jenkins can automatically call an interface of a system snapshot comparison test tool after an installation package is successfully built each time. After receiving the Jenkins request, the system snapshot comparison test tool automatically copies the relevant files to a special test virtual machine, and then executes snapshot comparison test. If the snapshot comparison test fails, an error code is returned to Jenkins, and the Jenkins informs developers that the Jenkins packaging process fails in a mail or other modes.
After the system snapshot comparison test tool is integrated with Jenkins, the quality of the installation package is improved to a new height by controlling and feeding back the abnormity.
According to the installation package automatic testing method of the present invention, an embodiment of the present invention further provides an installation package automatic testing apparatus, and the installation package automatic testing apparatus of the present invention is described in detail below with reference to the accompanying drawings and preferred embodiments.
Fig. 6 is a schematic structural diagram of an installation package automation test device of the invention in an embodiment. As shown in fig. 6, the installation package automatic testing apparatus in this embodiment includes:
the information obtaining module 10 is configured to obtain an installation package to be tested and an initial system snapshot of a current system.
The difference information obtaining module 20 is configured to compare the initial system snapshot with a final system snapshot obtained after the to-be-tested installation package is run, and obtain difference information between the initial system snapshot and the final system snapshot.
And the comparison result obtaining module 30 is configured to compare the difference information with the difference information in the preset system snapshot comparison test template, so as to obtain a comparison result.
And the test determining module 40 is configured to respond to an event that the comparison result meets a preset condition, and determine that the installation package to be tested passes the test.
In one embodiment, as shown in fig. 7, the method further includes: an information output module:
the test determining module 40 is configured to determine that the installation package to be tested fails the test in response to an event that the comparison result does not satisfy the preset condition.
And the information output module 50 is configured to output, in response to an event that the comparison result does not satisfy the preset condition, difference item information that is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
In one embodiment, as shown in fig. 7, the method further includes:
and the expected condition judging module 60 is configured to respond to an event that the difference information is consistent with the difference information in the system snapshot comparison test template, and judge that the comparison result meets an expected condition.
In one embodiment, as shown in fig. 7, the method further includes:
and a comparison test template establishing module 70, configured to, in response to receiving an event that the difference information satisfies the expected change instruction, establish a system snapshot comparison test template according to the difference information.
In one embodiment, referring to fig. 7, the comparison test template establishing module 70 is further configured to, in response to an event that the difference information satisfies the expected change instruction is not received, obtain difference information that satisfies the expected change and is manually configured by an operator, and establish a system snapshot comparison test template according to the difference information that satisfies the expected change.
In one embodiment, as shown in fig. 7, the method further includes:
and the system recovery module 80 is configured to recover the system corresponding to the initial system snapshot according to the initial system snapshot after determining that the installation package to be tested passes the test.
In one embodiment, referring to fig. 7, the system recovery module 80 is further configured to recover the system according to the initial system snapshot after determining that the to-be-tested installation package fails to pass the test and outputting a difference item in the difference information that is inconsistent with the difference information in the system snapshot comparison test template.
In one embodiment, referring to fig. 7, the system recovery module 80 is further configured to recover the system according to the initial system snapshot after establishing the system snapshot comparison test template according to the difference information meeting the pre-condition.
The installation package automatic test system can execute the installation package automatic test method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. As for the processing methods executed by the functional modules, for example, the information obtaining module 10, the comparison test template establishing module 70, the system recovering module 80, and the like, reference may be made to the description in the foregoing method embodiments, and details are not repeated here.
According to the installation package automatic testing method and system of the invention, the invention also provides a computer device, and the computer device of the invention is described in detail below with reference to the accompanying drawings and the preferred embodiments.
Fig. 8 is a schematic structural diagram of an apparatus of the present invention in one embodiment. As shown in fig. 8, the apparatus 800 in this embodiment comprises a memory 801, a processor 802 and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the following steps:
acquiring an installation package to be tested and an initial system snapshot of a current system;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with the difference information in a preset system snapshot comparison test template to obtain a comparison result;
and responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test.
In one embodiment, the processor when executing 802 the program may further perform the following steps:
and responding to the event that the comparison result does not meet the expected condition, judging that the installation package to be tested does not pass the test, and outputting the difference item information which is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and responding to an event that the difference information is consistent with the difference information in the system snapshot comparison test template, and judging that the comparison result meets an expected condition.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and in response to receiving an event that the difference information meets the expected change instruction, establishing the system snapshot comparison test template according to the difference information.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and responding to the event that the difference information meeting the expected change instruction is not received, obtaining the difference information meeting the expected change and manually configured by an operator, and establishing a system snapshot comparison test template according to the difference information meeting the expected change.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and after the step of judging that the installation package to be tested passes the test, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and after the step of judging that the installation package to be tested does not pass the test and outputting a difference item which is inconsistent with the difference information in the system snapshot comparison test template in the difference information, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
In one embodiment, the processor 802 may further perform the following steps when executing the program:
and after the step of establishing the system snapshot and comparing the test template, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
The processor 802 in the device 800 may execute the installation package automation test method provided by the embodiment of the present invention, and has corresponding beneficial effects of the execution method. Reference may be made to the description of the above method embodiments, which are not repeated herein.
According to the installation package automatic testing method, system and device of the invention, the invention also provides a storage medium, and the storage medium of the invention is described in detail below with reference to the accompanying drawings and preferred embodiments.
A computer-readable storage medium in an embodiment of the present invention, on which a computer program is stored, which when executed by a processor, implements the steps of:
acquiring an installation package to be tested and an initial system snapshot of a current system;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with the difference information in a preset system snapshot comparison test template to obtain a comparison result;
and responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test.
In one embodiment, the program when executed by the processor further performs the steps of:
and responding to the event that the comparison result does not meet the expected condition, judging that the installation package to be tested does not pass the test, and outputting the difference item information which is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
In one embodiment, the program when executed by the processor further performs the steps of:
and responding to an event that the difference information is consistent with the difference information in the system snapshot comparison test template, and judging that the comparison result meets an expected condition.
In one embodiment, the program when executed by the processor further performs the steps of:
and in response to receiving an event that the difference information meets the expected change instruction, establishing a system snapshot comparison test template according to the difference information.
In one embodiment, the program when executed by the processor further performs the steps of:
and responding to the event that the difference information meeting the expected change instruction is not received, obtaining the difference information meeting the expected change and manually configured by an operator, and establishing a system snapshot comparison test template according to the difference information meeting the expected change.
In one embodiment, the program when executed by the processor further performs the steps of:
and after the step of judging that the installation package to be tested passes the test, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
In one embodiment, the program when executed by the processor further performs the steps of:
and after the step of judging that the installation package to be tested does not pass the test and outputting a difference item which is inconsistent with the difference information in the system snapshot comparison test template in the difference information, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
In one embodiment, the program when executed by the processor further performs the steps of:
and after the step of establishing the system snapshot and comparing the test template, restoring the system corresponding to the initial system snapshot according to the initial system snapshot.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like ".
The storage medium is used for storing a program (instruction) of the installation package automatic testing method provided by the embodiment of the invention, wherein the installation package automatic testing method provided by the embodiment of the invention can be executed by executing the program, and the method has corresponding beneficial effects of an execution method. Reference may be made to the description of the above method embodiments, which are not repeated herein.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. An automatic test method for an installation package is characterized by comprising the following steps:
acquiring an installation package to be tested and an initial system snapshot of a current system; the installation package to be tested is an installation package of any program;
comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
comparing the difference information with difference information in a preset system snapshot comparison test template to obtain a comparison result;
responding to the event that the comparison result meets the expected condition, and judging that the installation package to be tested passes the test;
the method also comprises a step of establishing a system snapshot comparison test template, wherein the step of establishing the system snapshot comparison test template comprises the following steps:
in response to receiving an event that the difference information meets an expected change instruction, establishing the system snapshot comparison test template according to the difference information; the expected change instruction refers to the change which is required to occur when the installation package to be tested is operated;
and responding to an event that the difference information meeting the expected change instruction is not received, obtaining the difference information meeting the expected change and manually configured by an operator, and establishing the system snapshot comparison test template according to the difference information meeting the expected change.
2. The automated installation package testing method of claim 1, further comprising:
and responding to the event that the comparison result does not meet the expected condition, judging that the installation package to be tested does not pass the test, and outputting the difference item information which is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
3. The method for automatically testing the installation package according to claim 1, wherein the event that the comparison result meets the expected condition comprises:
and responding to an event that the difference information is consistent with the difference information in the system snapshot comparison test template, and judging that the comparison result meets an expected condition.
4. The method for automatically testing the installation package according to claim 1, further comprising, after the step of determining that the installation package to be tested passes the test, the steps of:
and restoring the system according to the initial system snapshot.
5. An installation package automatic testing device, characterized by, includes:
the information acquisition module is used for acquiring an installation package to be tested and an initial system snapshot of a current system; the installation package to be tested is an installation package of any program;
the difference information obtaining module is used for comparing the initial system snapshot with a final system snapshot obtained after the installation package to be tested is operated, and obtaining difference information of the initial system snapshot and the final system snapshot;
the comparison result acquisition module is used for comparing the difference information with the difference information in a preset system snapshot comparison test template to acquire a comparison result;
the test determining module is used for responding to an event that the comparison result meets a preset condition and judging that the installation package to be tested passes the test;
the system snapshot comparison test module is used for responding to an event that the received difference information meets an expected change instruction and establishing a system snapshot comparison test template according to the difference information; and responding to an event that the difference information meeting the expected change instruction is not received, obtaining the difference information meeting the expected change and manually configured by an operator, and establishing the system snapshot comparison test template according to the difference information meeting the expected change.
6. The installation package automated testing equipment of claim 5, further comprising: an information output module:
the test determining module is used for responding to the event that the comparison result does not meet the preset condition and judging that the installation package to be tested does not pass the test;
and the information output module is used for responding to the event that the comparison result does not meet the preset condition and outputting the difference item information which is inconsistent with the difference information in the system snapshot comparison test template in the difference information.
7. An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of claims 1-4 are implemented when the program is executed by the processor.
8. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN201710684411.0A 2017-08-08 2017-08-08 Installation package automatic testing method, device, equipment and storage medium Active CN107577597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710684411.0A CN107577597B (en) 2017-08-08 2017-08-08 Installation package automatic testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710684411.0A CN107577597B (en) 2017-08-08 2017-08-08 Installation package automatic testing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107577597A CN107577597A (en) 2018-01-12
CN107577597B true CN107577597B (en) 2020-06-16

Family

ID=61035780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710684411.0A Active CN107577597B (en) 2017-08-08 2017-08-08 Installation package automatic testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107577597B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804314A (en) * 2018-05-23 2018-11-13 北京五八信息技术有限公司 Installation kit test method, device, equipment and computer readable storage medium
CN109101426B (en) * 2018-08-16 2021-08-03 郑州云海信息技术有限公司 Business comparison test system
CN109189686A (en) * 2018-08-30 2019-01-11 中国平安人寿保险股份有限公司 Automation regression testing method, apparatus, storage medium and computer equipment
CN110417718B (en) * 2018-12-27 2022-04-05 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for processing risk data in website
CN109800022B (en) * 2019-01-25 2022-07-08 郑州云海信息技术有限公司 Method, system, terminal and storage medium for automatically comparing BIOS information difference
CN111240928B (en) * 2020-01-06 2024-04-09 上海闻泰信息技术有限公司 Automatic detection method, device, equipment and storage medium for equipment drive
CN113672514A (en) * 2021-08-24 2021-11-19 平安国际智慧城市科技股份有限公司 Test method, test device, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382914A (en) * 2008-10-15 2009-03-11 北大方正集团有限公司 Testing method and device for software update file
GB2518458A (en) * 2013-09-23 2015-03-25 Inst Information Industry Method for pre-testing software compatibility and system thereof.
CN104750612A (en) * 2015-03-31 2015-07-01 腾讯科技(深圳)有限公司 File operation testing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382914A (en) * 2008-10-15 2009-03-11 北大方正集团有限公司 Testing method and device for software update file
GB2518458A (en) * 2013-09-23 2015-03-25 Inst Information Industry Method for pre-testing software compatibility and system thereof.
CN104750612A (en) * 2015-03-31 2015-07-01 腾讯科技(深圳)有限公司 File operation testing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"安装测试";陈能技;《软件测试技术大全:测试基础、流行工具、项目实战》;20080630;正文第152-154页 *

Also Published As

Publication number Publication date
CN107577597A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN107577597B (en) Installation package automatic testing method, device, equipment and storage medium
US9720816B2 (en) Software development assistant method and system
US7185335B2 (en) Programmatic application installation diagnosis and cleaning
US9703677B2 (en) Code coverage plugin
CN102736978B (en) A kind of method and device detecting the installment state of application program
US20070220370A1 (en) Mechanism to generate functional test cases for service oriented architecture (SOA) applications from errors encountered in development and runtime
US7174265B2 (en) Heterogeneous multipath path network test system
CN109032838B (en) Automatic verification method for consistency of backup and recovery data of virtual machine
CN111026601A (en) Monitoring method and device for Java application system, electronic equipment and storage medium
US11782800B2 (en) Methods to automatically correct and improve system recovery and replication processes
CN112698846B (en) Method and system for automatically installing patches in Linux system
US8327189B1 (en) Diagnosing an incident on a computer system using a diagnostics analyzer database
CN116383090B (en) Automatic testing method and platform for kylin system migration tool
CN109614337B (en) Performance test system and test tool based on linux system
CN111722853A (en) Method and equipment for deploying installation script
CN113360366A (en) Web page testing method, testing device, electronic equipment and storage medium
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN115757138A (en) Method and device for determining script abnormal reason, storage medium and electronic equipment
CN115756914A (en) Test method, test system, test platform and test machine
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN113626325A (en) Interface testing method, device and equipment in code iterative updating
JP2000322283A (en) Fault detecting method of electronic computer
CN112860509A (en) Dial testing alarm method and device
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
CN107861842B (en) Metadata damage detection method, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant