Interface test method and device of vehicle-mounted Ethernet, and medium
By parsing the in-vehicle Ethernet configuration file, automatically extracting and writing signal information, and generating interface test cases, the problems of long test case development cycle and sequence omissions in the existing technology are solved, and efficient interface testing is achieved.
Patent Information
- Application Number
- CN202510684315.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-16
AI Technical Summary
In the existing technology, Ethernet interface testing has problems such as long test case development cycle and execution time, and manual modification is required when configuration files are changed, resulting in omissions in test sequences and long execution time.
By parsing the configuration file of the in-vehicle Ethernet, extracting the message attributes and signal information, automatically writing them into the corresponding writing unit, and generating interface test cases, it avoids omissions in the test sequence and improves test efficiency.
It effectively shortens the testing cycle, improves the problem detection rate and testing efficiency, and raises the testing threshold of domain controllers and the breadth of interface testing.
Smart Images

Figure CN120658641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, and medium for testing an in-vehicle Ethernet interface. Background Art
[0002] In existing technology, Ethernet interface testing is mostly performed through hardware-in-the-loop simulation systems, using test sequences to build tests. Under the current testing framework, test case development cycles are long, and test case execution times are lengthy. Furthermore, every change to the Ethernet interface configuration file, including the names and attributes of Ethernet signal definitions, is subject to change. Currently, this relies primarily on manual identification and modification of the relevant test sequences, leading to issues such as missed and incomplete test sequences and a significant time-consuming process. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to provide a method, device and medium for testing an in-vehicle Ethernet interface to improve testing efficiency.
[0004] To achieve the above-mentioned object, an embodiment of the present application provides a method for testing an in-vehicle Ethernet interface, the method comprising: parsing a first configuration file of the in-vehicle Ethernet, extracting message attributes of the in-vehicle Ethernet and Ethernet signal information corresponding to the message attributes;
[0005] Determining a first writing unit in a first writing area according to the message attributes and the Ethernet signal information, and writing the Ethernet signal information into the first writing unit accordingly;
[0006] parsing a second configuration file of the in-vehicle Ethernet, and extracting interface signal information corresponding to the Ethernet signal information according to the Ethernet signal information;
[0007] Determine a second writing unit in a second writing area according to the message attribute and the interface signal information, and write the interface signal information into the second writing unit accordingly; wherein the first writing area corresponds to the second writing area;
[0008] All matching first writing areas and second writing areas are traversed to generate interface test cases.
[0009] In some embodiments, extracting the message attributes of the in-vehicle Ethernet and the Ethernet signal information corresponding to the message attributes includes:
[0010] Parsing the Ethernet message attributes according to the universal unique identifier of the Ethernet message in the first configuration file;
[0011] Determine, according to the universal unique identifier, a signal node defined in Ethernet corresponding to the message attribute and a first signal name under the signal node;
[0012] Parsing the Ethernet message according to the universal unique identifier, obtaining transmission information of the Ethernet signal corresponding to the message attribute, and generating a transmission test value;
[0013] The Ethernet signal information is formed according to the first signal name, the transmission information and the transmission test value.
[0014] In some embodiments, determining the first writing unit in the first writing area according to the message attribute and the Ethernet signal information includes:
[0015] determining the first writing area according to the message attributes and the order in which the message attributes are extracted;
[0016] A first write identifier of the first write unit in the first write area is obtained, the first write identifier is matched with the Ethernet signal information, and the first write unit into which the Ethernet signal information is written is determined.
[0017] In some embodiments, the Ethernet signal information includes a first signal name, transmission information, and a transmission test value; and extracting the interface signal information corresponding to the Ethernet signal information includes:
[0018] Using the first signal name as a search condition, extracting a second signal name corresponding to the first signal name from the second configuration file;
[0019] determining, according to the transmission information, an interactive attribute of the second signal name;
[0020] Using the first signal name as a search condition, and according to the transmission test value, writing and retrieving the interface test value;
[0021] The interface signal information is formed according to the second signal name, the interaction attribute and the interface test value.
[0022] In some embodiments, determining the second writing unit in the second writing area according to the message attribute and the interface signal information includes:
[0023] determining, according to the message attribute and the interface signal information, the second writing area corresponding to the first writing area;
[0024] According to the second writing identifier of the second writing unit in the second writing area, the second writing identifier is matched with the interface signal information to determine the second writing unit into which the interface signal information is written.
[0025] In some embodiments, the message attributes include receiving attributes and sending attributes; and determining the first writing area according to the message attributes and the order in which the message attributes are extracted includes:
[0026] When the message attribute is the receiving attribute and the extraction order is the Nth extraction, the first writing area is the Nth input area.
[0027] In some embodiments, determining the first writing area according to the message attributes and the order in which the message attributes are extracted includes:
[0028] When the message attribute is the sending attribute and the extraction order is the Nth extraction, the first writing area is the Nth output area.
[0029] In some embodiments, the interface signal information includes an interaction attribute, and determining the second writing area corresponding to the first writing area according to the message attribute and the interface signal information includes:
[0030] An attribute position of the second writing area is determined according to the message attribute and the interaction attribute, and a sequential position of the second writing area is consistent with a sequential position of the first writing area.
[0031] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a vehicle control device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program implements the above-mentioned vehicle Ethernet interface testing method when executed by the processor.
[0032] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned vehicle Ethernet interface testing method is implemented.
[0033] The embodiments of the present application include at least the following beneficial effects: The present application provides an interface testing method, device and medium for an in-vehicle Ethernet. The scheme parses the first configuration file of the Ethernet, extracts the message attributes and Ethernet signal information, and writes them into the first write unit in the corresponding first write area. The Ethernet signal information is used as the retrieval condition, and the corresponding interface signal information is extracted in the second configuration file to match the Ethernet signal information with the interface signal information, thereby avoiding the problem of missing or incomplete test sequences in the test case; based on the matched Ethernet signal information and interface signal information, a second write unit for writing the interface signal information is determined, the first write area corresponds to the second write area, all matching first write areas and second write areas are traversed, and an interface test case corresponding to the Ethernet signal and the interface signal is generated. The test is performed according to the interface test case to obtain the test result, thereby effectively reducing the test cycle, and improving the detection rate and test efficiency of effective problem detection, thereby improving the test threshold of the domain controller and the extensiveness of the interface test. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a flow chart of the interface testing method of the in-vehicle Ethernet provided by an embodiment of the present application;
[0035] Figure 2 This is a schematic diagram of the storage area framework when writing Ethernet signal information in the vehicle Ethernet interface testing method provided by an embodiment of the present application;
[0036] Figure 3 It is a schematic diagram of the hardware structure framework of the vehicle control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0038] It is understood that the terms "first," "second," and the like used herein may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, Ethernet signal information may also be referred to as interface signal information, and similarly, interface signal information may also be referred to as Ethernet signal information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to a determination."
[0039] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0041] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0042] UUID stands for Universally Unique Identifier, and its purpose is to allow all elements in a distributed system to have unique identification information.
[0043] The ARXML file is an XML file format in the AUTOSAR standard. It is used to describe the software architecture and configuration information of automotive electronic software systems and is a general configuration / database file.
[0044] A MAP file (Mapping File) is a file used to describe address mapping, storage allocation, or configuration information.
[0045] In some embodiments of an aspect of the invention, Figure 1 This is an optional flowchart of the interface testing method of the in-vehicle Ethernet provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S100 to S500.
[0046] Step S100 , parsing a first configuration file of the in-vehicle Ethernet, extracting message attributes of the in-vehicle Ethernet and Ethernet signal information corresponding to the message attributes.
[0047] Step S200: Determine a first writing unit in a first writing area according to the message attributes and the Ethernet signal information, and write the Ethernet signal information into the first writing unit accordingly.
[0048] Step S300 , parsing a second configuration file of the in-vehicle Ethernet, and extracting interface signal information corresponding to the Ethernet signal information according to the Ethernet signal information.
[0049] Step S400 , determining a second writing unit in a second writing area according to the message attributes and the interface signal information, and writing the interface signal information into the second writing unit accordingly; wherein the first writing area corresponds to the second writing area.
[0050] Step S500: traverse all matching first writing areas and second writing areas to generate interface test cases.
[0051] In steps S100 to S500 shown in the embodiment of the present application, by parsing the first configuration file of the Ethernet, the message attributes and Ethernet signal information are extracted, and the information is written into the first write unit in the corresponding first write area. The Ethernet signal information is used as the retrieval condition, and the corresponding interface signal information is extracted in the second configuration file to match the Ethernet signal information with the interface signal information, so as to avoid the problem of missing or incomplete test sequences in the test case; according to the matched Ethernet signal information and the interface signal information, the second write unit for writing the interface signal information is determined, the first write area corresponds to the second write area, all matching first write areas and second write areas are traversed, and an interface test case corresponding to the Ethernet signal and the interface signal is generated. The test is performed according to the interface test case to obtain the test result, thereby effectively reducing the test cycle, and improving the detection rate and test efficiency of effective problem detection, thereby improving the test threshold of the domain controller and the extensiveness of the interface test.
[0052] In some embodiments of S100, a first configuration file of the in-vehicle Ethernet is obtained, the first configuration file is parsed to extract message attributes of the Ethernet message, and corresponding Ethernet signal information is retrieved from the first configuration file according to the message attributes.
[0053] That is, the first configuration file of the vehicle Ethernet is parsed, the transceiver attributes of the Ethernet message are determined according to the Ethernet message in the first configuration file, and the corresponding input and output Ethernet signal information is determined according to the transceiver attributes of the message.
[0054] The first configuration file is an ARXML file. Message attributes include sending attributes and receiving attributes. Ethernet signal information includes a first signal name, transmission information, and a transmission test value. The transmission information includes a signal value, signal type, signal length, message ID, transceiver type, and transceiver cycle.
[0055] In some embodiments of S200, the first writing area is determined according to the receiving and sending properties of the Ethernet message, and the first writing unit for writing the Ethernet signal information in the first writing area is determined according to the Ethernet signal information, and the Ethernet signal information is written into the first writing unit accordingly.
[0056] The first writing area may be a writing area of a memory, a writing area of an electronic spreadsheet, or a buffer for temporarily storing data. In this application, no specific restrictions are imposed on the specific application objects of the writing area.
[0057] Correspondingly, the first writing unit can be a writing unit of the writing area of the memory, corresponding to one or more addresses of the memory, or a writing cell of the writing area of the spreadsheet, or a storage unit of the buffer for temporarily storing data. In this application, no specific restrictions are made on the specific application objects of the writing unit used to store or update Ethernet signal information.
[0058] In some embodiments of S300 , a second configuration file of the vehicle-mounted Ethernet is obtained, the second configuration file is parsed, and the Ethernet signal information is used as a search condition to extract interface signal information that matches the input and output of the Ethernet signal information.
[0059] The second configuration file is a map file. The interface signal information includes: a second signal name, an interaction attribute, and an interface test value.
[0060] In some embodiments of S400, based on the first write area determined by S200 and the interface signal information that matches the Ethernet signal information in S300, the second write area to be written is determined by determining the first write area determined by the message attributes. Then, for the Ethernet signal information and the interface signal information that match each other, the first write area and the second write area correspond to each other in the write area, which is an input-output correspondence relationship.
[0061] According to the interface signal information, a second writing unit for writing the interface signal information in the second writing area is determined, and the interface signal information is correspondingly written into the second writing unit.
[0062] The second writing area may be a writing area of a memory, a writing area of an electronic spreadsheet, or a buffer area for temporarily storing data. In this application, no specific restrictions are imposed on the specific application objects of the writing area.
[0063] Correspondingly, the second writing unit can be a writing unit of the writing area of the memory, corresponding to one or more addresses of the memory, or a writing cell of the writing area of the spreadsheet, or a storage unit of the buffer for temporarily storing data. In this application, no specific restrictions are made on the specific application objects of the writing unit used to store or update Ethernet signal information.
[0064] In some embodiments of S500, all Ethernet signal information and all interface signal information are matched to each other through S400. An interface test case is generated based on each pair of matched Ethernet signal information and interface signal information.
[0065] Configure the automated testing environment, execute interface test cases, and obtain test results.
[0066] The automated test environment includes: power supply, host computer and software, CAN communication equipment and the controller under test.
[0067] In one embodiment, each pair of matching Ethernet signal information and interface signal information is used to generate the input of a test case script. Based on the set test requirements, an input signal value is selected from the Ethernet signal information or the interface signal information, and each signal value is used as an input to generate a test case. A test case can be generated by selecting a specific signal based on a user response, or input signal values can be selected in an enumerated manner. Based on the selected input signal value, a corresponding expected result output value is selected from the Ethernet signal information or the interface signal information and written into the expected result check section of the produced test case. The output format of the test result is compiled, and the test result includes: a comparison result between the expected result output value and the actual value, and the overall test result.
[0068] In some embodiments of one aspect of the present invention, S100, the process of extracting message attributes and Ethernet signal information corresponding to the message attributes includes:
[0069] S110: parse and obtain message attributes of the Ethernet message according to the universal unique identifier of the Ethernet message in the first configuration file.
[0070] S120: Determine, according to the universal unique identifier, a signal node defined in Ethernet corresponding to the message attribute and a first signal name under the signal node.
[0071] S130, parsing the Ethernet message according to the universal unique identifier, obtaining transmission information of the Ethernet signal corresponding to the message attribute, and generating a transmission test value.
[0072] S140, based on the first signal name, transmission information and transmission test value, forming Ethernet signal information.
[0073] In some embodiments of S110, the Ethernet message in the first configuration file is parsed, and the message attribute of the Ethernet message is identified and extracted based on a unique attribute UUID (universally unique identifier) of the Ethernet message.
[0074] Among them, the message attributes include: receiver attributes and sender attributes, that is, receiving attributes and sending attributes.
[0075] Exemplarily, the Ethernet message in the ARXML file is parsed, and the receiver attribute and the sender attribute of the Ethernet message are identified and extracted based on the unique attribute UUID of the Ethernet message.
[0076] In some embodiments of S120, based on the universal unique identifier, an Ethernet signal node definition is determined, a signal name under the signal node, ie, a first signal name, is determined, and basic attributes related to the signal are also determined.
[0077] According to the characteristics of the universal unique identifier, the message attributes and the first signal name under the same universal unique identifier can correspond to each other.
[0078] For example, the Ethernet message in the ARXML file is parsed, and based on the unique attribute UUID of the Ethernet message, the definition of the Ethernet model node and the signal name and signal-related attributes under the signal node, such as basic attributes such as the sending type, are found.
[0079] In some embodiments of S130, the Ethernet message is parsed through the universal unique identifier to obtain the signal value, signal type and signal length of the Ethernet signal, and the signal value, signal type and signal length are all transmission information of the Ethernet signal.
[0080] The transmission information may also include other attributes or data, which are not limited in this application.
[0081] According to the Ethernet message parsed in the ARXML file, test input and output values are generated to obtain transmission test values.
[0082] In one embodiment, the transceiver cycle, transceiver mode, and message ID of the Ethernet message obtained by parsing are also used as transmission information so as to be recorded and written into the first writing unit.
[0083] According to the characteristics of the universal unique identifier, the message attributes and transmission information under the same universal unique identifier can correspond to each other.
[0084] For example, the Ethernet message is parsed according to the unique attribute UUID of the Ethernet message to obtain the signal value, signal type and signal length of the Ethernet signal. According to the Ethernet message parsed in the ARXML file, the test input and output values are generated to obtain the transmission test value.
[0085] In some embodiments of S140 , the transmission test value, the transmission information, and the first signal name determined in S110 to S130 are combined to form Ethernet signal information.
[0086] Through the above embodiment, ARXML files are automatically identified and parsed, change points are automatically identified, manual operations are reduced, and the test cycle is effectively shortened.
[0087] In some embodiments of one aspect of the present invention, S200, the writing process of the first writing unit includes:
[0088] S210 : Determine a first writing area according to message attributes and the order in which the message attributes are extracted.
[0089] S220 , obtaining a first writing identifier of a first writing unit in the first writing area, matching the first writing identifier with the Ethernet signal information, and determining a first writing unit corresponding to the writing of the Ethernet signal information.
[0090] In some embodiments of S210, it can be known from S110 that the message attributes include: receiver attributes and sender attributes, that is, receiving attributes and sending attributes.
[0091] Based on the message attributes and the extraction order of the message attributes, it is determined which extraction order the current Ethernet signal is, and whether it belongs to the receiver attribute or the sender attribute, thereby confirming the first writing area where the Ethernet signal information is written.
[0092] The first writing area has a plurality of first writing units.
[0093] In one embodiment, if the current Ethernet signal belongs to the receiving attribute and is the first extracted, the first writing area is the first input area; if the current Ethernet signal belongs to the receiving attribute and is the Nth extracted, the first writing area is the Nth input area.
[0094] In one embodiment, if the current Ethernet signal has a sending attribute and is the first extracted, the first writing area is the first output area; if the current Ethernet signal has a sending attribute and is the Nth extracted, the first writing area is the Nth output area.
[0095] For example, referring to Figure 2When the write area is the write area of the memory, the write area of the memory is divided into N output areas and N input areas. Each output area and each input area has multiple write units, and the output areas correspond to the input areas. If the current Ethernet signal is of the receiving attribute and is the first to be extracted, the address of the first input area in the write area of the memory is obtained. The first input area is the first write area written by the current Ethernet signal; if the current Ethernet signal is of the sending attribute and is the second to be extracted, the address of the second output area in the write area of the memory is obtained. The second output area is used as the first write area. Among them, it is not the address of the first output area. The address of the first output area is used for writing the corresponding interface signal information later. And so on, until all Ethernet information is written, the area address facilitates the rapid positioning and writing of the subsequent signal information.
[0096] For example, referring to Figure 2 When the write area is a spreadsheet write area, the spreadsheet has N rows of output areas and N rows of input areas. Each row of the output area and each row of the input area has multiple write cells, and the output areas correspond to the input areas. If the current Ethernet signal is of the receive attribute and is the first to be extracted, the first row of the input area is designated as the first write area for the current Ethernet signal. If the current Ethernet signal is of the transmit attribute and is the second to be extracted, the second row of the output area is designated as the first write area for the current Ethernet signal. The address of the first row of the output area is not the address of the first row of the output area, as it is used to write the corresponding interface signal information later. This continues in this manner until all Ethernet information is written.
[0097] In some embodiments of S220, the first writing area has a plurality of first writing units, and the Ethernet signal information is written into the first writing units according to the correspondence between the first writing identifiers of the first writing units and the Ethernet signal information.
[0098] The first write identifier can be a storage address identifier in a memory, a row and column field in a spreadsheet, or a cache address identifier of a buffer for temporarily storing data. In this application, no specific restrictions are made on the specific application objects of the write identifier.
[0099] For example, referring to Figure 2When the write area is the write area of the memory, if the current Ethernet signal belongs to the receiving attribute and is the first to be extracted, then the address of the first input area in the write area of the memory is obtained, and the first input area is the first write area where the current Ethernet signal is written; according to the storage address identifier of the write unit in the first input area, through the correspondence with the Ethernet signal information, the first write unit corresponding to the first signal name in the current Ethernet signal information is determined, and the first write unit corresponding to the signal value in the current Ethernet signal information is determined, and so on, the current Ethernet signal information is written into the first write area.
[0100] For example, referring to Figure 2 When the writing area is the writing area of the spreadsheet, if the current Ethernet signal belongs to the receiving attribute and is the first extracted, the first row input area is set as the first writing area for writing the current Ethernet signal; according to the corresponding row and column fields in the first row input area, through the correspondence with the Ethernet signal information, the first writing unit corresponding to the first signal name in the current Ethernet signal information is determined, and the first writing unit corresponding to the signal value in the current Ethernet signal information is determined, and so on, the current Ethernet signal information is written into the first writing area.
[0101] In some embodiments of one aspect of the present invention, at S300, the process of extracting interface signal information includes:
[0102] S310 , using the first signal name as a search condition, extracting a second signal name corresponding to the first signal name from a second configuration file.
[0103] S320: Determine an interactive attribute of the second signal name according to the transmission information.
[0104] S330: Using the first signal name as a search condition, and writing the interface test value obtained by the search according to the transmission test value.
[0105] S340: Form interface signal information according to the second signal name, the interaction attribute, and the interface test value.
[0106] In some embodiments of S310, based on the Ethernet signal information and the second configuration file, the second signal name containing the first signal name field is extracted and retrieved from the second configuration file using the parsed first signal name of the Ethernet signal as a search condition.
[0107] The second signal name is the internal interface name.
[0108] Exemplarily, based on the Ethernet signal information and the MAP file, the first signal name of the Ethernet signal obtained by parsing is used as a search condition, and the second signal name containing the first signal name field is extracted and searched in the MAP file.
[0109] In some embodiments of S320 , the interactive attribute corresponding to the second signal name is determined according to the input and output attributes of the Ethernet signal in the search condition.
[0110] The interactive attributes are output attributes and input attributes. Because they are based on the same UUID, the input and output attributes of Ethernet signals correspond to the message attributes of Ethernet messages.
[0111] In one embodiment, the interaction attribute corresponding to the second signal name is determined according to the transceiver type, ie, the input / output attribute, in the transmission information of the Ethernet signal in the search condition.
[0112] For example, when the Ethernet signal in the search condition is an input attribute, the interaction attribute of the interface signal retrieved is an output attribute, and the interface signal serves as output; when the Ethernet signal in the search condition is an output attribute, the interaction attribute of the interface signal retrieved is an input attribute, and the interface signal serves as input.
[0113] In some embodiments of S330, the first signal name is used as a retrieval condition, and the transmission test value generated by parsing the first configuration file according to S100, that is, the test input value or the test output value, is written into the second configuration file to retrieve the interface signal input and output value, that is, the interface test value.
[0114] Exemplarily, the test input value or test output value generated by parsing the ARXML file in S100 is written into the interface signal input value or output value retrieved from the MAP file.
[0115] In some embodiments of S340 , the second signal name, interaction attribute, and interface test value determined in S310 to S330 are combined to form interface signal information.
[0116] The interface signal information may also include information of other interface signals, and the specific type of the interface signal information is not limited in this application.
[0117] Through the above embodiment, by using the Ethernet signal information as the search condition, the corresponding interface signal information is retrieved to achieve one-to-one matching, thereby avoiding the problems of test sequence omission, incomplete test sequence and long test time.
[0118] In some embodiments of one aspect of the present invention, at S400, the writing process of the second writing unit includes:
[0119] S410: Determine a second writing area corresponding to the first writing area according to message attributes and interface signal information.
[0120] S420 : Match the second write identifier with the interface signal information according to the second write identifier of the second write unit in the second write area, and determine the second write unit to which the interface signal information is written.
[0121] In some embodiments of S410, S320 indicates that, due to the same UUID, the message attributes of the Ethernet message and the input and output attributes of the Ethernet signal are consistent, and the input and output attributes of the Ethernet signal correspond to the interaction attributes of the interface signal. That is, if the Ethernet signal is input, the interface signal is output, and if the Ethernet signal is output, the interface signal is input.
[0122] In one embodiment, the attribute position of the second write area is determined based on the transceiver attributes of the Ethernet signal determined by the message attributes and the interaction attributes in the interface signal information. The first write area determined by the message attributes and the corresponding relationship between the first write area and the second write area are used to determine the writing sequence position of the second write area, thereby determining the second write area. The position of the first write area corresponds to the position of the second write area, forming an input-output correspondence relationship.
[0123] That is to say, the attribute position of the second write area is determined by the sending and receiving attributes of the message attributes and the input and output attributes of the interaction attributes, and then the writing sequence position of the second write area is determined by the sequence position of the first write area, thereby determining the writing position of the second write area.
[0124] For example, based on the Ethernet signal and interface signal that match each other in S300, when the message attribute is a receiving attribute, that is, the first writing area is an input area, and the interaction attribute of the interface signal is an output attribute, the interface signal is written to the output area as an output, that is, the second writing area is the output area. According to the first writing area, if the first writing area is the first input area, the second writing area is the first output area.
[0125] For example, based on the Ethernet signal and interface signal that match each other in S300, when the message attribute is a sending attribute, that is, the first writing area is the output area, and the interaction attribute of the interface signal is an input attribute, the interface signal is written into the input area as input, that is, the second writing area is the input area. According to the first writing area, if the first writing area is the Nth output area, the second writing area is the Nth input area.
[0126] In some embodiments of S420, the second writing area has a plurality of second writing units, and the interface signal information is written into the second writing units according to the correspondence between the second writing identifiers of the second writing units and the interface signal information.
[0127] The second write identifier can be a storage address identifier in the memory, a row and column field in a spreadsheet, or a cache address identifier of a buffer for temporarily storing data. In this application, no specific restrictions are made on the specific application objects of the write identifier.
[0128] Exemplarily, when the write area is the write area of the memory, if S410 determines that the second write area of the current interface signal information is the first output area; according to the storage address identifier of the write unit in the first output area, through the correspondence with the interface signal information, the second write unit corresponding to the second signal name in the current interface signal information is determined, and the second write unit corresponding to the interface test value in the current interface signal information is determined, and so on, the current interface signal information is written into the second write area.
[0129] Exemplarily, when the writing area is the writing area of a spreadsheet, if S410 determines that the second writing area of the current interface signal information is the Nth input area, then the Nth row input area is the second writing area for writing the current interface signal; according to the corresponding row and column fields in the Nth row input area, through the correspondence with the Ethernet signal information, the second writing unit corresponding to the second signal name in the current Ethernet signal information is determined, and the second writing unit corresponding to the interface test value in the current interface signal information is determined, and so on, and the current interface signal information is written into the second writing area.
[0130] The above embodiments can improve the test efficiency and avoid the omission of test cases due to changes in Ethernet signals.
[0131] Another embodiment of the present application provides a vehicle control device comprising a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned vehicle Ethernet interface testing method. The vehicle control device can be any intelligent terminal, including a tablet computer and an onboard computer.
[0132] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0133] See also Figure 3 , Figure 3 The hardware structure of a vehicle control device according to another embodiment is shown. The vehicle control device includes:
[0134] The processor may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0135] The memory can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory, and the processor is called to execute the interface test method of the in-vehicle Ethernet of the embodiment of this application;
[0136] Input / output interface, used to realize information input and output;
[0137] Communication interface, used to realize communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, Wi-Fi, Bluetooth, etc.);
[0138] The bus transmits information between the various components of the device (such as the processor, memory, input / output interfaces, and communication interfaces);
[0139] The processor, memory, input / output interface and communication interface are connected to each other through a bus within the device.
[0140] An embodiment of the present invention further provides a vehicle, including the vehicle-mounted Ethernet interface testing method of the above embodiment.
[0141] The vehicle can be a private car, such as a sedan, SUV, MPV, or pickup truck. It can also be a commercial vehicle, such as a van, bus, small truck, or large trailer. The vehicle must have an electric motor that can output power or store mechanical energy as a generator. If the vehicle is a new energy vehicle, it can be a hybrid or a pure electric vehicle.
[0142] Since the vehicle applies all the technical solutions of the above-mentioned vehicle control device, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be repeated here.
[0143] Another embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned vehicle Ethernet interface testing method.
[0144] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0145] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0146] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0147] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0149] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0150] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0151] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0152] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0154] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A method for testing an in-vehicle Ethernet interface, characterized in that: The method comprises: Parsing a first configuration file of the in-vehicle Ethernet, extracting message attributes of the in-vehicle Ethernet and Ethernet signal information corresponding to the message attributes; Determining a first writing unit in a first writing area according to the message attributes and the Ethernet signal information, and writing the Ethernet signal information into the first writing unit accordingly; parsing a second configuration file of the in-vehicle Ethernet, and extracting interface signal information corresponding to the Ethernet signal information according to the Ethernet signal information; Determine a second writing unit in a second writing area according to the message attribute and the interface signal information, and write the interface signal information into the second writing unit accordingly; wherein the first writing area corresponds to the second writing area; All matching first writing areas and second writing areas are traversed to generate interface test cases.
2. The interface testing method according to claim 1, characterized in that: The extracting the message attributes of the in-vehicle Ethernet and the Ethernet signal information corresponding to the message attributes includes: Parsing the Ethernet message attributes according to the universal unique identifier of the Ethernet message in the first configuration file; Determine, according to the universal unique identifier, a signal node defined in Ethernet corresponding to the message attribute and a first signal name under the signal node; Parsing the Ethernet message according to the universal unique identifier, obtaining transmission information of the Ethernet signal corresponding to the message attribute, and generating a transmission test value; The Ethernet signal information is formed according to the first signal name, the transmission information and the transmission test value.
3. The interface testing method according to claim 1, wherein: The determining, according to the message attribute and the Ethernet signal information, a first writing unit in the first writing area includes: determining the first writing area according to the message attributes and the order in which the message attributes are extracted; A first write identifier of the first write unit in the first write area is obtained, the first write identifier is matched with the Ethernet signal information, and the first write unit into which the Ethernet signal information is written is determined.
4. The interface testing method according to claim 1, wherein: The Ethernet signal information includes a first signal name, transmission information, and a transmission test value; and extracting the interface signal information corresponding to the Ethernet signal information includes: Using the first signal name as a search condition, extracting a second signal name corresponding to the first signal name from the second configuration file; determining, according to the transmission information, an interactive attribute of the second signal name; Using the first signal name as a search condition, and according to the transmission test value, writing and retrieving the interface test value; The interface signal information is formed according to the second signal name, the interaction attribute and the interface test value.
5. The interface testing method according to claim 1, wherein: The determining, according to the message attribute and the interface signal information, a second writing unit in the second writing area includes: determining, according to the message attribute and the interface signal information, the second writing area corresponding to the first writing area; According to the second writing identifier of the second writing unit in the second writing area, the second writing identifier is matched with the interface signal information to determine the second writing unit into which the interface signal information is written.
6. The interface testing method according to claim 3, characterized in that: The message attributes include a receiving attribute and a sending attribute; and determining the first writing area according to the message attributes and the extraction order of the message attributes includes: When the message attribute is the receiving attribute and the extraction order is the Nth extraction, the first writing area is the Nth input area.
7. The interface testing method according to claim 6, characterized in that: The determining the first writing area according to the message attributes and the extraction order of the message attributes includes: When the message attribute is the sending attribute and the extraction order is the Nth extraction, the first writing area is the Nth output area.
8. The interface testing method according to claim 5, characterized in that: The interface signal information includes an interaction attribute, and determining the second writing area corresponding to the first writing area according to the message attribute and the interface signal information includes: An attribute position of the second writing area is determined according to the message attribute and the interaction attribute, and a sequential position of the second writing area is consistent with a sequential position of the first writing area.
9. A vehicle control device, characterized in that: The invention comprises a memory, a processor and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the interface testing method of the in-vehicle Ethernet according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the interface testing method of the in-vehicle Ethernet according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Consistency testing method for vehicle-mounted Ethernet
CN113468070A
Vehicle-mounted Ethernet protocol conformance test method and device, and related equipment
CN115102888A
Test script generation method and device, electronic equipment and storage medium
CN118760615A
Function test method and device of intelligent vehicle-mounted terminal and electronic equipment
CN119201713A
On vehicle network central control unit and its managing and controlling method for on-vehicle network
CN1719782A