CN-121979775-A - Man-machine interaction automatic test system and method for vehicle-mounted instrument
Abstract
The invention relates to the field of automatic testing, and provides a human-computer interaction automatic testing system and method of a vehicle-mounted instrument, wherein the system comprises a configuration management module for storing and managing structural configuration data; the system comprises a communication connection module, a protocol adaptation module, an instruction execution and verification module and a test flow control module, wherein the communication connection module is used for establishing and maintaining a bidirectional communication link with a vehicle-mounted instrument to be tested through a standardized communication interface, the protocol adaptation module is used for encoding test operation instructions into a protocol format supported by the vehicle-mounted instrument and decoding response data received from the vehicle-mounted instrument into a format which can be processed by the system, the instruction execution and verification module is used for calling corresponding test operation instructions based on test case data, sending the corresponding test operation instructions to the vehicle-mounted instrument through the protocol adaptation module and the communication connection module and verifying test results based on the response data or state information acquired from the vehicle-mounted instrument, and the test flow control module is used for controlling the execution flow of the test instructions. The system and the method provided by the invention improve the test automation level.
Inventors
- Zuo Tengda
- YOU TAO
Assignees
- 武汉云片松科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251210
Claims (10)
- 1. The man-machine interaction automatic test system of the vehicle-mounted instrument is characterized by comprising: the configuration management module is used for storing and managing structural configuration data, wherein the structural configuration data comprises test case data, connection parameters of the vehicle-mounted instrument to be tested and user interface element definition information; the communication connection module is used for establishing and maintaining a bidirectional communication link with the vehicle-mounted instrument to be tested through the standardized communication interface; the protocol adaptation module is communicatively coupled with the communication connection module and is used for encoding a test operation instruction into a protocol format supported by the vehicle-mounted instrument and decoding response data received from the vehicle-mounted instrument into a format which can be processed by a system; The instruction execution and verification module is in communication coupling with the protocol adaptation module and is used for calling a corresponding test operation instruction based on the test case data, sending the test operation instruction to the vehicle-mounted instrument through the protocol adaptation module and the communication connection module and verifying a test result based on the response data or state information acquired from the vehicle-mounted instrument; And the test flow control module is in communication coupling with the instruction execution and verification module and is used for controlling the execution flow of the test instruction according to the test case data in the configuration management module.
- 2. The human-computer interaction automatic test system of the vehicle-mounted instrument according to claim 1, wherein the user interface element definition information comprises user interface element template images matched with the resolution of a display screen of the vehicle-mounted instrument to be tested and position information of the user interface element template images in a screen coordinate system, and each template image corresponds to an icon, a text area or an indicator light display area to be verified in an HMI interface of the instrument; the instruction execution and verification module is specifically used for acquiring a screen image of the vehicle-mounted instrument, and comparing the screen image with the user interface element template image to verify whether the display content accords with the expectation.
- 3. The automated human-machine interaction test system of the vehicle-mounted instrument of claim 2, wherein the instruction execution and verification module is specifically configured to control the vehicle-mounted instrument to perform a screenshot to obtain the screen image.
- 4. The man-machine interaction automatic test system of the vehicle-mounted instrument according to claim 1, wherein the structural configuration data adopts a YAML format, the communication connection module establishes Socket connection with the vehicle-mounted instrument through a TCP/IP protocol, and the protocol adaptation module is specifically used for encoding the test operation instruction into a data packet in a JSON format.
- 5. The human-machine interaction automated testing system of an in-vehicle instrument of any one of claims 1-4, further comprising: and the test report generation module is used for summarizing the execution results of all the test cases and generating a test report containing the test passing rate, the error log and the associated screen shots.
- 6. The man-machine interaction automatic test method for the vehicle-mounted instrument is characterized by comprising the following steps of: loading structural configuration data to obtain connection parameters and test case sets of the vehicle-mounted instrument to be tested; Based on the connection parameters, establishing communication connection with the vehicle-mounted instrument to be tested; according to the test case set, test cases are executed in sequence, wherein executing a single test case comprises: the method comprises the steps of defining operation according to a test case, generating a corresponding control instruction, sending the control instruction to the vehicle-mounted instrument, receiving response data returned by the vehicle-mounted instrument, analyzing the response data to obtain an analysis result, and verifying whether response of the vehicle-mounted instrument meets expectations or not based on the analysis result.
- 7. The method for automatically testing human-computer interaction of the vehicle-mounted instrument according to claim 6, wherein the generating the corresponding control command according to the operation defined by the test case comprises: converting the operation defined by the test case into predefined structured data; and according to the protocol specification communicated with the vehicle-mounted instrument, the structured data are encapsulated into a data packet which can be identified by the vehicle-mounted instrument.
- 8. The method for human-machine interaction automated testing of an in-vehicle meter according to claim 6, wherein after said verifying whether the response of the in-vehicle meter meets the expectations, the method further comprises: generating and outputting a test report containing the test passing rate, the error log and the associated screen shots according to the execution results of all the test cases; And after all the test cases are executed, disconnecting the communication connection with the vehicle-mounted instrument.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the method for human-machine interaction automated testing of an in-vehicle meter according to any one of claims 6 to 8 when executing the computer program.
- 10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements a method of human-machine interaction automated testing of an in-vehicle meter according to any one of claims 6 to 8.
Description
Man-machine interaction automatic test system and method for vehicle-mounted instrument Technical Field The invention relates to the technical field of automatic testing, in particular to a man-machine interaction automatic testing system and method for a vehicle-mounted instrument. Background Along with the development of intelligent and networking acceleration of automobiles, modern vehicle-mounted instruments are fully turned to full liquid crystal digital display screens by traditional machinery, integrate various human-machine interaction (HMI) functions such as navigation, multimedia, vehicle state monitoring, driving auxiliary information display and the like, and have complex interface logic, various interaction paths and high requirements on real-time performance and reliability. The current mainstream test mode still depends on manual operation, namely a tester visually observes screen response and manually records results through a physical key trigger instruction, and part of manufacturers send basic control commands by adopting a simple script tool based on USB or serial ports or relying on a vehicle-mounted diagnosis protocol, but the closed loop verification capability facing HMI visual feedback and multi-mode interaction behavior is not constructed. The manual and semi-automatic modes have inherent limitations that a test flow cannot automatically trigger screenshot and image comparison, is difficult to cover visual state changes such as icon lighting, text switching and animation transition, is poor in test repeatability due to uncontrollable key parameters such as operation time sequence, pressing strength and response delay, is weak in expansibility due to the fact that scripts are required to be rewritten and personnel are retrained for new vehicle models or UI iteration, and cannot simulate stable operation scenes under high concurrency, long period and boundary conditions, so that test coverage rate is insufficient and defect omission ratio is high. Disclosure of Invention The invention provides a man-machine interaction automatic test system and method for a vehicle-mounted instrument, which are used for solving the technical problems of low efficiency, poor repeatability, easy error, weak expansibility and insufficient coverage caused by high dependence on manual work in man-machine interaction test of the vehicle-mounted instrument in the prior art. The invention provides a man-machine interaction automatic test system of a vehicle-mounted instrument, which comprises the following components: the configuration management module is used for storing and managing structural configuration data, wherein the structural configuration data comprises test case data, connection parameters of the vehicle-mounted instrument to be tested and user interface element definition information; the communication connection module is used for establishing and maintaining a bidirectional communication link with the vehicle-mounted instrument to be tested through the standardized communication interface; the protocol adaptation module is communicatively coupled with the communication connection module and is used for encoding a test operation instruction into a protocol format supported by the vehicle-mounted instrument and decoding response data received from the vehicle-mounted instrument into a format which can be processed by a system; The instruction execution and verification module is in communication coupling with the protocol adaptation module and is used for calling a corresponding test operation instruction based on the test case data, sending the test operation instruction to the vehicle-mounted instrument through the protocol adaptation module and the communication connection module and verifying a test result based on the response data or state information acquired from the vehicle-mounted instrument; And the test flow control module is in communication coupling with the instruction execution and verification module and is used for controlling the execution flow of the test instruction according to the test case data in the configuration management module. The human-computer interaction automatic test system of the vehicle-mounted instrument provided by the invention comprises user interface element template images matched with the resolution of a display screen of the vehicle-mounted instrument to be tested and position information of the user interface element template images in a screen coordinate system, wherein each template image corresponds to an icon, a text area or an indicator light display area to be verified in an HMI (human-machine interface) of the instrument; the instruction execution and verification module is specifically used for acquiring a screen image of the vehicle-mounted instrument, and comparing the screen image with the user interface element template image to verify whether the display content accords with the expectation. According to the man-machine interaction a