Automatic testing method and device for in-vehicle infotainment system, electronic equipment and storage medium

The development of vehicle-machine automation testing tools through the target graphical interface application development framework has solved the problems of low efficiency and high cost of existing testing methods, achieved efficient and low-cost vehicle-machine automation testing, adapted to a large number of test needs, and improved the test quality.

CN119829456APending Publication Date: 2025-04-15BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411996326.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing automotive automation testing methods are inefficient and costly, making them difficult to cope with a large number of test needs, and the source code of the upper computer needs to be modified during stress testing, making it difficult for developers to obtain or intervene, resulting in a decline in work efficiency and quality.

Method used

The vehicle-machine automation testing tool is developed through the target graphical interface application development framework, and automated test scripts are generated according to the test requirements, and the script-driven hardware is used to test. The Qt framework is used to realize a test tool with centralized functions and simple operation.

Benefits of technology

It improves testing efficiency and reduces testing costs, and can cope with a large number of stress testing needs without obtaining or interfering with the source code of the computer. Ordinary testers can use tools to test after simple training, which improves work efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829456A_ABST
    Figure CN119829456A_ABST
Patent Text Reader

Abstract

The invention provides an automatic testing method and device for a vehicle machine, electronic equipment and a storage medium, and the method comprises the steps: constructing a corresponding target function for each piece of hardware through employing a character string generation mode based on a target graphical interface application program development framework, so as to obtain the function execution data of each target function of all pieces of hardware, in response to a selection operation for hardware, generating a corresponding hardware driving script, generating a corresponding hardware configuration file under a specified path based on the hardware driving script, and packaging the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle-machine automatic test tool, and obtaining a target test requirement of the target test, obtaining a corresponding automatic test script through the vehicle-machine automatic test tool according to the target test requirement, and driving corresponding hardware to perform the target test based on the automatic test script.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle computer technology, and in particular to a vehicle computer automation testing method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid development of intelligent connected vehicles, the in-vehicle system has become the core of vehicle intelligence. From infotainment systems to autonomous driving control, the complexity and reliability requirements of in-vehicle systems are increasing. This background has promoted the application of automated testing technology in the field of vehicle computers to ensure that the in-vehicle system can operate stably under various conditions.

[0003] At present, automated testing of vehicle computers usually requires developers to write scripts and perform corresponding tests based on the scripts.

[0004] However, this method has low testing efficiency, high cost, and is difficult to cope with a large number of testing needs. At the same time, since the stress test involving CAN signals requires modifying the host computer source code, developers often cannot obtain or intervene in the host computer source code, and often do not understand the meaning of CAN signals, resulting in reduced work efficiency and quality. Summary of the invention

[0005] In view of this, the purpose of this application is to provide a vehicle-machine automated testing method, device, electronic device and storage medium, through the target graphical interface application development framework vehicle-machine automated testing tool, according to the target test requirements, the vehicle-machine automated testing tool obtains the corresponding automated testing script, and drives the corresponding hardware to perform target testing based on the automated testing script, and uses the Qt framework to obtain a vehicle-machine automated testing tool with centralized functions and easy operation, which improves the testing efficiency, reduces the testing cost, and can cope with a large number of stress testing requirements. At the same time, when performing stress testing, there is no need to obtain or intervene in the host computer source code. Ordinary testers can directly obtain the test script according to the vehicle-machine automated testing tool after simple training, which improves work efficiency and quality.

[0006] In a first aspect, an embodiment of the present application provides a vehicle computer automated testing method, the method comprising:

[0007] Based on the target graphical interface application development framework, a corresponding target function is constructed for each hardware by using a string generation method to obtain the function execution data of each target function of all hardware; wherein the hardware at least includes a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box, a LIN box, and a camera; each hardware corresponds to at least one target function;

[0008] In response to the selection operation for the hardware, a corresponding hardware driver script is generated, and based on the hardware driver script, a corresponding hardware configuration file is generated in a specified path; the hardware driver script can be run in a python environment; the hardware configuration file represents the interface parameters of the hardware, and the interface parameters at least include the serial port number and baud rate of the hardware;

[0009] Packaging the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool;

[0010] Obtain target test requirements for the target test, obtain a corresponding automated test script through the vehicle-mounted automated test tool according to the target test requirements, and drive corresponding hardware to perform the target test based on the automated test script.

[0011] In a possible implementation, the hardware driver script is executed based on the hardware configuration file to drive the corresponding hardware to work;

[0012] The executing the hardware driver script based on the hardware configuration file to drive the corresponding hardware operation includes:

[0013] In response to executing the hardware driver script, reading interface parameters in the hardware configuration file;

[0014] The hardware is driven to operate based on the interface parameters and the hardware driver script is communicated with.

[0015] In a possible implementation, the obtaining a corresponding automated test script through the vehicle computer automated test tool according to the target test requirement includes:

[0016] According to the target test requirement, determining the corresponding target hardware and the target function corresponding to the target hardware, and the target state of the target function;

[0017] In response to a selection operation on a function interface of the vehicle computer automated testing tool for a target function of the target hardware and a target state of the target function, changing the state of the target hardware to the target state;

[0018] In response to the generation operation for the target function of the target hardware on the function interface, an automated test script corresponding to the target test requirement is generated on the script interface of the vehicle-computer automated test tool.

[0019] In a possible implementation, after the automated test script is generated, in response to a debugging operation on the automated test script on the script interface, the automated test script is debugged to obtain a corresponding debugging result;

[0020] The hardware is checked based on the debugging result, and the hardware is adjusted based on the checking result.

[0021] In a possible implementation, the method further includes:

[0022] In response to a click operation on the camera on the function interface of the vehicle-computer automated testing tool, a target screenshot of the target software on the vehicle-computer system is selected; the target screenshot includes a picture mode and a code mode; the code mode represents the position of the target screenshot;

[0023] Based on the preset image recognition technology, the corresponding target software is matched on the vehicle system according to the target screenshot, and the target software is executed.

[0024] In a possible implementation, in response to inputting a target interaction instruction (shell instruction) in a function interface of the vehicle-computer automation test tool, the vehicle-computer automation test tool generates a corresponding interaction script based on the target interaction instruction;

[0025] Based on the interactive script and the automated test script, the corresponding hardware is driven to perform the target test.

[0026] In a possible implementation, the target interaction instruction corresponds to an input box and a button component, and the method further includes:

[0027] An input box and button components of the target interactive instruction based on the target graphical interface application development framework architecture;

[0028] The input box and button components of the target interaction instruction of the architecture include:

[0029] Obtaining working parameters corresponding to the target interaction instruction;

[0030] The working parameters are used as coordinate values, and a corresponding input box and a corresponding button component are constructed based on the coordinate values.

[0031] In a second aspect, an embodiment of the present application further provides a vehicle computer automatic testing device, the device comprising:

[0032] A construction module is used to construct a corresponding target function for each hardware by using a string generation method based on a target graphical interface application development framework, so as to obtain function execution data of each target function of all hardware; wherein the hardware at least includes a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box, a LIN box, and a camera; each hardware corresponds to at least one target function;

[0033] A generation module, for generating a corresponding hardware driver script in response to a selection operation for the hardware, and generating a corresponding hardware configuration file under a specified path based on the hardware driver script; the hardware driver script can be run in a python environment; the hardware configuration file represents the interface parameters of the hardware, and the interface parameters at least include the serial port number and baud rate of the hardware;

[0034] A packaging module, used to package the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool;

[0035] The test module is used to obtain the target test requirements of the target test, obtain the corresponding automated test script through the vehicle-mounted automated test tool according to the target test requirements, and drive the corresponding hardware to perform the target test based on the automated test script.

[0036] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0037] A driver module, used to execute the hardware driver script based on the hardware configuration file to drive the corresponding hardware operation;

[0038] The driving module is specifically used for:

[0039] In response to executing the hardware driver script, reading interface parameters in the hardware configuration file;

[0040] The hardware is driven to operate based on the interface parameters and the hardware driver script is communicated with.

[0041] In a possible implementation manner, the test module is specifically used to:

[0042] According to the target test requirement, determining the corresponding target hardware and the target function corresponding to the target hardware, and the target state of the target function;

[0043] In response to a selection operation on a function interface of the vehicle computer automated testing tool for a target function of the target hardware and a target state of the target function, changing the state of the target hardware to the target state;

[0044] In response to the generation operation for the target function of the target hardware on the function interface, an automated test script corresponding to the target test requirement is generated on the script interface of the vehicle-computer automated test tool.

[0045] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0046] A debugging module, for debugging the automated test script after generating the automated test script, in response to a debugging operation on the automated test script on the script interface, to obtain a corresponding debugging result;

[0047] The checking module is used to check the hardware based on the debugging result and adjust the hardware based on the checking result.

[0048] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0049] A selection module is used to select a target screenshot of a target software on a vehicle system in response to a click operation on the camera on a function interface of the vehicle system automation test tool; the target screenshot includes a picture mode and a code mode; the code mode represents a position of the target screenshot;

[0050] The matching module is used to match the corresponding target software on the vehicle system according to the target screenshot based on a preset image recognition technology, and execute the target software.

[0051] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0052] An input module, configured to generate a corresponding interaction script based on the target interaction instruction in response to inputting a target interaction instruction in a function interface of the vehicle-computer automation test tool, through the vehicle-computer automation test tool;

[0053] A driver module is used to drive the corresponding hardware to perform the target test based on the interactive script and the automated test script.

[0054] In a possible implementation manner, the target interaction instruction corresponds to an input box and a button component, and the vehicle computer automatic testing device of the present application further includes:

[0055] A framework module, used for constructing the input box and button components of the target interactive instruction based on the target graphical interface application development framework;

[0056] The architecture module is specifically used for:

[0057] Obtaining working parameters corresponding to the target interaction instruction;

[0058] The working parameters are used as coordinate values, and a corresponding input box and a corresponding button component are constructed based on the coordinate values.

[0059] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the vehicle-computer automation testing method as described in any one of the first aspects.

[0060] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle-computer automated testing method described in any one of the first aspects are executed.

[0061] The embodiment of the present application provides a vehicle-machine automated testing method, device, electronic device and storage medium. Based on the target graphical interface application development framework, a corresponding target function is constructed for each hardware in a string generation manner to obtain the function execution data of each target function of all hardware. In response to the selection operation for the hardware, a corresponding hardware driver script is generated, and a corresponding hardware configuration file is generated under a specified path based on the hardware driver script. The hardware configuration file and the function execution data are packaged based on a preset packaging tool to obtain a corresponding vehicle-machine automated testing tool, obtain the target test requirements of the target test, obtain the corresponding automated testing script through the vehicle-machine automated testing tool according to the target test requirements, and drive the corresponding hardware to perform the target test based on the automated testing script. In the present application, a vehicle-machine automated testing tool is developed through a target graphical interface application development framework, and a corresponding automated testing script is obtained through the vehicle-machine automated testing tool according to the target test requirements, and the corresponding hardware is driven to perform the target test based on the automated testing script. A vehicle-machine automated testing tool with concentrated functions and simple operation is obtained using the Qt framework, which improves the test efficiency, reduces the test cost, and can cope with a large number of stress testing requirements. At the same time, when performing stress testing, there is no need to obtain or intervene in the source code of the host computer. Ordinary testers can directly obtain the test script according to the vehicle computer automated testing tool after simple training, which improves work efficiency and quality. In order to make the above-mentioned purposes, features and advantages of this application more obvious and easy to understand, the following is a detailed description of the preferred embodiments in conjunction with the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0063] Figure 1 is a flow chart of a vehicle computer automated testing method provided according to an embodiment of the present application;

[0064] Figure 2 This is a schematic diagram of the interface of the vehicle computer automation test tool;

[0065] Figure 3 It is a schematic diagram of the overall architecture of the vehicle computer automation test process;

[0066] Figure 4 is a structural schematic diagram of a vehicle computer automation test device provided according to an embodiment of the present application;

[0067] Figure 5 It is a structural schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0069] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0070] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0071] With the rapid development of intelligent connected vehicles, the in-vehicle system has become the core of vehicle intelligence. From infotainment systems to autonomous driving control, the complexity and reliability requirements of in-vehicle systems are increasing. This background has promoted the application of automated testing technology in the field of vehicle computers to ensure that the in-vehicle system can operate stably under various conditions.

[0072] At present, the automated testing of vehicle computers usually requires developers to write scripts and perform corresponding tests according to the scripts. However, this method has low testing efficiency, high cost, and is difficult to cope with a large number of testing needs. At the same time, since the stress test involving CAN signals requires modifying the host computer source code, developers often cannot obtain or intervene in the host computer source code, and often do not understand the meaning of CAN signals, resulting in reduced work efficiency and quality.

[0073] In response to this problem, this application provides a vehicle-machine automation testing method, which uses a vehicle-machine automation testing tool developed through a target graphical interface application framework, obtains the corresponding automation testing script through the vehicle-machine automation testing tool according to the target test requirements, and drives the corresponding hardware to perform target testing based on the automation testing script. The Qt framework is used to obtain a vehicle-machine automation testing tool with centralized functions and easy operation, which improves testing efficiency, reduces testing costs, and can cope with a large number of stress testing requirements. At the same time, when performing stress testing, there is no need to obtain or intervene in the host computer source code. Ordinary testers can directly obtain the test script based on the vehicle-machine automation testing tool after simple training, which improves work efficiency and quality.

[0074] Figure 1 1 is a flow chart of a vehicle computer automated testing method provided according to an embodiment of the present application. Figure 1 As shown, the vehicle computer automatic testing method of the embodiment of the present application may specifically include:

[0075] S101. Based on the target graphical interface application development framework, a corresponding target function is constructed for each hardware by using a string generation method to obtain function execution data of each target function of all hardware.

[0076] S102: In response to a selection operation on hardware, a corresponding hardware driver script is generated, and based on the hardware driver script, a corresponding hardware configuration file is generated in a specified path.

[0077] S103: Pack the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool.

[0078] S104: Obtain target test requirements for the target test, obtain corresponding automated test scripts through the vehicle computer automated test tool according to the target test requirements, and drive corresponding hardware to perform target test based on the automated test scripts.

[0079] In the above-mentioned vehicle-machine automation test method, the vehicle-machine automation test tool of the target graphical interface application development framework is used to obtain the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and the corresponding hardware is driven to perform the target test based on the automation test script. The Qt framework is used to obtain a vehicle-machine automation test tool with concentrated functions and easy operation, which improves the test efficiency, reduces the test cost, and can cope with a large number of stress test requirements. At the same time, when performing stress testing, there is no need to obtain or intervene in the host computer source code. Ordinary testers can directly obtain the test script according to the vehicle-machine automation test tool after simple training, which improves work efficiency and quality.

[0080] The above exemplary steps of the embodiment of the present application are described below with reference to specific examples:

[0081] S101, constructing a corresponding target function for each hardware in a character string generation manner based on a target graphical interface application development framework, so as to obtain function execution data of each target function of all hardware.

[0082] In the embodiment of the present application, the target graphical interface application development framework is the Qt graphical interface application development framework, and the hardware includes at least a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box (corresponding to a CAN signal), a LIN box (corresponding to a LIN signal), a camera, etc. For example, Figure 2 As shown on the left; each hardware corresponds to at least one target function, that is, each hardware can correspond to multiple target functions. For example, for a programmable power supply, target functions such as turning on, off, and adjusting voltage and current can be constructed. The function execution data is the function execution data of the hardware's target function. The corresponding target function is realized through the function execution data. For example, the function execution data can represent the code of the hardware's target function. Based on the Qt target graphical interface application development framework, a string generation method is used to construct the corresponding target function for each hardware, and the function execution data of each target function of all hardware is obtained for subsequent processing.

[0083] It should be noted that the target functions of this application mainly refer to hardware functions. In fact, it can also have software functions, such as Figure 2 The “notification” and “shell” shown are software-level functions, but this application focuses on hardware, so we will not go into details about this.

[0084] S102, in response to a selection operation on hardware, generating a corresponding hardware driver script, and generating a corresponding hardware configuration file in a specified path based on the hardware driver script.

[0085] In the embodiment of the present application, the selection operation is a function selection operation, that is, selecting a function of a hardware, and the state of the corresponding function, such as on and off, for example, Figure 2 As shown, several target functions under the single-port relay are selected to be on or off, thereby completing the selection operation; the hardware driver script is the script that drives the hardware to work, and each hardware driver script corresponds to a hardware that can be driven. The hardware driver script can run in the python environment; the specified path is a file path in the vehicle system storage; the hardware configuration file mainly defines some interface parameters of the hardware, that is, it represents the interface parameters of the hardware. The interface parameters include at least the serial port number, baud rate, and other important parameters of the hardware; the hardware configuration file represents the control function corresponding to each hardware; perform the corresponding function selection operation for a piece of hardware, generate the corresponding hardware driver script after selecting the function, and generate the corresponding hardware configuration file under the specified path based on the hardware driver script for subsequent processing. For example, Figure 2 As shown in the figure, after selecting on or off for several target functions under the single-port relay, click Generate to generate the corresponding hardware driver script.

[0086] It should be noted that when operating the hardware, triggering the button component of the host computer, that is, the button component corresponding to the hardware selection operation, will generate a hardware driver script that can run in the Python environment and generate a hardware configuration file under the specified path.

[0087] S103, packaging the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool.

[0088] In the embodiment of the present application, the vehicle computer automation test tool is used to connect to the vehicle computer system. The vehicle computer automation test tool is a tool for performing an automated test on the vehicle computer. For example, Figure 2 As shown, it is a vehicle-computer automation test tool. The packaging tool can be PyInstaller. Based on the packaging tool, the hardware configuration file and function execution data, that is, all the files and data involved above, are packaged to obtain the corresponding vehicle-computer automation test tool for subsequent processing.

[0089] It should be noted that all files and data involved in the above (steps S101 and S102) are packaged.

[0090] S104, obtaining target test requirements of the target test, obtaining corresponding automated test scripts through the vehicle computer automated test tool according to the target test requirements, and driving corresponding hardware to perform target test based on the automated test scripts.

[0091] In the embodiment of the present application, the target test is a vehicle computer test, and the target test requirements include the hardware required for the target test and the corresponding functions and states, etc. The automated test script is a script for performing automated vehicle computer tests. According to the target test requirements of the target test, the vehicle computer automated test tool in step S103 obtains the corresponding automated test script, and drives the corresponding hardware to perform the target test based on the automated test script. For example, Figure 2 As shown, after selecting the hardware required for the target test and their respective functions and states (such as on and off), click Generate to generate an automated test script for the target test.

[0092] Optionally, when obtaining the corresponding automated test script through the vehicle-computer automation test tool according to the target test requirements, the corresponding target hardware and the target function corresponding to the target hardware, as well as the target state of the target function are determined according to the target test requirements; in response to the selection operation for the target function of the target hardware and the target state of the target function on the function interface of the vehicle-computer automation test tool, the state of the target hardware is changed to the target state; in response to the generation operation for the target function of the target hardware on the function interface, an automated test script corresponding to the target test requirements is generated on the script interface of the vehicle-computer automation test tool.

[0093] For example, Figure 2 As shown, according to the target test requirements, the required target hardware and the target function corresponding to the target hardware and the target state of the target function (for example, on or off) are determined. Figure 2 After selecting the corresponding target function and the target state of the target function on the functional interface of the vehicle-computer automation test tool, that is, the left interface, change the state of the target hardware to the target state. Then, click the Generate button on the functional interface of the vehicle-computer automation test tool to generate the automated test script for the target test in the script interface of the vehicle-computer automation test tool, that is, the right interface.

[0094] Therefore, ordinary testers only need to use the vehicle-mounted automated testing tools according to specific testing requirements, and they can flexibly obtain and run the required automated testing scripts by themselves, thus achieving efficient and high-quality testing.

[0095] The vehicle-machine automation test method provided in the embodiment of the present application uses a character string generation method based on the target graphical interface application development framework to construct a corresponding target function for each hardware to obtain the function execution data of each target function of all hardware, generates a corresponding hardware driver script in response to the selection operation for the hardware, and generates a corresponding hardware configuration file under the specified path based on the hardware driver script, packages the hardware configuration file and the function execution data based on the preset packaging tool, obtains the corresponding vehicle-machine automation test tool, obtains the target test requirements of the target test, obtains the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and drives the corresponding hardware to perform the target test based on the automation test script. The vehicle-machine automation test method of the present application uses a vehicle-machine automation test tool based on the target graphical interface application development framework, obtains the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and drives the corresponding hardware to perform the target test based on the automation test script, and uses the Qt framework to obtain a vehicle-machine automation test tool with concentrated functions and simple operation, which improves the test efficiency, reduces the test cost, and can cope with a large number of stress testing requirements. At the same time, when conducting stress testing, there is no need to obtain or intervene in the source code of the host computer. Ordinary testers can directly obtain the test script based on the vehicle-mounted automated testing tool after simple training, which improves work efficiency and quality.

[0096] Furthermore, a hardware driver script is executed based on the hardware configuration file to drive the corresponding hardware to work.

[0097] Optionally, in response to executing the hardware driver script, the interface parameters in the hardware configuration file are read; based on the interface parameters, the hardware driver script is communicated with to drive the hardware to operate.

[0098] It should be noted that during the execution of the script, the parameters of the configuration file need to be read, such as the serial port number and baud rate of the hardware, in order to communicate with the hardware and drive the hardware to work.

[0099] Furthermore, after the automated test script is generated, in response to a debugging operation on the automated test script on the script interface, the automated test script is debugged to obtain a corresponding debugging result; the hardware is checked based on the debugging result, and the hardware is adjusted based on the checking result.

[0100] For example, Figure 2 As shown, after generating an automated test script in the script interface, right-click and click Run to debug the automated test script. You can then check the relevant hardware based on the debugging results, for example, whether the hardware wires are properly connected, etc., and adjust the hardware based on the inspection results.

[0101] Furthermore, in response to a click operation on the camera on the function interface of the vehicle-mounted computer automated testing tool, a target screenshot of the target software on the vehicle-mounted computer system is selected; based on a preset image recognition technology, the corresponding target software is matched on the vehicle-mounted computer system according to the target screenshot, and the target software is executed. The target screenshot includes an image mode and a code mode; the code mode represents the location of the target screenshot, that is, the specific location of the target screenshot in the vehicle-mounted computer system storage; for example, Figure 2 As shown, the picture "Owner's Guide" on the right is the target screenshot of the picture mode. You can switch between the picture mode and the code mode by right clicking.

[0102] Specifically, for example, Figure 2 As shown, click the camera on the function interface of the vehicle-computer automation test tool, select the target screenshot of the target software on the vehicle-computer system, and based on the image recognition technology, match the corresponding target software on the vehicle-computer system according to the target screenshot and automatically execute (click).

[0103] Furthermore, in response to inputting a target interaction instruction in the function interface of the vehicle-based automated testing tool, the vehicle-based automated testing tool generates a corresponding interaction script based on the target interaction instruction; based on the interaction script and the automated testing script, the corresponding hardware is driven to perform the target test. The interaction script can be run in a Python environment, and the target interaction instruction is a shell instruction, for example, Figure 2 The shell functions of the functional interface shown correspond to the instructions, and the interactive script is a script used for automatic interaction.

[0104] Specifically, when the target interactive instruction is a shell instruction for page jump, for example, Figure 2 As shown, open the shell function module in the tool auxiliary window of the vehicle computer automation test tool, enter the shell command, and click Generate.

[0105] Furthermore, the target interaction instruction corresponds to an input box and a button component, and the input box and the button component of the target interaction instruction are constructed based on a target graphical interface application development framework.

[0106] Optionally, obtain the working parameters corresponding to the target interactive command; use the working parameters as coordinate values, and construct the corresponding input box and corresponding button components based on the coordinate values. For example, input the shell command, use the qt component to construct the input box and the corresponding button component, and output the script that can be run in the python environment, so as to construct the required interface of the vehicle computer automation test tool.

[0107] Furthermore, after the interactive script is generated, in response to the debugging operation of the interactive script on the script interface, the interactive script is debugged to obtain the corresponding debugging result; based on the debugging result, it is determined whether the vehicle-machine automated test tool can meet the target condition corresponding to the interactive script, and if so, it is determined that the vehicle-machine automated test tool can realize the machine to execute the interactive instruction. Among them, the target condition indicates that the vehicle-machine automated test tool can execute the adb root instruction in a non-manual state so that the machine executes the interactive instruction.

[0108] It should be noted that shell commands themselves cannot be run in Python. The vehicle computer automation test tool will generate interactive scripts that can be run in the Python environment based on the input shell commands. For example, right-click a blank space in the script interface and select Run in the pop-up menu to debug the code of the current interactive script and output the results. Observe whether the vehicle computer tool can execute adb root commands in a non-manual state to achieve the purpose of machine execution of shell commands, that is, page jump.

[0109] Therefore, this application uses Qt to implement the test script simplification process, and uses the pywinauto module to complete the interactive integration of the automated test tool with the host computer. Developers do not need to understand the source code and implementation of the host computer, and only need to focus on the development and writing of automated tools. Due to the low technical difficulty, ordinary developers can complete the development of automated tools, and the developed vehicle-mounted automated test tools are highly integrated and easy to operate. Ordinary testers can complete the acquisition of the required test scripts by themselves after simple training, simplifying complex problems and greatly improving test efficiency and test quality. At the same time, it also saves the need for professional developers and saves labor costs.

[0110] In order to better describe the vehicle computer automatic testing method of the present application, the following is combined with Figure 3 Further description.

[0111] like Figure 3As shown, the overall idea of ​​this application is divided into a software driver layer, a functional module and a business application layer. In the software driver layer, Python is mainly used as the programming language, and technologies such as Qt, pywinauto, serial, adb debugging bridge and image visual recognition algorithms are used as technical means to implement the software driver layer. In the functional module, functions such as adb operation, host computer operation, relay operation, image comparison operation, camera operation and basic function operation (such as time waiting, basic cycle, etc.) are implemented and completed through the software driver layer. In the business application layer, ordinary testers generate the required test scripts based on the developed automated testing tools to complete various automated testing requirements. Obviously, the car machine automated testing tool uses Python language, combined with technologies such as Qt, pywinauto, serial and adb debugging bridge, to realize the automated control functions of the host computer, car machine, relay, camera equipment, etc.

[0112] In short, use the Qt graphical interface application development framework to build a GUI interface based on the existing device architecture, use the python language, combine pywinauto, serial and adb debug bridge and other technologies to write the specific implementation logic of the GUI architecture, use the pyintsaller module to generate an executable car-machine automated testing tool, and ordinary testers use the automated testing tool to write the required test scripts.

[0113] Figure 4 is a structural diagram of a vehicle-mounted automatic test device provided according to an embodiment of the present application; Figure 4 As shown, the vehicle computer automatic testing device 400 of the embodiment of the present application may specifically include:

[0114] The construction module 401 is used to construct the corresponding target function for each hardware by character string generation based on the target graphical interface application development framework, so as to obtain the function execution data of each target function of all hardware; wherein the hardware at least includes a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box, a LIN box, and a camera; each hardware corresponds to at least one target function.

[0115] The generation module 402 is used to generate a corresponding hardware driver script in response to a selection operation for the hardware, and generate a corresponding hardware configuration file under a specified path based on the hardware driver script; the hardware driver script can run in a python environment; the hardware configuration file represents the interface parameters of the hardware, and the interface parameters include at least the serial port number and baud rate of the hardware.

[0116] The packaging module 403 is used to package the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool.

[0117] The test module 404 is used to obtain the target test requirements of the target test, obtain the corresponding automated test script through the vehicle computer automated test tool according to the target test requirements, and drive the corresponding hardware to perform the target test based on the automated test script.

[0118] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0119] The driver module is used to execute the hardware driver script based on the hardware configuration file to drive the corresponding hardware to work;

[0120] Driver module, specifically used for:

[0121] In response to executing the hardware driver script, reading the interface parameters in the hardware configuration file;

[0122] Communicate with the hardware driver script based on the interface parameters to drive the hardware to work.

[0123] In a possible implementation, the test module is specifically used to:

[0124] According to the target test requirements, determine the corresponding target hardware and the target function corresponding to the target hardware, as well as the target state of the target function;

[0125] In response to a selection operation on a function interface of the vehicle computer automation test tool for a target function of the target hardware and a target state of the target function, changing the state of the target hardware to a target state;

[0126] In response to a generation operation for a target function of the target hardware on the function interface, an automated test script corresponding to the target test requirement is generated on a script interface of the vehicle-computer automated test tool.

[0127] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0128] A debugging module is used to debug the automated test script after generating the automated test script and obtain corresponding debugging results in response to debugging operations on the automated test script on the script interface;

[0129] The checking module is used to check the hardware based on the debugging result and adjust the hardware based on the checking result.

[0130] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0131] A selection module is used to select a target screenshot of the target software on the vehicle system in response to a click operation on the camera on the function interface of the vehicle automation test tool; the target screenshot includes a picture mode and a code mode; the code mode represents the position of the target screenshot;

[0132] The matching module is used to match the corresponding target software on the vehicle system according to the target screenshot based on the preset image recognition technology, and execute the target software.

[0133] In a possible implementation manner, the vehicle computer automatic testing device of the present application further includes:

[0134] An input module, configured to respond to inputting a target interaction instruction in a function interface of the vehicle-computer automation test tool, and generate a corresponding interaction script based on the target interaction instruction through the vehicle-computer automation test tool;

[0135] The driver module is used to drive the corresponding hardware to perform target testing based on interactive scripts and automated test scripts.

[0136] In a possible implementation manner, the target interaction instruction corresponds to an input box and a button component, and the vehicle computer automatic testing device of the present application further includes:

[0137] An architecture module, for input box and button components of target interactive instructions based on a target graphical interface application development framework architecture;

[0138] Architecture modules, specifically for:

[0139] Obtain working parameters corresponding to the target interaction instruction;

[0140] The working parameters are used as coordinate values, and the corresponding input box and the corresponding button components are constructed based on the coordinate values.

[0141] The vehicle-machine automation test device provided in the embodiment of the present application uses a character string generation method based on the target graphical interface application development framework to construct a corresponding target function for each hardware to obtain the function execution data of each target function of all hardware, generates a corresponding hardware driver script in response to the selection operation for the hardware, and generates a corresponding hardware configuration file under the specified path based on the hardware driver script, packages the hardware configuration file and the function execution data based on the preset packaging tool, obtains the corresponding vehicle-machine automation test tool, obtains the target test requirements of the target test, obtains the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and drives the corresponding hardware to perform the target test based on the automation test script. The vehicle-machine automation test device of the present application uses the vehicle-machine automation test tool of the target graphical interface application development framework to obtain the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and drives the corresponding hardware to perform the target test based on the automation test script. The vehicle-machine automation test device of the present application uses the vehicle-machine automation test tool of the target graphical interface application development framework to obtain the corresponding automation test script through the vehicle-machine automation test tool according to the target test requirements, and drives the corresponding hardware to perform the target test based on the automation test script. The vehicle-machine automation test tool with concentrated functions and simple operation is obtained using the Qt framework, which improves the test efficiency, reduces the test cost, and can cope with a large number of stress test requirements. At the same time, when conducting stress testing, there is no need to obtain or intervene in the source code of the host computer. Ordinary testers can directly obtain the test script based on the vehicle-mounted automated testing tool after simple training, which improves work efficiency and quality.

[0142] like Figure 5 As shown, an electronic device 500 provided in an embodiment of the present application includes: a processor 501, a memory 502 and a bus, wherein the memory 502 stores machine-readable instructions executable by the processor 501. When the electronic device is running, the processor 501 communicates with the memory 502 through the bus, and the processor 501 executes the machine-readable instructions to perform the steps of the above-mentioned vehicle-computer automation testing method.

[0143] Specifically, the above-mentioned memory 502 and processor 501 can be general-purpose memories and processors, which are not specifically limited here. When the processor 501 runs the computer program stored in the memory 502, the above-mentioned vehicle-computer automation testing method can be executed.

[0144] Corresponding to the above-mentioned vehicle-computer automated testing method, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned vehicle-computer automated testing method are executed.

[0145] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0146] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0148] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the deployment method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0149] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A vehicle computer automated testing method, characterized in that: The method comprises: Based on the target graphical interface application development framework, a corresponding target function is constructed for each hardware by using a string generation method to obtain the function execution data of each target function of all hardware; wherein the hardware at least includes a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box, a LIN box, and a camera; each hardware corresponds to at least one target function; In response to the selection operation for the hardware, a corresponding hardware driver script is generated, and based on the hardware driver script, a corresponding hardware configuration file is generated in a specified path; the hardware driver script can be run in a python environment; the hardware configuration file represents the interface parameters of the hardware, and the interface parameters at least include the serial port number and baud rate of the hardware; Packaging the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool; Obtain target test requirements for the target test, obtain a corresponding automated test script through the vehicle-mounted automated test tool according to the target test requirements, and drive corresponding hardware to perform the target test based on the automated test script.

2. The method according to claim 1, characterized in that The method further comprises: Executing the hardware driver script based on the hardware configuration file to drive the corresponding hardware operation; The executing the hardware driver script based on the hardware configuration file to drive the corresponding hardware operation includes: In response to executing the hardware driver script, reading interface parameters in the hardware configuration file; The hardware is driven to operate based on the interface parameters and the hardware driver script is communicated with.

3. The method according to claim 2, characterized in that The obtaining a corresponding automated test script through the vehicle computer automated test tool according to the target test requirement includes: According to the target test requirement, determining the corresponding target hardware and the target function corresponding to the target hardware, and the target state of the target function; In response to a selection operation on a function interface of the vehicle computer automated testing tool for a target function of the target hardware and a target state of the target function, changing the state of the target hardware to the target state; In response to the generation operation for the target function of the target hardware on the function interface, an automated test script corresponding to the target test requirement is generated on the script interface of the vehicle-computer automated test tool.

4. The method according to claim 3, characterized in that The method further comprises: After the automated test script is generated, in response to a debugging operation on the automated test script on the script interface, the automated test script is debugged to obtain a corresponding debugging result; The hardware is checked based on the debugging result, and the hardware is adjusted based on the checking result.

5. The method according to claim 4, characterized in that The method further comprises: In response to a click operation on the camera on the function interface of the vehicle-computer automated testing tool, a target screenshot of the target software on the vehicle-computer system is selected; the target screenshot includes a picture mode and a code mode; the code mode represents the position of the target screenshot; Based on the preset image recognition technology, the corresponding target software is matched on the vehicle system according to the target screenshot, and the target software is executed.

6. The method according to claim 1, characterized in that The method further comprises: In response to inputting a target interaction instruction in a function interface of the vehicle-computer automation test tool, generating a corresponding interaction script based on the target interaction instruction by the vehicle-computer automation test tool; Based on the interactive script and the automated test script, the corresponding hardware is driven to perform the target test.

7. The method according to claim 6, characterized in that The target interaction instruction corresponds to an input box and a button component, and the method further includes: An input box and button components of the target interactive instruction based on the target graphical interface application development framework architecture; The input box and button components of the target interaction instruction of the architecture include: Obtaining working parameters corresponding to the target interaction instruction; The working parameters are used as coordinate values, and a corresponding input box and a corresponding button component are constructed based on the coordinate values.

8. A vehicle computer automatic testing device, characterized in that: The device comprises: A construction module is used to construct a corresponding target function for each hardware by using a string generation method based on a target graphical interface application development framework, so as to obtain function execution data of each target function of all hardware; wherein the hardware at least includes a single-port relay, a programmable power supply, a three-side relay, a clicker, a multimeter, a noise detection element, a CAN box, a LIN box, and a camera; each hardware corresponds to at least one target function; A generation module, for generating a corresponding hardware driver script in response to a selection operation for the hardware, and generating a corresponding hardware configuration file under a specified path based on the hardware driver script; the hardware driver script can be run in a python environment; the hardware configuration file represents the interface parameters of the hardware, and the interface parameters at least include the serial port number and baud rate of the hardware; A packaging module, used to package the hardware configuration file and the function execution data based on a preset packaging tool to obtain a corresponding vehicle computer automation test tool; The test module is used to obtain the target test requirements of the target test, obtain the corresponding automated test script through the vehicle-mounted automated test tool according to the target test requirements, and drive the corresponding hardware to perform the target test based on the automated test script.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the vehicle-machine automation testing method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vehicle computer automatic testing method as described in any one of claims 1 to 7 are executed.

Citation Information

Cited By

  • Python-based space electric propulsion automatic diagnosis method and control system

    CN121614916A