Test system and test method

By setting a data selector between the vehicle's CAN signal bus and the CAN bus test board, the connection relationship between the CAN signal channel is automatically converted, and the problems of low testing efficiency and high cost in CAN bus testing are solved, and an efficient and automated testing process is achieved.

CN119882686AActive Publication Date: 2025-04-25CHONGQING CHANGAN TECH CO LTD
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202510040021.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-25
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

In the CAN bus communication test of the vehicle, due to the limited number of input CAN ports of the CAN bus test board, the testers need to frequently replace the test script and connection relationship, which reduces the testing efficiency and increases the cost.

Method used

By setting a data selector between the CAN signal bus of the vehicle and the CAN bus test board, the connection relationship between multiple CAN signal channels and the CAN bus test board is automatically converted according to the characteristics of the test case, and the signal path is automatically selected.

Benefits of technology

The equipment channel of the test board is not required to frequently replace the test board, which reduces the cost of the test system, improves the testing efficiency of the vehicle, and improves the automation rate of automated tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119882686A_ABST
    Figure CN119882686A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test system and a test method. The test system is used for testing a vehicle, the vehicle comprises a central control unit and a vehicle control unit, the vehicle control unit comprises a CAN signal bus and a plurality of CAN signal channels, the test system comprises a data selector, the data selector comprises a plurality of input ends and at least one output end, and the input ends are correspondingly connected with the CAN signal channels respectively; the CAN bus test board card comprises at least one test channel which is connected with at least one output end of the data selector, and the number of the at least one test channel is smaller than that of the CAN signal channels; and the equipment controller is connected with the data selector and is used for controlling the connection relationship between a plurality of input ends and output ends in the data selector according to the type of the target CAN signal indicated by the current test case when the vehicle is tested, so that the target CAN signal channel in the plurality of CAN signal channels is communicated with the CAN bus test board card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle testing technology, and in particular to a testing system and a testing method. Background Art

[0002] During the vehicle's research and development and production process, the vehicle needs to be subjected to bench simulation testing. This process requires the use of test equipment to simulate the changes in CAN bus signals generated by each node of the vehicle to determine whether the two-way communication connection between the vehicle's cockpit central control unit and the vehicle control unit is working properly.

[0003] The two-way communication test between the vehicle cockpit central control unit and the vehicle control unit is usually carried out by relying on a test system. The CAN bus test equipment is an important part of the test system, which is connected to the CAN bus of the vehicle control unit. During the test, the test program or test script is first used to simulate the operation of the vehicle central control unit, such as simulating the adjustment of the air volume of the air conditioner on the central control screen. The vehicle control unit responds to the above-mentioned simulated operation of the central control unit and sends a signal to the corresponding electrical component (such as in the air conditioning system) through the target CAN signal channel; the CAN bus test board monitors the target CAN signal channel to obtain the control signal sent by the vehicle control unit, thereby determining whether the communication between the vehicle central control unit and the vehicle controller is normal.

[0004] There are usually many types of electrical parts in the vehicle, and these electrical parts are connected to the vehicle control unit through the CAN signal channel, which leads to a large number of channels in the vehicle's CAN bus; when performing communication tests, these CAN signal channels need to be tested one by one to ensure that each signal channel works properly. The above test is usually carried out using a CAN bus test board, which has a high cost and a small number of input CAN ports configured therefor (for example, including 2 CAN ports). The number of CAN signal channels involved in the test is large, which requires the tester to manually switch the test script, determine the CAN signal channel required for the script according to the test case, and replace the connection relationship between the test board and different CAN signal channels, which leads to low test efficiency and easy missed detection. Summary of the invention

[0005] The present application provides a test system and a test method. The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, a test system is provided for testing a vehicle, wherein the vehicle comprises a central control unit and a vehicle control unit, the central control unit being connected to the vehicle control unit, the vehicle control unit comprising a CAN signal bus, the CAN signal bus comprising a plurality of CAN signal channels arranged corresponding to a plurality of electronic devices in the vehicle, the test system comprising: a data selector comprising a plurality of input terminals and at least one output terminal, the plurality of input terminals being respectively connected corresponding to the plurality of CAN signal channels; a CAN bus test board comprising at least one test channel connected to the at least one output terminal of the data selector, the number of the at least one test channel being less than the number of the plurality of CAN signal channels; a device controller connected to the data selector, for controlling the connection relationship between the plurality of input terminals and the at least one output terminal in the data selector when testing the vehicle, according to the type of the target CAN signal indicated by the current test case, so that a target CAN signal channel among the plurality of CAN signal channels is connected to the CAN bus test board; wherein the target CAN signal channel corresponds to the type of the target CAN signal.

[0007] According to the above technical means, by setting a data selector between the vehicle's CAN signal bus and the CAN bus test board, the connection relationship between multiple CAN signal channels and the CAN bus test board is automatically converted according to the characteristics of the test case. When using a CAN bus test board with fewer input channels to test multiple CAN signal channels, there is no need to frequently change the device channels of the test board, which can reduce the cost of the test system and improve the testing efficiency of the vehicle.

[0008] In some embodiments, the test system also includes: a host computer, connected to the device controller and the CAN bus test board, used to parse the current test case, extract the type of target CAN signal involved in the current test case, and generate a first control command according to the type of the target CAN signal; the device controller is also used to: receive and decode the first control command to determine the target address code; the data selector is used to: adjust the connection relationship between the multiple input terminals and the at least one output terminal according to the target address code, so that the target CAN signal channel is connected to the CAN bus test board.

[0009] According to the above technical means, the host computer is used to automatically parse the test cases, and the device controller is used to automatically control the data selector according to the type of target CAN signals involved in the test cases, so as to realize automatic switching of the connection relationship between the CAN bus test board and multiple CAN signal channels, thereby achieving the effect of automatically selecting the signal path and improving the test efficiency.

[0010] In some embodiments, the device controller includes a data register and a control processor; the data register is used to: store the mapping relationship between the multiple CAN signal channels and the corresponding address codes; the control processor is used to: decode the first control command, and, according to the target CAN signal channel indicated by the first control command, query the mapping relationship and determine that the address code corresponding to the target CAN signal channel is the target address code.

[0011] According to the above technical means, by pre-setting the correspondence parameters between the CAN signal and the corresponding address code value according to the pins connected to different CAN signals, during the test process, after entering the test case, the address code is directly assigned according to the mapping relationship, thereby improving the switching efficiency of the connection relationship between the CAN bus test board and multiple CAN signal channels.

[0012] In some embodiments, the host computer is also used to: parse the current test case to determine the type and related parameters of the current test case; generate a target test script based on the type and related parameters of the current test case; call the target test script for test verification and determine the test results.

[0013] According to the above technical means, by pre-setting the test script template in the host computer, when testing, it is only necessary to parse the current test case and write the relevant parameters of the case into the script template to obtain the corresponding target test script. When testing based on this technical solution, there is no need to repeatedly write the test script, which can improve the test efficiency.

[0014] In some embodiments, the types of test cases include monitoring test cases and setting test cases, and the host computer stores a first test script template and a second test script template corresponding to the monitoring test cases and the setting test cases, respectively; the host computer is also used to: call a target test script template corresponding to the type of the current test case according to the type of the current test case and the relevant parameters, and the target test script template is one of the first test script template and the second test script template; write the relevant parameters into the target test script template to obtain the target test script.

[0015] According to the above-mentioned technical means, by pre-setting the first test script template and the second test script template for different test case types in the host computer, the pre-stored script templates are assigned values ​​according to the different types of test cases to obtain the corresponding target test scripts. This technical solution is simple to operate and can improve testing efficiency.

[0016] In some embodiments, the test system also includes a bus transceiver device, which is connected to the host computer and the CAN signal bus, and the host computer is also connected to the central control unit; the host computer is also used to: when the current test case is the monitoring test case, send the value of the target CAN signal to the target CAN signal channel through the bus transceiver device; after a first delay time, receive a return signal sent by the central control unit; determine the test result based on the return signal; and, when the current test case is the setting test case, send an interface signal value to the central control unit; after a second delay time, determine the signal value of the target CAN signal channel through the CAN bus test board 12; determine the test result based on the signal value in the target CAN signal channel.

[0017] According to the above technical means, the host computer is set to be connected to the central control unit, and a bus transceiver is set in the test system. Depending on the type of test case, the value of the target CAN signal is sent through the bus transceiver or the interface signal value is sent to the central control unit. The test result is determined based on the return signal or the signal value in the target CAN signal channel, thereby realizing automated testing for different types of test cases.

[0018] In some embodiments, the host computer is also used to: determine the consistency between the return signal or the signal value of the target CAN signal channel and the expected result of the current test case; when the return signal or the signal value of the target CAN signal channel is consistent with the expected result of the current test case, determine that the current test case has passed the test, and output the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel; and, when the return signal or the signal value of the target CAN signal channel is inconsistent with the expected result of the test case, determine that the current test case has not passed the test, output the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel, and save the case information of the current test case and the test result.

[0019] According to the above technical means, the test result is determined based on the consistency between the return signal or the signal value in the target CAN signal channel and the expected result of the test case, and the test result and the intermediate result of the test are automatically output and saved, which can improve the automation rate of the test.

[0020] In a second aspect, a test method is provided, which is applied to a test system, wherein the test system is used to test a vehicle, wherein the vehicle includes a central control unit and a vehicle control unit, the central control unit is connected to the vehicle control unit, the vehicle control unit includes a CAN signal bus, and the CAN signal bus includes a plurality of CAN signal channels corresponding to a plurality of electronic devices in the vehicle, and the test system includes: a data selector, including a plurality of input terminals and at least one output terminal, wherein the plurality of input terminals are respectively connected to the plurality of CAN signal channels; a CAN bus test board, including at least one signal channel, connected to the at least one output terminal of the data selector, and the number of the at least one signal channel is less than the number of the plurality of CAN signal channels; a device controller, connected to the data selector; the method includes: when testing the vehicle, according to the type of the target CAN signal indicated by the current test case, controlling the connection relationship between the plurality of input terminals and the at least one output terminal in the data selector through the device controller, so that a target CAN signal channel among the plurality of CAN signal channels is connected to the CAN bus test board; wherein the target CAN signal channel corresponds to the type of the target CAN signal.

[0021] In some embodiments, the test system also includes a host computer, which is connected to the device controller and the CAN bus test board; the method also includes: using the host computer to parse the current test case, extracting the type of target CAN signal involved in the current test case, and generating a first control command according to the type of the target CAN signal; using the device controller to receive and decode the first control command to determine the target address code; using the data selector to adjust the connection relationship between the multiple input terminals and the at least one output terminal according to the target address code, so that the target CAN signal channel is connected to the CAN bus test board.

[0022] In some embodiments, the device controller includes a data register and a control processor, and the method further includes: using the data storage device to store the mapping relationship between the multiple CAN signal channels and the corresponding address codes; using the control processor to decode the first control command, and, according to the target CAN signal channel indicated by the first control command, querying the mapping relationship to determine that the address code corresponding to the target CAN signal channel is the target address code. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic structural diagram of a test system provided in one embodiment of the present application;

[0024] Figure 2A schematic structural diagram of a test system provided in another embodiment of the present application;

[0025] Figure 3 is a schematic flow chart of a testing method provided in an embodiment of the present application;

[0026] Figure 4 It is a schematic flow chart of a testing method provided in another embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0028] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application. Before introducing the technical solution of the embodiment of the present application, the test method used in the related art for performing a two-way communication test on the vehicle's computer and the problems existing therein are first described in detail with examples.

[0030] During the vehicle's research and development and production process, the vehicle needs to be subjected to bench simulation testing. This process requires the use of test equipment to simulate the changes in CAN bus signals generated by each node of the vehicle to determine whether the two-way communication connection between the vehicle's cockpit central control unit and the vehicle control unit is working properly.

[0031] The vehicle control unit (VIU) in the vehicle is a controller that integrates vehicle control and air conditioning control lights. It communicates with various electronic devices in the vehicle through the CAN bus to detect the vehicle's status information and collect the working status of each control unit. When performing vehicle testing tasks, the central control unit in the cockpit usually communicates with the vehicle control unit through the DDS service, and the vehicle control unit communicates with the controller of the entire vehicle through the CAN bus.

[0032] The two-way communication test between the vehicle cockpit central control unit and the vehicle control unit is usually carried out by a test system. The CAN bus test equipment is an important part of the test system, which is connected to the CAN bus of the vehicle control unit. During the test, the operation of the vehicle central control unit is simulated by a test program or a test script, such as simulating the adjustment of the air volume of the air conditioner on the central control screen. The vehicle control unit responds to the above-mentioned simulated operation of the central control unit and sends a signal to the corresponding electrical component (such as in the air conditioning system) through the target CAN signal channel; the CAN bus test board monitors the target CAN signal channel and obtains the control signal sent by the vehicle control unit, thereby determining whether the communication between the vehicle central control unit and the vehicle controller is normal.

[0033] Vehicles are usually equipped with various types of electrical components, which are all connected to the vehicle control unit through CAN signal channels, which leads to a large number of channels in the vehicle's CAN bus. When conducting communication tests, these CAN signal channels need to be tested one by one to ensure that each signal channel works properly.

[0034] As mentioned above, the above test is usually performed using a CAN bus test board, which is expensive and usually has a small number of input CAN ports (e.g., 2 CAN ports). The number of CAN signal channels involved in the test is large, which requires the tester to manually switch the test script, determine the CAN signal channel required for the script according to the test case, and replace the connection relationship between the test board and different CAN signal channels, which results in low test efficiency and easy missed detection.

[0035] In view of the above situation, the embodiment of the present application provides a test system and a test method to solve the above problem. The technical solution provided by the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.

[0036] Figure 1 is a schematic structural diagram of the test system provided in the embodiment of the present application. For ease of understanding, Figure 1 Also shown are some components of a vehicle 20 to which the test system 10 is applied. Figure 1As shown, the vehicle 20 includes a central control unit 21 and a vehicle control unit 22 .

[0037] The central control unit 21 is connected to the vehicle control unit 22, and can receive user operations and send control signals to the vehicle control unit 22. The vehicle control unit 22 is connected to the electronic devices in the vehicle to control them. For example, the user can adjust the air-conditioning temperature by adjusting the knob or sliding on the touch screen of the vehicle; at the same time, the central control unit 21 can also detect the operation of the vehicle through the vehicle control unit 22, for example, the remaining power of the vehicle battery can be displayed on the vehicle dashboard.

[0038] The vehicle control unit 22 includes a CAN signal bus 221 including a plurality of CAN signal channels 2211. The number of the plurality of CAN signal channels 2211 is not less than the number of electronic devices controlled by the vehicle control unit 22.

[0039] In some embodiments, the central control unit 21 and the vehicle control unit 22 are connected via DDS communication.

[0040] The test system 10 includes a data selector 11, a CAN bus test board 12, and a device controller 13. The data selector 11 includes a plurality of input terminals 111 and at least one output terminal 112, and the plurality of input terminals 111 are respectively connected to a plurality of CAN signal channels 2211; that is, the number of the input terminals 111 of the data selector 11 is the same as the number of the plurality of CAN signal channels 2211. The CAN bus test board 12 includes at least one signal channel 121, which is connected to at least one output terminal 112 of the data selector 11, and the number of the at least one test channel 121 of the CAN bus test board 12 is less than the number of the plurality of CAN signal channels 2211.

[0041] In some embodiments, the CAN bus test board 12 may be a Zhou Ligong CAN test card.

[0042] The device controller 13 is connected to the data selector 11, and is used to control the connection relationship between the multiple input terminals 111 and the at least one output terminal 112 in the data selector 11 according to the type of the target CAN signal indicated by the current test case when testing the vehicle, so that the target CAN signal channel in the multiple CAN signal channels 2211 is connected to the CAN bus test board 12. The target CAN signal channel corresponds to the type of the target CAN signal.

[0043] The connection relationship between the multiple input terminals 111 and at least one output terminal 112 includes whether each input terminal among the multiple input terminals 112 is connected to the output terminal, or in other words, whether a target input terminal among the multiple input terminals is connected to the output port.

[0044] For example, when the target CAN signal indicated by the test case is an auxiliary driving bus signal, it corresponds to the third input terminal D3 of the data selector 11. The device controller 13 controls the D3 port of the data selector 11 to be connected with the output port 112 of the data selector 11, so that the auxiliary driving bus is connected with the CAN bus test board 12 through the data selector 11.

[0045] When the type of the target CAN signal indicated by the test case changes, the device controller 13 re-determines, according to the type of the target CAN signal, that one of the multiple input terminals 111 of the data selector 11 corresponding to the type of the target CAN signal is connected to the output port 112 of the data selector 11, thereby achieving the effect of selecting the signal path.

[0046] According to the above technical means, by setting a data selector between the vehicle's CAN signal bus and the CAN bus test board, the connection relationship between multiple CAN signal channels and the CAN bus test board is automatically converted according to the characteristics of the test case. When using a CAN bus test board with fewer input channels to test multiple CAN signal channels, there is no need to frequently change the device channels of the test board, which can reduce the cost of the test system and improve the testing efficiency of the vehicle.

[0047] In some embodiments, continue to refer to Figure 1 The test system 10 further includes a host computer 14, which is connected to the device controller 13 and the CAN bus test board 12. The host computer 14, the device controller 13 and the CAN bus test board 12 can be connected via a serial port.

[0048] The host computer 14 is used to parse the current test case, extract the type of the target CAN signal involved in the current test case, and generate a first control command according to the type of the target CAN signal.

[0049] The device controller 13 can receive the first control command sent by the host computer 14, decode it, and determine the target address code.

[0050] The data selector 11 is used to receive the target address code sent by the device controller 13, and adjust the connection relationship between multiple input terminals and at least one output terminal according to the target address code, and connect the target CAN signal channel with the CAN bus test board 12.

[0051] In some implementations, the current test case is an xlsx file, which is usually in the form of a table. The host computer 14 can parse the table and extract valid parameters therein. The above-mentioned valid parameters include the type of CAN signal corresponding to the current test case, etc.

[0052] In some embodiments, the target address code is a set of binary numbers, and different combinations of 0 and 1 represent different input terminals in the data selector 11. The number of bits n of the binary number is related to the number k of the input terminals of the data selector 11, and the number of bits n of the address code at least meets the following conditions: n ≤k.

[0053] For example, a digital selector has eight input signal variables, three input selection signals, and one output variable; the three input selection signals are used to select and output the eight input signals. In a digital circuit, the three input selection signals are assigned 0 or 1 respectively, and the output signal is selected by different combinations of 0 and 1 of the three signals. For example, the input signal in the test case is PTCAN, and the input pin it is connected to is D3, so the address code ABC is assigned 011.

[0054] According to the above technical means, the host computer is used to automatically parse the test cases, and the device controller is used to automatically control the data selector according to the type of target CAN signals involved in the test cases, so as to realize automatic switching of the connection relationship between the CAN bus test board and multiple CAN signal channels, thereby achieving the effect of automatically selecting the signal path and improving the test efficiency.

[0055] In some embodiments, the device controller 13 includes a data storage device and a control processor, wherein the data storage device is used to store received commands and parameters, wherein a mapping relationship between multiple CAN signal channels 2211 and corresponding address codes is stored; the control processor is used to decode the first control command and further control the data selector 11.

[0056] The aforementioned determination of the target address code includes: querying a mapping relationship according to the target CAN signal channel indicated by the first control command, and determining that the address code corresponding to the target CAN signal channel is the target address code.

[0057] Table 1 shows the mapping relationship between the CAN signal channel and the address code in the above example when the data selector 11 has eight input signal variables. A, B and C are the address codes respectively, and the outputs D0-D7 in Table 1 correspond to the eight input terminals of the data selector 11 respectively.

[0058] As shown in Table 1, if the address code ABC is assigned a value of 011, the corresponding output is D3. At this time, the D3 pin of the data selector 11 is connected to the output end of the data selector 11.

[0059] Table 1

[0060]

[0061] According to the above technical means, by pre-setting the correspondence parameters between the CAN signal and the corresponding address code value according to the pins connected to different CAN signals, during the test process, after entering the test case, the address code is directly assigned according to the mapping relationship, thereby improving the switching efficiency of the connection relationship between the CAN bus test board and multiple CAN signal channels.

[0062] In some embodiments, the host computer 14 is also used to: parse the current test case to determine the type and related parameters of the current test case; generate a target test script based on the type and related parameters of the current test case; and call the target test script for test verification to determine the test results.

[0063] In the embodiment of the present application, different test script templates are stored in the host computer 14, which may correspond to different verification methods or different CAN signal types. The host computer 14 parses the received current test case, determines the type of the test case, selects the corresponding test script template according to the type, writes the relevant parameters into the script template, and completes the assignment of the relevant parameters.

[0064] According to the above technical means, by pre-setting the test script template in the host computer, when testing, it is only necessary to parse the current test case and write the relevant parameters of the case into the script template to obtain the corresponding target test script. When testing based on this technical solution, there is no need to repeatedly write the test script, which can improve the test efficiency.

[0065] Since the central control unit 21 and the vehicle control unit 22 are in two-way communication, they are the transmitter and receiver of each other. Therefore, two verification methods are required when performing automated testing: one is to simulate the change of clicking the central control screen through the interface information provided by the developer, thereby controlling the bus signal change of the vehicle control unit 22, and then controlling the setting class of the lower pendant; the other is to monitor the change of the corresponding control of the central control screen caused by the device simulating the bus signal change of the lower pendant of the vehicle control unit 22.

[0066] In some embodiments of the present application, the types of test cases include monitoring test cases and setting test cases, and the host computer 14 stores a first test script template and a second test script template corresponding to the monitoring test cases and the setting test cases, respectively.

[0067] The host computer 14 is also used to call a target test script template corresponding to the type of the current test case according to the type and related parameters of the current test case, and write the related parameters into the target test script template to obtain the target test script, wherein the target test script template is one of the first test script template and the second test script template.

[0068] According to the above-mentioned technical means, by pre-setting the first test script template and the second test script template for different test case types in the host computer, the pre-stored script templates are assigned values ​​according to the different types of test cases to obtain the corresponding target test scripts. This technical solution is simple to operate and can improve testing efficiency.

[0069] As mentioned above, test cases are divided into monitoring test cases and setting test cases. Among them, monitoring test cases are used to test the one-way communication from the vehicle control unit 22 to the central control unit 21, and setting test cases are used to test the one-way communication from the vehicle central control unit 21 to the vehicle control unit 22. The above two types of test cases correspond to different test methods. For example, for monitoring test cases, it is necessary to input the bus signal into the target CAN signal channel, and then detect the response of the central control unit 21; for another example, for setting test cases, it is necessary to operate in the central control unit 21 or simulate the operation through other external devices, and then use the CAN bus test board 12 to detect the response in the corresponding target CAN signal channel.

[0070] In the embodiment of the present application, the test system 10 further includes a bus transceiver 15, which is connected to the host computer 14 and the CAN signal bus, and the host computer 14 is also connected to the central control unit 21. The host computer 14 is connected to the bus transceiver 15 via a serial port, and is connected to the central control unit 21 via DDS communication.

[0071] The host computer 14 is also used to: when the current test case is a monitoring test case, send the value of the target CAN signal to the target CAN signal channel through the bus transceiver device 15, and after the first delay time, receive the return signal sent by the central control unit 21; determine the test result according to the return signal. And, when the current test case is a setting test case, send the interface signal value to the central control unit 21, and after the second delay time, determine the signal value of the target CAN signal channel through the CAN bus test board 12; determine the test result according to the signal value in the target CAN signal channel.

[0072] The first delay time and the second delay time are not limited in the embodiment of the present application, and can be determined according to the different target CAN signal channels or the communication rate of the vehicle bus. The first delay time and the second delay time can be the same or different, and the embodiment of the present application does not limit this.

[0073] The above process is described in more detail below with an example. When testing the CAN signal channel of the vehicle's air-conditioning system, a signal representing the current air-conditioning temperature is sent to its corresponding target CAN signal channel through the bus transceiver device 15; when the one-way communication from the vehicle control unit 22 to the central control unit 21 is normal, the central control unit 21 will receive the signal, and send a response message within a certain period of time (for example, 20ms) and display the current air-conditioning temperature on the vehicle's vehicle screen or instrument screen. The above response message is used to indicate that the central control unit 21 can correctly receive the above target CAN signal. Within the delay time of 20ms after sending the above target CAN signal, if the host computer 14 can receive the return signal sent by the central control unit 21, and the signal is consistent with the expected result, it is determined that the test is successful. If the host computer 14 fails to receive or receives an erroneous signal, it means that the test has failed.

[0074] According to the above technical means, the host computer is set to be connected to the central control unit, and a bus transceiver is set in the test system. Depending on the type of test case, the value of the target CAN signal is sent through the bus transceiver or the interface signal value is sent to the central control unit. The test result is determined based on the return signal or the signal value in the target CAN signal channel, thereby realizing automated testing for different types of test cases.

[0075] In some embodiments, the host computer 14 is further used to determine the consistency between the return signal or the signal value of the target CAN signal channel and the expected result of the test case.

[0076] When the signal value of the return signal or the target CAN signal channel is consistent with the expected result of the current test case, the current test case is determined to have passed, and the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel are output.

[0077] When the signal value of the return signal or the target CAN signal channel is inconsistent with the expected result of the test case, it is determined that the current test case has not passed the test, and the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel are output, and the case information and test result of the current test case are saved.

[0078] It is understandable that when the current test case is a monitoring test case, the above consistency determination is performed based on the return result of the central control unit 21. If it is consistent with the expected result of the current test case, it is determined that the current test case has passed the test. The host computer 14 can output the result of the above successful test (for example, print the result of the successful test), and the host computer 14 also needs to output the test result of the current test case, the value of the target CAN signal, and the signal value of the return signal or save them in the storage space of the host computer 14. If the above return result is inconsistent with the expected result or the return result is not received, it is determined that the current test has not passed, and the host computer 14 also needs to output the result of the failed test, and save the use case information and test results of the current test case.

[0079] When the current test result is a setting test case, the consistency judgment is based on the signal value of the target CAN signal channel. If it is consistent with the expected result of the current test case, it is determined that the current test case has passed. The host computer 14 can output the result of the above test success. At the same time, the host computer 14 saves the test result of the current test case and the signal value of the target CAN signal channel; if the signal value of the above target CAN signal channel is inconsistent with the expected result or the CAN bus test board 12 does not receive the signal value, it is determined that the current test has failed. The host computer 14 also needs to output the result of the test failure and save the case information and test result of the current test case.

[0080] According to the above technical means, the test result is determined based on the consistency between the return signal or the signal value in the target CAN signal channel and the expected result of the test case, and the test result and the intermediate result of the test are automatically output and saved, which can improve the automation rate of the test.

[0081] In some embodiments, the host computer 14 is also used to: execute multiple test cases in sequence, save the test results and related information of each test case in the storage space of the host computer 14, and form a test result table; after traversing all test cases, call the test result table in the storage space and output it, and the result table includes at least the case number, test name, test results, whether the bus and interface signals are sent or received successfully, and other test related information.

[0082] According to the above technical means, the host computer is used to execute multiple test cases in sequence to realize automated testing of the central control unit and the vehicle control unit, thereby eliminating the need to manually switch test scripts after executing a test script; based on the test results and test-related information in the test result table, the two-way communication failure between the central control unit and the vehicle control unit can be quickly located.

[0083] Combination of the above Figure 1 and Figure 2 , describes in detail the device embodiment of the present application, and will now be combined with Figure 3 and Figure 4 , the method embodiment of the present application is described in detail. It should be understood that the method embodiment corresponds to the device embodiment in the foregoing text. Therefore, the part not described in detail can refer to the device embodiment in the foregoing text.

[0084] Figure 3 It is a schematic flow chart of the test method provided in the embodiment of the present application, and the test method is applied to a test system, and the test system can be the test system 10 described in any of the embodiments above. The test system is used to test a vehicle, and the vehicle includes a central control unit and a vehicle control unit, the central control unit is connected to the vehicle control unit, and the vehicle control unit includes a CAN signal bus, and the CAN signal bus includes a plurality of CAN signal channels corresponding to a plurality of electronic devices in the vehicle. The test system includes: a data selector, a CAN bus test board and a device controller, wherein the data selector includes a plurality of input terminals and at least one output terminal, and the plurality of input terminals are respectively connected to a plurality of CAN signal channels; the CAN bus test board includes at least one signal channel, which is connected to at least one output terminal of the data selector, and the number of at least one signal channel is less than the number of a plurality of CAN signal channels; the device controller is connected to the data selector.

[0085] Figure 3 The method includes: step S310, when testing a vehicle, according to the type of the target CAN signal indicated by the current test case, controlling the connection relationship between multiple input terminals and at least one output terminal in the data selector through the device controller, so that a target CAN signal channel among the multiple CAN signal channels is connected to the CAN bus test board; wherein the target CAN signal channel corresponds to the type of the target CAN signal.

[0086] In some embodiments, the test system further includes a host computer connected to the device controller and the CAN bus test board. The method further includes:

[0087] The host computer is used to parse the current test case, extract the type of the target CAN signal involved in the current test case, and generate a first control command according to the type of the target CAN signal; the device controller is used to receive and decode the first control command to determine the target address code; and the data selector is used to adjust the connection relationship between multiple input terminals and at least one output terminal according to the target address code, so that the target CAN signal channel is connected to the CAN bus test board.

[0088] In some embodiments, the device controller includes a data register and a control processor, and the aforementioned test method also includes: using a data storage device to store a mapping relationship between multiple CAN signal channels and corresponding address codes; using the control processor to decode the first control command, and, according to the target CAN signal channel indicated by the first control command, querying the mapping relationship, and determining that the address code corresponding to the target CAN signal channel is the target address code.

[0089] In some embodiments, the testing method also includes: using the host computer to parse the current test case to determine the type and related parameters of the current test case; generating a target test script based on the type and related parameters of the current test case; calling the target test script for test verification to determine the test results.

[0090] In some embodiments, the types of test cases include monitoring test cases and setting test cases, and the host computer stores a first test script template and a second test script template corresponding to the monitoring test cases and the setting test cases, respectively.

[0091] The testing method also includes: using a host computer to call a target test script template corresponding to the type of the current test case according to the type and relevant parameters of the current test case, the target test script template being one of the first test script template and the second test script template; writing relevant parameters into the target test script template to obtain a target test script.

[0092] In some embodiments, the test system further includes a bus transceiver, the bus transceiver is connected to the host computer and the CAN signal bus, and the host computer is also connected to the central control unit; the test method further includes:

[0093] When the current test case is a monitoring test case, the host computer sends the value of the target CAN signal to the target CAN signal channel through the bus transceiver device; after a first delay time, the return signal sent by the central control unit is received; according to the return signal, the test result is determined; and,

[0094] When the current test case is a setting test case, the interface signal value is sent to the central control unit; after the second delay time, the signal value of the target CAN signal channel is determined through the CAN bus test board; and the test result is determined according to the signal value in the target CAN signal channel.

[0095] In some embodiments, the testing method further includes: using a host computer to determine the consistency of the signal value of the return signal or the target CAN signal channel with the expected result of the current test case; when the signal value of the return signal or the target CAN signal channel is consistent with the expected result of the current test case, determining that the current test case has passed the test, and outputting the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel; and, when the signal value of the return signal or the target CAN signal channel is inconsistent with the expected result of the test case, determining that the current test case has not passed the test, outputting the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel, and saving the case information and test result of the current test case.

[0096] Figure 4 A schematic flow chart of a test method provided for another embodiment of the present application, the method is applied to a test system, the test system is used to test a vehicle, the test system can be the test system 10 described in any of the embodiments above, the vehicle tested by the test system includes a central control unit and a vehicle control unit, the central control unit is connected to the vehicle control unit, the vehicle control unit includes a CAN signal bus, and the CAN signal bus includes a plurality of CAN signal channels corresponding to a plurality of electronic devices in the vehicle. The test system includes: a data selector, a CAN bus test board, a device controller, a bus technique device, and a host computer, etc. Among them, the data selector includes a plurality of input terminals and at least one output terminal, and the plurality of input terminals are respectively connected to a plurality of CAN signal channels; the CAN bus test board includes at least one signal channel, which is connected to at least one output terminal of the data selector, and the number of at least one signal channel is less than the number of multiple CAN signal channels; the device controller is connected to the data selector. The host computer is connected to the device controller and the CAN bus test board, the bus transceiver is connected to the host computer and the CAN signal bus, and the host computer is also connected to the central control unit. Figure 4 The testing method includes steps S401-S411.

[0097] In step S401, the storage address of the test case table is configured. The storage address is the storage location of the test case table in the host computer, which is configured by a configuration script.

[0098] In step S402, the program is run to perform test case analysis. This step is performed by the host computer, and the computer program deployed on the host computer is used to determine the verification method of the test case, and extract the CAN signal type and related parameters involved in the test case.

[0099] The verification methods of test cases are divided into setting class and monitoring class, which have been described in detail in the previous article and will not be repeated here.

[0100] In step S403, the CAN bus type and related parameters are obtained.

[0101] In step S404, the data selector performs channel switching so that the input signal of the CAN bus test board matches the current CAN bus type.

[0102] The specific process of the data selector performing channel switching can be found in the previous description and will not be repeated here.

[0103] In step S405, the corresponding script template is called to run the script parameter assignment. The script template is two different test script templates involved in different verification methods before the test, which can be stored in the host computer. After determining the verification method of the test case according to the above steps, a script template matching the verification method of the current test case is selected, and the relevant parameters are written into it to complete the assignment of the script parameters.

[0104] It can be understood that the above steps S404 and S405 are independent of each other, and the two steps can be performed successively or simultaneously.

[0105] In step S406, the test script is run. The host computer runs the test script and executes the test steps corresponding to the verification method of the current test case.

[0106] In step S407, the consistency between the return result of the central control unit or the signal value of the target CAN signal channel and the expected result is determined.

[0107] If the consistency determination in step S407 is passed, it is determined that the test is successful, and step S408 is executed to print the test results and the results of whether the signal transmission and reception are successful.

[0108] If the consistency determination in step S407 fails, it is determined that the test has failed, and step S409 is executed to print the result of the test failure and the result of whether the signal transmission and reception are successful.

[0109] In step S410, the test information is stored in a result table, which is located in a storage unit of the host computer.

[0110] In step S411, after all test cases are executed in sequence, a result table including the test results of all test cases is output, and the test is completed.

[0111] The embodiment of the present application provides a storage medium, which stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement some or all of the steps in the above method. The storage medium can be transient or non-transient.

[0112] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0113] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0114] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0115] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0116] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0117] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0118] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0119] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0120] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0121] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0122] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0123] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0124] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0125] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a vehicle-mounted terminal (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0126] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A test system for testing a vehicle, wherein the vehicle comprises a central control unit and a vehicle control unit, wherein the central control unit is connected to the vehicle control unit, wherein the vehicle control unit comprises a CAN signal bus, wherein the CAN signal bus comprises a plurality of CAN signal channels corresponding to a plurality of electronic devices in the vehicle, wherein: The test system comprises: A data selector, comprising a plurality of input terminals and at least one output terminal, wherein the plurality of input terminals are respectively connected to the plurality of CAN signal channels; A CAN bus test board, comprising at least one test channel connected to the at least one output end of the data selector, wherein the number of the at least one test channel is less than the number of the plurality of CAN signal channels; a device controller connected to the data selector, and configured to control the connection relationship between the multiple input terminals and the at least one output terminal in the data selector according to the type of the target CAN signal indicated by the current test case when testing the vehicle, so that the target CAN signal channel among the multiple CAN signal channels is connected to the CAN bus test board; The target CAN signal channel corresponds to the type of the target CAN signal.

2. The test system according to claim 1, characterized in that: Also includes: A host computer, connected to the device controller and the CAN bus test board, for parsing the current test case, extracting the type of the target CAN signal involved in the current test case, and generating a first control command according to the type of the target CAN signal; The device controller is further used to: receive and decode the first control command to determine a target address code; The data selector is used to adjust the connection relationship between the multiple input terminals and the at least one output terminal according to the target address code, so that the target CAN signal channel is connected to the CAN bus test board.

3. The test system according to claim 2, characterized in that: The device controller includes a data register and a control processor; The data register is used to store the mapping relationship between the multiple CAN signal channels and the corresponding address codes; The control processor is used to decode the first control command, and, according to the target CAN signal channel indicated by the first control command, query the mapping relationship to determine that the address code corresponding to the target CAN signal channel is the target address code.

4. The test system according to claim 2 or 3, characterized in that: The host computer is also used for: Parsing the current test case to determine the type and related parameters of the current test case; Generate a target test script according to the type and relevant parameters of the current test case; The target test script is called to perform test verification and determine the test result.

5. The test system according to claim 4, characterized in that: The types of the test cases include monitoring test cases and setting test cases, and the host computer stores a first test script template and a second test script template corresponding to the monitoring test cases and the setting test cases respectively; The host computer is also used for: According to the type of the current test case and the related parameters, calling a target test script template corresponding to the type of the current test case, the target test script template being one of the first test script template and the second test script template; as well as, The relevant parameters are written into the target test script template to obtain the target test script.

6. The test system according to claim 5, characterized in that: The test system further includes a bus transceiver, which is connected to the host computer and the CAN signal bus, and the host computer is also connected to the central control unit; the host computer is also used for: In the case where the current test case is the monitoring test case, sending the value of the target CAN signal to the target CAN signal channel through the bus transceiver device; After a first delay time, receiving a return signal sent by the central control unit; Determining the test result according to the return signal; and When the current test case is the setting test case, sending an interface signal value to the central control unit; After the second delay time, the signal value of the target CAN signal channel is determined by the CAN bus test board; and the test result is determined according to the signal value in the target CAN signal channel.

7. The test system according to claim 6, characterized in that: The host computer is also used for: Determining consistency between the return signal or the signal value of the target CAN signal channel and the expected result of the current test case; In the case where the return signal or the signal value of the target CAN signal channel is consistent with the expected result of the current test case, determining that the current test case has passed the test, and outputting the test result of the current test case, the value of the target CAN signal or the interface signal value, and the return signal or the signal value of the target CAN signal channel; and, When the return signal or the signal value of the target CAN signal channel is inconsistent with the expected result of the test case, it is determined that the current test case has not passed the test, and the test result of the current test case, the value of the target CAN signal or the interface signal value, and the signal value of the return signal or the target CAN signal channel are output, and the use case information of the current test case and the test result are saved.

8. A test method, applied to a test system, the test system is used to test a vehicle, the vehicle includes a central control unit and a vehicle control unit, the central control unit is connected to the vehicle control unit, the vehicle control unit includes a CAN signal bus, the CAN signal bus includes a plurality of CAN signal channels corresponding to a plurality of electronic devices in the vehicle, the test system includes: A data selector, comprising a plurality of input terminals and at least one output terminal, wherein the plurality of input terminals are respectively connected to the plurality of CAN signal channels; A CAN bus test board, comprising at least one signal channel connected to the at least one output end of the data selector, wherein the number of the at least one signal channel is less than the number of the plurality of CAN signal channels; A device controller connected to the data selector; Characterized in that the method comprises: When testing the vehicle, according to the type of the target CAN signal indicated by the current test case, the connection relationship between the multiple input terminals and the at least one output terminal in the data selector is controlled by the device controller, so that the target CAN signal channel among the multiple CAN signal channels is connected to the CAN bus test board; wherein the target CAN signal channel corresponds to the type of the target CAN signal.

9. The testing method according to claim 8, characterized in that: The test system also includes a host computer, which is connected to the device controller and the CAN bus test board; The method further comprises: Utilizing the host computer to parse the current test case, extracting the type of the target CAN signal involved in the current test case, and generating a first control command according to the type of the target CAN signal; Using the device controller to receive and decode the first control command to determine a target address code; The data selector is used to adjust the connection relationship between the multiple input terminals and the at least one output terminal according to the target address code, so that the target CAN signal channel is connected to the CAN bus test board.

10. The method according to claim 9, characterized in that The device controller includes a data register and a control processor, and the method further includes: Using the data memory to store the mapping relationship between the plurality of CAN signal channels and the corresponding address codes; The control processor is used to decode the first control command, and according to the target CAN signal channel indicated by the first control command, the mapping relationship is queried to determine that the address code corresponding to the target CAN signal channel is the target address code.

Citation Information

Patent Citations

  • Vehicle electronic control unit CAN interface automatic test system and method

    CN107145140A

  • Distributed type cable testing system with expandable channel

    CN108318780A

  • CAN bus input-output interface system

    CN109361584A

  • Automatic drive controller test system and method as well as upper computer

    CN110543164A

  • Vehicle-mounted routing device, communication conversion equipment, vehicle control system and vehicle

    CN115834476A