Multi-version CDM tool automatic testing method, device and computer equipment
Through automated detection and control of multi-version CDM tools, the problem of low efficiency of existing hard disk detection is solved, efficient hard disk detection and data aggregation are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202111040114.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-06
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-06
AI Technical Summary
Existing hard drive detection methods are inefficient, especially when multiple repetitive test cases and multiple versions of test tools are involved, making it difficult to efficiently aggregate data through manual operations.
Provides a multi-version CDM tool automatic testing method, through access detection, formatting, receiving test parameters, automatically controlling the CDM tool for testing, and summarizing the test data into a preset file format to improve hard drive detection efficiency and data comparison analysis convenience.
It realizes automated detection and customized testing of multi-version CDM tools, improves hard drive detection efficiency and user experience, and simplifies test data aggregation and comparative analysis of multiple hard drives.
Smart Images

Figure CN113742151B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hard disk detection, and in particular to a multi-version CDM tool automatic testing method, device, computer equipment and readable storage medium. Background Art
[0002] In the prior art, hard disk testing tools are generally used in a manual operation mode to test the hard disk to be tested. When multiple repeated test cases, repeated test processes and multiple versions of test tools are involved, the manual operation mode is inefficient and it is difficult to aggregate data. Summary of the invention
[0003] In view of the above problems, the present invention provides a multi-version CDM tool automatic testing method, apparatus, computer equipment and readable storage medium to improve the efficiency of hard disk detection and automatically summarize test data.
[0004] In order to achieve the above object, the present invention adopts the following technical solution:
[0005] A multi-version CDM tool automatic testing method, comprising:
[0006] Performing access detection and formatting on at least one hard disk to be tested;
[0007] Receive test parameters, where the test parameters include at least one CDM tool version information, combination information of the content to be tested, and corresponding test content information;
[0008] According to the test parameters, testing at least one of the hard disks to be tested is performed in sequence to obtain test data of each of the hard disks to be tested;
[0009] After the test data is associated with the corresponding hard disk drive letters, it is aggregated into a test file in a preset file format.
[0010] Preferably, the multi-version CDM tool automatic testing method further comprises, after formatting and before testing:
[0011] Receive the input hard disk number set to be tested and the system protection hard disk number;
[0012] Determine whether the corresponding hard disk to be tested has been connected according to the hard disk number set to be tested, and generate abnormal information and prompt if at least one corresponding hard disk to be tested is missing;
[0013] Determine whether the system protection hard disk number is in the hard disk number set to be tested, and if the system protection hard disk number is in the hard disk number set to be tested, generate abnormal information and prompt;
[0014] When it is determined that the corresponding hard disk to be tested has been connected and the system protection hard disk number is not in the hard disk number set to be tested, the corresponding hard disk to be tested is formatted according to the hard disk number set to be tested.
[0015] Preferably, in the multi-version CDM tool automatic testing method, testing at least one hard disk to be tested in turn according to the test parameters, and obtaining test data of each hard disk to be tested includes:
[0016] Selecting an initial version of a CDM tool as a current CDM tool according to the combination information of the content to be tested;
[0017] Extract text information from the current CDM tool interface and control the focus of buttons;
[0018] Setting the test content of the current CDM tool according to the test content information and the focus of the control button;
[0019] After determining that the selected hard disk to be tested is correct according to the text information, running the current CDM tool and extracting new text information at a preset time interval;
[0020] After determining that the test is completed according to the new text information, collecting the test data of the current CDM tool;
[0021] The next version of the CDM tool is selected according to the combination information of the content to be tested as the current CDM tool and the process returns to the step of extracting text information from the interface of the current CDM tool and controlling the focus of the button.
[0022] Preferably, the multi-version CDM tool automatic testing method further includes:
[0023] After executing all corresponding versions of CDM tools according to the combination information of the content to be tested, select the next hard disk to be tested according to the drive number, and return to the step of selecting the initial version of CDM tool according to the combination information of the content to be tested.
[0024] Preferably, the multi-version CDM tool automatic testing method further includes:
[0025] After collecting the test data of the current CDM tool, when it is determined according to the test content information that formatting is required, the hard disk to be tested is formatted, and then the next version of the CDM tool is selected for testing.
[0026] Preferably, in the multi-version CDM tool automatic testing method, running the current CDM tool includes:
[0027] Access the focus of the execution button of the current CDM tool by simulating a mouse, and click the focus of the execution button;
[0028] If the simulated mouse access is unsuccessful, the simulated keyboard is switched to access the execution key focus of the current CDM tool, and the Enter key is simulated to click the execution key focus;
[0029] If the simulated keyboard access is unsuccessful, a corresponding automatic test failure message will be generated and prompted.
[0030] Preferably, the multi-version CDM tool automatic testing method further includes:
[0031] While extracting the new text information at preset time intervals, the running time of the current CDM tool is monitored, and when it is determined that the running time is greater than the preset time, the running of the current CDM tool is terminated, and corresponding timeout information is generated and prompted.
[0032] The present invention also provides a multi-version CDM tool automatic testing device, comprising:
[0033] A formatting processing module, used to perform access detection and format processing on at least one hard disk to be tested;
[0034] A test logic receiving module, used for receiving test parameters, wherein the test parameters include at least one CDM tool version information, combination information of the content to be tested and corresponding test content information;
[0035] A hard disk test module for testing, used to test at least one hard disk for testing in turn according to the test parameters, and obtain test data of each hard disk for testing;
[0036] The test data aggregation module is used to aggregate the test data into a test file in a preset file format after associating the test data with the corresponding hard disk drive letters.
[0037] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the multi-version CDM tool automatic testing method is described when the computer program runs on the processor.
[0038] The present invention also provides a readable storage medium storing a computer program, wherein the computer program executes the multi-version CDM tool automatic testing method when running on a processor.
[0039] The present invention provides a multi-version CDM tool automatic testing method, which includes: performing access detection and formatting processing on at least one hard disk to be tested; receiving test parameters, the test parameters including at least one CDM tool version information, combination information of content to be tested and corresponding test content information; testing at least one hard disk to be tested in turn according to the test parameters, and obtaining test data of each hard disk to be tested; and summarizing the test files in a preset file format after associating the corresponding hard disk drive numbers with the test data. The multi-version CDM tool automatic testing method of the present invention automatically detects the hard disk to be tested, formats it, and automatically controls the CDM tool of the multi-version combination to test the hard disk to be tested with customized content according to the test parameters input by the user, thereby improving the efficiency of the hard disk to be tested detection, improving the user experience, and finally summarizing the test data of multiple hard disks to be tested into a test file, which is convenient for the user to compare and analyze the test data.
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0042] Figure 1 is a flow chart of a multi-version CDM tool automatic testing method provided by Embodiment 1 of the present invention;
[0043] Figure 2 This is a flow chart of hard disk detection and formatting provided by Embodiment 2 of the present invention;
[0044] Figure 3 This is a flow chart of testing a hard disk to be tested provided by Embodiment 3 of the present invention;
[0045] Figure 4 is another flow chart of testing a hard disk to be tested provided by Embodiment 3 of the present invention;
[0046] Figure 5 This is a flow chart of testing a hard disk to be tested provided by Embodiment 4 of the present invention;
[0047] Figure 6 is a flow chart of automatically running a CDM tool provided by Embodiment 5 of the present invention;
[0048] Figure 7 It is a structural diagram of a multi-version CDM tool automatic testing device provided in Example 6 of the present invention. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0050] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0051] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0052] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0053] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0054] Example 1
[0055] Figure 1 : is a flowchart of a multi-version CDM tool automatic testing method provided by Example 1 of the present invention, the method comprising the following steps:
[0056] Step S11: performing access detection on at least one hard disk to be tested and performing formatting processing.
[0057] In the embodiment of the present invention, the CDM tool, namely the CRYSTALDISKMARK tool, is a computer hard disk detection tool that can perform random read / write speed, continuous read / write speed and other tests on the hard disk. The CDM tool has multiple versions, and the test data obtained by each version may be different. Therefore, when testing the hard disk, the user generally determines the versions and test contents of the multiple CDM tools that need to be tested according to their own needs, so as to obtain more detailed test data, thereby accurately reflecting the current status of the hard disk. However, each version of the CDM tool is an independent tool, so it does not have the function of arbitrarily adjusting the version test order and automating the test.
[0058] In an embodiment of the present invention, an automation script may be provided on a computer device running a CDM tool, for controlling the entire detection process of a hard disk, including formatting of the hard disk and application of the CDM tool, etc., and adjusting each logical step of the test through an automated test script. The automation script may be PYWINAUTO, which is an automation tool based on Python language, and performs automated control by sending preset mouse and keyboard operations to window dialog boxes and controls, that is, sending preset mouse and keyboard operations to the CDM tool window and corresponding controls, and performing automatic control of the CDM tool, as well as automatic control of hard disks outside the CDM tool, etc.
[0059] In the embodiment of the present invention, through the automated test script, the hard disk to be tested connected to the computer device will first be tested for access detection and formatting, so that the hard disk is restored to the FOB state (FOB, Fresh Of Box, just unpacked state), and a drive number is assigned to each hard disk to be tested, so that the CDM tool can test the corresponding hard disk to be tested by selecting the drive number. The models of the hard disks to be tested can be different, and the hard disks to be tested from different manufacturers can all be tested as the same batch to compare their performance.
[0060] Step S12: receiving test parameters, wherein the test parameters include at least one CDM tool version information, combination information of the content to be tested, and corresponding test content information.
[0061] In the embodiment of the present invention, the user can set various versions of CDM tools, test sequences and corresponding test contents for testing in the automated test script as required by inputting test parameters into the automated test script, that is, the content to be tested can be different tool modules of different CDM tool versions, and a combination test is performed on the corresponding tool modules. For example, an optimal test logic can be: (CDM3 data type is random type, data size is 1G, number of tests is 5, and the test is looped three times) --> (formatted) --> (CDM6 data type is random type, data size is 1G, number of tests is 5, and the test is looped three times) --> (formatted) --> (CDM6 data (Type is all 0, data size is 1G, test times are 5, and the test is repeated once)-->(Format)-->(CDM7 data type is random, data size is 1G, test times are 5, and the test is repeated three times)-->(Format)-->(CDM7 data type is all 0, data size is 1G, test times are 5, and the test is repeated once)-->(Clear data or format), among which CDM3 is the third version of CDM tool of CRYSTALDISKMARK3, CDM6 is the sixth version of CDM tool of CRYSTALDISKMARK6, and CDM7 is the seventh version of CDM tool of CRYSTALDISKMARK7.
[0062] Step S13: testing at least one of the hard disks to be tested in turn according to the test parameters, and obtaining test data of each of the hard disks to be tested.
[0063] In an embodiment of the present invention, the test parameters input by the user can be converted into the actual CDM tool operation process through the automated test script, for example, the automated test script simulates the mouse access to the CDM tool, or simulates the keyboard access to the CDM tool, so as to switch different versions of the CDM tool, set the test content on the CDM tool, and switch the hard disk to be tested according to the drive letter. In addition, during the test process, the test data of the hard disk to be tested of the CDM tool after each test is completed is also obtained. Among them, after traversing and testing all the hard disks to be tested, the hard disk to be tested can also be de-fragmented and formatted, which is not limited here.
[0064] Step S14: After associating the test data with the corresponding hard disk drive letters, the test data are compiled into a test file in a preset file format.
[0065] In the embodiment of the present invention, during the test process, the test data recorded by each CDM tool can be associated with the drive number of the corresponding hard disk to be tested. After all the test processes of all the hard disks to be tested are completed, all the test data can be associated with the corresponding drive number and summarized into a test file in a preset format, so that the user can perform comparative analysis of the test data between different hard disks to be tested. The preset file format can be a CSV format (CSV, Comma-Separated Values, comma separated value file format).
[0066] In the embodiment of the present invention, the connected hard disk to be tested is automatically detected and formatted, and a multi-version combination of CDM tools is automatically controlled according to the test parameters input by the user to perform customized content testing on the hard disk to be tested, thereby improving the efficiency of the hard disk to be tested detection and improving the user experience, and finally aggregating the test data of multiple hard disks to be tested into one test file, which is convenient for users to compare and analyze the test data.
[0067] Example 2
[0068] Figure 2 A flowchart of detecting a hard disk number provided by Embodiment 2 of the present invention includes the following steps:
[0069] Step S21: receiving an input hard disk number set to be tested and a system protection hard disk number.
[0070] In the embodiment of the present invention, since the computer device has its own hard disk, after receiving the hard disk to be tested outside, the tester needs to input multiple corresponding hard disk numbers to be tested, that is, the hard disk number set to be tested, and the system protection hard disk number into the automated test script, so as to distinguish the system protection hard disk number from the hard disk number to be tested, so as to avoid misdetection and formatting of the system protection hard disk.
[0071] Step S22: judging whether the corresponding hard disk to be tested has been connected according to the hard disk number set to be tested, and generating abnormal information and prompting if at least one corresponding hard disk to be tested is missing.
[0072] In an embodiment of the present invention, for the hard disk number to be tested input by the tester, it will automatically detect whether the connected hard disk to be tested exists. If not, the automated test script will generate corresponding exception information and prompt so that the tester can check and modify the input hard disk number set to be tested.
[0073] Step S23: determine whether the system protection hard disk number is in the hard disk number set to be tested; if the system protection hard disk number is in the hard disk number set to be tested, generate abnormal information and prompt.
[0074] In the embodiment of the present invention, it is also detected whether the system protection hard disk number is in the hard disk number set to be tested, so as to avoid the automated test script from automatically detecting the system protection hard disk number and formatting the system protection hard disk by mistake. If the system protection hard disk number is found to be in the hard disk number set to be tested, the automated test script can generate an abnormal information and prompt, so that the tester can check and modify the hard disk number set to be tested.
[0075] Step S24: when it is determined that the corresponding hard disk to be tested has been connected and the system protection hard disk number is not in the hard disk number set to be tested, format the corresponding hard disk to be tested according to the hard disk number set to be tested.
[0076] Example 3
[0077] Figure 3 A flowchart of testing a hard disk to be tested provided by Embodiment 3 of the present invention includes the following steps:
[0078] Step S31: selecting an initial version of a CDM tool as the current CDM tool according to the combination information of the content to be tested.
[0079] Step S32: extracting text information and the focus of control buttons from the interface of the current CDM tool.
[0080] In the embodiment of the present invention, the AUTOMATIONID control provided by the application program interface of PYWINAUTO is used to obtain the text information of the interface of the CDM tool and the focus of the control button, thereby improving the accuracy and reliability of the operation of the simulated mouse or simulated keyboard.
[0081] Step S33: setting the test content of the current CDM tool according to the test content information and the focus of the control button.
[0082] In the embodiment of the present invention, the automated test script can access the focus of the control button according to the test content information by simulating the keyboard or simulating the mouse, thereby setting the test content of the current CDM tool. Alternatively, the automated test script can also directly modify the configuration file of the CDM tool according to the test content information, which is not limited here.
[0083] Step S34: after determining that the selected hard disk to be tested is correct according to the text information, run the current CDM tool and extract new text information at a preset time interval.
[0084] In an embodiment of the present invention, the new text information may be the text of an execution button, and the text on the execution button is extracted at a preset time interval. For example, when the extracted text is "Complete", the test is determined to be finished. The preset time interval may be 5 seconds, 10 seconds, etc., which is not limited here, and the tester may set it according to the requirements.
[0085] Step S35: After determining that the test is completed according to the new text information, the test data of the current CDM tool is collected.
[0086] Step S36: selecting the next version of the CDM tool as the current CDM tool according to the combination information of the content to be tested and returning to the step of extracting text information from the interface of the current CDM tool and controlling the focus of the button.
[0087] In the embodiment of the present invention, for the current hard disk to be tested, the CDM tool of the corresponding version will be tested in sequence according to the combination information of the contents to be tested, until the testing of all versions of the CDM tool in the combination information of the contents to be tested is completed.
[0088] Figure 4 Another flow chart of testing a hard disk to be tested provided by Embodiment 3 of the present invention further includes the following steps:
[0089] Step S37: After executing all corresponding versions of CDM tools according to the combination information of the content to be tested, select the next hard disk to be tested according to the drive number, and return to the step of selecting the initial version of the CDM tool according to the combination information of the content to be tested.
[0090] Example 4
[0091] Figure 5 A flowchart of testing a hard disk to be tested provided by Embodiment 4 of the present invention includes the following steps:
[0092] Step S51: selecting an initial version of a CDM tool as the current CDM tool according to the combination information of the content to be tested.
[0093] This step is consistent with the above step S31 and will not be described again here.
[0094] Step S52: extracting text information and the focus of control buttons from the interface of the current CDM tool.
[0095] This step is consistent with the above step S32 and will not be repeated here.
[0096] Step S53: setting the test content of the current CDM tool according to the test content information and the focus of the control button.
[0097] This step is consistent with the above step S33 and will not be repeated here.
[0098] Step S54: after determining that the selected hard disk to be tested is correct according to the text information, run the current CDM tool and extract new text information at a preset time interval.
[0099] This step is consistent with the above step S34 and will not be repeated here.
[0100] Step S55: While extracting the new text information at a preset time interval, monitor the running time of the current CDM tool, and when it is determined that the running time is greater than the preset time, terminate the running of the current CDM tool, generate corresponding timeout information and prompt.
[0101] In the embodiment of the present invention, when the current CDM tool is testing the hard disk to be tested, it will also monitor the running time of the hard disk to be tested in real time, determine whether the detection has timed out according to the preset time set by the tester, terminate the operation of the current CDM tool after the timeout, and generate timeout information for prompting. Alternatively, after the operation of the current CDM tool is terminated due to timeout, the timeout information can be retained, and then the next version of the CDM tool can be directly switched to perform the corresponding test, so as to implement the test of the complete hard disk to be tested to the greatest extent.
[0102] Step S56: After determining that the test is completed according to the new text information, the test data of the current CDM tool is collected.
[0103] This step is consistent with the above step S35 and will not be repeated here.
[0104] Step S57: when it is determined according to the test content information that formatting is required, formatting is performed on the hard disk to be tested.
[0105] In the embodiment of the present invention, according to the test content information of the tester, when it is determined that the hard disk to be tested needs to be formatted or data cleaned when the current CDM tool is switched to the next version of the CDM tool, the formatting or data cleansing operation is performed.
[0106] Step S58: selecting the next version of the CDM tool as the current CDM tool according to the combination information of the content to be tested and returning to the step of extracting text information from the interface of the current CDM tool and controlling the focus of the button.
[0107] This step is consistent with the above step S36 and will not be repeated here.
[0108] Example 5
[0109] Figure 6This is a flowchart of automatically running a CDM tool provided by Embodiment 5 of the present invention, comprising the following steps:
[0110] Step S61: access the focus of the execution button of the current CDM tool by simulating a mouse, and click the focus of the execution button.
[0111] Step S62: If the simulated mouse access is unsuccessful, switch to the simulated keyboard to access the focus of the execution button of the current CDM tool, and simulate the Enter key to click the focus of the execution button.
[0112] Step S63: If the simulated keyboard access is unsuccessful, a corresponding automatic test failure message is generated and prompted.
[0113] In an embodiment of the present invention, when both simulated mouse access and simulated keyboard access are unsuccessful, in addition to generating corresponding automatic test failure information and prompting, the automatic test failure information can also be saved, and the next version of the CDM tool can be switched for testing, or the hard disk to be tested can be switched for testing.
[0114] Example 6
[0115] Figure 7 It is a structural diagram of a multi-version CDM tool automatic testing device provided in Example 6 of the present invention.
[0116] The multi-version CDM tool automatic testing device 700 includes:
[0117] The formatting processing module 710 is used to perform access detection and format processing on at least one hard disk to be tested;
[0118] The test logic receiving module 720 is used to receive test parameters, wherein the test parameters include at least one CDM tool version information, combination information of the content to be tested, and corresponding test content information;
[0119] The hard disk test module 730 is used to test at least one hard disk to be tested in turn according to the test parameters, and obtain test data of each hard disk to be tested;
[0120] The test data aggregation module 740 is used to aggregate the test data into a test file in a preset file format after associating the test data with the corresponding hard disk drive letters.
[0121] In the embodiment of the present invention, a more detailed functional description of each of the above modules can be referred to the corresponding parts of the aforementioned embodiment, which will not be repeated here.
[0122] In addition, the present invention also provides a computer device, which includes a memory and a processor. The memory can be used to store a computer program, and the processor runs the computer program to enable the computer device to execute the functions of each module in the above method or the above multi-version CDM tool automatic testing device.
[0123] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one hard disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0124] This embodiment also provides a computer storage medium for storing a computer program used in the above-mentioned computer device.
[0125] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0127] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0128] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A multi-version CDM tool automatic testing method, characterized in that: include: Performing access detection and formatting on at least one hard disk to be tested; Receive test parameters, where the test parameters include at least one CDM tool version information, combination information of the content to be tested, and corresponding test content information; According to the test parameters, testing at least one of the hard disks to be tested is performed in sequence to obtain test data of each of the hard disks to be tested; After associating the test data with the corresponding hard disk drive letters, the test data are aggregated into a test file in a preset file format; The step of testing at least one of the hard disks to be tested in sequence according to the test parameters to obtain test data of each of the hard disks to be tested includes: Selecting an initial version of a CDM tool as a current CDM tool according to the combination information of the content to be tested; Extract text information from the current CDM tool interface and control the focus of buttons; Setting the test content of the current CDM tool according to the test content information and the focus of the control button; After determining that the selected hard disk to be tested is correct according to the text information, running the current CDM tool and extracting new text information at a preset time interval; After determining that the test is completed according to the new text information, collecting the test data of the current CDM tool; The next version of the CDM tool is selected according to the combination information of the content to be tested as the current CDM tool and the process returns to the step of extracting text information from the interface of the current CDM tool and controlling the focus of the button.
2. The multi-version CDM tool automatic testing method according to claim 1, characterized in that: After formatting and before testing, it also includes: Receive the input hard disk number set to be tested and the system protection hard disk number; Determine whether the corresponding hard disk to be tested has been connected according to the hard disk number set to be tested, and generate abnormal information and prompt if at least one corresponding hard disk to be tested is missing; Determine whether the system protection hard disk number is in the hard disk number set to be tested, and if the system protection hard disk number is in the hard disk number set to be tested, generate abnormal information and prompt; When it is determined that the corresponding hard disk to be tested has been connected and the system protection hard disk number is not in the hard disk number set to be tested, the corresponding hard disk to be tested is formatted according to the hard disk number set to be tested.
3. The multi-version CDM tool automatic testing method according to claim 1, characterized in that: Also includes: After executing all corresponding versions of CDM tools according to the combination information of the content to be tested, select the next hard disk to be tested according to the drive number, and return to the step of selecting the initial version of CDM tool according to the combination information of the content to be tested.
4. The multi-version CDM tool automatic testing method according to claim 1, characterized in that: Also includes: After collecting the test data of the current CDM tool, when it is determined according to the test content information that formatting is required, the hard disk to be tested is formatted, and then the next version of the CDM tool is selected for testing.
5. The multi-version CDM tool automatic testing method according to claim 1, characterized in that: The running of the current CDM tool comprises: Access the focus of the execution button of the current CDM tool by simulating a mouse, and click the focus of the execution button; If the simulated mouse access is unsuccessful, the simulated keyboard is switched to access the execution key focus of the current CDM tool, and the Enter key is simulated to click the execution key focus; If the simulated keyboard access is unsuccessful, a corresponding automatic test failure message will be generated and prompted.
6. The multi-version CDM tool automatic testing method according to claim 1, characterized in that: Also includes: While extracting the new text information at preset time intervals, the running time of the current CDM tool is monitored, and when it is determined that the running time is greater than the preset time, the running of the current CDM tool is terminated, and corresponding timeout information is generated and prompted.
7. A multi-version CDM tool automatic testing device, characterized in that: The method for automatically testing a multi-version CDM tool according to claim 1 comprises: A formatting processing module, used to perform access detection and format processing on at least one hard disk to be tested; A test logic receiving module, used for receiving test parameters, wherein the test parameters include at least one CDM tool version information, combination information of the content to be tested and corresponding test content information; A hard disk test module for testing, used to test at least one hard disk for testing in turn according to the test parameters, and obtain test data of each hard disk for testing; The test data aggregation module is used to aggregate the test data into a test file in a preset file format after associating the test data with the corresponding hard disk drive letters.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the method for automatically testing a multi-version CDM tool according to any one of claims 1 to 6 is executed.
9. A readable storage medium, characterized in that: The computer program stores a computer program, which executes the multi-version CDM tool automatic testing method according to any one of claims 1 to 6 when running on a processor.
Citation Information
Patent Citations
Independent Web service test equipment based on USB network card technology
CN111078576A
Automatic test method and device, storage medium and electronic equipment
CN111462811A
Human-machine order testing method
CN1555014A
Method of testing hard disk drive and computer readable medium therefor
US20040230399A1
Techniques for Background Testing a Hard Disk Drive
US20090083580A1
