Search

CN-121996480-A - Touch screen testing method, device, system, diagnosis system and readable storage medium

CN121996480ACN 121996480 ACN121996480 ACN 121996480ACN-121996480-A

Abstract

The application discloses a touch screen testing method, a device, a system, a diagnosis system and a readable storage medium, wherein a touch screen is connected with an ultrasonic host machine, and the ultrasonic host machine is configured with an ultrasonic main program; the method comprises the steps of carrying out layer-by-layer searching by utilizing a control path to determine a target control to be tested from a page of a touch screen, sending an operation event for operating the target control to an ultrasonic main program, receiving a response result returned by the ultrasonic main program aiming at the operation event, and determining a test result of the target control based on the response result. The method and the device have the technical effects that the touch screen control in the touch screen can be comprehensively and accurately automatically tested.

Inventors

  • WU WENTAO

Assignees

  • 开立生物医疗科技(武汉)有限公司

Dates

Publication Date
20260508
Application Date
20241107

Claims (15)

  1. 1. A touch screen testing method, wherein the touch screen is connected with an ultrasonic host machine, the ultrasonic host machine is configured with an ultrasonic main program, the method comprising: acquiring a test command aiming at a touch screen control, and analyzing the test command to obtain a control path; performing layer-by-layer searching by utilizing the control path to determine a target control to be tested from the page of the touch screen; Transmitting an operation event for operating the target control to the ultrasonic main program, and receiving a response result returned by the ultrasonic main program for the operation event; And determining a test result of the target control based on the response result.
  2. 2. The method of claim 1, wherein prior to sending the operational event to the ultrasound main program that operates the target control, further comprising: And simulating and executing corresponding target operation on the target control to obtain the operation event.
  3. 3. The method of claim 2, wherein performing the corresponding target operation on the target control simulation comprises: And calling an execution program corresponding to the target control to execute the target operation on the target control, wherein the target operation comprises at least one of clicking operation and page turning operation.
  4. 4. The method of claim 1, wherein sending an operation event to the ultrasound main program that operates the target control comprises: and writing the operation event into a system file corresponding to the ultrasonic main program.
  5. 5. The method of claim 1, wherein performing a layer-by-layer lookup using the control path to determine a target control to be tested from within a page of a touch screen comprises: acquiring a control object tree of the touch screen, wherein the control object tree comprises at least one of a main page name, a function page name and a control name; According to the control path, searching in the control object tree layer by layer until a control object corresponding to the end point of the control path is found; and determining the searched control object as the target control.
  6. 6. The method of claim 5, further comprising, prior to obtaining the control object tree for the touch screen: when a display page and a control are loaded, acquiring a page name and a control name, wherein the page comprises at least one of a main page and a functional page; And setting corresponding object names in the tree topology structure according to the page names, the control names and the hierarchical relations of the pages and the controls to obtain the control object tree.
  7. 7. The method of claim 1, wherein determining a test result for the target control based on the response result comprises: Analyzing the response result to obtain a display attribute corresponding to the target control; And if the display attribute is matched with the operation corresponding to the target control, determining that the test result is normal.
  8. 8. The method of claim 7, wherein determining a test result for the target control based on the response result further comprises: If the display attribute is not matched with the operation corresponding to the target control, determining that the test result is abnormal, and outputting abnormal prompt information based on the state of the target control, wherein the abnormal prompt information comprises at least one of the control is absent and the control is in a disabled state currently.
  9. 9. The method of any of claims 1 to 8, wherein obtaining a test command for a touch screen control comprises: And traversing the control in the touch screen page, and if the current control does not complete the test, acquiring a test command corresponding to the current control until the traversal is finished.
  10. 10. A touch screen testing device, wherein the touch screen is connected to an ultrasound host machine, the ultrasound host machine configured with an ultrasound main program, the device comprising: The command analysis unit is used for acquiring a test command for the touch screen control and analyzing the test command to obtain a control path; The control determining unit is used for searching layer by utilizing the control path so as to determine a target control to be tested from the page of the touch screen; The operation response unit is used for sending an operation event for operating the target control to the ultrasonic main program and receiving a response result returned by the ultrasonic main program for the operation event; And the result determining unit is used for determining the test result of the target control based on the response result.
  11. 11. A touch screen testing system, comprising: The system comprises a touch screen and an ultrasonic host, wherein the ultrasonic host is configured with an ultrasonic main program, and a test server is embedded in the touch screen; the test server is used for implementing the touch screen test method according to any one of claims 1 to 9.
  12. 12. The touch screen testing system of claim 11, further comprising a testing client, wherein the testing server comprises a testing service module and a control operation module, wherein the testing service module is in network communication with the testing client; The test service module is used for receiving a test request sent by the test client, analyzing the test request and obtaining a test command, sending the test command to the control operation module, sending the operation event to the ultrasonic main program when an operation event for operating a target control to be tested by the control operation module is monitored, receiving a response result returned by the ultrasonic main program for the operation event, determining the test result of the target control based on the response result, and sending the test result to the test client; the control operation module is used for analyzing the test command to obtain a control path, searching the control path layer by layer to determine a target control to be tested from the page of the touch screen, and generating an operation event for operating the target control.
  13. 13. The touch screen testing system according to claim 11, wherein the testing server further comprises a page and control data acquisition module and a control path setting module, wherein the page and control data acquisition module interacts with an ultrasonic main program; the page and control data acquisition module is used for acquiring the page type of the current page and the control information of the current page from the ultrasonic main program; The control path setting module is used for acquiring the page type and the control information from the page and control data acquisition module and generating a page name and a control name, wherein the page name and the control name are used for generating a control path.
  14. 14. An ultrasonic diagnostic system, comprising: the system comprises an ultrasonic host and a touch screen, wherein the ultrasonic host is configured with an ultrasonic main program, and the touch screen is embedded with a touch screen program; the ultrasonic main program is used for communication interaction with the touch screen program; the touch screen program is used to implement the touch screen testing method of any one of claims 1 to 9.
  15. 15. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the touch screen testing method according to any of claims 1 to 9.

Description

Touch screen testing method, device, system, diagnosis system and readable storage medium Technical Field The present application relates to the field of computer application technologies, and in particular, to a touch screen testing method, device, system, diagnostic system, and readable storage medium. Background Medical ultrasonic diagnostic systems generally include a main display for displaying an ultrasonic image and a touch screen for human-computer interaction. A graphical user interface is provided on the touch screen that can be manipulated to adjust image parameters, switch image modes, measure item selections, etc., for controlling and manipulating the ultrasound image. The automatic test of the ultrasonic diagnostic system plays a vital role in the rapid test of the stability of products. The test scheme for the touch screen in the ultrasonic diagnosis system mainly comprises the following steps: The key operation on the touch screen is triggered by performing operations such as simulating user clicking at the corresponding coordinates on the touch screen. It is required that the coordinates of a particular control be determined at the time the test script is written. When the scheme is adopted to write the test cases, the coordinates of the specific control are required to be determined, and when the interface is adjusted or the control position is changed, the corresponding test cases are required to be modified and the requirement of dynamically adjusting the control position cannot be covered. Since the corresponding events are written only at the corresponding coordinates, it cannot be judged whether the current position is the desired control and the desired state. Meanwhile, because of more controls on the touch screen, all possible operation paths cannot be well covered by adopting the method, so that the touch screen test is not comprehensive and accurate enough. In summary, the problem that the touch screen test is not comprehensive and accurate enough is a technical problem that a person skilled in the art needs to solve. Disclosure of Invention The application aims to provide a touch screen testing method, a device, a system, a diagnosis system and a readable storage medium, which can carry out comprehensive and accurate automatic test on a touch screen program in a touch screen. In order to solve the technical problems, the application provides the following technical scheme: A touch screen testing method, the touch screen being connected to an ultrasound host machine, the ultrasound host machine being configured with an ultrasound main program, the method comprising: acquiring a test command aiming at a touch screen control, and analyzing the test command to obtain a control path; performing layer-by-layer searching by utilizing the control path to determine a target control to be tested from the page of the touch screen; Transmitting an operation event for operating the target control to the ultrasonic main program, and receiving a response result returned by the ultrasonic main program for the operation event; And determining a test result of the target control based on the response result. Illustratively, before sending the operation event for operating the target control to the ultrasound main program, the method further comprises: And simulating and executing corresponding target operation on the target control to obtain the operation event. Illustratively, performing the corresponding target operation on the target control simulation includes: And calling an execution program corresponding to the target control to execute the target operation on the target control, wherein the target operation comprises at least one of clicking operation and page turning operation. Illustratively, sending an operation event to the ultrasound main program that operates the target control includes: and writing the operation event into a system file corresponding to the ultrasonic main program. Illustratively, performing a layer-by-layer search by using the control path to determine a target control to be tested from within a page of the touch screen, including: acquiring a control object tree of the touch screen, wherein the control object tree comprises at least one of a main page name, a function page name and a control name; According to the control path, searching in the control object tree layer by layer until a control object corresponding to the end point of the control path is found; and determining the searched control object as the target control. Illustratively, before obtaining the control object tree of the touch screen, the method further comprises: when a display page and a control are loaded, acquiring a page name and a control name, wherein the page comprises at least one of a main page and a functional page; And setting corresponding object names in the tree topology structure according to the page names, the control names and the hierarchical relations of the pages and the c