CN110727574A - Method and device for testing stability of operating system and electronic equipment - Google Patents

Method and device for testing stability of operating system and electronic equipment Download PDF

Info

Publication number
CN110727574A
CN110727574A CN201810781348.7A CN201810781348A CN110727574A CN 110727574 A CN110727574 A CN 110727574A CN 201810781348 A CN201810781348 A CN 201810781348A CN 110727574 A CN110727574 A CN 110727574A
Authority
CN
China
Prior art keywords
test
check code
operating system
stability
wget
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
CN201810781348.7A
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.)
Loongson Technology Corp Ltd
Original Assignee
Loongson Technology Corp 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 Loongson Technology Corp Ltd filed Critical Loongson Technology Corp Ltd
Priority to CN201810781348.7A priority Critical patent/CN110727574A/en
Publication of CN110727574A publication Critical patent/CN110727574A/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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

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

Abstract

According to the method and the device for testing the stability of the operating system and the electronic equipment, the stability test of the operating system is started, and the wget test script is repeatedly executed according to the preset test times to generate the test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; and judging whether the test check code obtained when the wget test script is executed at each time is consistent with the comparison check code or not, and obtaining a test result, so that the stability of the operating system is automatically tested, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced.

Description

Method and device for testing stability of operating system and electronic equipment
Technical Field
The present invention relates to computer technologies, and in particular, to a method and an apparatus for testing operating system stability, and an electronic device.
Background
The stability of the operating system refers to the extent to which the operating system can continue to operate in the presence of abnormal input or stress conditions, and is also used to indicate the ability of the operating system to reject or react to an introduced error in the running application, hardware, or device driver. Therefore, the stability test of the operating system becomes an important judgment basis for judging whether the operating system is credible or not. The wget test is a common test method for testing the stability of an operating system.
In the existing testing method, a tester needs to manually download an image file from a server, verify the downloaded image file, repeat the steps of downloading and verifying for many times, and obtain a testing result of the stability of an operating system according to the verification result. However, since the existing wget-based test is generally implemented manually, a large number of repeated operations need to be performed by a tester, and the test cost is high.
Disclosure of Invention
The invention provides a method and a device for testing stability of an operating system and electronic equipment, and aims to solve the problems that in the prior art, testing cost is high and testing efficiency is low due to the fact that a tester needs to manually and repeatedly execute downloading and verifying steps in a wget test.
In one aspect, the method for testing the stability of the operating system provided by the invention comprises the following steps:
starting a stability test of an operating system, and repeatedly executing a wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
In an alternative embodiment, the wget test script is configured to:
controlling the operating system to download the image file to be tested from the remote server, and processing the image file downloaded and stored at the time to generate a test check code;
recording the test check code in a first document of a test record file;
controlling the operating system to download the comparison check code corresponding to the mirror image file to be tested from a remote server;
and recording the comparison check code in a second document of the test record file.
In an optional implementation manner, before the starting the stability test of the operating system, the test method further includes:
processing the mirror image file to be tested according to a preset algorithm to obtain a comparison check code;
uploading the mirror image file to be tested and the comparison check code to a remote server;
the processing the image file downloaded and stored this time to generate the test check code includes:
and processing the image file downloaded and stored at the time according to the preset algorithm to obtain a test check code.
In an optional implementation manner, before controlling the operating system to download the image file to be tested from the remote server, or after recording the test check code in the first document of the test record file, the wget test script is further configured to control the operating system to delete the downloaded and stored image file.
In an alternative embodiment, the test check code and the comparison check code are obtained by using md5 algorithm.
In another aspect, the present invention further provides a device for testing stability of an operating system, including:
the starting unit is used for starting the stability test of the operating system;
the execution unit is used for repeatedly executing the wget test script according to the preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and the test result acquisition unit is used for judging whether the test check code acquired when the wget test script is executed each time is consistent with the comparison check code or not and acquiring a test result.
In one optional implementation, the execution unit is specifically configured to:
controlling the operating system to download the image file to be tested from the remote server, and processing the image file downloaded and stored at the time to generate a test check code;
recording the test check code in a first document of a test record file;
controlling the operating system to download the comparison check code corresponding to the mirror image file to be tested from a remote server;
and recording the comparison check code in a second document of the test record file.
In one optional embodiment, the test device further comprises a configuration unit;
the configuration unit is used for processing the mirror image file to be tested according to a preset algorithm before the starting unit starts the stability test of the operating system, and obtaining a comparison check code; uploading the mirror image file to be tested and the comparison check code to a remote server;
correspondingly, the execution unit is specifically configured to process the image file downloaded and stored this time according to the preset algorithm, so as to obtain the test check code.
In an optional implementation manner, the execution unit is further configured to control the operating system to delete the downloaded and stored image file before controlling the operating system to download the image file to be tested from the remote server, or after recording the test check code in the first document of the test record file.
In another aspect, the present invention provides an apparatus for testing stability of an operating system, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
starting a stability test of an operating system, and repeatedly executing a wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
In a final aspect, the present invention provides an electronic device, in which an operating system and a device for testing the stability of any one of the operating systems as described above are installed;
the test device for the stability of the operating system is used for testing the stability of the operating system installed in the electronic equipment.
According to the method and the device for testing the stability of the operating system and the electronic equipment, the stability test of the operating system is started, and the wget test script is repeatedly executed according to the preset test times to generate the test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result, so that the automatic test of the stability of the operating system is realized, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced; compared with manual testing, the stability testing of the operating system is automatically realized through software, the stability testing process of the operating system can be monitored constantly, and the accuracy of the stability testing of the operating system is effectively improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flowchart illustrating a method for testing operating system stability according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for testing operating system stability according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for testing stability of an operating system according to a third embodiment of the present invention;
fig. 4 is a schematic hardware structure diagram of a device for testing operating system stability according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The stability of the operating system refers to the extent to which the operating system can continue to operate in the presence of abnormal input or stress conditions, and is also used to indicate the ability of the operating system to reject or react to an introduced error in the running application, hardware, or device driver. Therefore, the stability test of the operating system becomes an important judgment basis for judging whether the operating system is credible or not.
Generally, a restart test, a usb disk hot plug test, an scp test, a wget test, an I/O stress test, and the like can be used as a test method for an operating system stability test. In particular, the operating system is used as a platform for running all application programs and services, and the requirement on accuracy of downloading a large file is very high, so the wget test is the most common test method for testing the stability of the operating system.
In the existing wget test method, in order to know the capability of an operating system whether to continue to operate under a pressure condition, a tester needs to manually download a mirror image file from a server for many times, manually check the downloaded mirror image file, manually download the mirror image file from the server again, and manually check the mirror image file. And judging whether the operating system has stability or not according to the result of the multiple times of verification by repeating the steps of downloading and verifying for multiple times. Therefore, in the prior art, a large number of repeated operations need to be performed by a tester, the execution efficiency is low, errors are easy to occur, and the test cost is high.
The following describes the technical solutions of the present invention 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 invention will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for testing stability of an operating system according to an embodiment of the present invention, which is provided to solve the problems of high testing cost and low testing efficiency caused by the fact that a tester needs to manually repeat the steps of downloading and verifying in a wget test in the prior art.
As shown in fig. 1, the method includes:
step 101, starting a stability test of an operating system.
And 102, repeatedly executing the wget test script according to the preset test times to generate a test record file.
The test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time.
And 103, judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
The execution subject of the method for testing the stability of the operating system provided by the invention is the device for testing the stability of the operating system, and the method for testing the stability of the operating system can be applied to testing the operating system of various electronic devices capable of running test programs or test scripts. In addition, the testing device for the stability of the operating system can be written by C/C + +, Java, Shell or Python and other languages; the electronic device may be, for example, a desktop computer, a tablet computer, a smart phone, etc.; the operating system may be a windows system, an Ios system, a linux system, etc. that may be operated based on the electronic device, and the electronic device and the operating system are not limited in any way in the present invention.
Specifically, in the test method provided by the invention, the stability of the operating system can be tested by utilizing a previously edited wget test script.
Firstly, the wget test script prestored in the electronic equipment can be called through a mode of manually inputting an operation instruction, and the electronic equipment can also automatically start and trigger the wget test script so as to enable the electronic equipment to test an operating system running on the electronic equipment. Before starting the test, the configuration of the test environment may also be included, for example, configuring a test file, configuring a test script, configuring the number of tests, and the like.
And then, the wget test script starts to execute the stability test according to the preset test times and generates a test record file. The method comprises the steps of testing a system according to a wget test procedure by a wget test script, namely, repeatedly running the wget test script according to preset test times, wherein each test script realizes the steps of downloading a mirror image file and a test check code, obtaining a comparison check code, and recording the test check code and the comparison check code in a test recording file until the time of running the wget test script is equal to the preset test times. At this time, the test record file includes a test check code and a comparison check code obtained each time the wget test script is executed. Preferably, the test check code and the comparison check code can be obtained by adopting an md5 algorithm, so that the uniqueness of the check code is further improved, and the test accuracy is further improved.
And finally, after the wget test script of the preset test times is executed, determining the test result of the test according to the test check code in the test record file and the comparison check code. The method can be realized by comparing whether the test check code obtained when the wget test script is executed each time with the comparison check code is consistent, and once the test check code at a certain time is inconsistent with the comparison check code, the test result of the test can be determined to be that the stability of the operating system is poor. In addition, after the test result is obtained, the test device can also output the test result and the related file in the test, so that a tester can adjust the operating system according to the test result and the related file. It should be noted that, because the purpose of testing the operating system is to know whether the operating system has the capability of downloading a file under a stressed condition, the performance stability of the operating system under the stressed condition can be effectively obtained by comparing the test check code obtained when executing the wget test script each time with the comparison check code after the wget test script for the preset number of times is executed.
According to the test method for the stability test of the operating system, provided by the embodiment of the invention, a test record file is generated by starting the stability test of the operating system and repeatedly executing a wget test script according to preset test times; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result, so that the automatic test of the stability of the operating system is realized, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced; compared with manual testing, the stability testing of the operating system is automatically realized through software, the stability testing process of the operating system can be monitored constantly, and the accuracy of the stability testing of the operating system is effectively improved.
On the basis of the foregoing embodiments of the first embodiment, in order to further explain the method for testing the stability of the operating system provided by the present invention, fig. 2 is a schematic flow chart of a method for testing the stability of the operating system provided by the second embodiment of the present invention. As shown in fig. 2, the test method includes:
step 201, starting a stability test of the operating system.
Similar to the second embodiment, in the second embodiment, the wget test script pre-stored in the electronic device may be called by manually inputting an operation instruction, or the electronic device may automatically start and trigger the wget test script, so that the electronic device tests the operating system running on the electronic device. Before starting the test, the configuration of the test environment may also be included, for example, configuring a test file, configuring a test script, configuring the number of tests, and the like.
Step 202, updating the current test times.
And 203, controlling the operating system to download the image file to be tested from the remote server, and processing the image file downloaded and stored at the time to generate a test check code.
And step 204, recording the test check code in a first document of the test record file.
And step 205, controlling the operating system to download the comparison check code corresponding to the image file to be tested from the remote server.
And step 206, recording the comparison check code in a second document of the test record file.
And step 207, judging whether the current test times are equal to the preset test times.
If yes, go to step 208; if not, go to step 202.
Different from the first embodiment, in the second embodiment, the wget test script is repeatedly executed according to the preset test times, and the generation of the test record file can be realized through steps 202 to 207.
Specifically, after the test is started, the current test number is updated first, such as the current test number is the 1 st test, and so on.
Then, controlling an operating system to download the image file to be tested from the remote server, processing the image file downloaded and stored at the time, generating a test check code, and recording the test check code in a first document of the test record file; and controlling the operating system to download the comparison check code corresponding to the mirror image file to be tested from the remote server, and recording the comparison check code in a second document of the test record file.
It should be noted that two documents for recording the check code can be preset in the test record file; the first document may be used to record a test check code generated according to the image file downloaded this time, the second document may be used to record a comparison check code directly downloaded from the remote server, and the test check code and the comparison check code may specifically be md5 values, and may also be check codes generated by other algorithms for identifying the content of the image file.
Then, judging whether the current test frequency is equal to a preset test frequency, if not, returning to the step of updating the current test frequency, namely adding 1 to the original current test frequency, and repeatedly executing operations of controlling an operating system to download the image file to be tested from a remote server and the like; if so, go to step 208.
And 208, judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
Wherein the test record file includes a first document and a second document. The test check code contained in the first document may further carry an identifier indicating the number of acquisition times, and correspondingly, the comparison check code contained in the second document may also carry an identifier indicating the number of acquisition times corresponding to the test check code, so that the test check code and the comparison check code having the same identifier indicating the number of acquisition times are compared in the following.
Specifically, as similar to the embodiment, after the wget test script for executing the preset test times is completed, the test result of the test is determined according to the test check code in the test record file and the comparison check code. The method can be specifically realized by comparing whether the test check code obtained when the wget test script is executed each time with the comparison check code, for example, a vim-d command can be executed to compare two documents differently, and once the test check code at a certain time is found to be inconsistent with the comparison check code, the test result of the test can be determined to be that the stability of the operating system is poor. In addition, after the test result is obtained, the test device can also output the test result and the related file in the test, so that a tester can adjust the operating system according to the test result and the related file.
In the second embodiment, it is understood that step 203 and step 205 may be executed simultaneously or in a distributed manner, and the execution order is not limited in this embodiment.
On the basis of the second embodiment, one preferred implementation method comprises the following steps: before the step 201 of starting the stability test of the operating system, the method further includes processing the image file to be tested according to a preset algorithm, obtaining a comparison check code, and uploading the image file to be tested and the comparison check code to a remote server. Correspondingly, the processing the image file downloaded and stored this time in step 203 to generate the test check code may include processing the image file downloaded and stored this time according to a preset algorithm to obtain the test check code. By adopting the same preset algorithm, the comparability of comparing the check code with the test check code in the test process is ensured, and the test accuracy is improved.
Preferably, on the basis of the second embodiment, one of the optional implementations includes: before the step 201 of starting the stability test of the operating system, the method further includes processing the image file to be tested according to a preset algorithm, obtaining a comparison check code, and uploading the image file to be tested and the comparison check code to a remote server. Correspondingly, the processing the image file downloaded and stored this time in step 203 to generate the test check code may include processing the image file downloaded and stored this time according to a preset algorithm to obtain the test check code.
Preferably, the wget test script is further used for controlling the operating system to delete the downloaded and stored image file before controlling the operating system to download the image file to be tested from the remote server, or after recording the test check code in the first document of the test record file. By deleting the tested mirror image file, the waste of resources is effectively avoided, and the testing efficiency is improved.
In the second embodiment, on the basis of the first embodiment, a test record file is generated by starting a stability test of an operating system and repeatedly executing a wget test script according to preset test times; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; the wget test script can control the operating system to download the image file to be tested from the remote server, process the image file downloaded and stored at the time, generate a test check code, and record the test check code in a first document of the test record file; the method comprises the steps that an operating system is controlled to download a comparison check code corresponding to a mirror image file to be tested from a remote server, the comparison check code is recorded in a second document of a test record file, and finally whether a test check code obtained when a wget test script is executed every time is consistent with the comparison check code is judged, and a test result is obtained, so that the automatic test of the stability of the operating system is realized, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced; compared with manual testing, the stability testing of the operating system is automatically realized through software, the stability testing process of the operating system can be monitored constantly, and the accuracy of the stability testing of the operating system is effectively improved.
Fig. 3 is a schematic structural diagram of a device for testing stability of an operating system according to a third embodiment of the present invention.
As shown in fig. 3, the apparatus for testing the stability of the operating system includes:
a starting unit 10, configured to start a stability test of an operating system;
the execution unit 20 is configured to repeatedly execute the wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
the test result obtaining unit 30 determines whether the test check code obtained when executing the wget test script is consistent with the comparison check code each time, and obtains a test result.
In an optional implementation manner, the execution unit 20 is specifically configured to: controlling an operating system to download a mirror image file to be tested from a remote server, processing the downloaded and stored mirror image file at the time, and generating a test check code; recording the test check code in a first document of a test record file; controlling an operating system to download a comparison check code corresponding to the mirror image file to be tested from a remote server; and recording the comparison check code in a second document of the test record file.
In one optional embodiment, the test apparatus further comprises a configuration unit; the configuration unit is used for processing the mirror image file to be tested according to a preset algorithm before the starting unit starts the stability test of the operating system, and obtaining a comparison check code; uploading the mirror image file to be tested and the comparison check code to a remote server; correspondingly, the execution unit 20 is specifically configured to process the image file downloaded and stored this time according to a preset algorithm, so as to obtain the test check code.
In an alternative embodiment, the execution unit 20 is further configured to control the operating system to delete the downloaded and stored image file before controlling the operating system to download the image file to be tested from the remote server, or after recording the test check code in the first document of the test record file.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and corresponding beneficial effects of the system described above may refer to the corresponding process in the foregoing method embodiments, and are not described herein again.
In other embodiments, fig. 4 is a schematic hardware structure diagram of a device for testing stability of an operating system according to a third embodiment of the present invention. As shown in fig. 4, the apparatus for testing the stability of the operating system may specifically include:
a processor 32;
a memory 31 for storing processor-executable instructions;
wherein the processor 32 is configured to:
starting a stability test of an operating system, and repeatedly executing a wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
The memory 31 may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. And processor 32 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital signal processor architectures (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessor architectures or other electronic components.
The above-mentioned instructions can be written by using languages such as C/C + +, Java, Shell, Python, etc., which is not limited in this embodiment.
According to the test device for the stability test of the operating system, provided by the third embodiment of the invention, the test record file is generated by starting the stability test of the operating system and repeatedly executing the wget test script according to the preset test times; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result, so that the automatic test of the stability of the operating system is realized, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced; compared with manual testing, the stability testing of the operating system is automatically realized through software, the stability testing process of the operating system can be monitored constantly, and the accuracy of the stability testing of the operating system is effectively improved.
Fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, in which an operating system 5 and a device 6 for testing stability of any one of the operating systems are installed in the electronic device 4; the operating system stability testing device 6 is used for performing a stability test on the operating system 5 installed in the electronic device 4.
It should be noted that the operating system 5 can communicate with the remote server 7 and perform data interaction, and the testing device 6 for the stability test of the operating system generates a test record file by starting the stability test of the operating system and repeatedly executing the wget test script according to the preset test times; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
It should be noted that the test apparatus for stability test of the operating system can be applied to various electronic devices, and the operation method thereof can be referred to the scheme disclosed in the first embodiment or the second embodiment, and the structure thereof can be referred to the scheme disclosed in the third embodiment.
According to the electronic device provided by the fourth embodiment of the invention, the test record file is generated by starting the stability test of the operating system and repeatedly executing the wget test script according to the preset test times; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time; whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code or not is judged, and a test result is obtained, so that the stability of the operating system is automatically tested, the problem of low test efficiency caused by the fact that a test step needs to be executed manually in the prior art is solved, and the test cost is effectively reduced.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for testing stability of an operating system is characterized by comprising the following steps:
starting a stability test of an operating system, and repeatedly executing a wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
2. The testing method of claim 1, wherein the wget test script is configured to:
controlling the operating system to download the image file to be tested from the remote server, and processing the image file downloaded and stored at the time to generate a test check code;
recording the test check code in a first document of a test record file;
controlling the operating system to download the comparison check code corresponding to the mirror image file to be tested from a remote server;
and recording the comparison check code in a second document of the test record file.
3. The testing method of claim 2, wherein before the initiating the stability test of the operating system, the testing method further comprises:
processing the mirror image file to be tested according to a preset algorithm to obtain a comparison check code;
uploading the mirror image file to be tested and the comparison check code to a remote server;
the processing the image file downloaded and stored this time to generate the test check code includes:
and processing the image file downloaded and stored at the time according to the preset algorithm to obtain a test check code.
4. The testing method according to claim 2, wherein the wget test script is further used for controlling the operating system to delete the downloaded and stored image file before controlling the operating system to download the image file to be tested from the remote server and/or after recording the test check code in the first document of the test record file.
5. The test method according to any one of claims 1 to 4, wherein the test check code and the comparison check code are obtained by md5 algorithm.
6. An apparatus for testing operating system stability, comprising:
the starting unit is used for starting the stability test of the operating system;
the execution unit is used for repeatedly executing the wget test script according to the preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and the test result acquisition unit is used for judging whether the test check code acquired when the wget test script is executed each time is consistent with the comparison check code or not and acquiring a test result.
7. The testing device of claim 6, wherein the execution unit is specifically configured to:
controlling the operating system to download the image file to be tested from the remote server, and processing the image file downloaded and stored at the time to generate a test check code;
recording the test check code in a first document of a test record file;
controlling the operating system to download the comparison check code corresponding to the mirror image file to be tested from a remote server;
and recording the comparison check code in a second document of the test record file.
8. The test device of claim 7, further comprising a configuration unit;
the configuration unit is used for processing the mirror image file to be tested according to a preset algorithm before the starting unit starts the stability test of the operating system, and obtaining a comparison check code; uploading the mirror image file to be tested and the comparison check code to a remote server;
correspondingly, the execution unit is specifically configured to process the image file downloaded and stored this time according to the preset algorithm, so as to obtain the test check code.
9. The testing apparatus of claim 7, wherein the execution unit is further configured to control the operating system to delete the downloaded and stored image file before controlling the operating system to download the image file to be tested from a remote server, or after recording the test check code in the first document of the test record file.
10. An apparatus for testing operating system stability, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
starting a stability test of an operating system, and repeatedly executing a wget test script according to preset test times to generate a test record file; the test record file comprises a test check code and a comparison check code which are obtained when the wget test script is executed each time;
and judging whether the test check code obtained when the wget test script is executed each time is consistent with the comparison check code, and obtaining a test result.
11. An electronic device, characterized in that an operating system and a test device for stability of the operating system according to any one of claims 6-10 are installed in the electronic device;
the test device for the stability of the operating system is used for testing the stability of the operating system installed in the electronic equipment.
CN201810781348.7A 2018-07-17 2018-07-17 Method and device for testing stability of operating system and electronic equipment Pending CN110727574A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810781348.7A CN110727574A (en) 2018-07-17 2018-07-17 Method and device for testing stability of operating system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810781348.7A CN110727574A (en) 2018-07-17 2018-07-17 Method and device for testing stability of operating system and electronic equipment

Publications (1)

Publication Number Publication Date
CN110727574A true CN110727574A (en) 2020-01-24

Family

ID=69216989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810781348.7A Pending CN110727574A (en) 2018-07-17 2018-07-17 Method and device for testing stability of operating system and electronic equipment

Country Status (1)

Country Link
CN (1) CN110727574A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100138813A1 (en) * 2008-12-01 2010-06-03 Electronics And Telecommunications Research Institute Method and apparatus for testing online performance on client/server architecture
CN103336741A (en) * 2013-06-28 2013-10-02 广东电网公司电力科学研究院 Method and device for testing stability of operation system of power secondary system
CN103810108A (en) * 2014-03-07 2014-05-21 龙芯中科技术有限公司 Method and device for testing stability of operating system kernel
CN107203445A (en) * 2017-05-24 2017-09-26 郑州云海信息技术有限公司 A kind of automated testing method of timing cycle perform script
CN107948011A (en) * 2017-11-16 2018-04-20 郑州云海信息技术有限公司 The method and system of data consistency under a kind of verification network pressure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100138813A1 (en) * 2008-12-01 2010-06-03 Electronics And Telecommunications Research Institute Method and apparatus for testing online performance on client/server architecture
CN103336741A (en) * 2013-06-28 2013-10-02 广东电网公司电力科学研究院 Method and device for testing stability of operation system of power secondary system
CN103810108A (en) * 2014-03-07 2014-05-21 龙芯中科技术有限公司 Method and device for testing stability of operating system kernel
CN107203445A (en) * 2017-05-24 2017-09-26 郑州云海信息技术有限公司 A kind of automated testing method of timing cycle perform script
CN107948011A (en) * 2017-11-16 2018-04-20 郑州云海信息技术有限公司 The method and system of data consistency under a kind of verification network pressure

Similar Documents

Publication Publication Date Title
CN106339312B (en) API test method and system
US9152521B2 (en) Systems and methods for testing content of mobile communication devices
CN107733847B (en) Method and device for platform login website, computer equipment and readable storage medium
CN109902005B (en) Automatic testing method and system
CN111026645A (en) User interface automatic testing method and device, storage medium and electronic equipment
CN106843947B (en) Method and device for processing code defects
US20190149571A1 (en) Method and device for repairing page vulnerability
CN111309602A (en) Software testing method, device and system
US20230315620A1 (en) System and Method for Diagnosing a Computing Device in Safe Mode
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN107301105B (en) Method and device for checking hot patch or dynamic library
CN112507343A (en) BIOS updating method, device, equipment and medium
CN116049011A (en) Deployment method and device of test environment, electronic equipment and storage medium
CN110727574A (en) Method and device for testing stability of operating system and electronic equipment
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN114880244A (en) Application testing method and device, storage medium and electronic equipment
CN112685071A (en) Application program repairing method, device, equipment and storage medium
CN109408063B (en) Instruction pile inserting method and device based on virtual machine
CN113553271A (en) Method for generating and testing internal test program of application program
KR102002545B1 (en) Code test automatic proceeding method through virtualixation and appratus for the same
CN108536599B (en) BIOS default configuration verification method, system, device and computer readable storage medium
CN112527335A (en) Method, system and computer device for automating npm dependent package installation
CN113890825B (en) Interactive upgrade test method and device of equipment, storage medium and electronic equipment
CN114265729B (en) Pressure testing method and device, storage medium and electronic equipment
CN114265782B (en) Application program based shell adding tool testing method, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant after: Loongson Zhongke Technology Co.,Ltd.

Address before: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant before: LOONGSON TECHNOLOGY Corp.,Ltd.