Automatic test method and device of graphical user interface program and electronic equipment
Through automated test scripts and screenshot analysis, the problem of high manpower and time costs in graphical user interface program testing is solved, automated testing is realized, and testing efficiency and coverage are improved.
Patent Information
- Application Number
- CN202410745770.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-10
AI Technical Summary
During the testing process of graphical user interface programs, manual testing results in a large amount of manpower and time costs, and it is difficult to achieve efficient test result convergence.
By obtaining the control coordinate information of the graphical user interface program, writing an automated test script, and using the character and color status in the screenshot to generate a test case status report, the automated test script runs until all test tasks are completed to achieve automated testing.
It greatly reduces labor and time costs, improves test case coverage, makes scenario coverage more comprehensive, and realizes automated testing of graphical user interface programs.
Smart Images

Figure CN118626374A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an automatic testing method for a graphical user interface program, an automatic testing device for a graphical user interface program, and an electronic device. Background Art
[0002] The testing process of the graphical user interface program of TCAD (Technology Computer Aided Design, which refers to semiconductor process simulation and device simulation tools) is generally carried out manually. This manual testing method is easily affected by the tester himself. For example, due to improper parameter settings, it is impossible to obtain convergence results for a long time, which consumes a lot of manpower and time costs. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a method for automatically testing a graphical user interface program, an automatic testing device for a graphical user interface program, and an electronic device, so as to solve the problem of consuming a large amount of manpower and time costs in the testing process of the graphical user interface program.
[0004] In order to achieve the above object, an embodiment of the present invention provides an automatic testing method for a graphical user interface program, comprising:
[0005] Get the coordinate information of the controls operated in the test case of the graphical user interface program;
[0006] Writing an automated test script in response to a script editing instruction for the control coordinate information;
[0007] Running the automated test script;
[0008] Repeat the following steps until all test tasks are completed:
[0009] Capture screenshots of a graphical user interface at preset time intervals, and extract characters of multiple test tasks in the screenshots and the color status corresponding to each of the test tasks; generate a test case status report based on the screenshots, the characters of the multiple test tasks and the color status of each of the test tasks; determine the test progress of all test tasks based on the test case status report; wherein the test case status report includes the running status corresponding to all test tasks.
[0010] Optionally, the screenshot includes a split table of process device simulation in a test case of the graphical user interface program; and generating a test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks includes:
[0011] Recognize the split table based on an optical character recognition tool to obtain a table to be filled in;
[0012] Based on the color mapping relationship, determine the running state of the test task corresponding to the color state of each test task; wherein the color mapping relationship includes the running states of the test tasks corresponding to different color states;
[0013] Fill the characters of the multiple test tasks and the running status of each of the test tasks into the to-be-filled form to generate the test case status report.
[0014] Optionally, obtaining a screenshot of the graphical user interface at a preset time interval includes:
[0015] At preset time intervals, pyautogui is used to control the mouse or keyboard to operate the screenshot command to obtain a screenshot of the user interface.
[0016] Optionally, writing an automated test script in response to a script editing instruction for the control coordinate information includes:
[0017] In response to the script editing instruction of the control coordinate information through Dogtail or LDTP, an automated test script is written.
[0018] Optionally, determining the test progress of all test tasks based on the test case status report includes:
[0019] The test progress of all the test tasks is determined based on the comparison result between the running status corresponding to all the test tasks in the test case status report and the running status of all the test tasks before running the automated test script.
[0020] On the other hand, an embodiment of the present invention further provides an automatic testing device for a graphical user interface program, comprising:
[0021] A control coordinate information acquisition module is used to obtain the control coordinate information of the operation in the test case of the graphical user interface program;
[0022] A test script writing module, used for writing an automated test script in response to a script editing instruction for the control coordinate information;
[0023] A test script running module, used to run the automated test script;
[0024] The repeat execution module is used to repeat the following steps until all test tasks are completed:
[0025] Capture screenshots of a graphical user interface at preset time intervals, and extract characters of multiple test tasks in the screenshots and the color status corresponding to each of the test tasks; generate a test case status report based on the screenshots, the characters of the multiple test tasks and the color status of each of the test tasks; determine the test progress of all test tasks based on the test case status report; wherein the test case status report includes the running status corresponding to all test tasks.
[0026] Optionally, the screenshot includes a split table of process device simulation in a test case of the graphical user interface program; and generating a test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks includes:
[0027] Recognize the split table based on an optical character recognition tool to obtain a table to be filled in;
[0028] Based on the color mapping relationship, determine the running state of the test task corresponding to the color state of each test task; wherein the color mapping relationship includes the running states of the test tasks corresponding to different color states;
[0029] Fill the characters of the multiple test tasks and the running status of each of the test tasks into the to-be-filled form to generate the test case status report.
[0030] Optionally, obtaining a screenshot of the graphical user interface at a preset time interval includes:
[0031] At preset time intervals, pyautogui is used to control the mouse or keyboard to operate the screenshot command to obtain a screenshot of the user interface.
[0032] Optionally, writing an automated test script in response to a script editing instruction for the control coordinate information includes:
[0033] In response to the script editing instruction of the control coordinate information through Dogtail or LDTP, an automated test script is written.
[0034] Optionally, determining the test progress of all test tasks based on the test case status report includes:
[0035] The test progress of all the test tasks is determined based on the comparison result between the running status corresponding to all the test tasks in the test case status report and the running status of all the test tasks before running the automated test script.
[0036] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the automatic testing method of the above-mentioned graphical user interface program when executing the program.
[0037] On the other hand, the present invention further provides a machine-readable storage medium having a computer program stored thereon, which implements the automatic testing method of the above-mentioned graphical user interface program when executed by a processor.
[0038] On the other hand, the present invention also provides a computer program product, including a computer program, which implements the automatic testing method of the above-mentioned graphical user interface program when executed by a processor.
[0039] Through the above technical scheme, the embodiment of the present invention writes an automated test script through the control coordinate information of the operation in the test case. After the automated test script is run, the test process of the test task is obtained based on the color status of the test task in the screenshot, thereby realizing automatic testing of the graphical user interface program and greatly reducing labor costs and time costs.
[0040] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0042] Figure 1 It is a flow chart of the automatic testing method of the graphical user interface program provided by the present invention;
[0043] Figure 2 is a schematic diagram of a screenshot of a graphical user interface provided by the present invention;
[0044] Figure 3 is a schematic diagram of a test case status report provided by the present invention;
[0045] Figure 4 It is a structural schematic diagram of an automatic testing device for a graphical user interface program provided by the present invention;
[0046] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0047] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0048] Method Embodiment
[0049] Please refer to Figure 1 , an embodiment of the present invention provides an automatic testing method for a graphical user interface program, comprising:
[0050] Step 100: Obtain coordinate information of controls operated in a test case of a graphical user interface program.
[0051] The automatic testing method of the embodiment of the present invention can be applied to the automatic testing of the graphical user interface program of TCAD (Technology Computer Aided Design, which refers to semiconductor process simulation and device simulation tools). First, the process device simulation test case of the graphical user interface program of TCAD can be manually executed to record the coordinate information of the controls operated at each step during the operation of the test case. The control coordinate information includes the coordinates of the control and the control operation mode. For example, the coordinates and operation mode of a certain control operated at a certain step during the operation of the actual test case are: "OK button, coordinates (300, 400), click". The coordinates of the controls operated in the test case of the graphical user interface program can be one or more.
[0052] Step 200: Writing an automated test script in response to a script editing instruction for the control coordinate information.
[0053] In the case of obtaining the coordinate information of the control operated in the test case of the graphical user interface (GUI) program, the user can use the script editing instructions of Dogtail or LDTP (Linux Desktop Testing Project) to write an automated test script based on the coordinate information of the control. The electronic device responds to the script editing instructions of the user through Dogtail or LDTP for the coordinate information of the control to write an automated test script.
[0054] For example, in a specific example, through the script editing instructions of Dogtail, the automated test script is written based on the control coordinate information as follows:
[0055]
[0056]
[0057]
[0058] It should be noted that in the above code, the start_tcad() function is responsible for starting the TCAD application. This usually involves using the subprocess module or other methods to execute the TCAD startup command. However, since the specific startup method may vary depending on the version and installation method of TCAD, a placeholder is used here to implement this part of the code according to the actual situation. The interact_with_tcad() function is responsible for interacting with the TCAD GUI. It first waits for the GUI to load, then locates the main window and menu items, and performs operations to open the project file. Next, it waits for the project to load, clicks the "Run" button to start the simulation, and waits for the simulation to complete. The "Run" button is the control coordinate information in step 100. Finally, the simulation results are checked and printed. Please note that the element positioning in the above code (such as menu items, buttons, and text areas) is based on assumptions. In actual applications, these positioning codes can be modified according to the actual layout and element names of the TCAD GUI.
[0059] In other embodiments, Dogtail or LDTP may be used to implement automated setup of test cases in a TCAD graphical user interface and generation of a split table for process device simulation.
[0060] Step 300: Run the automated test script.
[0061] The electronic device runs the automated test script written in step 200 and waits for the automated test result to be determined.
[0062] Step 400, repeatedly perform the following steps until all test tasks are completed: obtain a screenshot of the graphical user interface at preset time intervals, and extract the characters of multiple test tasks in the screenshot and the color status corresponding to each of the test tasks; generate a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; determine the test progress of all test tasks based on the test case status report.
[0063] Since pyautogui is used to automate mouse movement, clicks, drags and keyboard input on the screen, as well as perform image recognition and processing. Therefore, in an embodiment of the present invention, the electronic device can control the mouse or keyboard to operate the screenshot command through pyautogui at intervals of a preset time period to obtain a screenshot of the user interface. Taking the control of the mouse as an example, through PyAutoGUI, you can use the screenshot function of a third-party screenshot tool through operations such as moving, clicking, and dragging the mouse to obtain a screenshot of the graphical user interface at intervals of a preset time period. For example, the pyautogui.moveTo() function can be used to move the mouse to a specified position, the pyautogui.click() function can simulate a mouse click, thereby realizing the opening of a third-party screenshot tool and the screenshot function of the third-party screenshot tool, and the pyautogui.dragTo() and pyautogui.dragRel() functions can be used to implement the drag operation of the mouse and select a specified screenshot area.
[0064] In the embodiment of the present invention, optical character recognition (OCR) tools, such as pytesseract and OpenCV, can be used to extract the characters of multiple test tasks in the screenshot and the color state corresponding to each test task. Figure 2 A screenshot representing a graphical user interface can be used to extract characters of multiple test tasks in the screenshot, such as psub, Debug2, angle, SiTrench, Lox, and extract the corresponding color status in the box below each test task through pytesseract and OpenCV. For example, the color of the box filled with "[n144]:10" below the test task psub is orange. The color of the box filled with "[n9]:Debug2" below the test task Debug2 is red. In an embodiment of the present invention, the running status of a test task in the process device simulation split table is judged according to the color at the specified coordinates in the TCAD graphical user interface. For example, orange means completion and red means failure. Therefore, the running status corresponding to the test task psub is test completion, and the running status corresponding to the test task Debug2 is test failure.
[0065] On the basis of acquiring the characters of multiple test tasks and the running status of each of the test tasks, a test case status report is generated based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; for example, the test case status report includes the running status corresponding to the test task psub as test completion, and the running status corresponding to the test task Debug2 as test failure. The electronic device determines the test progress of all test tasks based on the completion rate of the test tasks in the test case status report. For example, if 8 out of 10 test tasks are completed in the test case status report, the test progress of all test tasks is 8 / 10=80%. Since it is uncertain when the automated test script completes the test of the test task, it is necessary to repeat the steps of acquiring a screenshot of the graphical user interface, extracting the test tasks and the color status of the screenshot, generating a test case status report, and determining the test progress of all test tasks, so as to obtain the test progress of the test tasks in each time period, so as to facilitate the technicians to know the test progress until all test tasks are tested.
[0066] The embodiment of the present invention writes an automated test script through the coordinate information of the controls operated in the test case. After the automated test script is run, the test progress of the test task is obtained based on the color state of the test task in the screenshot, thereby realizing automatic testing of the graphical user interface program, greatly reducing the labor cost and time cost. At the same time, the embodiment of the present invention helps to improve the coverage of test cases, making the scene coverage more comprehensive.
[0067] In other aspects of the embodiments of the present invention, the screenshot includes a split table of process device simulation in the test case of the graphical user interface program; the generating of the test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks includes:
[0068] The split table is recognized based on an optical character recognition tool to obtain a form to be filled in; based on a color mapping relationship, the running status of the test task corresponding to the color status of each of the test tasks is determined; wherein the color mapping relationship includes the running status of the test tasks corresponding to different color statuses; the characters of the multiple test tasks and the running status of each of the test tasks are filled in the form to be filled in to generate the test case status report.
[0069] Specifically, the embodiment of the present invention can convert the screenshot of the split table (Split Table) of the TCAD process device simulation into an Excel table (i.e., a table to be filled in) based on Python's OCR tool pytesseract and OpenCV. For example, the following code can be used to recognize the split table through pytesseract to obtain a table to be filled in:
[0070] text=pytesseract.image_to_string(Image.fromarray(img), lang='eng').
[0071] In the embodiment of the present invention, the preset color mapping relationship is used to determine the running status of the test task corresponding to the different color status. For example, green corresponds to the test task in the preparation state, blue corresponds to the test task in the running state, orange corresponds to the test task in the completion state, and red corresponds to the test task in the failure state. Therefore, the embodiment of the present invention can judge the running status of a test task in the process device simulation splitting table according to the color at the specified coordinates in the graphical user interface of TCAD. For example, Figure 2 The running status is judged as follows: the color of the box filled with "[n144]: 10" under the test task psub is orange-yellow, which means the status is completed; the color of the box filled with "[n9]: Debug2" under the test task Debug2 is red, which means the status is failed; the color of the box filled with "[n11]: SiTrench" under the test task SiTrench is orange-yellow, which means the status is completed; the color of the box filled with "[n10]: 80" under the test task angle is orange-yellow, which means the status is completed; the color of the box filled with "[n12]: Lox" under the test task Lox is orange-yellow, which means the status is completed. Please refer to Figure 3 Finally, the characters of the multiple test tasks and the running status of each of the test tasks are filled into the to-be-filled form to generate the test case status report.
[0072] In other aspects of the embodiments of the present invention, determining the test process of all test tasks based on the test case status report includes: determining the test process of all test tasks based on the comparison results of the running status corresponding to all test tasks in the test case status report and the running status of all test tasks before running the automated test script.
[0073] For example, there are 4 test tasks in the test case status report that are in the completed state, and all 5 test tasks in the Excel table are in the untested state before running the automated test script. At this time, the test progress of all test tasks is 4 / 5=80%. All test tasks can be monitored automatically by comparing the Excel table.
[0074] The embodiment of the present invention realizes the automated testing of TCAD graphical user interface (GUI) program by using methods such as Dogtail or Linux Desktop Testing Project (LDTP) in combination with computer pattern recognition and other means. The technical solution provided by the present invention can realize the automated execution of TCAD graphical user interface program test cases and test case data, greatly reducing the testing cost of the software, helping to improve the coverage of test cases, and making the scenario coverage more comprehensive.
[0075] Device Embodiment
[0076] Please refer to Figure 4 On the other hand, an embodiment of the present invention further provides an automatic testing device for a graphical user interface program, comprising:
[0077] The control coordinate information acquisition module 401 is used to acquire the control coordinate information of the operation in the test case of the graphical user interface program;
[0078] A test script writing module 402, for writing an automated test script in response to a script editing instruction for the control coordinate information;
[0079] A test script running module 403 is used to run the automated test script;
[0080] The repeat execution module 404 is used to repeatedly execute the following steps until all test tasks are completed:
[0081] Capture screenshots of the graphical user interface at preset time intervals, and extract characters of multiple test tasks in the screenshots and the color status corresponding to each of the test tasks; generate a test case status report based on the screenshots, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; determine the test progress of all test tasks based on the test case status report.
[0082] The embodiment of the present invention writes an automated test script through the control coordinate information of the operation in the test case. After the automated test script is run, the test progress of the test task is obtained based on the color status of the test task in the screenshot, thereby realizing automatic testing of the graphical user interface program and greatly reducing labor costs and time costs.
[0083] Optionally, the screenshot includes a split table of process device simulation in a test case of the graphical user interface program; and generating a test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks includes:
[0084] Recognize the split table based on an optical character recognition tool to obtain a table to be filled in;
[0085] Based on the color mapping relationship, determine the running state of the test task corresponding to the color state of each test task; wherein the color mapping relationship includes the running states of the test tasks corresponding to different color states;
[0086] Fill the characters of the multiple test tasks and the running status of each of the test tasks into the to-be-filled form to generate the test case status report.
[0087] Optionally, obtaining a screenshot of the graphical user interface at a preset time interval includes:
[0088] At preset time intervals, pyautogui is used to control the mouse or keyboard to operate the screenshot command to obtain a screenshot of the user interface.
[0089] Optionally, writing an automated test script in response to a script editing instruction for the control coordinate information includes:
[0090] In response to the script editing instruction of the control coordinate information through Dogtail or LDTP, an automated test script is written.
[0091] Optionally, determining the test progress of all test tasks based on the test case status report includes:
[0092] The test progress of all the test tasks is determined based on the comparison result between the running status corresponding to all the test tasks in the test case status report and the running status of all the test tasks before running the automated test script.
[0093] The automatic testing device of the graphical user interface program includes a processor and a memory. The above-mentioned control coordinate information acquisition module 401, test script writing module 402, test script running module 403 and repeated execution module 404 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0094] The processor includes a kernel, which calls the corresponding program unit from the memory. There can be one or more kernels.
[0095] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0096] Figure 5An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 complete mutual communication through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the automatic testing method of the graphical user interface program, the method comprising: obtaining the control coordinate information of the operation in the test case of the graphical user interface program; writing an automated testing script in response to the script editing instruction for the control coordinate information; running the automated testing script; repeatedly performing the following steps until all test tasks are tested: obtaining a screenshot of the graphical user interface at intervals of a preset time period, and extracting the characters of multiple test tasks in the screenshot and the color status corresponding to each of the test tasks; generating a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; and determining the test process of all test tasks based on the test case status report.
[0097] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a machine-readable storage medium. When the computer program is executed by a processor, the computer can execute an automatic testing method for a graphical user interface program, the method including: obtaining control coordinate information of operations in a test case of the graphical user interface program; writing an automated testing script in response to a script editing instruction for the control coordinate information; running the automated testing script; repeating the following steps until all test tasks are tested: obtaining a screenshot of the graphical user interface at intervals of a preset time period, and extracting characters of multiple test tasks in the screenshot and the color status corresponding to each of the test tasks; generating a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; and determining the test progress of all test tasks based on the test case status report.
[0099] On the other hand, the present invention also provides a machine-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an automatic testing method for executing a graphical user interface program, the method comprising: obtaining control coordinate information of operations in a test case of the graphical user interface program; writing an automated testing script in response to a script editing instruction for the control coordinate information; running the automated testing script; repeating the following steps until all test tasks are tested: obtaining a screenshot of the graphical user interface at intervals of a preset time period, and extracting characters of multiple test tasks in the screenshot and the color status corresponding to each of the test tasks; generating a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; the test case status report includes the running status corresponding to all test tasks; and determining the test progress of all test tasks based on the test case status report.
[0100] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically testing a graphical user interface program, characterized in that: include: Get the coordinate information of the controls operated in the test case of the graphical user interface program; Writing an automated test script in response to a script editing instruction for the control coordinate information; Running the automated test script; Repeat the following steps until all test tasks are completed: Acquire a screenshot of the graphical user interface at preset time intervals, and extract characters of multiple test tasks in the screenshot and a color state corresponding to each of the test tasks; Generate a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; determine the test progress of all test tasks based on the test case status report; The test case status report includes the running status corresponding to all test tasks.
2. The automatic testing method of a graphical user interface program according to claim 1, characterized in that: The screenshot includes a split table of process device simulation in a test case of the graphical user interface program; The generating a test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks comprises: Recognize the split table based on an optical character recognition tool to obtain a table to be filled in; Based on the color mapping relationship, determine the running state of the test task corresponding to the color state of each test task; wherein the color mapping relationship includes the running states of the test tasks corresponding to different color states; Fill the characters of the multiple test tasks and the running status of each of the test tasks into the to-be-filled form to generate the test case status report.
3. The automatic testing method of a graphical user interface program according to claim 1, characterized in that: The step of obtaining a screenshot of the graphical user interface at a preset time interval includes: At preset time intervals, pyautogui is used to control the mouse or keyboard to operate the screenshot command to obtain a screenshot of the user interface.
4. The automatic testing method of a graphical user interface program according to claim 1, characterized in that: The step of writing an automated test script in response to a script editing instruction for the control coordinate information comprises: In response to the script editing instruction of the control coordinate information through Dogtail or LDTP, an automated test script is written.
5. The automatic testing method of a graphical user interface program according to claim 1, characterized in that: Determining the test progress of all test tasks based on the test case status report includes: The test progress of all the test tasks is determined based on the comparison result between the running status corresponding to all the test tasks in the test case status report and the running status of all the test tasks before running the automated test script.
6. An automatic testing device for a graphical user interface program, characterized in that: include: A control coordinate information acquisition module is used to obtain the control coordinate information of the operation in the test case of the graphical user interface program; A test script writing module, used for writing an automated test script in response to a script editing instruction for the control coordinate information; A test script running module, used to run the automated test script; The repeat execution module is used to repeat the following steps until all test tasks are completed: Acquire a screenshot of the graphical user interface at preset time intervals, and extract characters of multiple test tasks in the screenshot and a color state corresponding to each of the test tasks; Generate a test case status report based on the screenshot, the characters of the multiple test tasks and the color status of each of the test tasks; determine the test progress of all test tasks based on the test case status report; wherein the test case status report includes the running status corresponding to all test tasks.
7. The automatic testing device for a graphical user interface program according to claim 6, characterized in that: The screenshot includes a split table of process device simulation in a test case of the graphical user interface program; The generating a test case status report based on the screenshot, the characters of the plurality of test tasks and the color status of each of the test tasks comprises: Recognize the split table based on an optical character recognition tool to obtain a table to be filled in; Based on the color mapping relationship, determine the running state of the test task corresponding to the color state of each test task; wherein the color mapping relationship includes the running states of the test tasks corresponding to different color states; Fill the characters of the multiple test tasks and the running status of each of the test tasks into the to-be-filled form to generate the test case status report.
8. The automatic testing device for a graphical user interface program according to claim 6, characterized in that: The step of obtaining a screenshot of the graphical user interface at a preset time interval includes: At preset time intervals, pyautogui is used to control the mouse or keyboard to operate the screenshot command to obtain a screenshot of the user interface.
9. The automatic testing device for a graphical user interface program according to claim 6, characterized in that: The step of writing an automated test script in response to a script editing instruction for the control coordinate information comprises: In response to the script editing instruction of the control coordinate information through Dogtail or LDTP, an automated test script is written.
10. The automatic testing device for a graphical user interface program according to claim 6, characterized in that: Determining the test progress of all test tasks based on the test case status report includes: The test progress of all the test tasks is determined based on the comparison result between the running status corresponding to all the test tasks in the test case status report and the running status of all the test tasks before running the automated test script.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the automatic testing method of the graphical user interface program according to any one of claims 1 to 5 is implemented.
12. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the automatic testing method of the graphical user interface program according to any one of claims 1 to 5 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the automatic testing method of the graphical user interface program according to any one of claims 1 to 5 is implemented.
