Brush test method, device and equipment, storage medium and computer program product
By presetting the test process and configuration scenarios, and automatically selecting the target test process and configuration scenarios, the problem of increasing testing complexity in the existing technology is solved, and the effect of simplifying testing is achieved.
Patent Information
- Application Number
- CN202510366085.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art requires corresponding modifications to the code when conducting diversified testing, resulting in increased testing complexity.
By presetting the test process and configuration scenario, the target test process and configuration scenario are automatically selected according to the controller type and test type to simplify the testing process.
There is no need to modify the host computer code, which simplifies the testing process and improves testing efficiency and accuracy.
Smart Images

Figure CN120295270A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of flashing tests, and particularly relates to a flashing test method, device, equipment, storage medium, and computer program product. Background Art
[0002] In recent years, during the development of vehicle-mounted controllers, the flashing operation usually relies on CAN diagnostic technology. To thoroughly verify the stability of controller flashing, the development team must implement fault injection tests to simulate various problems that may occur during the flashing process. Since different projects have different flashing requirements for the controller, the required configuration parameters and flashing processes are also different.
[0003] Currently, the flashing test solutions on the production line mainly focus on the positive tests for specific projects, and the upper computer software used usually only provides a set of fixed test processes and parameter configurations. This limitation means that when diverse tests need to be performed on the controller, multiple upper computers must be used, and the code must be modified accordingly according to the test requirements and the characteristics of the controller to be tested, thereby increasing the complexity and resource consumption of the test.
[0004] The above content is only used to assist in understanding the technical solution of the present application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of the present application is to provide a flashing test method, device, equipment, storage medium, and computer program product, aiming to solve the technical problem that the prior art requires corresponding code modification during diverse tests, thereby increasing the complexity of the test.
[0006] To achieve the above objective, the present application proposes a flashing test method, and the method includes:
[0007] Determine the controller type and test type of the controller to be tested;
[0008] Select a target test process from a preset test process according to the controller type and the test type, and select a target configuration scenario from a preset configuration scenario according to the controller type and the test type;
[0009] Determine target configuration parameters based on the controller type, and perform a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario.
[0010] In an embodiment, the step of determining the controller type and test type of the controller to be tested includes:
[0011] Obtain the controller number of the controller to be tested, and obtain the corresponding controller type of the controller to be tested from a preset rule library based on the controller number;
[0012] Determine the corresponding function type of the controller to be tested according to the controller type, and determine the corresponding test type of the controller to be tested according to the function type.
[0013] In one embodiment, the step of selecting a target configuration scenario from a preset configuration scenario according to the controller type and the test type includes:
[0014] Select configurable scenarios from a preset configuration scenario based on the controller type;
[0015] Determine the fault type and fault parameters according to the test type, and select a target configuration scenario from the configurable scenarios according to the fault type and the fault parameters.
[0016] In one embodiment, the step of determining target configuration parameters based on the controller type includes:
[0017] Obtain target flashing parameters from a preset flashing parameter library based on the controller type;
[0018] Obtain the communication protocol corresponding to the controller type, and determine the target communication parameters corresponding to the controller to be tested according to the controller type and the communication protocol;
[0019] Determine the target configuration parameters corresponding to the controller to be tested based on the target communication parameters and the target flashing parameters.
[0020] In one embodiment, the step of determining the target communication parameters corresponding to the controller to be tested according to the controller type and the communication protocol includes:
[0021] Determine the communication rate, communication address, and addressing mode corresponding to the controller to be tested based on the controller type;
[0022] Determine the target communication parameters corresponding to the controller to be tested according to the communication rate, the communication address, the addressing mode, and the communication protocol.
[0023] In one embodiment, after the step of performing a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario, it further includes:
[0024] Obtain the flashing test result corresponding to the controller to be tested;
[0025] Determine a test report template based on the controller type and the test type, and generate a flashing test report corresponding to the to-be-tested controller based on the flashing test result and the test report template.
[0026] In addition, to achieve the above object, the present application further provides a flashing test device, which includes:
[0027] A determination module, configured to determine the controller type and the test type of the to-be-tested controller;
[0028] A configuration module, configured to select a target test process from a preset test process according to the controller type and the test type, and select a target configuration scenario from a preset configuration scenario according to the controller type and the test type;
[0029] A test module, configured to determine target configuration parameters based on the controller type, and perform a flashing test on the to-be-tested controller based on the target configuration parameters, the target test process, and the target configuration scenario.
[0030] In addition, to achieve the above object, the present application further provides a flashing test device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the flashing test method as described above.
[0031] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the flashing test method as described above are implemented.
[0032] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the flashing test method as described above are implemented.
[0033] The present application provides a flashing test method, device, equipment, storage medium and computer program product. The method includes: determining the controller type and test type of the controller to be tested; selecting a target test process from a preset test process according to the controller type and test type, and selecting a target configuration scenario from a preset configuration scenario according to the controller type and test type; determining target configuration parameters based on the controller type, and performing a flashing test on the controller to be tested based on the target configuration parameters, target test process and target configuration scenario. Since multiple host computers need to be introduced when performing different tests on the controller to be tested, modifying the host computer code according to the test type and the controller type of the controller to be tested and performing a flashing test on the controller increases the complexity of the test. Therefore, the present application simplifies the test by presetting a configuration scenario and a test process in advance, and selecting a target configuration scenario and a target test process from the preset configuration scenario and the preset test process based on the test type and the controller type of the controller to be tested, without modifying the code of the host computer according to the controller to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0035] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a flowchart of the first embodiment of the flashing test method proposed by the embodiment of the present application;
[0037] Figure 2 It is a structural block diagram of a flashing device applicable to different vehicle-mounted controllers in the flashing test method proposed in this embodiment;
[0038] Figure 3 It is a flowchart of the second embodiment of the flashing test method proposed by the embodiment of the present application;
[0039] Figure 4 It is a diagram of the flashing test device provided by the embodiment of the present application;
[0040] Figure 5 It is a structural schematic diagram of a flashing test device suitable for implementing the embodiment of the present application.
[0041] The implementation, functional features and advantages of the objectives of the present application will be further described in combination with the embodiments with reference to the accompanying drawings. Detailed implementation manners
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0043] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0044] It should be noted that all the directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0045] It can be understood that in recent years, with the increasing complexity of in-vehicle electronic systems, the flashing operation of controllers has become particularly important in the development process. This process generally uses CAN diagnostic technology to achieve. To ensure the reliability of controller flashing, the development team not only needs to conduct regular flashing tests, but also needs to introduce fault injection tests to simulate and solve various possible fault situations during the flashing process. Since the performance requirements and flashing environments of controllers vary for each project, this requires the test process and configuration parameters to be highly flexible and customizable.
[0046] However, the existing production line flashing test solutions are only applicable to the positive testing of specific projects, and the upper computer software generally comes with a fixed set of test processes and parameter configurations. This single test strategy is inadequate when faced with diverse test requirements. Therefore, in order to adapt to the testing of different controllers, engineers have to deploy multiple upper computers and frequently modify the code according to the specific test types and controller characteristics. This not only increases the complexity of the test, but also significantly increases the investment in manpower and material resources, posing a challenge to the efficiency of the entire development process.
[0047] Therefore, to solve the technical problem that the prior art requires corresponding code modification during diverse testing, thereby increasing the complexity of testing, this embodiment proposes a flashing test method, apparatus, device, storage medium, and computer program product. The method includes: determining the controller type and test type of the controller to be tested; selecting a target test process from a preset test process according to the controller type and test type, and selecting a target configuration scenario from a preset configuration scenario according to the controller type and test type; determining target configuration parameters based on the controller type, and performing a flashing test on the controller to be tested based on the target configuration parameters, target test process, and target configuration scenario. Since multiple host computers need to be introduced during different tests on the controller to be tested, modifying the host computer code according to the test type and the controller type of the controller to be tested and performing a flashing test on the controller increases the complexity of the test. Therefore, this embodiment performs tests on the controller to be tested by presetting a configuration scenario and a test process in advance, and selecting a target configuration scenario and a target test process from the preset configuration scenario and test process based on the test type and controller type of the controller to be tested, without modifying the host computer code according to the controller to be tested, making the test simpler.
[0048] For ease of understanding, the following Figures 1 to 4 specifically introduces the flashing test method provided in the embodiments of the present application and the flashing test method, apparatus, device, storage medium, and computer program product provided in the following embodiments.
[0049] The embodiments of the present application provide a flashing test method. Refer to Figure 1 , Figure 1 which is the flowchart of the first embodiment of the flashing test method proposed in the embodiments of the present application.
[0050] As Figure 1 shown, the method includes:
[0051] Step S10: Determine the controller type and test type of the controller to be tested.
[0052] It should be noted that the execution subject of this embodiment can be a computing service device with flashing test, network communication, and program running functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions. Hereinafter, a device with a flashing test function (hereinafter referred to as the device) is used as an example to illustrate this embodiment and the following embodiments.
[0053] In addition, it should be noted that the above controller types can be types of controllers designed according to different system requirements of the vehicle, such as a powertrain controller, a body control module, etc. The above test types can be types of tests performed on the controller, such as reliability tests, safety tests, and stability tests, etc. In specific implementation, the above device can first analyze the controller to be tested, determine the functions of the controller, and select the test types to be performed according to these functions.
[0054] Further, in order to accurately obtain the controller type and test type of the controller to be tested, the steps of determining the controller type and test type of the controller to be tested include:
[0055] Obtain the controller number of the controller to be tested, and obtain the corresponding controller type of the controller to be tested from a preset rule library based on the controller number;
[0056] Determine the corresponding function type of the controller to be tested according to the controller type, and determine the corresponding test type of the controller to be tested according to the function type.
[0057] It should be noted that the above controller number can be the unique identification code inside the controller, used to distinguish different controller models and versions. The above preset rule library can be a database preset by the user containing the mapping relationship between the controller number and the controller type, used to determine the controller type according to the controller number. The above function type can be the functions that the controller to be tested can achieve, such as body control, power control, etc.
[0058] In specific implementation, the above device can first obtain the controller number of the controller to be tested through Controller Area Network (CAN) or other communication methods. This number is usually assigned by the manufacturer and is used to uniquely identify the controller. Subsequently, the above device obtains the corresponding controller type of the controller to be tested from the preset rule library according to this controller number, and further determines its corresponding function type according to the controller type. For example, an engine controller may include functions such as fuel injection control, ignition control, and emission control. Finally, the above device determines the corresponding test type of the controller to be tested according to the function type. For example, the test types of an engine controller may include performance tests, endurance tests, fault diagnosis tests, etc.
[0059] Step S20: Select a target test process from the preset test processes according to the controller type and the test type, and select a target configuration scenario from the preset configuration scenarios according to the controller type and the test type.
[0060] It should be noted that the above preset test process can be a series of steps and operations for testing preset by the user, such as initialization, data acquisition, test execution, result analysis, etc. The above target test process can be a series of steps and operations for testing the above controller to be tested. In this embodiment, a flashing step configuration (used to select the applicable flashing steps for the controller on the interface, such as writing fingerprints and checking compatibility steps), a RID configuration for flashing (used to configure the RID used in each flashing step of the controller), a security unlocking configuration (used to configure the unlocking level and unlocking algorithm for the 0x27 service unlocking of the controller), and a function addressing and diagnostic suppression configuration (used to configure whether the function addressing and diagnostic suppression bits are used in the controller flashing process) are used for explanation, but there is no specific limitation on this embodiment. The above preset configuration scenario can be the environment and conditions for testing preset by the user, such as flashing process verification, prerequisite verification, flashing reliability verification, flashing security verification, and flashing stability verification, etc. The above target configuration scenario can be the environment and conditions for testing the above controller to be tested.
[0061] In specific implementation, first, the above device searches for a matching target test process in the preset test process according to the type of the controller to be tested and the test type, and searches for a matching target configuration scenario in the preset configuration scenario library. For example, if the controller to be tested is an engine controller and the test type is a performance test, the above device will select a performance test process for the engine controller and select a configuration scenario related to the performance test, such as tests at different temperatures and tests at different loads, etc. By selecting the target test process and configuration scenario, the above device can automatically generate a test script and execute the test operation, thereby simplifying the test process and improving the test efficiency.
[0062] For the convenience of understanding, the following is illustrated by examples, but there is no specific limitation on this embodiment. Assume that the controller to be tested is an engine controller and the test type is a performance test. The preset test process library may include the following processes: Process A: Cold start performance test; Process B: Hot start performance test; Process C: Hard acceleration performance test. The preset configuration scenario library may include the following scenarios: Scenario A: Low voltage start; Scenario B: High voltage start; Scenario C: Insufficient oil pressure. Assume that the controller type is an engine controller and the test type is a performance test, then the selected target test process is the hard acceleration performance test (Process C), and the target configuration scenarios are the low voltage start (Scenario A) and the high voltage start (Scenario B).
[0063] Further, in order to select an accurate configuration scenario to test the above device to be tested, the step of selecting a target configuration scenario from the preset configuration scenarios according to the controller type and the test type includes:
[0064] Select a configurable scenario from preset configuration scenarios based on the controller type;
[0065] It should be noted that the previous configurable scenario can be a scenario that can be configured by the controller corresponding to the above controller type.
[0066] Determine the fault type and fault parameters according to the test type, and select a target configuration scenario from the configurable scenarios according to the fault type and the fault parameters.
[0067] The above fault type can be an abnormal state that occurs in the system or the above device, such as sensor failure, actuator failure, line failure, etc. The above fault parameters can be characteristic parameters describing the fault state, such as sensor signal voltage, actuator response time, line resistance, etc.
[0068] In a specific implementation, the above device first screens out configurable scenarios from a preset configuration scenario library according to the type of the controller to be tested. The configuration scenario library contains configuration information for different controllers and test requirements, such as fault injection types, test cases, test data, etc. For example, if the controller to be tested is an engine controller, the above device will select configuration scenarios related to the engine controller, such as fault injection scenarios for the engine, test cases for the engine, etc.
[0069] Next, the above device determines the fault type and fault parameters to be simulated according to the test type of the controller to be tested. For example, if the test type is a fault diagnosis test, the above device needs to simulate various possible faults, such as sensor failure, actuator failure, line failure, etc.
[0070] Finally, the above device will further screen out a target configuration scenario from the configurable scenarios according to the fault type and the fault parameters. For example, if the controller to be tested is an engine controller, the test type is a fault diagnosis test, and a sensor failure needs to be simulated, the above device will select a fault injection scenario for the engine sensor and set the corresponding fault parameters, such as simulating an oxygen sensor failure and setting the fault parameter as the oxygen sensor signal voltage being lower than the normal range.
[0071] Through this series of steps, the above device can automatically select a target configuration scenario suitable for the controller to be tested and the test type, providing a basis for subsequent fault injection and test execution.
[0072] Step S30: Determine target configuration parameters based on the controller type, and perform a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario.
[0073] It should be noted that the above-mentioned target configuration parameters can be specific parameters that need to be set to ensure the correct operation of the controller in a specific test environment, such as communication baud rate, power supply voltage, sensor threshold, etc. The above-mentioned flashing test can be a process of updating new firmware or software to the controller and verifying whether its functions work as expected. In a specific implementation, after determining the type of the controller to be tested, the above-mentioned device begins to determine the target configuration parameters, which are key parameters set according to the controller characteristics and test requirements. On this basis, the above-mentioned device will perform the flashing test in combination with the target test process and the target configuration scenario. The target test process refers to a series of predefined test steps, such as controller self-check, function test, fault simulation, etc. The target configuration scenario is the specific environmental conditions simulated during the test, such as high temperature, high altitude or different load states. For example, if the engine control unit of a car is to be tested, the target test process may include start-up test, idle test and acceleration test, and the target configuration scenario may be to simulate the operating state of the vehicle in a plateau environment.
[0074] By precisely setting the target configuration parameters and performing the flashing test in a specific configuration scenario according to the target test process, the above-mentioned device can comprehensively evaluate the performance and reliability of the controller, ensuring its stable operation under various conditions. This not only improves the test efficiency but also provides important data support for the optimization and fault diagnosis of the controller.
[0075] Reference Figure 2 , Figure 2 FIG. is a structural block diagram of a flashing device applicable to different vehicle-mounted controllers in the flashing test method proposed in this embodiment. In another example, after obtaining the target configuration scenario, the above-mentioned device can configure the corresponding fault environment to perform scenario configuration on the controller to be tested (the controller in Figure 2 ) by adjusting the relay (such as the relay in Figure 2 ) and the programmable power supply (such as the programmable power supply in Figure 2 ). Among them, the above-mentioned host computer is respectively connected to the first relay (i.e., the upper relay in Figure 2 ) through the power supply and to the second relay (i.e., the lower relay in Figure 2 ) through the CAN line. The controller to be tested is connected to the programmable power supply through the power line, and the controller to be tested is also connected to the second relay through the CAN line. The relay and the programmable power supply are also connected through the power line.
[0076] This embodiment provides a flashing test method, apparatus, the above device, and a storage medium. The method includes: determining the controller type and test type of the controller to be tested; selecting a target test process from a preset test process according to the controller type and test type, and selecting a target configuration scenario from a preset configuration scenario according to the controller type and test type; determining target configuration parameters based on the controller type, and performing a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario. Since multiple host computers need to be introduced when performing different tests on the controller to be tested, modifying the host computer code according to the test type and the controller type of the controller to be tested and performing a flashing test on the controller increases the complexity of the test. Therefore, in this embodiment, by presetting a configuration scenario and a test process in advance, and selecting a target configuration scenario and a target test process from the preset configuration scenario and the preset test process based on the test type and the controller type of the controller to be tested to test the controller to be tested, there is no need to modify the code of the host computer according to the controller to be tested, making the test simpler.
[0077] Based on the first embodiment, in the second embodiment, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 3 , Figure 3 which is a flowchart of the second embodiment of the flashing test method proposed in the embodiment of the present application. The step of determining target configuration parameters based on the controller type includes:
[0078] Step S31: Obtain target flashing parameters from a preset flashing parameter library based on the controller type;
[0079] It should be noted that the above-mentioned flashing parameter library can be a database containing various parameters required for flashing controllers, such as firmware version, flashing protocol, security authentication, etc. The above-mentioned target flashing parameters can be the flashing parameters corresponding to the controller to be tested. For example, the flashing file path, the boot file path, the unlocking algorithm, the version information DID configuration, which is used to configure the DID required for reading various information; the fault and pressure test parameter configuration, which is used to configure the high and low pressures and the packet size of the fault injection, and the number of rounds of the pressure test; the wake-up method configuration, which is used to configure whether the controller is woken up by KL15 or CAN.
[0080] In a specific implementation, the above-mentioned device obtains target flashing parameters from a preset flashing parameter library according to the type of the controller to be tested, ensuring that the flashing process matches the specific requirements of the controller. For example, for an engine controller of a certain model, the above-mentioned device will automatically select the corresponding flashing file and boot file, and adopt an appropriate unlocking algorithm, such as Unified Diagnostic Services (UDS), to execute the flashing steps, thereby completing the firmware update.
[0081] Step S32: Obtain the communication protocol corresponding to the controller type, and determine the target communication parameters corresponding to the controller to be tested according to the controller type and the communication protocol;
[0082] It should be noted that the above-mentioned communication protocol can be a set of rules that define the format and process of data communication, such as CAN, Local Interconnect Network (LIN), and FlexRay communication protocols, etc. The above-mentioned target communication parameters can be specific parameters configured for effective communication, such as baud rate (data transmission rate), frame format (structure of data packets), identifier (used to identify the type of data packets), etc.
[0083] In a specific implementation, the above-mentioned device first identifies the type of the controller to be tested, and then obtains the communication protocol corresponding to this type of controller, such as CAN or LIN. The communication protocol is the rules and standards for information exchange between controllers. The above-mentioned device determines the target communication parameters according to the controller type and the selected communication protocol. These parameters include baud rate, frame format, identifier, etc., which are the keys to ensuring smooth communication. For example, for the engine control unit of a car, the above-mentioned device may configure a baud rate of 1 Mbps for the CAN protocol and set a specific identifier to exchange engine status data. In this way, the above-mentioned device can ensure the establishment of a correct communication connection with the controller to be tested, laying a solid foundation for subsequent testing and diagnosis.
[0084] Step S33: Determine the target configuration parameters corresponding to the controller to be tested based on the target communication parameters and the target flashing parameters.
[0085] In a specific implementation, the above-mentioned device uses the target communication parameters and the target flashing parameters to determine the target configuration parameters of the controller to be tested. These parameters include communication rate, programming mode, memory mapping, etc. For example, for the flashing of an engine control unit, the above-mentioned device will set an appropriate baud rate according to the CAN protocol and select the correct programming mode according to the flashing parameters to ensure that the configuration parameters meet the flashing requirements.
[0086] Further, the step of determining the target communication parameters corresponding to the controller to be tested according to the controller type and the communication protocol includes:
[0087] Determine the communication rate, communication address, and addressing method corresponding to the controller to be tested based on the controller type;
[0088] Determine the target communication parameters corresponding to the controller to be tested according to the communication rate, the communication address, the addressing method, and the communication protocol.
[0089] It should be noted that the above communication rate can be the speed of data transmission, such as the baud rate. The above communication address can be the unique identifier of the controller in the network. The above addressing method can refer to how to specify the recipient during data transmission, such as broadcast or point-to-point.
[0090] In a specific implementation, in the above test process, the device first determines the corresponding communication rate, communication address, and addressing method based on the type of the controller to be tested. For example, for an engine control unit of a car, the device may set a communication rate of 1 Mbps, allocate a specific CAN bus address, and select a point-to-point addressing method. Subsequently, the device determines the target communication parameters according to this information and the communication protocol (such as CAN or LIN), which includes but is not limited to frame format, message identifier, error handling mechanism, etc. Through such configuration, the device ensures that a stable and efficient communication connection can be established with the controller to be tested, laying a solid foundation for subsequent flashing tests and function verification.
[0091] In addition, to facilitate the user to read the flashing test result, after the step of performing the flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario, it further includes:
[0092] Obtain the flashing test result corresponding to the controller to be tested;
[0093] Determine a test report template based on the controller type and the test type, and generate a flashing test report corresponding to the controller to be tested based on the flashing test result and the test report template.
[0094] It should be noted that the above flashing test result can be a direct reflection of the functionality and reliability of the controller under specific test conditions, such as the performance data, error logs, and the result of the success or failure status of the controller during the flashing process. The above test report template can be a preset document format for standardizing the presentation of test results.
[0095] In a specific implementation, after the above device completes the flashing test of the controller to be tested, it first obtains the flashing test results, which include the performance data, error logs, and success or failure status of the controller during the flashing process. For example, for the flashing test of an engine control unit, the above device will select a template that includes engine-related parameters and flashing steps.
[0096] Finally, based on the flashing test results and the selected test report template, the above device generates a flashing test report corresponding to the controller to be tested. This report details the execution process of the test, result analysis, any abnormal situations that occurred, and possible fault diagnoses. For example, the report may indicate that a data transmission error occurred at a specific time point during the flashing of the engine control unit, and provides the error code and suggestions for solution. In this way, the above device not only completes the test of the controller, but also provides detailed documentation for the user to analyze and troubleshoot subsequent faults.
[0097] This embodiment also provides a first embodiment of a flashing test device. Please refer to Figure 4 , Figure 4 which is the flashing test device diagram provided by the embodiment of the present application. The flashing test device includes:
[0098] A determination module, configured to determine the controller type and test type of the controller to be tested;
[0099] A configuration module, configured to select a target test process from a preset test process according to the controller type and the test type, and select a target configuration scenario from a preset configuration scenario according to the controller type and the test type;
[0100] A test module, configured to determine target configuration parameters based on the controller type, and perform a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario.
[0101] The determination module is further configured to obtain the controller number of the controller to be tested, and obtain the corresponding controller type of the controller to be tested from a preset rule library based on the controller number; determine the corresponding function type of the controller to be tested according to the controller type, and determine the corresponding test type of the controller to be tested according to the function type;
[0102] The configuration module is further configured to select configurable scenarios from a preset configuration scenario based on the controller type; determine the fault type and fault parameters according to the test type, and select a target configuration scenario from the configurable scenarios according to the fault type and the fault parameters.
[0103] Based on the first embodiment of the flashing test device described above, a second embodiment of the flashing test device is also proposed in this embodiment. For the same or similar content as the first embodiment of the flashing test device described above, reference can be made to the above introduction and will not be elaborated hereinafter.
[0104] The test module is further configured to obtain target flashing parameters from a preset flashing parameter library based on the controller type; obtain the communication protocol corresponding to the controller type, and determine the target communication parameters corresponding to the controller to be tested according to the controller type and the communication protocol; determine the target configuration parameters corresponding to the controller to be tested based on the target communication parameters and the target flashing parameters;
[0105] The test module is further configured to determine the communication rate, communication address, and addressing mode corresponding to the controller to be tested based on the controller type; determine the target communication parameters corresponding to the controller to be tested according to the communication rate, the communication address, the addressing mode, and the communication protocol;
[0106] The test module is further configured to obtain the flashing test result corresponding to the controller to be tested; determine a test report template based on the controller type and the test type, and generate a flashing test report corresponding to the controller to be tested based on the flashing test result and the test report template.
[0107] The flashing test device provided in this embodiment adopts the flashing test method in the above embodiment, and can solve the technical problem that the prior art needs to modify the code accordingly when performing diversified tests, thereby increasing the complexity of the test. Compared with the prior art, the beneficial effects of the flashing test device provided in this embodiment are the same as those of the flashing test method provided in the above embodiment, and the other technical features in the flashing test device are the same as the features disclosed in the method of the above embodiment, and will not be elaborated herein.
[0108] This embodiment provides a flashing test device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to perform the steps of the flashing test method described above.
[0109] Next, refer to Figure 5 , Figure 5It is a schematic structural diagram of a flashing test device suitable for implementing the embodiments of the present application. Among them, the storage device in the figure is the register in this embodiment. The flashing test device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The flashing test device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0110] As Figure 5 shown, the flashing test device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the flashing test device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the flashing test device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a flashing test device with various systems, it should be understood that it is not required to implement or have all the systems shown. Instead, more or fewer systems may be implemented or had.
[0111] In particular, according to this embodiment, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, this embodiment includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods disclosed in this embodiment are performed.
[0112] The flashing test device provided in this embodiment adopts the flashing test method in the above-mentioned embodiment, and can solve the technical problem that in the prior art, corresponding modifications need to be made to the code when performing diversified tests, thus increasing the complexity of the test. Compared with the prior art, the beneficial effects of the flashing test device provided in this embodiment are the same as those of the flashing test method provided in the above-mentioned embodiment, and other technical features in the flashing test device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0113] It should be understood that the various parts disclosed in this embodiment can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0114] As mentioned above, the above is only the specific implementation manner of this embodiment, but the protection scope of this embodiment is not limited thereto. Any person skilled in the art within the technical scope disclosed in this embodiment can easily think of changes or substitutions, which should all be covered by the protection scope of this embodiment. Therefore, the protection scope of this embodiment should be subject to the protection scope of the claims.
[0115] This embodiment provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to perform the flashing test method in the above-mentioned embodiment.
[0116] The computer-readable storage medium provided in this embodiment can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0117] The above computer-readable storage medium can be included in the flashing test device; it can also exist independently without being assembled into the flashing test device.
[0118] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the flashing test device, the flashing test device is caused to: perform a flashing test.
[0119] Computer program code for performing the operations of this embodiment can be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this embodiment. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0121] The modules described in this embodiment can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0122] The readable storage medium provided in this embodiment is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned flashing test method, aiming to solve the technical problem that the prior art needs to modify the code during diversified testing, thus increasing the complexity of testing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as those of the flashing test method provided in the above embodiment, and will not be elaborated here.
[0123] This embodiment also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the flashing test method as described above.
[0124] The computer program product provided in this embodiment can solve the technical problem that the prior art needs to modify the code during diversified testing, thus increasing the complexity of testing. Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as those of the flashing test method provided in the above embodiment, and will not be elaborated here.
[0125] The above are only partial embodiments, and thus do not limit the patent scope of this embodiment. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A flashing test method, characterized in that, The method includes: Determining the controller type and test type of the controller to be tested; Selecting a target test process from a preset test process according to the controller type and the test type, and selecting a target configuration scenario from a preset configuration scenario according to the controller type and the test type; Determining target configuration parameters based on the controller type, and performing a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario.
2. The method according to claim 1, wherein The step of determining the controller type and test type of the controller to be tested includes: Obtaining the controller number of the controller to be tested, and obtaining the corresponding controller type of the controller to be tested from a preset rule library based on the controller number; Determining the corresponding function type of the controller to be tested according to the controller type, and determining the corresponding test type of the controller to be tested according to the function type.
3. The method according to claim 1, wherein The step of selecting a target configuration scenario from a preset configuration scenario according to the controller type and the test type includes: Selecting configurable scenarios from a preset configuration scenario based on the controller type; Determining the fault type and fault parameters according to the test type, and selecting a target configuration scenario from the configurable scenarios according to the fault type and the fault parameters.
4. The method according to claim 1, wherein The step of determining target configuration parameters based on the controller type includes: Obtaining target flashing parameters from a preset flashing parameter library based on the controller type; Obtaining the communication protocol corresponding to the controller type, and determining the corresponding target communication parameters of the controller to be tested according to the controller type and the communication protocol; Determining the corresponding target configuration parameters of the controller to be tested based on the target communication parameters and the target flashing parameters.
5. The method according to claim 4, wherein The step of determining the corresponding target communication parameters of the controller to be tested according to the controller type and the communication protocol includes: Determining the communication rate, communication address, and addressing method corresponding to the controller to be tested based on the controller type; Determining the corresponding target communication parameters of the controller to be tested according to the communication rate, the communication address, the addressing method, and the communication protocol.
6. The method according to claim 1, characterized in that, After the step of performing a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario, it further includes: Obtaining the flashing test result corresponding to the controller to be tested; Determining a test report template based on the controller type and the test type, and generating a flashing test report corresponding to the controller to be tested based on the flashing test result and the test report template.
7. A flashing test device, characterized in that, The device includes: A determination module for determining the controller type and test type of the controller to be tested; A configuration module for selecting a target test process from a preset test process according to the controller type and the test type, and selecting a target configuration scenario from a preset configuration scenario according to the controller type and the test type; A test module for determining target configuration parameters based on the controller type, and performing a flashing test on the controller to be tested based on the target configuration parameters, the target test process, and the target configuration scenario.
8. A flashing test device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the flashing test method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the flashing test method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the flashing test method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Fault injection test method and device, electronic equipment and storage medium
CN121165687A