Test tool, test system and test method
By introducing automated testing tools in ECU testing, the problems of inefficiency and human error of traditional testing methods are solved, and an efficient and accurate testing process is achieved, improving the user experience.
Patent Information
- Application Number
- CN202411959033.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional ECU testing methods rely on manual operations, which leads to inefficient test efficiency, repetition and consistency, increasing the risk of human error.
A testing tool is proposed, including a connection detection module, a file parsing module and an XML test file management module, which is used to automatically detect the connection status, parse the DBC file and output CAN messages, execute test instructions in the XML test file, and compare the actual results with the expected results to obtain the test results.
It significantly shortens the test cycle, improves testing efficiency and accuracy, reduces test complexity and manual intervention, and improves user experience.
Smart Images

Figure CN119806110A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a testing tool, a testing system and a testing method. Background Art
[0002] With the rapid development of automotive electronic technology, the number and complexity of automotive electronic control units (ECUs) have increased significantly. These ECUs are not only responsible for managing core components such as the engine and transmission, but also involve the control of safety systems, comfort functions, and infotainment systems. Therefore, ensuring the stability and reliability of ECUs has become a key factor in ensuring the overall performance and driving experience of the vehicle. However, traditional ECU testing methods have limitations and often rely on manual operations, which leads to low testing efficiency. At the same time, the repeatability and consistency of the test process are also affected, increasing the risk of human error. Summary of the invention
[0003] The main purpose of the present invention is to propose a testing tool, a testing system and a testing method, aiming to improve testing efficiency, enhance testing accuracy, and reduce testing complexity, thereby improving user experience.
[0004] To achieve the above object, the present invention proposes a test tool, which is applied to a terminal device, wherein the terminal device is electrically connected to at least one test device, and the test device is used to control the object under test to perform a test according to an instruction output by the terminal device. The test tool includes:
[0005] A connection detection module is used to detect the connection status between the terminal device and the test device;
[0006] A file parsing module, used for receiving a DBC file, parsing the DBC file to obtain a CAN message, and outputting the message to the object under test;
[0007] The XML test file management module is used to receive an XML test file and drive the test device to perform corresponding tests according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain the corresponding test results.
[0008] In one embodiment, the testing tool further comprises:
[0009] The parameter control module is used to receive user input instructions and adjust the working parameters of the test device according to the user input instructions, so that the test device tests the object under test according to the working parameters.
[0010] In one embodiment, the testing tool further comprises:
[0011] The parameter data acquisition module is used to acquire the test data output by the test device after testing the object under test according to the working parameters.
[0012] In one embodiment, the testing tool further comprises:
[0013] A report generation module is electrically connected to the XML test file management module, and is used to receive the test result and generate a test report corresponding to the test result.
[0014] In one embodiment, the report generating module is further used to upload the generated test report to a preset location for storage.
[0015] In one embodiment, the testing tool further comprises:
[0016] A graphical interface generation module is electrically connected to the XML test file management module; the graphical interface generation module is used to receive the test result and generate a graphical interface corresponding to the test result to display the test result.
[0017] The present invention further provides a test system, the test system comprising a terminal device, a test device and any one of the test tools described above connected in sequence;
[0018] The test device is used to control the object under test to perform a test according to the instruction output by the terminal device.
[0019] In one embodiment, the test device includes any one of Zlgcan or CANoe combined with an AP.
[0020] The present invention also provides a testing method, which comprises:
[0021] Detecting the connection status between the terminal device and the test device to obtain a connection status detection result;
[0022] When the connection status detection result is successful connection, the DBC file is imported, and the DBC file is parsed to obtain the CAN message, and the CAN message is output to the object under test;
[0023] Receive an XML test file, and drive the test device to perform corresponding tests according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain corresponding test results.
[0024] In one embodiment, the testing method further comprises:
[0025] A user input instruction is received, and the working parameters of the test device are adjusted according to the user input instruction, so that the test device tests the object under test according to the working parameters.
[0026] The present invention proposes a testing tool, which is applied to a terminal device, wherein the terminal device is electrically connected to at least one testing device, and the testing device is used to control a tested object to perform a test according to an instruction output by the terminal device. The testing tool comprises a connection detection module, a file parsing module and an XML test file management module, wherein the connection detection module is used to detect the connection status between the terminal device and the testing device; the file parsing module is used to receive a DBC file, parse the DBC file to obtain a CAN message, and output it to the tested object; the XML test file management module is used to receive an XML test file, and drive the testing device to perform a corresponding test according to the instructions in the XML test file; and obtain the message content fed back by the testing device, and compare the actual result in the message content with the expected result in the XML test file to obtain the corresponding test result.
[0027] In practical applications, the test tool is applied in the terminal device. When the user uses the test tool, the connection detection module confirms whether the test device is correctly connected to the terminal device. The user can also import the DBC file when confirming that the connection is successful, so that the file parsing module parses the DBC file to obtain the CAN message and outputs it to the object under test. When the object under test responds to the signal in these messages, the XML test file management module will capture the returned message content and compare and analyze it with the expected results to obtain the test results. In this way, the user can evaluate the function and performance of the object under test based on the test results. The test tool of the present invention significantly shortens the test cycle, thereby improving the test efficiency. At the same time, the test tool completes the automated test of the object under test, reduces the test complexity, reduces manual intervention, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0029] Figure 1 A schematic diagram of a module of an embodiment of a testing tool of the present invention;
[0030] Figure 2 A schematic diagram of a module of another embodiment of the testing tool of the present invention;
[0031] Figure 3 A schematic diagram of a module of another embodiment of the testing tool of the present invention;
[0032] Figure 4 A schematic diagram of a module of another embodiment of the testing tool of the present invention;
[0033] Figure 5 A schematic diagram of a module of another embodiment of the testing tool of the present invention;
[0034] Figure 6 A schematic diagram of a flow chart of an embodiment of a testing method of the present invention;
[0035] Figure 7 A schematic diagram of a flow chart of an embodiment of a testing tool of the present invention;
[0036] Figure 8 A schematic diagram of a graphical interface of an embodiment of a testing tool of the present invention.
[0037] Description of Figure Numbers:
[0038] 10. Connection status detection module; 20. File parsing module; 30. XML test file management module; 40. Parameter control module; 50. Parameter data acquisition module; 60. Report generation module; 70. Graphical interface generation module.
[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] It should be noted that, in this article, step codes such as S100, S200, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S200 first and then S100, etc., but these should all be within the scope of protection of this application.
[0042] With the rapid development of automotive electronic technology, the number and complexity of automotive electronic control units (ECUs) have increased significantly. These ECUs are not only responsible for managing core components such as the engine and transmission, but also involve the control of safety systems, comfort functions, and infotainment systems. Therefore, ensuring the stability and reliability of the ECU has become a key factor in ensuring the overall performance and driving experience of the vehicle. However, traditional ECU testing methods have limitations and often rely on manual operations, which leads to low testing efficiency. At the same time, the repeatability and consistency of the test process are also affected, increasing the risk of human error. For this reason, reference Figure 1 The present invention proposes a test tool, which is applied to a terminal device, wherein the terminal device is electrically connected to at least one test device, and the test device is used to control a tested object to perform a test according to an instruction output by the terminal device, and the test tool comprises:
[0043] A connection detection module is used to detect the connection status between the terminal device and the test device;
[0044] The file parsing module 20 is used to receive the DBC file, parse the DBC file to obtain the CAN message, and output it to the object under test;
[0045] The XML test file management module 30 is used to receive an XML test file and drive the test device to perform corresponding tests according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain the corresponding test results.
[0046] In this embodiment, the test equipment includes any one of Zlgcan or CANoe combined with AP. It can be understood that in the testing of automotive electronic systems, Zlgcan or Canoe (CANoe) are two common test tools. Zlgcan is a physical layer CAN bus interface device that provides a connection bridge between the computer and the CAN network. Through this interface, users can send and receive CAN messages. Usually, Zlgcan comes with corresponding drivers and applications for configuring communication parameters (such as baud rate), monitoring CAN bus status, and recording transmitted data. Using Zlgcan, testers can simulate the working conditions of the communication of the vehicle CAN network in a laboratory environment to ensure that the ECU under test can communicate normally with other controllers. And by capturing and analyzing CAN messages, it can help identify potential problem points and guide subsequent debugging work. Canoe (a software tool for developing and testing automotive network systems) is a powerful automotive network development and testing tool that can simulate various vehicle network protocols (such as CAN, LIN, FlexRay, Ethernet, etc.) and generate corresponding communication traffic. Built-in support for DBC files allows users to easily import, view and edit these files to define or modify communication messages. With the powerful functions of Canoe, complex test scenarios can be built, covering everything from simple single nodes to the entire vehicle network, as well as ensuring that the ECU under test processes the received information in a predetermined manner and correctly responds to commands from other controllers as needed. AP (Audio Precision) is an audio analysis device that focuses on the quality analysis of audio signals and provides accurate electroacoustic performance evaluation, such as frequency response, distortion, signal-to-noise ratio and other key indicators. It supports real-time data acquisition and display so that users can instantly understand the operating status of the audio system. At the same time, users can adjust various test parameters through a graphical interface, such as input / output gain, filter settings, etc., to meet different test needs.
[0047] In this embodiment, when the terminal device is started and the test tool of the present application is used, the connection detection module automatically scans and confirms whether all necessary test equipment is correctly connected to the terminal device, including Zlgcan or Canoe and AP (Audio Precision), etc. To ensure the stability and reliability of the entire test environment, and improve the problem of test failure or inaccurate results caused by device connection problems. In addition, the test tool may also include a warning module for real-time monitoring of the connection status. Once an abnormal device connection is detected, an alarm is immediately issued and the user is prompted to check the device connection status. When the terminal device is successfully connected to each test device, the user can import the DBC file into the test tool, and the file parsing module 20 receives and parses the DBC file, extracts the CAN message information defined therein, and sends this information configuration to the object under test (such as the power amplifier ECU). It should be noted that the DBC file is a communication protocol standard provided by the vehicle manufacturer, which ensures that the CAN message format used in the test process meets the requirements of the actual test environment. This is crucial for verifying the interaction logic between the ECU and other controllers. In addition, users can also upload customized XML test files. The XML test file management module 30 reads the XML test files containing detailed test steps, expected results and other necessary conditions; the tool drives the test equipment to perform corresponding operations according to the instructions corresponding to the test steps in the XML test file; and automatically obtains the message content feedback from the test equipment during the test process and compares it with the expected results to obtain the test results, so that the testers can analyze the product functions and working stability based on the test results.
[0048] It is understandable that the vehicle manufacturer will set a default sending cycle for each CAN message based on the actual operating needs of the vehicle. Some key signals (such as vehicle speed and engine speed) need to be updated frequently to ensure the response speed of other systems. For example, safety-related signals may be sent every 10 milliseconds. By reasonably arranging the sending frequency of different messages, the load of the CAN bus can be effectively managed to avoid network congestion. When abnormal testing is required, testers can also set the message sending cycle, such as stress testing, robustness testing, and boundary value testing. Among them, stress testing is to evaluate the performance of ECU under high communication load, and it may be necessary to shorten the message sending cycle and increase the amount of data transmitted per unit time. Robustness testing is used to simulate extreme situations, such as sudden increase or decrease in communication traffic, to observe whether the ECU can maintain stable operation. Limit value testing is to test the behavior under boundary conditions, such as pushing the output of a sensor to its physical limit to see how the ECU handles these abnormal inputs. In this way, by changing the sending cycle, testers can test the responsiveness of the ECU under non-standard conditions and prevent possible problems in advance. Verifying design limits can confirm whether the ECU and its related components can still work normally when exceeding the normal range, thereby improving product reliability and durability.
[0049] In practical applications, compared with traditional solutions, the test tool proposed in the present invention reduces the risk of human error caused by manual intervention through automated testing, shortens the test cycle, improves the test effect, and can automatically adjust the message content and real-time data monitoring to enhance the test accuracy. In addition, it also integrates data analysis functions, can easily parse complex DBC files, and automatically generate detailed test reports, reducing the difficulty of operation, thereby improving the user experience.
[0050] In one embodiment, reference Figure 2 and Figure 3 , the test tool also includes:
[0051] The parameter control module 40 is used to receive user input instructions and adjust the working parameters of the test device according to the user input instructions, so that the test device tests the object under test according to the working parameters.
[0052] The parameter data acquisition module 50 is used to acquire the test data output by the test device after testing the object under test according to the working parameters.
[0053] In this embodiment, the parameter control module 40 is an important part of the test tool, which is responsible for receiving user input instructions and adjusting the working parameters of the test equipment according to these instructions. Specifically, the user can input specific parameter settings through a graphical interface, such as basic parameters of the AP (Audio Precision) device (such as frequency range, gain, etc.), so that the test equipment can test the object under test (i.e., the power amplifier ECU) according to the set conditions.
[0054] Specifically, the test tool can obtain the graphical user interface (GUI) of the AP (Audio Precision) in operation, allowing the user to select or enter the parameters that need to be adjusted. For example, the user can select an audio channel and set its RMS value or other key measurement parameters. Once the user submits the new parameter setting, the parameter control module 40 will immediately send an update instruction to the test device. For the AP device, this means that it can adjust and apply the new parameter configuration in real time to ensure that the latest settings are always used during the test process. During the test, the parameter data acquisition module 50 will continuously monitor and record the test data from the test device. For example, it can obtain the RMS value of the specified channel in real time, and output it to the test report in a visual way in the form of charts, etc., and store the data in the tool operation, so that the tester can review the results and upload key data when submitting bugs. Optionally, the test data can be uploaded to the specified folder of Feishu so that all relevant personnel can quickly find the required test data through the Feishu platform without transferring files between local devices. Team members can view the latest test results instantly, promoting communication and collaboration between cross-departmental or cross-regional teams. In addition, different levels of access rights can be set to protect test information while ensuring the security and confidentiality of key data. Optionally, test data can be uploaded to a server or dedicated test management system to improve work efficiency, enhance collaboration, and ensure data security and availability.
[0055] In this embodiment, by adjusting the AP parameters, the audio environment under different conditions can be simulated to ensure that the ECU can work properly in various actual usage situations. For example, changing the frequency range or volume level can help verify whether the ECU can provide stable and high-quality sound output under different audio conditions. Different vehicle configurations and user preferences may require different audio settings. By carefully adjusting the AP parameters, audio solutions can be customized for specific models or markets to ensure that the sound effects meet the expected standards. In addition, when audio-related problems are encountered, the AP parameters can be adjusted to help locate the problem. For example, if a problem is suspected in a certain frequency band, the problem can be quickly identified and resolved by focusing on testing that frequency band. In addition, the scope of the problem can be narrowed by gradually adjusting the parameters until the root cause is found.
[0056] In practical applications, suppose you need to test an amplifier ECU that automatically adjusts the volume of the in-car audio system based on the speed information from the navigation system. Therefore, the tester adjusts the AP frequency response, sets different frequency ranges (such as 20Hz to 20kHz), and observes how the ECU adjusts the volume and equalizer settings. In short, the AP parameters are adjusted to fully evaluate the functionality and reliability of the amplifier ECU to ensure that it can provide a high-quality audio experience under various conditions. This practice not only helps to discover potential problems, but also optimizes the final performance of the product and provides users with a better driving experience. By flexibly adjusting the test conditions, you can gain a deeper understanding of the behavior of the ECU and ensure that its design meets strict automotive electronic standards.
[0057] In one embodiment, reference Figure 4 , the test tool also includes:
[0058] The report generating module 60 is electrically connected to the XML test file managing module 30, and is used for receiving the test result and generating a test report corresponding to the test result.
[0059] In combination with the above-mentioned embodiments, the report generation module 60 is a key component of the test tool, which is electrically connected to the XML test file management module 30, and is used to receive the test results generated during the test process and generate a detailed test report based on these test results. For example, the XML test file management module 30 obtains the actual results (message content) obtained after executing the test, compares and analyzes the actual results with the expected results preset in the XML test file, and then outputs the corresponding analysis data to the report generation module 60, so that the report generation module 60 automatically generates a structured and formatted test report based on the analysis data using technologies such as the Jinja2 template engine.
[0060] In this embodiment, the report generation module 60 can obtain data from each module, including but not limited to connection status, DBC file parsing information, CAN message sending status, AP (AudioPrecision) parameter settings and key data of its output (such as RMS value), etc. The report content includes the test process, test results, data analysis and suggestions, etc., to help users quickly understand and analyze the test results. The entire report generation process is fully automated, reducing the need for manual intervention and improving efficiency and test accuracy. The generated test report can also be uploaded to a specified location, such as automatically uploading to a folder specified by Feishu, to ensure that authorized members of the team can access the latest test results at any time.
[0061] It should be noted that the test report records all the details of the test, including the test cases used, configuration parameters, execution steps and results, to ensure that each test is well documented. Optionally, the report generation module 60 is also used to upload the generated test report to a preset location for storage. That is, the report generation module 60 can be uploaded to a designated location (such as a Feishu folder) to save historical test reports, which is convenient for future reference and comparison of data from previous tests, and helps to evaluate product improvements. Based on the suggestions provided in the test report, developers can make targeted code modifications or design adjustments to improve product quality. For example, guide developers on how to optimize ECU performance or fix problems found.
[0062] In practical applications, the present invention provides a test tool for testing and analyzing power amplifier ECU based on Python and Qt. The test tool significantly improves the efficiency and accuracy of power amplifier ECU testing by integrating multiple interfaces, realizing comprehensive hardware connection detection, efficient DBC file parsing, flexible XML test reading and execution, real-time monitoring of AP (Audio Precision) output data and data acquisition, and intelligent report generation.
[0063] In another embodiment, reference Figure 5 , the test tool also includes:
[0064] The graphical interface generation module 70 is electrically connected to the XML test file management module 30; the graphical interface generation module 70 is used to receive the test result and generate a graphical interface corresponding to the test result to display the test result.
[0065] In this embodiment, the graphical interface generation module 70 obtains the test results obtained after executing the test from the XML test file management module 30, and converts the complex data into easy-to-understand charts, graphs and other visual elements. At the same time, the graphical interface is dynamically updated during the test process to display the latest test progress and results, and interactive functions are provided to allow users to view the test data in depth by clicking, dragging, etc.
[0066] It is understandable that the graphical interface generation module 70 can receive data from various modules, including but not limited to connection status, DBC file parsing information, CAN message sending status, AP (AudioPrecision) parameter settings and key data of its output (such as RMS value), etc., and display them in graphical form to help users understand the test information intuitively and quickly. Among them, the chart can be implemented by time series chart, bar chart / pie chart, heat map, etc. The entire graphical interface generation process is automated, reducing the need for manual intervention and improving efficiency and consistency.
[0067] refer to Figure 7 , the user starts the CAN bus test and analysis application based on Python and Qt on the terminal device. The connection detection module automatically scans and confirms the connection status of devices such as Zlgcan, Canoe and AP (AudioPrecision), and displays the detection results on the interface. The user imports the DBC file, the file parsing module 20 parses and displays the file content, and the user can edit and preset the CAN message. When the user uploads the XML test file, the XML test file management module 30 reads the file content and prepares to execute the test. That is, the test tool will perform the test according to the preset CAN message and the test steps in the XML file, and adjust the message content in real time during the process. In addition, the user can also modify the AP (audio analysis device or software) through the graphical interface provided by the test tool
[0068] (AudioPrecision) parameter, that is, the parameter control module 40 receives the user input instruction input by the user through the graphical interface, and adjusts the working parameters of the test equipment according to the user input instruction, so that the test equipment tests the object under test according to the working parameters, so that the parameter data acquisition module 50 obtains the RMS and other data of the specified channel in real time. After the test is completed, the report generation module 60 can use the Jinja2 template engine to generate a detailed test report and display it to the user. Users can customize the dashboard of the graphical interface according to their needs, add or delete specific charts and indicators, and create personalized views to improve the user experience. Figure 8 This is a schematic diagram of a graphical interface of an embodiment of the test tool of the present invention. The user can import the DBC file in the "Load DBC File" on the left side of the interface, and click "Send" to enable the file parsing module 20 to receive and parse the DBC file. In addition, the user can set or modify the working parameters of the AP in the "AP Set" section on the right side of the interface so that the test equipment can test the object under test according to the working parameters. Among them, the user can control the start of the test process through "Start" and control the end of the test process through "Stop", realizing one-click triggering of the start and stop control of the test of the object under test, reducing the difficulty of operation and improving the user experience.
[0069] It should be noted that, when the connection detection module determines that the connection has failed, the relevant connection status detection result can be output to the warning module to generate a warning message, so that the user can retry the connection to ensure the smooth progress of the test. When the XML test file management module 30 fails to read the test file (testcase), the corresponding warning message can be output to the warning module to prompt the user to check and take corresponding measures. In addition, after the report generation module 60 generates the test report, it can be output to the warning module to prompt the user, that is, by setting the message notification mode, it can be informed that the test report has been generated and can be viewed and used. Of course, after the report generation module 60 generates the test report, it can also not be sent to the warning module, that is, the message-notification mode is set to avoid disturbing the user.
[0070] In practical applications, the test tool of the present invention significantly shortens the test cycle through automated testing and real-time data analysis, thereby improving the test effect. The accuracy of the test is ensured by automatically adjusting the message content and real-time data monitoring. In addition, the flexible XML test file management and graphical interface reduce the difficulty of operation. The test tool can perform comprehensive hardware connection detection and intelligent report generation, improving the user experience.
[0071] The present invention provides a test system, the test system comprising a terminal device, a test device and any one of the test tools described above connected in sequence;
[0072] The test device is used to control the object under test to perform a test according to the instruction output by the terminal device.
[0073] The test equipment includes any one of Zlgcan or CANoe combined with an AP.
[0074] In this embodiment, the terminal device includes a desktop computer, a laptop computer, an embedded controller, a single board computer (SBC), etc.
[0075] In combination with the above embodiments, the terminal device includes a core as a user interaction interface and a control system, and runs a test tool application so that the test tool drives each test device to perform a test on the object under test. Optionally, the test system can ensure that the newly developed ECU can work normally according to the design requirements. The test content includes basic function inspection, logic judgment accuracy, interaction functions with other controllers, etc., such as verifying whether the power amplifier ECU can automatically adjust the volume according to the speed information of the navigation system. Optionally, the test system can also perform performance evaluation, such as evaluating the performance of the ECU under different loads and environmental conditions. The test content includes but is not limited to response time, throughput, resource utilization, etc. For example, measuring whether the power amplifier ECU can maintain stable sound output quality under high volume or complex audio sources. Optionally, the test system can also perform limit value testing, that is, testing the robustness and reliability of the ECU under extreme conditions. The test content includes but is not limited to extremely high frequency ranges, extremely high volume levels, audio peaks, etc. For example, checking whether the power amplifier ECU can maintain good audio quality and system stability when it exceeds the normal setting range. Optionally, the test system can also perform compatibility testing to ensure that the ECU can cooperate with other vehicle systems without conflicts or interference. The test content includes the compatibility of navigation, telephone connection, multimedia entertainment system, etc. For example, verify whether the power amplifier ECU can correctly process each signal when multiple audio sources are input at the same time. The specific test items correspond to different CAN messages in the DBC file.
[0076] In practical applications, the test system proposed in the present invention not only improves the inefficiency, complexity and unreliability problems existing in traditional testing methods, but also provides engineers and technicians with an efficient and easy-to-use testing platform. By integrating multiple testing equipment, it realizes the automated testing process, improves the accuracy of test results, and further enhances the user experience.
[0077] The present invention also proposes a testing method, referring to Figure 6 , the test method comprises:
[0078] Step S100: Detect the connection status between the terminal device and the test device to obtain a connection status detection result;
[0079] Step S200: when the connection status detection result is successful connection, import the DBC file, parse the DBC file to obtain the CAN message, and output it to the object under test;
[0080] Step S300, receive the XML test file, and drive the test device to perform the corresponding test according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain the corresponding test results.
[0081] Optionally, the testing method further comprises:
[0082] A user input instruction is received, and the working parameters of the test device are adjusted according to the user input instruction, so that the test device tests the object under test according to the working parameters.
[0083] In this embodiment, the test method of the present invention is applied to a control device of a terminal device, the control device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program is configured to implement the steps of any of the test methods described above. The control device may include a connection detection module, a file parsing module 20, an XML test file management module 30, a parameter control module 40, a parameter data acquisition module 50, a report generation module 60, etc.
[0084] In combination with the above-mentioned embodiments, when the terminal device is started and the test tool of the present application is used, the connection detection module automatically scans and confirms whether all necessary test equipment is correctly connected to the terminal device, including Zlgcan or Canoe and AP (AudioPrecision), etc. To ensure the stability and reliability of the entire test environment, and improve the problem of test failure or inaccurate results caused by device connection problems. In addition, the test tool may also include a warning module for real-time monitoring of the connection status. Once an abnormal device connection is detected, an alarm is immediately issued and the user is prompted to check the device connection status. When the terminal device is successfully connected to each test device, the user can import the DBC file into the test tool, and the file parsing module 20 receives and parses the DBC file, extracts the CAN message information defined therein, and sends this information configuration to the object under test (such as the power amplifier ECU). It should be noted that the DBC file is a communication protocol standard provided by the vehicle manufacturer, which ensures that the CAN message format used in the test process meets the requirements of the actual test environment. This is crucial for verifying the interaction logic between the ECU and other controllers. In addition, users can also upload custom XML test files. The XML test file management module 30 reads the XML test file containing detailed test steps, expected results and other necessary conditions; the tool drives the test equipment to perform corresponding operations according to the instructions corresponding to the test steps in the XML test file; and automatically obtains the message content fed back by the test equipment during the test and compares it with the expected results to obtain the test results. The report generation module 60 can obtain data from each module, including but not limited to connection status, DBC file parsing information, CAN message sending status, AP (AudioPrecision) parameter settings and key data of its output (such as RMS value), etc. For example, obtain the test results and generate the corresponding test report. The report content includes the test process, test results, data analysis and suggestions, etc., to help users quickly understand and analyze the test results. The entire report generation process is fully automated, reducing the need for manual intervention and improving efficiency and test accuracy. The generated test report can also be uploaded to a specified location, such as automatically uploading to a folder specified by Feishu, to ensure that authorized members of the team can access the latest test results at any time.
[0085] In addition, the test tool can obtain the graphical user interface (GUI) of the AP (Audio Precision) in operation, allowing the user to select or enter the parameters that need to be adjusted. For example, the user can select an audio channel and set its RMS value or other key measurement parameters. Once the user submits the new parameter setting, the parameter control module 40 will immediately send an update instruction to the test device. For the AP device, this means that it can adjust and apply the new parameter configuration in real time to ensure that the latest settings are always used during the test process. During the test, the parameter data acquisition module 50 will continuously monitor and record the test data from the test device. For example, it can obtain the RMS value of the specified channel in real time, and output it to the test report in a visual way in the form of charts, etc., and store the data in the tool operation, so that the tester can review the results and upload key data when submitting bugs. Optionally, the test data can be uploaded to the specified folder of Feishu so that all relevant personnel can quickly find the required test data through the Feishu platform without transferring files between local devices. Team members can view the latest test results instantly, promoting communication and collaboration between cross-departmental or cross-regional teams. In addition, different levels of access rights can be set to protect test information while ensuring the security and confidentiality of key data. Optionally, test data can be uploaded to a server or dedicated test management system to improve work efficiency, enhance collaboration, and ensure data security and availability.
[0086] In practical applications, the present invention provides a test method for testing and analyzing power amplifier ECU based on Python and Qt, which can realize comprehensive hardware connection detection, efficient DBC file parsing, flexible XML test reading and execution, real-time monitoring of AP (Audio Precision) output data and data acquisition, and intelligent report generation, etc., which significantly improves the efficiency and accuracy of power amplifier ECU testing.
[0087] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or direct / indirect applications in other related technical fields, under the inventive concept of the present invention are included in the patent protection scope of the present invention.
Claims
1. A testing tool, characterized in that: Applied to a terminal device, the terminal device is electrically connected to at least one test device, the test device is used to control the object under test to perform a test according to the instruction output by the terminal device, and the test tool includes: A connection detection module is used to detect the connection status between the terminal device and the test device; A file parsing module, used for receiving a DBC file, parsing the DBC file to obtain a CAN message, and outputting the message to the object under test; The XML test file management module is used to receive an XML test file and drive the test device to perform corresponding tests according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain the corresponding test results.
2. The test tool according to claim 1, characterized in that: The test tool also includes: The parameter control module is used to receive user input instructions and adjust the working parameters of the test device according to the user input instructions, so that the test device tests the object under test according to the working parameters.
3. The test tool according to claim 2, characterized in that: The test tool also includes: The parameter data acquisition module is used to acquire the test data output by the test device after testing the object under test according to the working parameters.
4. The testing tool according to claim 1, characterized in that: The test tool also includes: A report generation module is electrically connected to the XML test file management module, and is used to receive the test result and generate a test report corresponding to the test result.
5. The test tool according to claim 4, characterized in that: The report generating module is also used to upload the generated test report to a preset location for storage.
6. The testing tool according to claim 1, characterized in that: The test tool also includes: A graphical interface generation module is electrically connected to the XML test file management module; the graphical interface generation module is used to receive the test result and generate a graphical interface corresponding to the test result to display the test result.
7. A testing system, characterized in that: The test system comprises a terminal device, a test device and a test tool as claimed in any one of claims 1 to 6 connected in sequence; The test device is used to control the object under test to perform a test according to the instruction output by the terminal device.
8. The test system according to claim 7, characterized in that: The test equipment includes any one of Zlgcan or CANoe combined with an AP.
9. A testing method, characterized in that: The test method includes: Detecting the connection status between the terminal device and the test device to obtain a connection status detection result; When the connection status detection result is successful connection, the DBC file is imported, and the DBC file is parsed to obtain the CAN message, and the CAN message is output to the object under test; Receive an XML test file, and drive the test device to perform corresponding tests according to the instructions in the XML test file; and obtain the message content fed back by the test device, and compare the actual results in the message content with the expected results in the XML test file to obtain corresponding test results.
10. The testing method according to claim 9, characterized in that: The test method also includes: A user input instruction is received, and the working parameters of the test device are adjusted according to the user input instruction, so that the test device tests the object under test according to the working parameters.
Citation Information
Cited By
Element positioning method and device, equipment and medium
CN121640476A