Disk testing method, disk testing system, and computer-readable storage medium
By integrating multiple disk testing tools into the testing platform and utilizing control recognition and dynamic status monitoring, the problems of low efficiency and poor accuracy in batch disk testing have been solved, realizing an efficient and reliable automated testing pipeline.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN SHICHUANGYI ELECTRONICS CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-08-04
AI Technical Summary
In existing technologies, batch testing of multiple disks is cumbersome, time-consuming, and labor-intensive. Furthermore, the testing tools are complex to operate and are prone to interruption or invalid results due to human error.
An automated mechanism based on control recognition is adopted. By integrating multiple testing tools through the testing platform, and utilizing dynamic status monitoring and process management, batch testing of disks is achieved, simplifying parameter configuration and monitoring test progress, and avoiding human error.
It improves the efficiency and accuracy of disk testing, achieves continuity and reliability in batch testing, and avoids problems such as test interruption and invalid results.
Smart Images

Figure CN122507543A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of disk testing technology, and in particular to a disk testing method, a disk testing system, and a computer-readable storage medium. Background Technology
[0002] There are currently many independent testing tools available on the market for testing disk performance. Each tool has its own specific testing dimensions and advantages. Testers need to manually run these tools one by one according to their testing needs and record the test results.
[0003] When batch testing multiple disks is required, it currently necessitates manually operating multiple testing tools sequentially. This process is cumbersome, time-consuming, and incurs extremely high labor and time costs. Furthermore, each testing tool has a different graphical interface and operating procedure, requiring testers to be familiar with the specific operation of each tool. This can easily lead to test interruptions or invalid results due to human error. Summary of the Invention
[0004] The purpose of this application is to provide a disk testing method, a disk testing system, and a computer-readable storage medium that can perform automated batch testing of disks to improve testing efficiency and accuracy.
[0005] This application discloses a disk testing method, which includes the following steps: Create a testing platform; Connect multiple disks to multiple testing tools one by one; Connect the plurality of testing tools to the testing platform; Access the configuration interface of the test platform and configure the parameters on the configuration interface; and The testing tool is controlled to test the disk according to the configured parameters.
[0006] Optionally, in the step of connecting the multiple testing tools to the testing platform, the testing platform integrates multiple testing tools through a mechanism for recognizing controls.
[0007] Optionally, the step of controlling the testing tool to test the disk according to the configured parameters includes a step of querying the disk testing progress; in the step of querying the disk testing progress, the testing progress of the disk is determined by continuously querying the control properties.
[0008] Optionally, the step of controlling the testing tool to test the disk further includes: Record the process ID of each of the aforementioned testing tools during the test; Check if the testing tool is malfunctioning; If so, the process of the corresponding testing tool is terminated based on the process ID.
[0009] Optionally, in the step of creating a test platform, Python can be used as the main language, and the PyWinAuto library can be used to create the test platform.
[0010] Optionally, in the step of retrieving the configuration interface of the test platform and configuring the parameters of the configuration interface, the configuration interface of the test platform is constructed through the Tkinter interface; the parameter configuration of the configuration interface includes: selecting the disk to be tested, selecting the test tool, setting the parent disk drive letter and / or setting the test interval time.
[0011] Optionally, the step of controlling the testing tool to test the disk according to the configured parameters includes: Calculate the test capacity of the target disk; Check if the number of files is sufficient; If there are enough files, select at least one file to perform a copy test on the target disk; Monitor the progress of the replication test; When the replication test progress meets the preset conditions, take a screenshot of the replication test progress interface; and If the number of screenshots reaches the preset number, the copy test of the target disk is completed.
[0012] Optionally, the preset conditions are that the progress of the replication test is 10% and 90%.
[0013] This application also discloses a disk testing system. The disk testing system employs the disk testing method described above. The disk testing system includes a user interaction layer, a core control layer, and a test execution layer. The user interaction layer includes a visual configuration interface for testers to configure parameters. The core control layer is signal-connected to the user interaction layer and generates corresponding test instructions based on the configured parameters. The test execution layer is signal-connected to the core control layer and includes automated test logic corresponding to multiple test tools, executing the test instructions from the core control layer.
[0014] This application also discloses a computer-readable storage medium storing a disk test program, which, when executed by a processor, implements the steps of the disk test method described above.
[0015] The beneficial effects of this application embodiment are as follows: Compared with the current solution of manually operating multiple testing tools to test disks sequentially, this application embodiment controls multiple testing tools to test multiple disks through a testing platform, realizing batch testing of disks and improving testing efficiency; moreover, on the testing platform, testers can directly configure parameters on the configuration interface to realize the start control, progress monitoring and file saving of the testing tools, without having to be familiar with the specific operation of each testing tool, thereby avoiding the problem of test interruption or invalid results due to human negligence and improving testing accuracy. Attached Figure Description
[0016] The accompanying drawings, which form part of the specification, are used to provide a further understanding of the embodiments of this application and illustrate the implementation methods of this application, together with the textual description, to explain the principles of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any creative effort. In the drawings: Figure 1 This is a flowchart of a disk testing method provided in the first embodiment of this application; Figure 2 This is a schematic diagram of parameter configuration of a configuration interface provided in the first embodiment of this application; Figure 3 This is a schematic diagram of a testing tool interface provided in the first embodiment of this application; Figure 4 This is a schematic diagram of a replication test provided in the first embodiment of this application; Figure 5 This is a schematic diagram of a specific replication test provided in the first embodiment of this application; Figure 6 This is a screenshot of a replication test progress at 10% provided in the first embodiment of this application; Figure 7 This is a screenshot showing the replication test progress at 90% according to the first embodiment of this application; Figure 8 This is a schematic diagram of the framework of a disk testing system provided in the second embodiment of this application; Figure 9 This is a schematic diagram of a computer-readable storage medium provided in the third embodiment of this application.
[0017] Among them, 10 is a computer-readable storage medium; 11 is a disk test program; and 12 is a processor. Detailed Implementation
[0018] It should be understood that the terminology, specific structural and functional details used herein are merely for describing particular embodiments and are representative. However, this application may be implemented in many alternative forms and should not be construed as being limited to the embodiments set forth herein.
[0019] Furthermore, unless otherwise explicitly specified and limited, "connected" or "linked" should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a mechanical connection or an electrical connection; it can refer to a direct connection or an indirect connection through an intermediate medium, or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0020] Because disk testing tools are developed by different vendors, each tool is an independent piece of software with no interoperability mechanism. Furthermore, there is currently no central control system capable of uniformly scheduling, managing, and monitoring these heterogeneous testing tools. Therefore, the most common disk testing practice is for testers to manually open each tool, configure it step-by-step, and execute the tests. However, this approach suffers from low testing efficiency and accuracy.
[0021] In view of the above problems, this application provides a disk testing method, a disk testing system, and a computer-readable storage medium. The following is a detailed description of this application with reference to the accompanying drawings and optional embodiments.
[0022] like Figure 1 As shown, the disk testing method provided in the first embodiment of this application includes the following steps: S1: Create a test platform; S2: Connect multiple disks to multiple testing tools one by one; S3: Connect the plurality of testing tools to the testing platform; S4: Retrieve the configuration interface of the test platform and configure the parameters of the configuration interface; S5: Control the testing tool to test the disk according to the configured parameters.
[0023] Compared to the current approach of manually operating multiple testing tools sequentially to test disks, this embodiment of the application controls multiple testing tools to test multiple disks through a testing platform, achieving batch testing of disks and improving testing efficiency. Moreover, on the testing platform, testers can directly configure parameters on the configuration interface to control the startup of testing tools, monitor progress, and save files, without needing to be familiar with the specific operation of each testing tool. This avoids problems such as test interruption or invalid results due to human error, thus improving testing accuracy.
[0024] Although you can also use UI (User Interface) automation scripting tools such as AutoHotkey (a hotkey scripting language for the Windows platform) and Python+PyAutoGUI (which uses the Python programming language combined with the PyAutoGUI library to automate desktop operations), you can write scripts to simulate clicks and keyboard inputs for each test tool, and then use direct coordinate clicks to operate all test tools.
[0025] However, this approach has the following problems: First, the UI is unstable because different computer resolutions and theme settings can cause window and control positions to change, leading to frequent script failures. Second, it's difficult to determine the test status, as it's hard to accurately determine when a test starts and ends, and simply relying on waiting for a fixed time is both inefficient (the waiting time must be set according to the worst-case scenario) and unreliable. Third, the handling of exceptions is weak; when the testing tool unexpectedly pops up a warning dialog or becomes unresponsive, the coordinate clicking script will completely freeze and cannot recover.
[0026] To address these issues, the inventors considered an automated approach based on image recognition, using screenshots and template matching to locate the UI position. However, during the image recognition process, they discovered that the UI position was severely affected by visual interference (such as window occlusion).
[0027] To address the aforementioned issues, this application employs an automated mechanism based on control recognition (PyWinAuto), shifting from pixel recognition to control recognition (controls specifically include handles, class names, or automation IDs, etc.) to resolve the problem of unstable UI positioning and improve test reliability.
[0028] Specifically, in step S3, the testing platform integrates multiple testing tools through a mechanism for recognizing controls.
[0029] Furthermore, step S5 also includes a step of querying the disk test progress. In this step, the disk test progress is determined by continuously querying control attributes. This embodiment employs a dynamic status monitoring mechanism, abandoning the "blind waiting" strategy and instead accurately determining the test progress by continuously querying control attributes (such as button text and activation status). For example, monitoring whether the "Start" button changes from Cancel to Start serves as a sign that the test is complete.
[0030] Furthermore, this application embodiment adopts unified process lifecycle management. When testing the disk, the PID (process ID) is recorded for each started test process, and the test platform can also terminate the corresponding process through the process ID to ensure that the test tool can clean up the scene when an anomaly occurs in any test stage, without leaving "zombie processes", thus ensuring the continuity of batch testing.
[0031] Specifically, step S5 includes: recording the process ID of each test tool during testing; and detecting whether the test tool is abnormal. If so, controlling the termination of the corresponding test tool's process based on the process ID; otherwise, maintaining the test tool's process.
[0032] This application embodiment creates a unified, configurable scheduling framework (i.e., a testing platform). It seamlessly integrates multiple heterogeneous and independent graphical disk testing tools through UI automation technology, and utilizes dynamic status monitoring and fine-grained process management to achieve a fully automated, highly reliable disk performance testing pipeline, significantly improving disk testing efficiency. Furthermore, this application embodiment does not simply wrap a few command-line tools; instead, it controls these testing tools through the testing platform, enabling flexible combination and automatic driving, thereby achieving system-level performance improvements without modifying the original testing tools.
[0033] In some embodiments, step S1 uses Python as the primary language and the PyWinAuto library to create a test platform. Its specific operations mainly include environment setup, backend selection, connecting to or launching the target application, window and control operations, script writing, and framework extension, which will not be elaborated upon here. After creating the test platform, automated control is achieved through a Windows desktop application, and a configuration interface (i.e., a graphical user interface, GUI) is built using Tkinter, allowing users to configure test parameters. The parameter configuration in the configuration interface includes: selecting the disk to be tested, selecting the test tool, setting the parent disk letter, and / or setting the test interval.
[0034] Figure 2 This is a schematic diagram illustrating parameter configuration of a configuration interface provided in an embodiment of this application, such as... Figure 2 As shown, in step S4, the tester opens the test platform, which displays the main interface (i.e., the configuration interface). The user then configures the test parameters on the configuration interface, specifically by selecting the test tool, selecting the test disk, performing formatting options, setting the parent disk drive letter, setting the test time interval, and setting the file name suffix.
[0035] After configuring the test parameters on the configuration interface, the user clicks "Start Test." The test platform saves the current configuration and then checks the disk connection status. If the disk connection status is abnormal, the test platform terminates the test. If the disk connection status is normal, the test platform further checks whether the current disk is available. If it is unavailable, the current disk test is skipped, and the next disk is checked for availability. If the current disk is available, it determines whether to proceed with the current test. If not, it determines that all tests are complete, generates a test report and screenshots, and terminates the test. If yes, it executes a countdown and waits until the countdown is complete before starting the test. If the countdown is interrupted, the test terminates. Furthermore, if the user clicks "Stop Test" during the test, all tests are forcibly terminated, and the test ends. Finally, after the test, it checks whether the testing tool is running normally. If not, it indicates a test error, and the test terminates; if yes, it proceeds to the next test.
[0036] Figure 3 This is a schematic diagram of a testing tool interface provided in an embodiment of this application. Testers can adjust the testing tool by configuring parameters on the configuration interface. As an example, the tester selects... Figure 3 The test tool represents this, then select the disk to be tested (from...). Figure 3 (It can be seen from the image that it is drive E), select format (from...) Figure 3 It can be seen from the image that it is NTFS), set the parent drive letter (from... Figure 3 It can be seen from the image that it is D), set the file name suffix (from... Figure 3 As can be seen from this, it is 2), setting the test interval time (from... Figure 3 (As can be seen from the image, it takes 3 seconds). This demonstrates that testers can directly configure all testing tools by setting parameters in the configuration interface, eliminating the need for manual operation of each tool. Furthermore, because the testing platform identifies testing tools by recognizing controls, it avoids UI instability issues, thus improving testing reliability.
[0037] Combination Figure 2 and Figure 4 As shown, in some embodiments, if the tester needs to control the test tool through the test platform to perform a copy test on the test disk, then when "perform the next line test", the next test is selected as the copy test. At this time, after determining whether to perform the current test and executing a countdown wait, the copy test is performed. In this step, step S5 includes: S51: Calculate the test capacity of the target disk; S52: Check if the number of files is sufficient; S53: If there are enough files, select at least one file to perform a copy test on the target disk; S54: Monitor the progress of the replication test; S55: When the progress of the copy test meets the preset conditions, take a screenshot of the progress interface of the copy test; S56: If the number of screenshots reaches the preset number, the copy test of the target disk is completed.
[0038] This application's embodiments automatically trigger a large-scale file copying operation and intelligently monitor its progress. When the copying test progress meets preset conditions, a screenshot is automatically taken, and finally, the copying result is verified. Through this design, a typical task that relies on a graphical interface and requires manual monitoring and waiting is transformed into a fully automated, recordable, and verifiable standardized process, perfectly solving the core pain point of low efficiency in manual copying tests.
[0039] In some embodiments, the preset conditions are that the progress of the copy test is 10% and 90%, that is, when the progress of the copy test is at the two nodes of 10% and 90%, a screenshot of the progress interface of the copy test is taken.
[0040] In some embodiments, the preset quantity is 10 images.
[0041] Combination Figure 5 , Figure 6 and Figure 7As shown, after starting the copy test, the test capacity of the target disk is first calculated, and then the number of files is checked. If the number of files is sufficient, at least one file is selected for the copy test on the target disk; if the number of files is insufficient, a timeout error is recorded or a percentage parsing failure is displayed. After the number of files is sufficient, the first N files (at least one) are selected for testing, the Windows Shell API is called to trigger system file copying, and then the intelligent monitoring loop is entered to search for the copy progress window. If the window search times out, a timeout error is recorded; if it does not time out, the existence of the window is checked. If the window does not exist, the test terminates; if the window exists, the completion percentage in the title is parsed. It checks whether the progress percentage is greater than or equal to 10% and whether the screenshot of 10% progress is incomplete. If so, a 10% progress screenshot is saved, and it checks whether the progress percentage is greater than or equal to 90% and whether the number of screenshots of 90% progress is less than 10; if not, it similarly checks whether the progress percentage is greater than or equal to 90% and whether the number of screenshots of 90% progress is less than 10. If the progress percentage is greater than or equal to 90% and the number of screenshots at 90% progress is less than 10, then save the 90% progress screenshots and re-enter the intelligent monitoring loop; if the progress percentage is greater than or equal to 90% and the number of screenshots at 90% progress is more than 10, then check if the progress percentage is 100%; if not, re-enter the intelligent monitoring loop; if so, determine whether the copy is complete or exited abnormally, then verify the integrity of the target disk files and complete the copy test.
[0042] This application's embodiments cleverly combine three system functions—triggering mechanism, monitoring mechanism, and control logic—to achieve efficient automation. The triggering mechanism uses the Windows Shell API to programmatically trigger the system's native file copying operation, which automatically pops up a copy progress dialog box in Windows Explorer. The monitoring mechanism avoids error-prone image recognition and instead utilizes the UI automation framework (PyWinAuto) to directly read the title text of the copy dialog window and parse out the completion percentage. The control logic, based on the parsed percentage, implements an intelligent monitoring loop to control the timing of screenshots and determine task completion.
[0043] In this embodiment, the copy test design described above achieves several advantages. First, it directly utilizes the system's native copy function, ensuring the stability and correctness of file operations through the Windows system itself. This avoids potential errors arising from implementing custom copy logic, resulting in high test reliability. Second, it obtains progress by parsing the title text of the system dialog box, which is far more accurate and reliable than methods based on image recognition or fixed-time waiting, enabling precise monitoring. Furthermore, it requires no modification to the system or the file itself, acting merely as an automated "operator" interacting with the system UI, demonstrating strong versatility and a non-intrusive design. Finally, it automatically takes screenshots at the 10% and 90% critical points, providing intuitive visual evidence for performance analysis (such as the stability of copy speed), meeting the traceability requirements of the test, and enabling complete audit trails.
[0044] Figure 8 This is a schematic diagram of the framework of a disk testing system provided in the second embodiment of this application. The disk testing system adopts the disk testing method described above, such as... Figure 8 As shown, the disk testing system includes a user interaction layer, a core control layer, and a test execution layer. The user interaction layer includes a visual configuration interface for testers to configure parameters. The core control layer is signal-connected to the user interaction layer and generates corresponding test instructions based on the configured parameters. The test execution layer is signal-connected to the core control layer and includes automated test logic corresponding to multiple test tools, executing the test instructions from the core control layer.
[0045] Furthermore, the disk testing system also includes a data output layer, an automation adaptation layer, and an external tool layer. The core control layer includes a configuration manager, a main controller, a process monitor, and a result recorder. The configuration manager is connected to the user interaction layer and the main controller, respectively. The main controller is connected to the test execution layer, the process monitor, and the result recorder, respectively. The result recorder is connected to the data output layer. In the core control layer, the configuration manager manages user-configured parameters, the main controller controls the testing tools to execute test tasks, the process monitor monitors the processes, and the result recorder records test results and generates test reports.
[0046] The data output layer is used to output test results and artifacts generated during the test, specifically including log files, test reports, and screenshot files. The test execution layer includes a test interface and multiple test modules. Each test module encapsulates the automated operation logic for a specific testing tool. The core controller depends on the test interface (TesterInterface) and calls each test module sequentially through the test interface. Internally, the test execution layer uses PyWinAuto and the Shell API to interact with the actual GUI application. The test modules can be benchmark tests, load transfer performance tests, data block read / write performance tests, continuous or random read / write performance tests, file filling tests, extreme stress performance tests, or copy tests.
[0047] The automation adaptation layer includes a UI automation engine and a system Shell API interface. The external tool layer includes benchmark testing tools, load balancing performance testing tools, data block read / write performance testing tools, continuous or random read / write performance testing tools, file filling testing tools, and extreme stress performance testing tools. These tools correspond one-to-one with the test modules in the test execution layer, and the test modules control the corresponding test tools through the UI automation engine. The external tool layer also includes a Windows file manager; the copy test module calls the Windows file manager through the system Shell API interface.
[0048] The disk testing system provided in this application embodiment can seamlessly integrate multiple heterogeneous and independent graphical disk testing tools, and utilize dynamic status monitoring and fine-grained process management to achieve a fully automated and highly reliable disk performance testing pipeline.
[0049] Figure 9 This is a schematic diagram of a computer-readable storage medium provided in the third embodiment of this application, as shown below. Figure 9 As shown, the computer-readable storage medium 10 stores a disk test program 11, which, when executed by the processor 12, implements the steps of the disk test method described above.
[0050] It should be noted that the limitations of each step involved in this solution are not considered as limiting the order of steps, provided that they do not affect the implementation of the specific solution. The steps listed first can be executed first, later, or even simultaneously. Solutions from different embodiments can be combined and applied without conflict. As long as this solution can be implemented, they should be considered to fall within the protection scope of this application.
[0051] The above description, in conjunction with specific optional embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications or substitutions should be considered within the scope of protection of this application.
Claims
1. A disk testing method, characterized in that, Including the following steps: Create a testing platform; Connect multiple disks to multiple testing tools one by one; Connect the plurality of testing tools to the testing platform; Access the configuration interface of the test platform and configure the parameters on the configuration interface; as well as The testing tool is controlled to test the disk according to the configured parameters.
2. The disk testing method as described in claim 1, characterized in that, In the step of connecting the multiple testing tools to the testing platform, the testing platform integrates multiple testing tools through a mechanism for recognizing controls.
3. The disk testing method as described in claim 2, characterized in that, The step of controlling the testing tool to test the disk according to the configured parameters includes the step of querying the disk test progress; In the step of querying the disk test progress, the test progress of the disk is determined by continuously querying the control properties.
4. The disk testing method as described in claim 1, characterized in that, The step of controlling the testing tool to test the disk also includes: Record the process ID of each of the aforementioned testing tools during the test; Check if the testing tool is malfunctioning; If so, the process of the corresponding testing tool is terminated based on the process ID.
5. The disk testing method as described in claim 1, characterized in that, In the step of creating the test platform, Python is used as the main language, and the PyWinAuto library is used to create the test platform.
6. The disk testing method as described in claim 5, characterized in that, In the step of retrieving the configuration interface of the test platform and configuring the parameters of the configuration interface, the configuration interface of the test platform is constructed through the Tkinter interface; The parameter configuration of the configuration interface includes: selecting the disk to be tested, selecting the test tool, setting the parent disk drive letter, and / or setting the test interval.
7. The disk testing method as described in claim 1, characterized in that, The step of controlling the testing tool to test the disk according to the configured parameters includes: Calculate the test capacity of the target disk; Check if the number of files is sufficient; If there are enough files, select at least one file to perform a copy test on the target disk; Monitor the progress of the replication test; When the replication test progress meets the preset conditions, take a screenshot of the replication test progress interface; and If the number of screenshots reaches the preset number, the copy test of the target disk is completed.
8. The disk testing method as described in claim 7, characterized in that, The preset conditions are that the progress of the replication test is 10% and 90%.
9. A disk testing system, characterized in that, The disk testing system, employing the disk testing method as described in any one of claims 1-8, comprises: The user interaction layer includes a visual configuration interface for testers to configure parameters. A core control layer, which is signal-connected to the user interaction layer, generates corresponding test commands based on configured parameters; and The test execution layer is signal-connected to the core control layer. The test execution layer includes automated test logic corresponding to multiple test tools and executes the test instructions of the core control layer.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a disk test program, which, when executed by a processor, implements the steps of the disk test method as described in any one of claims 1 to 8.