A network communication test method, device, equipment and readable storage medium
Patent Information
- Application Number
- CN202211714820.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-12-27
Smart Images

Figure CN115914028B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a network communication testing method, device, equipment and readable storage medium. Background Art
[0002] Testing of vehicle electronic control units usually includes product network approval testing, environmental performance testing and electrical performance testing.
[0003] The entire process of product network approval test, environmental performance test and electrical performance test usually takes a long time. Therefore, a lot of test data will be generated. Testers need to be familiar with all test cases in order to filter out the data required by the test cases from a large amount of test data, and then analyze and obtain the test results.
[0004] Manual analysis of large amounts of test data is not only time-consuming but also carries the risk of human error, and may even lead to erroneous test results, affecting the reliability of the test results.
[0005] In summary, how to effectively solve the problems of testing and analysis of vehicle electronic control units is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0006] The purpose of this application is to provide a network communication test method, device, equipment and readable storage medium, which can automatically analyze the test data of the vehicle electronic control unit and obtain accurate test results.
[0007] In order to solve the above technical problems, this application provides the following technical solutions:
[0008] A network communication testing method, comprising:
[0009] Obtain test data of vehicle electronic control units;
[0010] Determine the message type corresponding to the test data;
[0011] Using the test case corresponding to the message type, parsing the normal format message and the wrong format message in the test data to obtain the parsing result;
[0012] According to the data calculation process in the test case, the analysis result is calculated to obtain the test result.
[0013] Optionally, using a test case corresponding to the message type, parsing normal format messages and erroneous format messages in the test data to obtain parsing results, including:
[0014] Dividing the messages in the test data into the normal format messages and the error format messages;
[0015] Using the test case, the normal format message is parsed to obtain a normal message parsing result;
[0016] Using the test case, performing error correction analysis on the erroneous format message to obtain an abnormal message analysis result;
[0017] The normal message parsing result and / or the abnormal message parsing result is determined as the parsing result.
[0018] Optionally, dividing the messages in the test data into the normal format messages and the erroneous format messages includes:
[0019] Traversing the messages in the test data, and determining the messages matching the message format specification of the message type as normal format messages;
[0020] A message that does not match the message type and the message format specification is determined as an abnormal format message.
[0021] Optionally, performing error correction analysis on the erroneous format message to obtain an abnormal message analysis result includes:
[0022] Clarify the error content of the error format message;
[0023] Parsing the correct content in the erroneous format message to obtain data content;
[0024] The error content and the data content are determined as the abnormal message parsing result.
[0025] Optionally, it also includes:
[0026] If the missing byte in the data field is a count byte, obtaining the count byte corresponding to the previous frame message of the error format message;
[0027] After adding 1 to the count value corresponding to the count byte, the count value of the error format message is determined.
[0028] Optionally, it also includes:
[0029] Using the test results, a target report corresponding to a preset output report type is generated.
[0030] Optionally, the acquiring test data of the vehicle electronic control unit includes:
[0031] During the process of performing at least one of a product network approval test, an environmental performance test and an electrical performance test on the vehicle electronic control unit, data acquisition is performed to obtain the test data.
[0032] A network communication testing device, comprising:
[0033] A test data acquisition module, used to acquire test data of a vehicle electronic control unit;
[0034] A message type determination module, used to determine the message type corresponding to the test data;
[0035] A message parsing module, used to parse the normal format messages and the wrong format messages in the test data using the test case corresponding to the message type to obtain the parsing result;
[0036] The test result calculation module is used to calculate the analysis result according to the data calculation process in the test case to obtain the test result.
[0037] An electronic device, comprising:
[0038] Memory for storing computer programs;
[0039] A processor is used to implement the steps of the above-mentioned network communication testing method when executing the computer program.
[0040] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned network communication test method are implemented.
[0041] Apply the method provided in the embodiment of the present application to obtain test data of a vehicle electronic control unit; determine the message type corresponding to the test data; use the test case corresponding to the message type to parse the normal format messages and the wrong format messages in the test data to obtain the parsing result; calculate the parsing result according to the data calculation process in the test case to obtain the test result.
[0042] In the present application, after obtaining the test data of the vehicle electronic control unit, the message type of the test data is determined. Through the test case corresponding to the message type, the normal format message and the wrong format message in the test data can be parsed to obtain the parsing result. Finally, according to the data calculation process in the test case, the parsing result is calculated, and the test result can be finally obtained. Since in the process of parsing the test data, with the help of the test case, not only the normal format message can be automatically analyzed, but also the wrong format message can be automatically analyzed, the parsing result can be more in line with the actual test data. Based on the more accurate parsing result, the data calculation is performed, and the test result finally obtained is also more accurate.
[0043] Correspondingly, the embodiments of the present application also provide a network communication test device, equipment and readable storage medium corresponding to the above-mentioned network communication test method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 This is a flowchart of an implementation method of a network communication test method in an embodiment of the present application;
[0046] Figure 2 A specific flow chart of a network communication testing method in an embodiment of the present application;
[0047] Figure 3 This is a schematic diagram of the structure of a network communication testing device in an embodiment of the present application;
[0048] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0049] Figure 5 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0051] Please refer to Figure 1 , Figure 1 This is a flow chart of a network communication testing method in an embodiment of the present application, the method comprising the following steps:
[0052] S101. Acquire test data of a vehicle electronic control unit.
[0053] The test data may specifically be a test message obtained by performing a test on a vehicle electronic control unit. That is, in the embodiment of the present application, the specific test of the test data and the message type of the test data itself are not limited. For example, the message type of the test data may include but is not limited to CAN, CANFD, and Ethernet.
[0054] Among them, CAN (Controller Area Network) is a multi-master serial communication bus and one of the most widely used field buses in the world.
[0055] CANFD (CAN with Flexible Data rate, an extension standard of the original CAN bus protocol) was originally designed to meet the requirements of automotive networks for higher bandwidth. CANFD achieves more accurate and near real-time data transmission by minimizing protocol latency and providing higher bandwidth. CANFD is compatible with CAN networks.
[0056] Ethernet (Automotive Ethernet is a wired network that connects electronic components in cars) was designed to meet the automotive industry's requirements for bandwidth, latency, synchronization, interference (for example, electromagnetic interference (EMI)), security, and network management.
[0057] In an optional embodiment of the present application, obtaining test data of a vehicle electronic control unit includes: recording data during at least one of a product network approval test, an environmental performance test, and an electrical performance test on the vehicle electronic control unit to obtain test data.
[0058] Among them, product network approval testing is also called effectiveness testing, which verifies whether the network communication, functions, performance and other characteristics of the electronic control unit are consistent with customer requirements.
[0059] Environmental performance testing verifies the performance of electronic control units in a simulated environment, including extreme temperature, thermal cycle, thermal shock and other environmental factors to verify whether the product's network communication meets the requirements.
[0060] Electrical performance testing is a test that uses professional testing tools to simulate a variety of normal, peak and abnormal conditions to evaluate the various performance indicators of the system. Through these tests and verifications, defects, errors and quality problems in the controller during manufacturing and installation can be discovered and eliminated in a timely manner to ensure that the controller can communicate normally on the network.
[0061] That is to say, other test data such as product network approval test, environmental performance test and electrical performance test can be taken as input.
[0062] S102: Determine the message type corresponding to the test data.
[0063] Specifically, the test data can be parsed by the message type (supporting CAN, CANFD, Flexray, Spi, TCP, UDP types), and can also automatically identify and distinguish data in different formats (such as binary data format, octal data format, decimal data format, hexadecimal data format), waiting for the selection of test cases for verification.
[0064] S103: using the test case corresponding to the message type, parse the normal format messages and the wrong format messages in the test data to obtain the parsing result.
[0065] In the embodiment of the present application, corresponding test cases can be set in advance for different message types. After the message type of the test data is clarified, the test case corresponding to the message type can be directly called to parse the normal format message and the wrong format message in the test data to obtain the parsing result.
[0066] That is to say, in the embodiment of the present application, when parsing the test data, not only the normal format messages in the test data are parsed, but also the erroneous format messages are parsed, so that the parsing result can be more comprehensive and reliable.
[0067] In an optional implementation manner of the present application, a normal format message and an erroneous format message in the test data are parsed using a test case corresponding to the message type to obtain a parsing result, including:
[0068] Step 1: Divide the messages in the test data into normal format messages and error format messages;
[0069] Step 2: Use the test case to parse the normal format message and obtain the normal message parsing result;
[0070] Step 3: Use the test case to perform error correction analysis on the message in the wrong format and obtain the abnormal message analysis result;
[0071] Step 4: Determine the normal message parsing result and / or the abnormal message parsing result as the parsing result.
[0072] For ease of description, the above four steps are combined for explanation below.
[0073] The message has a corresponding message format. When analyzing the test data, the messages in the test data can be first divided into normal format messages and error format messages. Specifically, when determining whether the message format is normal, the verification and comparison can be performed based on the message format of the corresponding message type. That is, the messages in the test data are divided into normal format messages and error format messages, including:
[0074] Step 1: traverse the messages in the test data, and determine the messages that match the message format specification of the message type as normal format messages;
[0075] Step 2: Determine the message that does not match the message type and message format specification as an abnormal format message.
[0076] That is to say, a message with no missing content and a format that matches the message format specification of the message type is a normal format message; a message that does not match the message format specification of the message type is an incorrect format message. An incorrect format message may specifically have missing content (such as missing bytes) or internal data errors (such as counting errors).
[0077] For parsing the registration format message, you can refer to the message protocol corresponding to the corresponding message type and other information, which will not be described here one by one.
[0078] Parsing the error-formatted message, that is, clarifying the error of the error-formatted message and trying to correct the error content, and also parsing the error-free content in the message, so as to obtain the abnormal message parsing result. Specifically, the error-formatted message is parsed for error correction to obtain the abnormal message parsing result, including:
[0079] Step 1: Identify the error content of the error format message;
[0080] Step 2: parse the correct content in the erroneous format message to obtain the data content;
[0081] Step 3: Determine the error content and data content as abnormal message parsing results.
[0082] Specifically, the error content that causes the message abnormality can be found by comparing the message with the message format specification, and the error content can be specifically missing bytes or numerical errors. The normal content in the message can be parsed according to the message format specification / protocol to obtain the data content. The abnormal message parsing result includes the error content and the data content.
[0083] That is, for the data frame requirements, this application is different from the conventional detection method that only extracts the format-error messages separately. In this application, the format-error messages can be deeply parsed, ignoring or extracting the available sub-signals of the error messages as much as possible according to the detected message rules (for example, if there are local data format errors in the reserved fields, counter fields, CRC check fields, header fields, message type fields and other regular or ignorable fields, the contents of other fields of the message will still be parsed successfully). By parsing the message frame by frame, checking the message ID, checking the message length, checking the rolling counter, checking the message signal and the checksum, etc.
[0084] The message sending type identifies the type flag of the data, determines the type of data to be sent, and counts the sending cycle, etc.
[0085] The bus-off recovery mechanism is tested to locate the location in the data where the bus is off, analyze the number of error frames and the message characteristics of the attempt to recover the sent data, and compare the mechanism for recovery after the bus is off with the recovery rules defined by the customer.
[0086] If one message fails to be sent, one error frame will be generated, and one error frame will increase the error sending counter by 8. When there are 32 error frames in succession (sending error counter>255), the bus will enter the off state. After entering the off state, the controller will try to send a message after a period of time. If the message is sent successfully, the controller will exit the off state. If the message fails to be sent, it will be another error frame. Wait for another period of time and continue to try to send until the message is sent successfully.
[0087] The recovery rule is that after the bus is closed, the controller will try to send a message after waiting for T1. If the message fails, it will continue to try n times. If the message fails after n attempts, it will wait for T2 time before trying to send the message again, and the cycle will continue until the message is sent successfully.
[0088] The message ID can be verified by parsing the message to obtain the data type of the message, dividing the message into fields of corresponding types according to the data type, extracting the ID segment, distinguishing the data format, and obtaining the actual ID through data format conversion for judging the result.
[0089] After completing the message parsing, for the test data, there may or may not be messages with abnormal formats. Therefore, the final parsing results may only correspond to normal message parsing results, or may only correspond to abnormal message parsing results, or may include both normal message parsing results and abnormal message parsing results.
[0090] In an optional implementation of the present application, if the missing byte in the data field is a count byte, the count byte corresponding to the previous frame message of the error format message is obtained; after the count value corresponding to the count byte is added by 1, it is determined as the count value of the error format message. That is, based on the count byte corresponding to the previous frame message, by adding 1, the technical value of the current message can be obtained. In this way, when judging whether the next frame message is abnormal, when the next frame message is actually a normal message, it can be avoided that the current frame is missing the count byte and the next frame is judged as abnormal.
[0091] For example: CAN type message is composed of frame start, arbitration field, control field, data field, CRC field, response field and frame end;
[0092] Among them, the data field is 8 bytes. If there is a message with a data field of less than 8 bytes (such as 7 bytes) in the input message, the conventional detection method will define the message with a data field length of 7 bytes as a format error message and record a format error. In this application, we will first analyze which byte is missing in the message with a data field length of 7 bytes (specifically, there will be bytes responsible for verification and bytes responsible for counting in the data field, etc.), and then check each byte separately (for example, the 6th byte is responsible for counting, and this byte is extracted from hexadecimal to decimal to obtain the count value, and compared with the count value of the previous frame message, whether it is increased according to the rules (for example, the count of the previous frame is 1, and this frame increases to 2. If it is not 2, the count error is recorded). The count value of this frame message will also be saved for the judgment of the next frame). In this way, the 7 bytes of the data field are parsed and checked one by one.
[0093] If the conventional detection method is: if the count of the previous frame is 1, the current frame is defined as a format error message because the data field is 7, and there is no specific analysis of the count of the format error message. There will be a lack of judgment of count error; if the message with a data field of 7 is missing the byte responsible for counting, this application will add 1 to the count value of the previous frame to determine whether the count value of the next frame is wrong. This will avoid false reporting of many count errors. The verification of other fields and bytes is similar, and will not be repeated here.
[0094] S104: Calculate the parsing result according to the data calculation process in the test case to obtain the test result.
[0095] Specifically, the rules defined by the currently executed test case can be called to calculate the test results according to the data calculation rules, and the expected results can be passed for result judgment. After the calculation of each set of data, it is necessary to judge whether the comparison results are successful. If successful, continue to calculate and compare the next set of data; if the calculation result comparison fails, update the test results of this set of test data, and then compare the next set of data.
[0096] Apply the method provided in the embodiment of the present application to obtain test data of a vehicle electronic control unit; determine the message type corresponding to the test data; use the test case corresponding to the message type to parse the normal format messages and the wrong format messages in the test data to obtain the parsing result; calculate the parsing result according to the data calculation process in the test case to obtain the test result.
[0097] In the present application, after obtaining the test data of the vehicle electronic control unit, the message type of the test data is determined. Through the test case corresponding to the message type, the normal format message and the wrong format message in the test data can be parsed to obtain the parsing result. Finally, according to the data calculation process in the test case, the parsing result is calculated, and the test result can be finally obtained. Since in the process of parsing the test data, with the help of the test case, not only the normal format message can be automatically analyzed, but also the wrong format message can be automatically analyzed, the parsing result can be more in line with the actual test data. Based on the more accurate parsing result, the data calculation is performed, and the test result finally obtained is also more accurate.
[0098] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.
[0099] In an optional implementation of this application, please refer to Figure 2 , Figure 2 This is a specific flow chart of a network communication test method in an embodiment of the present application, that is, after obtaining the test results, a report in a specific form can also be output. Specifically, the test results are used to generate a target report corresponding to a preset output report type.
[0100] Specifically, the output report type can be determined in advance by extracting effective test data features based on the test cases of the test product and establishing data analysis rules.
[0101] Among them, check the message ID, check the message DLC length, check the rolling counter, check the message signal and CheckSum, check the message timeout processing, check the message signal to meet the requirements, check the message sending type and period, and the bus shutdown recovery mechanism can be in no order. The specific inspection process can refer to the calculator verification process described above, and will not be repeated here.
[0102] After obtaining the test results, you can compare all the data of the test case and output them according to the selected report method, such as graphics, tables, etc.
[0103] Corresponding to the above method embodiment, the embodiment of the present application further provides a network communication testing device. The network communication testing device described below and the network communication testing method described above can refer to each other.
[0104] See also Figure 3 As shown, the device includes the following modules:
[0105] A test data acquisition module 101 is used to acquire test data of a vehicle electronic control unit;
[0106] A message type determination module 102, used to determine the message type corresponding to the test data;
[0107] The message parsing module 103 is used to parse the normal format messages and the wrong format messages in the test data using the test cases corresponding to the message types to obtain the parsing results;
[0108] The test result calculation module 104 is used to calculate the analysis result according to the data calculation process in the test case to obtain the test result.
[0109] The device provided in the embodiment of the present application is used to obtain test data of a vehicle electronic control unit; the message type corresponding to the test data is determined; the normal format messages and the incorrect format messages in the test data are parsed using the test case corresponding to the message type to obtain the parsing result; the parsing result is calculated according to the data calculation process in the test case to obtain the test result.
[0110] In the present application, after obtaining the test data of the vehicle electronic control unit, the message type of the test data is determined. Through the test case corresponding to the message type, the normal format message and the wrong format message in the test data can be parsed to obtain the parsing result. Finally, according to the data calculation process in the test case, the parsing result is calculated, and the test result can be finally obtained. Since in the process of parsing the test data, with the help of the test case, not only the normal format message can be automatically analyzed, but also the wrong format message can be automatically analyzed, the parsing result can be more in line with the actual test data. Based on the more accurate parsing result, the data calculation is performed, and the test result finally obtained is also more accurate.
[0111] In a specific implementation of the present application, the message parsing module 103 is specifically used to divide the messages in the test data into normal format messages and error format messages;
[0112] Use the test case to parse the normal format message and obtain the normal message parsing result;
[0113] Using the test case, error correction analysis is performed on the erroneous format message to obtain the abnormal message analysis result; the normal message analysis result and / or the abnormal message analysis result is determined as the analysis result.
[0114] In a specific implementation of the present application, the message parsing module 103 is specifically used to traverse the messages in the test data and determine the messages that match the message format specification of the message type as normal format messages;
[0115] A message that does not match the message type and message format specification is determined as an abnormal format message.
[0116] In a specific implementation of the present application, the message parsing module 103 is specifically used to clarify the error content of the error format message;
[0117] Parse the correct content in the erroneous format message to obtain the data content;
[0118] The error content and data content are determined as abnormal message parsing results.
[0119] In a specific implementation of the present application, the message parsing module 103 is specifically configured to obtain the count byte corresponding to the previous frame message of the error format message if the missing byte in the data field is a count byte;
[0120] After the count value corresponding to the count byte is increased by 1, it is determined to be the count value of the message in the wrong format.
[0121] In a specific implementation of the present application, it also includes: a report generation module, which is used to generate a target report corresponding to a preset output report type using the test results.
[0122] In a specific embodiment of the present application, the test data acquisition module 101 is specifically used to record data and obtain test data during at least one of product network approval testing, environmental performance testing and electrical performance testing of a vehicle electronic control unit.
[0123] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device. The electronic device described below and the network communication test method described above can refer to each other.
[0124] See also Figure 4 As shown, the electronic device includes:
[0125] A memory 332, for storing computer programs;
[0126] The processor 322 is used to implement the steps of the network communication testing method of the above method embodiment when executing the computer program.
[0127] For details, please refer to Figure 5 , Figure 5 A specific structural diagram of an electronic device provided for this embodiment, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the central processing unit 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0128] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0129] The steps in the network communication test method described above can be implemented by the structure of an electronic device.
[0130] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the network communication test method described above can refer to each other.
[0131] A readable storage medium stores a computer program, which implements the steps of the network communication test method of the above method embodiment when the computer program is executed by a processor.
[0132] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0133] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0134] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0135] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0136] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0137] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A network communication testing method, characterized in that: include: During at least one of a product network approval test, an environmental performance test and an electrical performance test on a vehicle electronic control unit, data acquisition is performed to obtain test data; Determine the message type corresponding to the test data; Using the test case corresponding to the message type, parsing the normal format message and the wrong format message in the test data to obtain the parsing result, including: dividing the message in the test data into the normal format message and the wrong format message; using the test case, parsing the normal format message to obtain the normal message parsing result; using the test case, performing error correction parsing on the wrong format message to obtain the abnormal message parsing result; determining the normal message parsing result and / or the abnormal message parsing result as the parsing result; Among them, performing error correction analysis on the erroneous format message to obtain the abnormal message analysis result includes: clarifying the erroneous content of the erroneous format message; in the case of a local data format error in a regular or negligible field, parsing the correct content in the erroneous format message to obtain the data content; determining the erroneous content and the data content as the abnormal message analysis result; if the missing byte in the data field is a count byte, obtaining the count byte corresponding to the previous frame message of the erroneous format message; adding 1 to the count value corresponding to the count byte, and determining it as the count value of the erroneous format message, so as to be used to determine whether the count value of the next frame is wrong; According to the data calculation process in the test case, the analysis result is calculated to obtain the test result.
2. The network communication testing method according to claim 1, characterized in that: Dividing the messages in the test data into the normal format messages and the error format messages, comprising: Traversing the messages in the test data, and determining the messages matching the message format specification of the message type as normal format messages; A message that does not match the message type and the message format specification is determined as an abnormal format message.
3. The network communication testing method according to claim 1, characterized in that: Also includes: Using the test results, a target report corresponding to a preset output report type is generated.
4. A network communication testing device, characterized in that: include: A test data acquisition module, used to record data and obtain test data during at least one of a product network approval test, an environmental performance test and an electrical performance test on a vehicle electronic control unit; A message type determination module, used to determine the message type corresponding to the test data; The message parsing module is used to parse the normal format messages and the erroneous format messages in the test data by using the test case corresponding to the message type to obtain the parsing result, including: dividing the messages in the test data into the normal format messages and the erroneous format messages; parsing the normal format messages by using the test case to obtain the normal message parsing result; performing error correction parsing on the erroneous format messages by using the test case to obtain the abnormal message parsing result; determining the normal message parsing result and / or the abnormal message parsing result as the parsing result; wherein, the erroneous format messages are parsed by The error correction analysis of the message is performed to obtain the abnormal message analysis result, including: clarifying the error content of the error format message; in the case where a local data format error occurs in a regular or negligible field, parsing the correct content in the error format message to obtain the data content; determining the error content and the data content as the abnormal message analysis result; if the missing byte of the data field is a count byte, obtaining the count byte corresponding to the previous frame message of the error format message; adding 1 to the count value corresponding to the count byte, determining it as the count value of the error format message, so as to be used to determine whether the count value of the next frame is wrong; The test result calculation module is used to calculate the analysis result according to the data calculation process in the test case to obtain the test result.
5. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the network communication testing method according to any one of claims 1 to 3 when executing the computer program.
6. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network communication testing method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Network automation test method, cabinet and test host
CN102608993A
Transaction message log analysis method and device
CN111061696A
Message data processing method and device, equipment and storage medium
CN113485284A