A computer testing method and related components
By performing performance testing and testing environment monitoring and repairing before use of the computer, it solves possible lags or abnormal problems that may occur during use of the computer equipment, ensuring the stability and security of the user experience.
Patent Information
- Application Number
- CN202210582402.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-05-26
AI Technical Summary
In the prior art, computers are usually not tested before using them, which may cause lag or abnormalities in the computer equipment during use, affecting the user's user experience.
Provide a computer testing method, including determining whether the computer meets preset performance testing conditions, and if so, start performance testing. During the testing process, monitor whether the test environment is abnormal and perform corresponding repair operations when an exception occurs.
By automatically testing the computer performance, it reduces missed tests or missed tests, ensures user experience, and detects whether preset conditions are met before performance testing, and automatically repairs when abnormal test environments are abnormal to ensure the stability and security of the test.
Smart Images

Figure CN114816884B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a computer testing method and related components. Background Art
[0002] With the development of computer technology, computer equipment has become the most productive and practical tool for people today. The performance of computer equipment has affected the user experience to a certain extent. However, in the prior art, the computer performance is generally not tested before use, which may cause the computer equipment to freeze or become abnormal during use, affecting the user experience. Summary of the invention
[0003] The purpose of the present invention is to provide a computer testing method and related components, which can automatically test the performance of the computer, reduce the possibility of missed tests or wrong tests, ensure the user experience, and detect whether the preset performance test conditions are met before the performance test. When the test environment is abnormal, it can also automatically repair it to ensure the stability and security of the test.
[0004] In order to solve the above technical problems, the present invention provides a computer testing method, comprising:
[0005] Determining whether the computer meets a preset performance test condition;
[0006] If yes, controlling the computer to start the performance test;
[0007] When the computer performs the performance test, if it is determined that the test environment of the computer is abnormal, a corresponding repair operation is performed on the computer based on the abnormal situation of the test environment.
[0008] Preferably, before determining whether the computer meets the preset performance test conditions, the method further includes:
[0009] Obtaining a processor architecture of the computer and an operating system type of the computer;
[0010] Determining processor identification information based on the processor architecture;
[0011] Determining operating system identification information based on the operating system type;
[0012] Based on the processor identification information and the operating system identification information, generating a test environment configuration condition corresponding to the computer;
[0013] Based on a preset test environment configuration list, the test environment of the computer is configured as a test environment in the preset test environment configuration list corresponding to the test environment configuration condition; wherein the preset test environment configuration list includes a correspondence between the test environment and the test environment configuration condition.
[0014] Preferably, the test environment configuration conditions include system setting conditions of the computer and BIOS setting conditions of the computer;
[0015] Based on a preset test environment configuration list, configuring the test environment of the computer to a test environment in the preset test environment configuration list corresponding to the test environment configuration condition includes:
[0016] Based on the preset test environment configuration list, the system settings of the computer are set according to the system setting conditions, and the BIOS settings of the computer are set according to the BIOS setting conditions.
[0017] Preferably, determining whether the computer meets a preset performance test condition includes:
[0018] Obtaining current system settings of the computer and current BIOS settings of the computer;
[0019] Determining whether the current system setting is consistent with the system setting condition and whether the current BIOS setting is consistent with the BIOS setting condition;
[0020] If the current system setting is consistent with the system setting condition and the current BIOS setting is consistent with the BIOS setting condition, then determining that the computer meets the preset performance test condition;
[0021] Otherwise, it is determined that the computer does not meet the preset performance test condition.
[0022] Preferably, the system setting conditions include the firewall settings of the computer and / or the settings of the test tool in the computer; wherein the test tool is used to perform the performance test;
[0023] The BIOS setting condition includes any one or more combinations of the input and output settings of the computer, the power-on self-test settings of the computer, and the self-start settings of the computer.
[0024] Preferably, determining that the test environment of the computer is abnormal includes:
[0025] Get the current system settings of the computer and the current BIOS settings of the computer
[0026] When the current system setting is inconsistent with the system setting condition and / or the current BIOS setting is inconsistent with the BIOS setting condition, determining that an abnormality occurs in the test environment of the computer;
[0027] When the read and / or write function of the operating system of the computer is abnormal, it is determined that the test environment of the computer is abnormal.
[0028] Preferably, performing corresponding repair operations on the computer based on the abnormal situation of the test environment includes:
[0029] When the current system setting is inconsistent with the system setting condition, resetting the system setting of the computer according to the system setting condition;
[0030] When the current BIOS setting is inconsistent with the BIOS setting condition, resetting the BIOS setting of the computer according to the BIOS setting condition;
[0031] When the read and / or write function of the operating system of the computer is abnormal, a memory in the computer where the read and / or write abnormality occurs is determined, and a repair operation is performed on the memory.
[0032] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned computer testing method are implemented.
[0033] In order to solve the above technical problems, the present invention also provides a computer testing device, comprising:
[0034] Memory for storing computer programs;
[0035] A processor is used to implement the steps of the above-mentioned computer testing method when executing the computer program.
[0036] In order to solve the above technical problem, the present invention also provides a computer, including the above-mentioned computer testing device.
[0037] The present invention provides a computer testing method and related components, which first determine whether the computer meets the preset performance test conditions. If so, the computer will be controlled to start the performance test. While the computer is performing the performance test, it will determine whether the test environment of the computer is abnormal. If the test environment is abnormal, the computer will be repaired accordingly based on the abnormal situation of the test environment. Therefore, the performance of the computer can be tested automatically, reducing the situation of missed tests or wrong tests, ensuring the user experience, and being able to detect whether the preset performance test conditions are met before the performance test. When the test environment is abnormal, it can also be automatically repaired, ensuring the stability and security of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 A flowchart of a computer testing method provided by the present invention;
[0040] Figure 2 The present invention provides a schematic structural diagram of a computer testing device. DETAILED DESCRIPTION
[0041] The core of the present invention is to provide a computer testing method and related components, which can automatically test the performance of the computer, reduce missed tests or wrong tests, ensure the user experience, and detect whether the preset performance test conditions are met before the performance test. When the test environment is abnormal, it can also automatically repair it to ensure the stability and security of the test.
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Please refer to Figure 1 , Figure 1 A flowchart of a computer testing method provided by the present invention, the testing method comprising:
[0044] S1, determining whether the computer meets the preset performance test conditions, if so, triggering S2;
[0045] S2, the control computer starts to perform performance test;
[0046] S3. When the computer is performing a performance test, if it is determined that the test environment of the computer is abnormal, a corresponding repair operation is performed on the computer based on the abnormal situation of the test environment.
[0047] Considering that the computer is generally not tested for performance before use in the prior art, it may cause the computer device to freeze or be abnormal during use, affecting the user experience. Therefore, the present application not only implements the performance test of the computer to ensure the user experience, but also ensures the safety of the performance test process.
[0048] Specifically, considering that it is generally necessary to configure the test environment for the performance test before performing a performance test on a computer, otherwise the process and test results of the performance test may be affected, therefore, in this application, before the performance test on the computer is performed, it is first determined whether the computer meets the preset performance test conditions, and the performance test can be preliminarily guaranteed to proceed smoothly. In addition, the preset performance test conditions in this application can be the relevant configuration conditions of the computer's operating system and the relevant settings of the computer's BIOS (Basic Input Output System, Basic Input Output System), etc., which are not particularly limited.
[0049] The computer will be controlled to start the performance test only after it is determined that the computer meets the preset performance test conditions, and considering that many performance tests of the computer need to control the computer to restart multiple times during the test process, it is easy to cause the computer's operating system and BIOS settings to be affected, which in turn causes the computer to malfunction. For example, when using MEmEye to test the computer's memory performance, it is necessary to control the change of the voltage signal of the memory regulator in the computer to promote the voltage offset of the memory controller and the memory. In this process, the computer will be controlled to perform read operations, write operations, and command address operations multiple times, and the computer will be controlled to restart multiple times during the execution process, which is easy to cause the computer to be abnormal, such as the computer's operating system becomes read-only mode, or the computer's configuration file is damaged. Therefore, in the present application, the computer's test environment will be continuously monitored during the computer's performance test, and when the computer's test environment is abnormal, the corresponding repair operation will be performed for the abnormal situation, so as to avoid the situation in which the performance test is stuck or cannot be continued due to the abnormal test environment of the computer during the computer's performance test, and further ensure the safety and stability of the computer's performance test during the test process.
[0050] In addition, in the present application, the computer's test environment may be monitored in real time to see if it is abnormal, or it may be monitored at a certain period to see if it is abnormal, and the present application does not impose any particular limitation on this.
[0051] In summary, the present invention provides a computer testing method, which first determines whether the computer meets the preset performance test conditions. If so, the computer will be controlled to start the performance test. While the computer is performing the performance test, it will determine whether the test environment of the computer is abnormal. If the test environment is abnormal, the computer will be repaired accordingly based on the abnormality of the test environment. Therefore, the performance of the computer can be tested automatically, reducing the situation of missed tests or wrong tests, ensuring the user experience, and being able to detect whether the preset performance test conditions are met before the performance test. When the test environment is abnormal, it can also be automatically repaired, ensuring the stability and security of the test.
[0052] Based on the above embodiments:
[0053] As a preferred embodiment, before determining whether the computer meets the preset performance test conditions, the method further includes:
[0054] Get the processor architecture of the computer and the type of operating system of the computer;
[0055] Determining processor identification information based on the processor architecture;
[0056] Determining operating system identification information based on the operating system type;
[0057] Based on the processor identification information and the operating system identification information, generate a test environment configuration condition corresponding to the computer;
[0058] Based on the preset test environment configuration list, the test environment of the computer is configured as a test environment corresponding to the test environment configuration condition in the preset test environment configuration list; wherein the preset test environment configuration list includes a correspondence between the test environment and the test environment configuration condition.
[0059] In this embodiment, before determining whether the computer meets the preset performance test conditions, that is, before preparing to perform a performance test on the computer, a test environment is automatically configured for the computer. Specifically, considering that the processor architectures and operating system types of different computers are different, the supported performance test methods are also different. Therefore, in this application, the processor flag of the computer is first determined based on the processor architecture of the computer, and the operating system flag information of the computer is determined according to the operating system type of the computer. Then, the processor identification information and the operating system identification information are combined to generate the test environment configuration conditions corresponding to the computer. A preset test environment configuration list is pre-stored in the computer, and the preset test environment configuration list includes the corresponding relationship between the test environment and the test environment configuration conditions. Therefore, after determining the test environment configuration conditions of the computer, the test environment corresponding to the computer can be determined based on the preset environment configuration list.
[0060] For example, after obtaining the computer's processor architecture and the computer's operating system type, determine that the computer's processor identification information and the operating system identification information are "AMD Ubuntu 20.04LTS", and then determine the test environment based on the preset test environment configuration list. The test environment here can be the system configuration information and BIOS setting, and this application does not specifically limit this.
[0061] For example, when the computer is turned on and enters the operating system, it starts running the configcheck.sh script, and then calls system&BIOSsetting.sh to obtain the computer's processor architecture and the computer's operating system type, and then automatically configures the test environment for the computer based on the preset test environment configuration list. It also monitors whether the computer's test environment configuration is complete, and then controls the computer to restart after determining that the test environment configuration is complete to make the test environment take effect.
[0062] In summary, in this embodiment, before determining whether the computer meets the preset performance test conditions, that is, before preparing to perform a performance test on the computer, a test environment is automatically configured for the computer, which further ensures the security and stability of the performance test with high efficiency.
[0063] As a preferred embodiment, the test environment configuration conditions include computer system setting conditions and computer BIOS setting conditions;
[0064] Based on the preset test environment configuration list, the test environment of the computer is configured as a test environment corresponding to the test environment configuration condition in the preset test environment configuration list, including:
[0065] Based on the preset test environment configuration list, the system settings of the computer are set according to the system setting conditions, and the BIOS settings of the computer are set according to the BIOS setting conditions.
[0066] In this embodiment, the main factors affecting the test environment of the performance test are the settings of the computer's operating system and the computer's BIOS, because the computer's BIOS stores the computer's most basic input and output programs, power-on self-test programs, and system self-starting programs.
[0067] Therefore, in this embodiment, the test environment configuration conditions include the system setting conditions of the computer and the BIOS setting conditions of the computer. After determining the test environment configuration conditions corresponding to the computer, based on the preset configuration list, the system settings of the computer are set according to the system setting conditions, and the BIOS settings of the computer are set according to the BIOS setting conditions, thereby further ensuring the security and stability of the performance test.
[0068] As a preferred embodiment, determining whether the computer meets the preset performance test conditions includes:
[0069] Get the current system settings of the computer and the current BIOS settings of the computer;
[0070] Determine whether the current system settings are consistent with the system setting conditions and whether the current BIOS settings are consistent with the BIOS setting conditions;
[0071] If the current system settings are consistent with the system setting conditions and the current BIOS settings are consistent with the BIOS setting conditions, then it is determined that the computer meets the preset performance test conditions;
[0072] Otherwise, it is determined that the computer does not meet the preset performance test conditions.
[0073] In this embodiment, since a test environment is configured for the computer before the performance test is performed on the computer, if you want to determine whether the computer meets the preset performance test conditions, you can compare the system settings with the system setting conditions, and compare the current BIOS settings with the BIOS setting conditions. If the current system settings are consistent with the system setting conditions and the current BIOS settings are consistent with the BIOS setting conditions, it means that the computer is not disturbed by multiple restart operations and other influencing factors that occur during the performance test, and it can be determined that the computer meets the preset performance test conditions; otherwise, it proves that the computer is disturbed by multiple restart operations and other influencing factors that occur during the performance test, and it is determined that the computer does not meet the preset performance test conditions. At this time, the performance test of the computer may not continue normally.
[0074] As a preferred embodiment, the system setting condition includes the firewall setting of the computer and / or the setting of the test tool in the computer; wherein the test tool is used to perform performance testing;
[0075] The BIOS setting conditions include any one or more combinations of the computer's input and output settings, the computer's power-on self-test settings, and the computer's self-start settings.
[0076] In this embodiment, considering that whether the computer's firewall is closed and whether the test tool used for performance testing is turned on has a very large impact on whether the performance test can be carried out normally, the system setting conditions can be set to the computer's firewall settings and / or the settings of the test tool in the computer.
[0077] And considering that the computer's BIOS stores the computer's most basic input and output programs, power-on self-test programs, and system self-starting programs, etc., therefore, in this embodiment, any one or more combinations of the computer's input and output settings, the computer's power-on self-test settings, and the computer's self-starting settings are also used as BIOS setting conditions, further ensuring the stability of the computer's performance test.
[0078] As a preferred embodiment, determining that a test environment of a computer is abnormal includes:
[0079] Get the current system settings of the computer and the current BIOS settings of the computer
[0080] When the current system setting is inconsistent with the system setting condition and / or the current BIOS setting is inconsistent with the BIOS setting condition, determining that the test environment of the computer is abnormal;
[0081] When the read and / or write function of the operating system of the computer is abnormal, it is determined that the test environment of the computer is abnormal.
[0082] In this embodiment, considering that the factors that affect the performance test of the computer mainly include system settings, BIOS settings, and the read and / or write functions of the operating system, in this embodiment, when the current system settings are inconsistent with the system setting conditions and / or the current BIOS settings are inconsistent with the BIOS setting conditions, it is determined that the test environment of the computer is abnormal, that is, the current test environment of the computer is different from the test environment initially configured for the computer, indicating that the computer may be interfered by multiple restarts or other factors during the test. In addition, when performing performance testing, it is very important whether the computer's operating system can perform read and write operations normally. For example, when the computer's operating system changes to read-only mode, the performance test cannot be performed. Therefore, in this embodiment, when the read and / or write functions of the computer's operating system are abnormal, it is determined that the computer's test environment is abnormal, which further ensures that the computer can perform performance testing normally.
[0083] For example, the computer calls systemcheck&BIOScheck.sh, and then the computer automatically detects whether the current system settings are inconsistent with the system setting conditions and / or whether the current BIOS settings are inconsistent with the BIOS setting conditions, and also detects whether the read and / or write functions of the computer's operating system are abnormal. For example, when the operating system is readonly or the BIOS is inconformity, it is determined that the computer's test environment is abnormal.
[0084] As a preferred embodiment, performing corresponding repair operations on the computer based on the abnormal situation of the test environment includes:
[0085] When the current system settings are inconsistent with the system setting conditions, resetting the system settings of the computer according to the system setting conditions;
[0086] When the current BIOS settings are inconsistent with the BIOS setting conditions, reset the BIOS settings of the computer according to the BIOS setting conditions;
[0087] When the read and / or write function of the computer operating system is abnormal, a memory in the computer where the read and / or write abnormality occurs is determined, and a repair operation is performed on the memory.
[0088] In this embodiment, in order to ensure that the performance test of the computer can be restored as soon as possible after an abnormality occurs, different repair operations are configured for different abnormalities of the computer. When the test environment of the computer changes, the test environment is reconfigured for the computer, and the abnormal test environment is overwritten with the test environment of the information. Specifically, when the current system settings are inconsistent with the system setting conditions, the system settings of the computer are reset according to the system setting conditions; when the current BIOS settings are inconsistent with the BIOS setting conditions, the BIOS settings of the computer are reset according to the BIOS setting conditions.
[0089] When the read and / or write functions of the computer's operating system are abnormal, the memory in the computer where the read and / or write abnormality occurs is determined, and then a repair operation is performed on the abnormal memory to improve the repair efficiency and accuracy and ensure the stability of the performance test.
[0090] For example, after an abnormality is found, systemrepair-BIOSset.sh is called to automatically perform corresponding repair operations for different abnormal situations. After the repair is completed, the computer is controlled to restart and then continue to perform performance testing.
[0091] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the computer testing method described above are implemented.
[0092] For the relevant introduction of a computer-readable storage medium provided by the present invention, please refer to the embodiment of the above-mentioned computer testing method, which will not be elaborated here.
[0093] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a computer testing device provided by the present invention comprises:
[0094] Memory 1, used for storing computer programs;
[0095] The processor 2 is used to implement the steps of the above-mentioned computer testing method when executing the computer program.
[0096] For the relevant introduction of the computer testing device provided by the present invention, please refer to the embodiment of the computer testing method mentioned above, which will not be elaborated here.
[0097] The present invention also provides a computer, including the computer testing device as described above.
[0098] For the relevant introduction of a computer provided by the present invention, please refer to the embodiment of the above-mentioned computer testing method, which will not be described in detail here.
[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0100] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A computer testing method, characterized in that: include: Determining whether the computer meets a preset performance test condition; If yes, controlling the computer to start the performance test; When the computer performs the performance test, if it is determined that the test environment of the computer is abnormal, a corresponding repair operation is performed on the computer based on the abnormality of the test environment; Before determining whether the computer meets the preset performance test conditions, the method further includes: Obtain the processor architecture of the computer and the operating system type of the computer; start running the configcheck.sh script after the computer is turned on and enters the operating system, and obtain the processor architecture of the computer and the operating system type of the computer by calling system&BIOSsetting.sh; Determining processor identification information based on the processor architecture; Determining operating system identification information based on the operating system type; Based on the processor identification information and the operating system identification information, generating a test environment configuration condition corresponding to the computer; Based on a preset test environment configuration list, configuring the test environment of the computer to a test environment in the preset test environment configuration list corresponding to the test environment configuration condition; wherein the preset test environment configuration list includes a correspondence between the test environment and the test environment configuration condition; The test environment configuration conditions include the system setting conditions of the computer and the BIOS setting conditions of the computer; Based on a preset test environment configuration list, configuring the test environment of the computer to a test environment in the preset test environment configuration list corresponding to the test environment configuration condition includes: Based on the preset test environment configuration list, the system settings of the computer are set according to the system setting conditions, and the BIOS settings of the computer are set according to the BIOS setting conditions; the BIOS of the computer stores the most basic input and output programs, power-on self-test programs and system self-starting programs of the computer; The system setting conditions include the firewall settings of the computer and / or the settings of the test tool in the computer; wherein the test tool is used to perform the performance test; The BIOS setting condition includes any one or more combinations of the input and output settings of the computer, the power-on self-test settings of the computer, and the self-start settings of the computer.
2. The computer testing method according to claim 1, wherein: Determining whether the computer meets a preset performance test condition includes: Obtaining current system settings of the computer and current BIOS settings of the computer; Determining whether the current system setting is consistent with the system setting condition and whether the current BIOS setting is consistent with the BIOS setting condition; If the current system setting is consistent with the system setting condition and the current BIOS setting is consistent with the BIOS setting condition, then determining that the computer meets the preset performance test condition; Otherwise, it is determined that the computer does not meet the preset performance test condition.
3. The computer testing method according to claim 1, wherein: Determining that an abnormality occurs in the test environment of the computer includes: Obtaining current system settings of the computer and current BIOS settings of the computer; When the current system setting is inconsistent with the system setting condition and / or the current BIOS setting is inconsistent with the BIOS setting condition, determining that an abnormality occurs in the test environment of the computer; When the read and / or write function of the operating system of the computer is abnormal, it is determined that the test environment of the computer is abnormal.
4. The computer testing method according to claim 3, characterized in that: Performing corresponding repair operations on the computer based on the abnormal situation of the test environment includes: When the current system setting is inconsistent with the system setting condition, resetting the system setting of the computer according to the system setting condition; When the current BIOS setting is inconsistent with the BIOS setting condition, resetting the BIOS setting of the computer according to the BIOS setting condition; When the read and / or write function of the operating system of the computer is abnormal, a memory in the computer where the read and / or write abnormality occurs is determined, and a repair operation is performed on the memory.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the computer test method according to any one of claims 1 to 4.
6. A computer testing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the computer testing method according to any one of claims 1 to 4 when executing the computer program.
7. A computer, characterized in that: A testing device comprising the computer as claimed in claim 6.
Citation Information
Patent Citations
A method and apparatus for monitoring a test environment
CN109144874A
System function testing method and device
CN111176910A