CN115242689A - Vehicle-mounted gateway testing method and system and computer readable storage medium - Google Patents

Vehicle-mounted gateway testing method and system and computer readable storage medium Download PDF

Info

Publication number
CN115242689A
CN115242689A CN202210832552.3A CN202210832552A CN115242689A CN 115242689 A CN115242689 A CN 115242689A CN 202210832552 A CN202210832552 A CN 202210832552A CN 115242689 A CN115242689 A CN 115242689A
Authority
CN
China
Prior art keywords
test
gateway
routing
tested
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210832552.3A
Other languages
Chinese (zh)
Other versions
CN115242689B (en
Inventor
程东辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Semidrive Technology Co Ltd
Original Assignee
Nanjing Semidrive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Semidrive Technology Co Ltd filed Critical Nanjing Semidrive Technology Co Ltd
Priority to CN202210832552.3A priority Critical patent/CN115242689B/en
Publication of CN115242689A publication Critical patent/CN115242689A/en
Application granted granted Critical
Publication of CN115242689B publication Critical patent/CN115242689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

A vehicle-mounted gateway testing method, a system and a computer readable storage medium are provided, wherein the vehicle-mounted gateway testing method comprises the following steps: acquiring and analyzing a routing information file with a preset format, and acquiring a routing rule of a test item; the node test module generates a test message and target message information according to the routing rule and sends the test message to a gateway to be tested; the gateway to be tested generates a target message according to the test message and the routing rule and sends the target message to a corresponding target bus; the node testing module acquires a target message sent by the gateway to be tested through the target bus and generates result message information, and the testing result of the testing item is determined based on the target message information and the result message information. Therefore, the workload of configuring the test scripts when testing different gateway projects can be effectively reduced, the message routing test of different gateway projects can be quickly realized, the test efficiency is improved, and a large amount of manpower and test time are saved.

Description

Vehicle-mounted gateway testing method and system and computer readable storage medium
Technical Field
The present application relates to the field of gateway testing technologies, and in particular, to a method and a system for testing a vehicle-mounted gateway, and a computer-readable storage medium.
Background
As the number of on-vehicle ECUs (Electronic Control units) increases, communication between different ECUs becomes more and more important. During communication, the vehicle-mounted gateway undertakes protocol conversion and routing work of the bus message, so that the protocol conversion and routing automatic test of the vehicle-mounted gateway are also very important. The automatic test of the message routing of the vehicle-mounted gateway is a necessary test means of the vehicle-mounted gateway at present, and the realization of more efficient and easily matched various different test requirements becomes an important development direction of the automatic test of the vehicle-mounted gateway.
In the prior art, when different vehicle-mounted gateway projects are tested, the configuration of a test environment needs to be modified according to specific project requirements, and different test scripts and test passing standards are customized. Therefore, after the software engineer develops the test software according to the product requirements, the test engineer is required to synchronously develop the automatic test equipment according to the product requirements to execute the automatic test or manually complete the message routing test. However, for the current vehicle-mounted gateway, a great number of different gateway items and requirements change, so that a great number of test scripts need to be modified again, the test efficiency is low, and a great amount of labor and time are consumed.
Disclosure of Invention
In order to solve the defects in the prior art, the application aims to provide a vehicle-mounted gateway testing method, a vehicle-mounted gateway testing system and a computer readable storage medium, which can effectively reduce the workload of configuring test scripts when testing different gateway projects and quickly realize the message routing test of the different gateway projects, thereby improving the testing efficiency and saving a large amount of labor and time.
In order to achieve the above object, the present application provides a vehicle-mounted gateway testing method, including:
acquiring and analyzing a routing information file with a preset format, and acquiring a routing rule of a test item;
the node test module generates a test message and target message information according to the routing rule and sends the test message to a gateway to be tested;
the gateway to be tested generates a target message according to the test message and the routing rule and sends the target message to a corresponding target bus;
the node testing module acquires a target message sent by the gateway to be tested through the target bus and generates result message information; and determining the test result of the test item based on the target message information and the result message information.
Further, the routing information file in the preset format is a binary file of a routing table, and the routing table includes a routing rule of at least one test item.
Furthermore, the routing rule at least includes test item information, source bus information, target bus information, an information identification number of the test packet, and an information identification number of the target packet.
Further, before the step of obtaining and analyzing the routing information file in the preset format and obtaining the routing rule of the test item, the method further includes:
acquiring a message routing communication matrix;
converting the message routing communication matrix into the routing table;
generating a binary file according to the routing table;
and sending the binary file to the node test module and the gateway to be tested.
Furthermore, the step of obtaining and analyzing the routing information file with the preset format and obtaining the routing rule of the test item includes:
burning the binary file to the node test module and the gateway to be tested;
and the node test module and the gateway to be tested respectively analyze the binary file.
Furthermore, the step of analyzing the binary file by the node test module and the gateway to be tested respectively includes:
the node test module receives a test instruction of the test item, analyzes the binary file according to the test instruction and determines a routing rule of the test item;
the node testing module sends the testing instruction to the gateway to be tested;
and the gateway to be tested analyzes the binary file according to the test instruction and determines the routing rule of the test item.
Further, a plurality of routing tables are obtained and parsed, the method further comprising:
in response to receiving all test results of the test items to be tested in the current routing table, the node test module sends a routing table switching instruction to the gateway to be tested;
and responding to the gateway to be tested to receive a routing table switching instruction, wherein the node test module and the gateway to be tested both switch the current routing table into a next routing table and respectively test the gateway to be tested based on the next routing table until the plurality of routing tables are traversed.
Further, the test item includes at least one of a routing test item, a frame loss test item, a delay test item, a period test item, a transmission timing test item, and a signal consistency test item.
In order to achieve the above object, the present application further provides a vehicle-mounted gateway testing system, including:
the node testing module is used for acquiring and analyzing a routing information file with a preset format, acquiring a routing rule of a test item, generating a test message and target message information according to the routing rule, and sending the test message to the gateway to be tested;
the gateway to be tested is used for acquiring and analyzing the routing information file with the preset format, acquiring the routing rule of the test item, generating a target message according to the test message and the routing rule and sending the target message to a corresponding target bus;
the node testing module is further used for acquiring a target message sent by the gateway to be tested through the target bus and generating result message information; and determining the test result of the test item based on the target message information and the result message information.
Further, the vehicle-mounted gateway testing system further comprises:
the routing information preprocessing module is used for acquiring a message routing communication matrix, converting the message routing communication matrix into a routing table, generating a binary file according to the routing table, and sending the binary file to the node testing module and the gateway to be tested;
and the burning module is used for burning the binary file to the node testing module and the gateway to be tested.
To achieve the above object, the present application provides a computer readable storage medium having stored thereon computer instructions, which when executed perform the steps of the vehicle gateway testing method as described above.
According to the vehicle-mounted gateway testing method, the vehicle-mounted gateway testing system and the computer readable storage medium, the routing rule of the testing item is obtained by obtaining and analyzing the routing information file in the preset format, the node testing module generates the testing message and the target message information according to the routing rule, the testing message is sent to the gateway to be tested, the target message is generated and sent to the corresponding target bus through the gateway to be tested according to the testing message and the routing rule, the node testing module obtains the target message sent by the gateway to be tested through the target bus and generates the result message information, and the testing result of the testing item is determined based on the target message information and the result message information. Therefore, after a set of test nodes and test codes of a to-be-tested piece are developed in the early period, the test codes do not need to be modified again and the automatic test environment does not need to be configured for different gateway projects, and the automatic test can be completed only by importing the route information file in the preset format, so that the workload of configuring test scripts when different gateway projects are tested can be effectively reduced, the message route test of different gateway projects can be quickly realized, the test efficiency is improved, and a large amount of labor and test time are saved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application.
Drawings
The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application and not limit the application. In the drawings:
FIG. 1 is a flow chart of a vehicle gateway testing method according to the present application;
FIG. 2 is a schematic structural diagram of an embodiment of a test environment for vehicle-mounted gateway testing according to the present application;
FIG. 3 is a flow diagram of an embodiment of message routing information preprocessing according to the present application;
FIG. 4 is a flow chart of a routing rule for obtaining a test item from a routing information file according to a preset format of the present application;
FIG. 5 is a schematic structural diagram of a vehicle gateway testing system according to the present application;
fig. 6 is a schematic structural diagram of an embodiment of a vehicle-mounted gateway testing system according to the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustration purposes only and are not intended to limit the scope of the present application.
It should be understood that the various steps recited in the method embodiments of the present application may be performed in a different order and/or in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present application is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the concepts of "node test module", "gateway under test", and the like mentioned in the present application are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this application are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise. "plurality" is to be understood as two or more.
Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings.
Example 1
Fig. 1 is a flowchart of a vehicle gateway testing method according to the present application, and the vehicle gateway testing method of the present application will be described in detail with reference to fig. 1.
In step 101, a routing information file in a preset format is obtained and analyzed, and a routing rule of a test item is obtained.
In this embodiment of the present application, the routing information file in the preset format may be a routing table in the preset format, for example, a binary file of the routing table or an image file of the routing table; the test item can be a test requirement item, such as a routing test item, a frame loss test item, a delay test item, a period test item, a transmission timing test item, a signal consistency test item, and the like. Specifically, when different vehicle-mounted gateway projects are tested, routing information files in a uniform format can be adopted for the node test module and the gateway to be tested to analyze, so that the node test module and the gateway to be tested can respectively obtain routing rules of the test items according to the routing information files, namely, the test codes do not need to be modified again and an automatic test environment is configured, and only the routing information files in a preset format need to be imported, so that automatic test can be carried out.
It should be noted that, when the entire vehicle system includes a plurality of vehicle-mounted ECUs, and different ECUs perform communication, the vehicle-mounted gateway therebetween performs protocol conversion and routing on the bus message. In this embodiment, on one hand, a vehicle-mounted gateway is integrated with test software to form a gateway to be tested for message routing test; on the other hand, for each vehicle-mounted gateway, a corresponding node for testing is arranged in the whole vehicle network, node testing equipment is connected to the node during testing, and corresponding testing software is installed in the node testing equipment to form a node testing module for message routing testing.
Fig. 2 is a schematic structural diagram of an embodiment of a test environment for vehicle-mounted Gateway test according to the present application, and referring to fig. 2, a Gateway (Gateway) is provided between a Body CAN (Body Controller Area Network) and a PT CAN (Power Train Controller Area Network), and test software is integrated with the Gateway to form a Gateway 11 to be tested for message routing test; there are many nodes (Node 1, node2, … …, node n) on Body CAN and PT CAN, and the nodes on the two buses correspond pairwise, and a group of nodes is used as Test Node, and the Node Test equipment is connected between the group of Test nodes, and the Node Test equipment is installed with corresponding Test software to form a Node Test module 12. When testing the vehicle-mounted gateway, only Routing-table (Routing-table) 13 needs to be respectively imported to the gateway 11 to be tested and the node test module 12, and the node test module 11 and the gateway 12 to be tested respectively analyze the Routing-table (Routing-table) 13 to obtain the Routing rule of the test item, and test the vehicle-mounted gateway based on the Routing rule respectively.
Fig. 2 is an example of a gateway test in a CAN network, and it is understood that the present application is not limited thereto, and is also applicable to other vehicle bus network environments.
In this embodiment of the present application, the routing information file in the preset format is a binary file of a routing table, and the routing table includes a routing rule of at least one test item. Because the binary file is a uniform format file based on the routing information, the binary file can be adopted for different vehicle-mounted gateway projects, and the node test module and the gateway to be tested can automatically analyze the binary file, so that the node test module and the gateway to be tested can respectively obtain the routing rule of the test item according to the binary file. Therefore, the operation can be simplified by adopting the binary file of the routing table, and the universality of testing different vehicle-mounted gateway projects can be improved.
It should be noted that each routing table includes at least one test entry. In a specific example, the routing table may be in an Excel format, the table may include a test requirement column, the test requirement column includes at least one test item, and each test item includes at least one routing rule, that is, a routing rule corresponding to the test item may be determined through the test item in the test requirement column.
In this embodiment of the present application, each Test packet corresponds to a routing rule, where the routing rule at least includes Test item (e.g., test Req) information, source BUS (Source BUS) information, target BUS (Target BUS) information, test packet, and information identity number (Msg ID) of the Target packet. Further, according to different test items, the routing rule may further include at least one of a Data Length Code (DLC) of the test packet and the target packet, a Period (Period) of the test packet and the target packet, data (Data) of the test packet and the target packet, and an information sending Type (Msg Send Type) of the test packet and the target packet.
In this embodiment of the present application, before step 101, the method may further include: the method comprises the steps of obtaining a message routing communication matrix, converting the message routing communication matrix into a routing table, generating a binary file according to the routing table, and sending the binary file to a node test module and a gateway to be tested.
That is, before the vehicle-mounted gateway test is performed, the message routing information may be preprocessed to generate a routing information file in a preset format. Specifically, during preprocessing, a message routing communication matrix is obtained, and buses of the communication matrix include but are not limited to vehicle-mounted buses such as a CAN (Controller Area Network), a LIN (Local Interconnect Network ), an Ethernet (Ethernet), an MOST (Media Oriented System Transport), and a FlexRAY (vehicle-mounted Network standard); then, the message communication matrix is converted into a routing table by using a script; and then generating a binary file according to the routing table, and sending the binary file to the node test module and the gateway to be tested so as to be used for the node test module and the gateway to be tested to subsequently analyze the routing rules of the test items respectively.
Fig. 3 is a flowchart of an embodiment of preprocessing message routing information according to the present application, and referring to fig. 3, a communication matrix 21 of a message route is obtained first, the communication matrix 21 is converted into a routing table 22, and then a binary file (routing-table.bin) 23 of the routing table is generated according to the routing table 22.
Wherein the communication matrix 21 is a series of files from different buses, such as testcan1.Dbc, testcan2.Dbc, testcan3.Dbc, … …, testcanx. Dbc, testline 1.Ldf, … …, testline x. Ldf; the routing table 22 is an Excel file, and its Test items include only a periodic Test (Period Test) item, the Test item includes five routing rules, and the information related to each routing rule includes: the Test request (Test Req), the Source BUS (Source BUS), the Target BUS (Target BUS), the message identification numbers (Msg ID) of the Test packet and the Target packet, the Data Length Codes (DLC) of the Test packet and the Target packet, and the cycle (Period) of the Test packet and the Target packet.
Fig. 4 is a flowchart of a routing rule for obtaining a test item from a routing information file in a preset format according to the present application, and referring to fig. 4, step 101 may include the following steps:
step 201: and burning the binary file to the node test module and the gateway to be tested.
Step 202: and the node test module and the gateway to be tested respectively analyze the binary file.
That is to say, the binary file of the routing table can be respectively burned to the node test module and the gateway to be tested through the burner, and after the burning is completed, the binary file is respectively analyzed through the test software of the node test module and the gateway to be tested, so that the node test module and the gateway to be tested can respectively obtain the routing rule of the test item.
Further, step 202 may further include the steps of:
step 301: and the node test module receives the test instruction of the test item, analyzes the binary file according to the test instruction and determines the routing rule of the test item.
Step 302: and the node test module sends the test instruction to the gateway to be tested.
Step 303: and the gateway to be tested analyzes the binary file according to the test instruction and determines the routing rule of the test item.
As a specific example, when a user needs to perform periodic testing on a vehicle-mounted gateway, binary files of corresponding routing tables are respectively burned into a node testing module and a gateway to be tested, and then a testing instruction of the periodic testing is sent to the node testing module. After receiving the test instruction of the periodic test, the node test module sends the test instruction of the periodic test to the gateway to be tested, and analyzes the binary file according to the test instruction so as to enable the node test module to obtain all routing rules of the periodic test item. After receiving the test instruction of the periodic test, the gateway to be tested also analyzes the binary file according to the test instruction, so that the gateway to be tested can obtain all routing rules of the same periodic test item.
It can be understood that, regarding the sending of the test instruction, the user may manually determine the test item based on the requirement of the test item, and send the test instruction to the node test module; or a series of test items in the routing table can be sequentially tested in sequence, so that a test instruction is automatically sent to the node test module according to a preset sequence. This is not particularly limited by the present application.
In step 102, the node test module generates a test message and target message information according to the routing rule, and sends the test message to the gateway to be tested.
Specifically, as shown in fig. 3, taking test packet 0x123 as an example, the node test module simulates test packet 0x123 according to the routing rule of the periodic test item, and then sends the test packet 0x123 to the gateway to be tested through the source bus CAN1. In this example, the corresponding target message information includes a period 50ms for target message 0x456.
In step 103, the gateway to be tested generates a target message according to the test message and the routing rule, and sends the target message to the corresponding target bus.
Specifically, as shown in fig. 3, taking test message 0x123 as an example, after receiving test message 0x123 sent by the node test module, the gateway to be tested determines target message 0x456 and target bus CAN2 corresponding to test message 0x123 according to the routing rule of the same periodic test item, and sends target message 0x456 to the node test module through target bus CAN2.
In step 104, the node test module acquires a target message sent by the gateway to be tested through the target bus and generates result message information; and determining the test result of the test item based on the target message information and the result message information.
Specifically, the test items may include at least one of a routing test item, a frame loss test item, a delay test item, a period test item, a transmission timing test item, and a signal consistency test item. When the test items are different, the contents of the target message information and the result message information are different, and the mode of determining the test result of the test item is also different.
For example, when the test item is a periodic test item, as shown in fig. 3, taking a test packet 0x123 as an example, the target packet information is obtained by the node test module according to the routing table, and includes a period 50ms of a target packet 0x456, and the result packet information includes an actual period of the target packet 0x456 received by the node test module. If the difference value of the two is within the threshold range, determining that the period of the message routing is normal; if the difference value of the two is out of the threshold range, the cycle of the message routing is determined to be abnormal.
For another example, when the test item is a routing test item, the target packet information includes an information identity identifier of the target packet obtained according to the routing table, and the result packet information includes an information identity identifier of the target packet actually received by the node test module. If the two are consistent, determining that the message route is normal; if the two are not consistent or the result message information shows that the node testing module does not receive any message on the target bus, determining that the message routing is abnormal.
For another example, when the test item is a frame loss test item, the node test module determines the number of frames (for example, 1000 frames) for sending the test message, the target message information includes the number of frames (the same as the number of frames for sending the test message) of the target message to be received, and the result message information includes the number of frames of the target message actually received by the node test module. If the two are consistent, determining that no frame loss exists in the message route; if the two are not consistent, determining that the message route has frame loss.
In this embodiment of the present application, a plurality of routing tables may be generated according to the packet routing communication matrix, and the method further includes: in response to receiving all test results of the test items to be tested in the current routing table, the node test module sends a routing table switching instruction to the gateway to be tested; and in response to the gateway to be tested receiving the routing table switching instruction, the node test module and the gateway to be tested switch the current routing table to the next routing table, and test the gateway to be tested based on the routing tables respectively until the plurality of routing tables are traversed.
Specifically, since the routing information related to different vehicle-mounted gateways may be different, and the routing information related to different test items may also be different, a plurality of routing tables may be generated according to the message routing communication matrix. When testing is carried out, after all the tests of the test items to be tested in the current routing table are completed, the node test module can stop the tests and send a test stopping instruction to the gateway to be tested, and the gateway to be tested stops the tests according to the test stopping instruction. Then, under the condition that all routing tables are not used, the node test module sends a routing table switching instruction to the gateway to be tested, after the gateway to be tested receives the routing table switching instruction, the node test module and the gateway to be tested both switch the current routing table into the next routing table which is not tested, and the gateway to be tested is tested by adopting the method based on the routing tables respectively. Therefore, the automation degree of the vehicle-mounted gateway test can be improved, and the further labor and test time saving is facilitated.
According to the vehicle-mounted gateway testing method in the embodiment, the routing rule of the testing item is obtained by obtaining and analyzing the routing information file in the preset format, the node testing module generates the testing message and the target message information according to the routing rule, the testing message is sent to the gateway to be tested, the gateway to be tested generates the target message according to the testing message and the routing rule, the target message sent by the gateway to be tested is sent to the corresponding target bus, the node testing module obtains the target message sent by the gateway to be tested through the target bus and generates the result message information, and the testing result of the testing item is determined based on the target message information and the result message information. Therefore, after a set of test nodes and test codes of a to-be-tested piece are developed in the early period, the test codes do not need to be modified again and the automatic test environment does not need to be configured for different gateway projects, and the automatic test can be completed only by importing the route information file in the preset format, so that the workload of configuring test scripts when different gateway projects are tested can be effectively reduced, the message route test of different gateway projects can be quickly realized, the test efficiency is improved, and a large amount of labor and test time are saved.
Example 2
Fig. 5 is a schematic structural diagram of a vehicle-mounted gateway testing system according to the embodiment of the present application, and as shown in fig. 5, in the embodiment of the present application, a vehicle-mounted gateway testing system 30 includes: a node test module 31 and a gateway under test 32.
Wherein, the node testing module 31 is configured to: and acquiring and analyzing the routing information file in the preset format, acquiring the routing rule of the test item, generating a test message and target message information according to the routing rule, and sending the test message to the gateway 32 to be tested. The gateway under test 32 is configured to: and acquiring and analyzing the routing information file in the preset format, acquiring the routing rule of the test item, generating a target message according to the test message and the routing rule, and sending the target message to a corresponding target bus. The node test module 31 is further configured to: and acquiring a target message sent by the gateway 32 to be tested through the target bus, generating result message information, and determining a test result of the test item based on the target message information and the result message information.
Further, the vehicle-mounted gateway testing system 30 further includes: a routing information preprocessing module (not shown in fig. 5) and a burning module (not shown in fig. 5).
Wherein, the routing information preprocessing module is used for: the method comprises the steps of obtaining a message routing communication matrix, converting the message routing communication matrix into a routing table, generating a binary file according to the routing table, and sending the binary file to a node test module 31 and a gateway to be tested 32. The burning module is used for: and burning the binary file into the node test module 31 and the gateway to be tested 32.
Further, the node testing module 31 is specifically configured to: and analyzing the binary file. The gateway under test 32 is specifically configured to: and analyzing the binary file.
Further, the node testing module 31 is specifically configured to: receiving a test instruction of a test item, analyzing the binary file according to the test instruction, and determining a routing rule of the test item; the test instructions are sent to the gateway under test 32. The gateway under test 32 is specifically configured to: and analyzing the binary file according to the test instruction, and determining the routing rule of the test item.
Still further, the node testing module 31 is further configured to: when receiving all test results of the test items to be tested in the current routing table, sending a routing table switching instruction to the gateway 32 to be tested; when the gateway 32 to be tested receives the routing table switching instruction, the current routing table is switched to the next routing table, and the vehicle-mounted gateway is tested based on the routing table until a plurality of routing tables are used. The gateway under test 32 is also configured to: and receiving a routing table switching instruction, switching the current routing table to the next routing table, and testing the gateway 32 to be tested based on the routing table.
Example 3
Fig. 6 is a schematic structural diagram of an embodiment of a vehicle-mounted gateway test system according to the present application, and as shown in fig. 6, in this embodiment, a vehicle-mounted gateway test system 30 includes a node test module 31, a gateway to be tested 32, and a routing information preprocessing module 33.
When the vehicle-mounted gateway testing system 30 operates, the Routing information preprocessing module 33 first obtains a Routing Table (Routing-Table), the Routing Table includes BUS (BUS) information, information identification number (Msg ID), data (Data), period (Period), information sending Type (Msg Send Type) and testing requirement (Test Req), then generates a binary file (Routing-Table. Bin) according to the Routing Table, and sends the binary file to the node testing module 31 and the gateway 32 to be tested. The node test module 31 and the gateway to be tested 32 respectively obtain the routing rule of the test item according to the binary file, and test the gateway to be tested 32 based on the routing rule.
In this embodiment, the vehicle-mounted gateway testing system 30 supports processing of a plurality of Routing tables (Routing-Table 1, routing-Table 2, routing-Table 3, … …, routing-Table n), and may adopt different Routing tables according to different testing requirements, or may pass through all Routing tables according to a preset sequence. The node test module 31 and the gateway under test 32 have a switching function for a plurality of routing tables.
Specifically, after receiving the binary file of the Routing Table, the node test module 31 sends a test start instruction to the gateway to be tested 32, and when the gateway to be tested 32 receives the test start instruction, the node test module 31 and the gateway to be tested 32 start to test the vehicle-mounted gateway based on Routing-Table 1. Until the node test module 31 receives all test results of the test items to be tested in Routing-Table 1, the node test module 31 sends a Routing Table switching instruction to the gateway 32 to be tested, so that the node test module 31 and the gateway 32 to be tested both switch Routing-Table 1 into Routing-Table 2, and the gateway 32 to be tested is tested based on Routing-Table 2. In this way, until all routing tables are traversed, the node test module 31 then sends the test results to the bus or reports them to the upper computer.
Example 4
In one embodiment of the present application, there is also provided a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist separately and not be assembled into the system. The computer readable storage medium carries one or more computer instructions, and when the one or more computer instructions are executed, the steps of the vehicle gateway testing method of the above embodiment are implemented.
In embodiments of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Those of ordinary skill in the art will understand that: although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing embodiments, or equivalents may be substituted for elements thereof. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (11)

1. A vehicle-mounted gateway testing method comprises the following steps:
acquiring and analyzing a routing information file with a preset format, and acquiring a routing rule of a test item;
the node test module generates a test message and target message information according to the routing rule and sends the test message to a gateway to be tested;
the gateway to be tested generates a target message according to the test message and the routing rule and sends the target message to a corresponding target bus;
the node testing module acquires a target message sent by the gateway to be tested through the target bus and generates result message information; and determining the test result of the test item based on the target message information and the result message information.
2. The vehicle gateway testing method of claim 1, wherein the routing information file with the preset format is a binary file of a routing table, and the routing table comprises routing rules of at least one test item.
3. The vehicle-mounted gateway testing method according to claim 2, wherein the routing rule at least includes test item information, source bus information, target bus information, information identification number of the test packet, and information identification number of the target packet.
4. The vehicle-mounted gateway testing method according to claim 2, wherein before the step of obtaining and analyzing the routing information file with the preset format and obtaining the routing rule of the test item, the method further comprises:
acquiring a message routing communication matrix;
converting the message routing communication matrix into the routing table;
generating a binary file according to the routing table;
and sending the binary file to the node test module and the gateway to be tested.
5. The vehicle-mounted gateway testing method according to claim 4, wherein the step of obtaining and analyzing the routing information file with the preset format and obtaining the routing rule of the testing item comprises:
burning the binary file to the node test module and the gateway to be tested;
and the node test module and the gateway to be tested respectively analyze the binary file.
6. The vehicle-mounted gateway testing method according to claim 5, wherein the step of analyzing the binary file by the node testing module and the gateway to be tested respectively comprises:
the node test module receives a test instruction of the test item, analyzes the binary file according to the test instruction and determines a routing rule of the test item;
the node testing module sends the testing instruction to the gateway to be tested;
and the gateway to be tested analyzes the binary file according to the test instruction and determines the routing rule of the test item.
7. The vehicle gateway testing method of claim 6, wherein a plurality of routing tables are obtained and parsed, the method further comprising:
in response to receiving all test results of the test items to be tested in the current routing table, the node test module sends a routing table switching instruction to the gateway to be tested;
and responding to the gateway to be tested to receive a routing table switching instruction, wherein the node test module and the gateway to be tested both switch the current routing table into a next routing table and respectively test the gateway to be tested based on the next routing table until the plurality of routing tables are traversed.
8. The vehicle gateway testing method of any one of claims 1-7, wherein the test items comprise at least one of a routing test item, a frame loss test item, a delay test item, a period test item, a transmission timing test item, and a signal consistency test item.
9. An in-vehicle gateway test system, comprising:
the node testing module is used for acquiring and analyzing a routing information file with a preset format, acquiring a routing rule of a test item, generating a test message and target message information according to the routing rule, and sending the test message to the gateway to be tested;
the gateway to be tested is used for acquiring and analyzing the routing information file with the preset format, acquiring the routing rule of the test item, generating a target message according to the test message and the routing rule and sending the target message to a corresponding target bus;
the node testing module is further used for acquiring a target message sent by the gateway to be tested through the target bus and generating result message information; and determining the test result of the test item based on the target message information and the result message information.
10. The vehicle gateway test system of claim 9, further comprising:
the routing information preprocessing module is used for acquiring a message routing communication matrix, converting the message routing communication matrix into a routing table, generating a binary file according to the routing table, and sending the binary file to the node test module and the gateway to be tested;
and the burning module is used for burning the binary file to the node testing module and the gateway to be tested.
11. A computer-readable storage medium, having stored thereon computer instructions which, when executed, perform the steps of the in-vehicle gateway testing method of any one of claims 1-8.
CN202210832552.3A 2022-07-14 2022-07-14 Vehicle-mounted gateway testing method, system and computer readable storage medium Active CN115242689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210832552.3A CN115242689B (en) 2022-07-14 2022-07-14 Vehicle-mounted gateway testing method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210832552.3A CN115242689B (en) 2022-07-14 2022-07-14 Vehicle-mounted gateway testing method, system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115242689A true CN115242689A (en) 2022-10-25
CN115242689B CN115242689B (en) 2023-08-01

Family

ID=83673452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210832552.3A Active CN115242689B (en) 2022-07-14 2022-07-14 Vehicle-mounted gateway testing method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115242689B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865776A (en) * 2022-11-30 2023-03-28 重庆长安汽车股份有限公司 Method and device for generating routing detection script and storage medium
CN117176507A (en) * 2023-11-02 2023-12-05 上海鉴智其迹科技有限公司 Data analysis method, device, electronic equipment and storage medium
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795587A (en) * 2012-11-02 2014-05-14 北汽福田汽车股份有限公司 Gateway routing test method and device
CN104298224A (en) * 2014-09-12 2015-01-21 中国第一汽车股份有限公司 Automatic vehicle-mounted electronic control unit CAN bus communication testing device and system
CN110048910A (en) * 2019-04-24 2019-07-23 重庆长安汽车股份有限公司 A kind of vehicle-mounted ethernet gateway test macro and method
CN110673576A (en) * 2019-09-23 2020-01-10 广州小鹏汽车科技有限公司 Automatic test method and device, vehicle and storage medium
CN111343051A (en) * 2020-03-05 2020-06-26 中国第一汽车股份有限公司 Message routing test method, device and storage medium
CN114679396A (en) * 2021-07-02 2022-06-28 北京新能源汽车股份有限公司 Method, device and system for testing routing performance of gateway

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795587A (en) * 2012-11-02 2014-05-14 北汽福田汽车股份有限公司 Gateway routing test method and device
CN104298224A (en) * 2014-09-12 2015-01-21 中国第一汽车股份有限公司 Automatic vehicle-mounted electronic control unit CAN bus communication testing device and system
CN110048910A (en) * 2019-04-24 2019-07-23 重庆长安汽车股份有限公司 A kind of vehicle-mounted ethernet gateway test macro and method
CN110673576A (en) * 2019-09-23 2020-01-10 广州小鹏汽车科技有限公司 Automatic test method and device, vehicle and storage medium
CN111343051A (en) * 2020-03-05 2020-06-26 中国第一汽车股份有限公司 Message routing test method, device and storage medium
WO2021175314A1 (en) * 2020-03-05 2021-09-10 中国第一汽车股份有限公司 Message routing testing method and device, and storage medium
CN114679396A (en) * 2021-07-02 2022-06-28 北京新能源汽车股份有限公司 Method, device and system for testing routing performance of gateway

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865776A (en) * 2022-11-30 2023-03-28 重庆长安汽车股份有限公司 Method and device for generating routing detection script and storage medium
CN117176507A (en) * 2023-11-02 2023-12-05 上海鉴智其迹科技有限公司 Data analysis method, device, electronic equipment and storage medium
CN117176507B (en) * 2023-11-02 2024-02-23 上海鉴智其迹科技有限公司 Data analysis method, device, electronic equipment and storage medium
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Also Published As

Publication number Publication date
CN115242689B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
CN115242689B (en) Vehicle-mounted gateway testing method, system and computer readable storage medium
CN109067617B (en) V2X protocol consistency test method, device and system
CN105162646A (en) Multi-protocol interface test system and method
CN111083017A (en) Air conditioner distribution network testing method, air conditioner distribution network testing terminal and readable storage medium
CN113900941A (en) Micro-service processing method, micro-service system, electronic device and storage medium
CN108919788A (en) A kind of remote monitoring system and method for the automobile bench test based on vehicle-mounted CAN bus
CN115190041A (en) Remote CAN bus automatic test system and method
CN113485920B (en) Method and device for realizing DoIP entity, readable storage medium and electronic equipment
CN114326672A (en) ECU simulation detection method, electronic device and storage medium
CN114679396A (en) Method, device and system for testing routing performance of gateway
CN113556335A (en) Vehicle-mounted bus safety testing method and system
CN115657646B (en) Test method and device of CAN controller
JP2014035595A (en) Testing device for communication system, testing program for communication system, and testing method for communication system
CN112398672B (en) Message detection method and device
WO2021128936A1 (en) Message processing method and apparatus
CN114546829A (en) Method and device for testing scheme system, storage medium and electronic equipment
CN107707492B (en) Method and device for reporting and issuing message
CN112532482A (en) Shunting equipment testing method and device
CN113407444A (en) Interface test case generation method, device, equipment and storage medium
Xu et al. Design of vehicle gateway automatic test system based on canoe
CN112737872B (en) ARINC664P7 end system cross-network testing system and method
Yu et al. Research on Automotive UDS Diagnostic Protocol Stack Test System
CN115473832B (en) Internet of vehicles end cloud communication testing method, device, server, client and system
CN115442284B (en) System and method for testing equipment
CN109391989B (en) Digital logic circuit detection method and device for base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant