CN115914028A - Network communication testing method, device, equipment and readable storage medium - Google Patents
Network communication testing method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN115914028A CN115914028A CN202211714820.8A CN202211714820A CN115914028A CN 115914028 A CN115914028 A CN 115914028A CN 202211714820 A CN202211714820 A CN 202211714820A CN 115914028 A CN115914028 A CN 115914028A
- Authority
- CN
- China
- Prior art keywords
- message
- test
- format
- data
- error
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 221
- 238000004891 communication Methods 0.000 title claims abstract description 40
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 238000004458 analytical method Methods 0.000 claims abstract description 85
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000004364 calculation method Methods 0.000 claims abstract description 20
- 230000008569 process Effects 0.000 claims abstract description 14
- 230000002159 abnormal effect Effects 0.000 claims description 28
- 238000011056 performance test Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 230000007613 environmental effect Effects 0.000 claims description 9
- 238000012937 correction Methods 0.000 claims description 7
- 238000010998 test method Methods 0.000 claims description 7
- 238000013215 result calculation Methods 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000011084 recovery Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000005096 rolling process Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000035939 shock Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
The application discloses a network communication testing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring test data of a vehicle electronic control unit; determining a message type corresponding to the test data; analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result; and calculating the analysis result according to the data calculation flow in the test case to obtain the test result. In the application, in the process of analyzing the test data, by means of the test case, not only can the normal format message be automatically analyzed, but also the error format message can be automatically analyzed, and the analysis result can be more fit with the actual test data. And data calculation is performed based on the more accurate analysis result, and the finally obtained test result is more accurate.
Description
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a network communication testing method, apparatus, device, and readable storage medium.
Background
Vehicle electronic control units are tested, typically including product network acceptance testing, environmental performance testing, and electrical performance testing.
The whole process of the product network acceptance test, the environmental performance test and the electrical performance test usually takes a long time. Therefore, a lot of test data can be generated, and a tester needs to be familiar with all test cases to filter out data required by the test cases from a large amount of test data and then analyze the data to obtain a test result.
A large amount of test data are manually analyzed, so that the time cost is high, the risk of human errors exists, even wrong test results are obtained, and the reliability of the test results is influenced.
In summary, how to effectively solve the problems of testing and analyzing the vehicle electronic control unit and the like is a technical problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a network communication testing method, a network communication testing device, a network communication testing equipment and a readable storage medium, which can automatically analyze the testing data of a vehicle electronic control unit and can obtain an accurate testing result.
In order to solve the technical problem, the application provides the following technical scheme:
a network communication test method comprises the following steps:
acquiring test data of a vehicle electronic control unit;
determining a message type corresponding to the test data;
analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result;
and calculating the analysis result according to the data calculation flow in the test case to obtain a test result.
Optionally, analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result, including:
dividing messages in the test data into the normal format messages and the error format messages;
analyzing the normal format message by using the test case to obtain a normal message analysis result;
utilizing the test case to carry out error correction analysis on the error format message to obtain an abnormal message analysis result;
and determining the normal message analysis result and/or the abnormal message analysis result as the analysis result.
Optionally, dividing the packets in the test data into the normal format packets and the error format packets includes:
traversing the messages in the test data, and determining the messages which are in standard matching with the message format of the message type as normal format messages;
and determining the message with the type not matched with the message format specification as an abnormal format message.
Optionally, the error correction analyzing the error format packet to obtain an abnormal packet analysis result includes:
defining the error content of the error format message;
analyzing the correct content in the error format message to obtain data content;
and determining the error content and the data content as the abnormal message analysis result.
Optionally, the method further comprises:
if the missing bytes of the data field are counting bytes, acquiring the counting bytes corresponding to the last frame of the message with the wrong format;
and after the count value corresponding to the counting byte is added with 1, determining the count value as the count value of the error format message.
Optionally, the method further comprises:
and generating a target report corresponding to a preset output report type by using the test result.
Optionally, the acquiring test data of the vehicle electronic control unit includes:
and in the process of performing at least one of a product network acceptance test, an environmental performance test and an electrical performance test on the vehicle electronic control unit, performing data recording to obtain the test data.
A network communication test apparatus, comprising:
the test data acquisition module is used for acquiring test data of the vehicle electronic control unit;
the message type determining module is used for determining the message type corresponding to the test data;
the message analysis module is used for analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result;
and the test result calculation module is used for calculating the analysis result according to the data calculation flow in the test case to obtain the test result.
An electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network communication testing method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described network communication testing method.
By applying the method provided by the embodiment of the application, the test data of the vehicle electronic control unit is obtained; determining a message type corresponding to the test data; analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result; and calculating the analysis result according to the data calculation flow in the test case to obtain the test result.
In the method, the test data of the vehicle electronic control unit are acquired, and then the message type of the test data is determined. The normal format message and the error format message in the test data can be analyzed through the test case corresponding to the message type, so that an analysis result is obtained. And finally, calculating the analysis result according to the data calculation flow in the test case, and finally obtaining the test result. In the process of analyzing the test data, the test case can be used for automatically analyzing not only the message with the normal format but also the message with the wrong format, and the analysis result can be more fit with the actual test data. And data calculation is performed based on the more accurate analysis result, and the finally obtained test result is more accurate.
Accordingly, embodiments of the present application further provide a network communication testing apparatus, a device and a readable storage medium corresponding to the network communication testing method, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a network communication testing method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a network communication testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a network communication testing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating a network communication testing method according to an embodiment of the present application, where the method includes the following steps:
and S101, acquiring test data of the vehicle electronic control unit.
The test data may be a test message obtained by performing an easy test on the vehicle electronic control unit. That is, in the embodiment of the present application, the specific test on the test data and the message type of the test data itself are not limited. For example, the packet type of the test data may include, but is not limited to, CAN, CANFD, ethernet.
Among them, CAN (Controller Area Network) is a serial communication bus of a multi-master mode, and is one of the most widely used field buses internationally.
CAN fd (CAN with Flexible Data rate, which is an extended standard for the original CAN bus protocol), is designed primarily to meet the requirement of higher bandwidth of the car network. CANFD enables more accurate and near real-time data transmission by minimizing protocol latency and providing higher bandwidth. A CANFD may be compatible with a CAN network.
Ethernet (vehicle Ethernet is a wired network for connecting electronic components in automobiles) is initially designed with the hope of meeting the requirements of the automotive industry for bandwidth, delay, synchronization, interference (e.g., electromagnetic interference (EMI)), security, and network management.
In an alternative embodiment of the present application, obtaining test data of a vehicle electronic control unit includes: and in 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, performing data recording to obtain test data.
The product network approval test is also called a validity test, which is to verify whether the network communication, function, performance and other characteristics of the electronic control unit are in accordance with the requirements of the customer.
The environmental performance test verifies the performance of the electronic control unit in a simulated environment, and verifies whether the network communication of the product meets the requirements or not under the influence of environmental factors such as limit temperature, thermal cycle, thermal shock and the like.
The electric performance test is a test for evaluating various performance indexes of the system by simulating various normal, peak and abnormal conditions through a professional test tool, and through the tests and verification, defects, errors and quality problems of the controller during manufacturing and installation can be timely found and eliminated, so that the controller can normally carry out network communication.
That is, other test data such as product network acceptance tests, environmental performance tests, and electrical performance tests may be recorded as input.
S102, determining the message type corresponding to the test data.
Specifically, the test data CAN be analyzed according to the type of the message (supporting CAN, CANFD, flexray, spi, tcp, UDP types), and CAN also be automatically identified and distinguished from data of different formats (such as binary data format, octal data format, decimal data format, hexadecimal data format), so as to wait for the test case to be selected for verification.
S103, analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result.
In the embodiment of the application, corresponding test cases can be set in advance for different message types. After the message type of the test data is determined, the test case corresponding to the message type can be directly called, so that the normal format message and the error format message in the test data are analyzed, and an analysis result is obtained.
That is to say, in the embodiment of the present application, when the test data is analyzed, not only the normal format packet in the test data but also the error format packet is analyzed, so that the analysis result is more comprehensive and reliable.
In an optional implementation manner in the present application, analyzing a normal format packet and an error format packet in test data by using a test case corresponding to a packet type to obtain an analysis result includes:
dividing messages in test data into normal format messages and error format messages;
analyzing the normal format message by using the test case to obtain a normal message analysis result;
thirdly, error correction analysis is carried out on the error format message by using the test case to obtain an abnormal message analysis result;
and step four, determining the normal message analysis result and/or the abnormal message analysis result as the analysis result.
For convenience of description, the above four steps will be described in combination.
The messages have corresponding message formats, and when the test data is analyzed, the messages in the test data can be firstly divided into normal format messages and error format messages. Specifically, when determining whether the message format is normal, the verification comparison may be performed specifically according to the message format of the corresponding message type. The method includes that messages in test data are divided into normal format messages and error format messages, and the method includes the following steps:
step 1, traversing messages in test data, and determining the messages which are in standard matching with the message format of the message type as normal format messages;
and 2, determining the message with the type not matched with the message format specification as the message with the abnormal format.
That is, the content is not lost, and the message with the format matched with the message format specification of the message type is the normal format message; and the message which is not matched with the message format specification of the message type is the error format message. The error format message may specifically be a content missing (e.g. a byte missing), or an internal data error (e.g. a counting error).
The message in the registration format is analyzed, and information such as a message protocol corresponding to the corresponding message type can be referred to, which is not described in detail herein.
And analyzing the error format message, namely, determining the error of the error format message, trying to correct the error content, and analyzing the error-free content in the message to obtain an abnormal message analysis result. Specifically, the error correction analysis of the error format message to obtain an abnormal message analysis result includes:
step 1, defining error contents of an error format message;
step 2, analyzing the correct content in the error format message to obtain the data content;
and step 3, determining the error content and the data content as an abnormal message analysis result.
Specifically, by comparing the message with the message format specification, the error content causing message exception can be found out, and the error content can be specifically byte missing, or numerical value error, and the like. The normal content in the message is analyzed, and the analysis can be specifically carried out according to the message format specification/protocol, so that the data content is obtained. The abnormal message analysis result includes error content and data content.
That is, for the requirement of the data frame, the present application is different from the conventional detection method that only the message with the format error is extracted alone, and in the present application, the message with the format error can be deeply analyzed, and the usable sub-signals of the message with the format error are ignored or extracted as much as possible according to the detected message rule (for example, the regular or negligible fields such as the reserved field, the counter field, the CRC check field, the header field, the message type field, etc. have local data format errors, and the contents of other fields of the message can still be successfully analyzed). The message is analyzed frame by frame, the message ID is checked, the message length is checked, the rolling counter is checked, the message signal and the checksum are checked, and the like.
The message sending type is a flag bit for identifying the type of the data, determining the type of the data sending, and counting the sending period.
And testing a bus closing recovery mechanism, positioning the bus closing position in the data, analyzing the number of error frames and attempting to recover the message characteristics of the transmitted data, and comparing the recovery mechanism after the bus is closed with a recovery rule defined by a client.
Wherein, 1 message fails to be sent, 1 error frame is generated, and 1 error frame can cause an error sending counter to be +8; when 32 error frames (transmission error counter > 255) are continuously transmitted, the bus is closed. After entering the bus closing state, the controller will try to send the message after a time interval, if the sending is successful, the controller will exit the bus closing state, and if the sending is failed, the controller will be an error frame. And waiting for a time to continue to attempt transmission until the transmission is successful.
And (4) recovering the rule, namely after the bus is closed, the controller waits for time T1 and then tries to send the message, and after the sending fails, the controller continues to try for n times. If the transmission still fails after n times of attempts, the message is attempted to be transmitted after T2 time, and the process is circulated until the message is successfully transmitted.
And (3) checking the ID of the message, namely obtaining the data type of the message by analyzing the message, dividing the message into fields of corresponding types according to the data type, extracting the ID section, distinguishing the data format, and obtaining the actual ID through data format conversion for judging the result.
After the message analysis is completed, for the test data, there may be a message with an abnormal format or no message with an abnormal format, so that the final analysis result may only correspond to the normal message analysis result, may only correspond to the abnormal message analysis result, or may include both the normal message analysis result and the abnormal message analysis result.
In an optional implementation manner in the present application, if the missing bytes of the data field are count bytes, the count bytes corresponding to the previous frame of the error format packet are obtained; and after adding 1 to the count value corresponding to the counting byte, determining the count value as the count value of the error format message. That is, the technical value of the current packet can be obtained by adding 1 based on the counting byte corresponding to the previous frame of packet. Therefore, when judging whether the next frame message is abnormal or not and when the next frame message is substantially normal, the method can avoid that the current frame lacks counting bytes to judge the next frame as abnormal.
For example, the following steps are carried out: the CAN type message consists of a frame start, an arbitration field, a control field, a data field, a CRC field, a response field and a frame end;
wherein, the data field is 8 bytes, if there is a message with a data field smaller than 8 bytes (for example, 7 bytes) in the input message, the conventional detection method will define the message with a data field length of 7 bytes as a message with a format error, and record a format error. In the present application, it is to analyze which 1 byte is missing in the message with the data field length of 7 bytes (specifically, there are bytes in charge of checking and bytes in charge of counting in the data field, etc.), and then check each byte (for example, the 6 th byte is in charge of counting, extract this byte and convert from 16 system to 10 system to obtain a counted value, compare with the counted value of the message of the previous frame, and determine whether to increase according to a rule (for example, the previous frame is counted as 1, the frame is increased as 2, if not, a counting error is recorded), and also store the counted value of the message of this frame for the judgment of the next frame). The check is resolved in this way for 7 bytes of the data field one by one.
If the conventional detection mode is as follows: 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 on what the count of the format error message is. A counting error judgment is absent; if the message with the data field of 7 is missing the byte responsible for counting, the application will give the count value +1 of the previous frame to determine whether the count value of the next frame is wrong. This avoids false positives as well as counting errors. The same principle for checking other fields and bytes is not repeated herein.
And S104, calculating the analysis result according to the data calculation flow in the test case to obtain a test result.
Specifically, a rule well defined by a currently executed test case can be called, a test result is calculated according to a data calculation rule, an expected result is transmitted for result judgment, whether the comparison of the result is successful or not needs to be carried out after the calculation of each group of data is finished, and if the comparison is successful, the next group of data is continuously calculated and compared; if the comparison of the calculation results fails, the test results of the group of test data are updated, and then the comparison of the next group of data is carried out.
By applying the method provided by the embodiment of the application, the test data of the vehicle electronic control unit is obtained; determining a message type corresponding to the test data; analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result; and calculating the analysis result according to the data calculation flow in the test case to obtain the test result.
In the method, the test data of the vehicle electronic control unit are acquired, and then the message type of the test data is determined. The normal format message and the error format message in the test data can be analyzed through the test case corresponding to the message type, so that an analysis result is obtained. And finally, calculating the analysis result according to the data calculation flow in the test case, and finally obtaining the test result. In the process of analyzing the test data, the test case can be used for automatically analyzing not only the message with the normal format but also the message with the wrong format, and the analysis result can be more fit with the actual test data. And data calculation is performed based on the more accurate analysis result, and the finally obtained test result is more accurate.
It should be noted that, based on the foregoing embodiments, the embodiments of the present application also provide corresponding improvements. In the preferred/improved embodiment, the same steps as those in the above embodiment or corresponding steps may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the preferred/improved embodiment herein.
In an alternative embodiment of the present application, please refer to fig. 2, where fig. 2 is a specific flowchart of a network communication testing method in an embodiment of the present application, that is, after a testing result is obtained, a report in a specific form may be output. Specifically, a target report corresponding to a preset output report type is generated by using the test result.
Specifically, the data analysis rule can be established by extracting effective test data features according to the test case of the test product in advance, and the output report type can be determined.
The method comprises the steps of checking a message ID, checking the DLC length of the message, checking a rolling counter, checking a message signal and checkSum, checking overtime processing of the message, checking that the message signal meets requirements, checking the sending type and the sending period of the message, enabling a bus closing recovery mechanism to have no sequence, and enabling a specific checking process to refer to the computer checking process described above, wherein the detailed description is omitted.
After the test result is obtained, all data of the test case can be compared with the result and output according to a selected reporting mode, such as a graph, a table and the like.
Corresponding to the above method embodiments, the present application further provides a network communication testing apparatus, and the network communication testing apparatus described below and the network communication testing method described above may be referred to correspondingly.
Referring to fig. 3, the apparatus includes the following modules:
the test data acquisition module 101 is used for acquiring test data of the vehicle electronic control unit;
a message type determining module 102, configured to determine a message type corresponding to the test data;
the message analysis module 103 is configured to analyze a normal format message and an error format message in the test data by using a test case corresponding to the type of the message, so as to obtain an analysis result;
and the test result calculation module 104 is configured to calculate an analysis result according to a data calculation flow in the test case to obtain a test result.
The device provided by the embodiment of the application is applied to obtain the test data of the vehicle electronic control unit; determining a message type corresponding to the test data; analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result; and calculating the analysis result according to the data calculation flow in the test case to obtain the test result.
In the method, the test data of the vehicle electronic control unit are obtained, and then the message type of the test data is determined. The normal format message and the error format message in the test data can be analyzed through the test case corresponding to the message type, so that an analysis result is obtained. And finally, calculating the analysis result according to the data calculation flow in the test case, and finally obtaining the test result. In the process of analyzing the test data, the test case can be used for automatically analyzing not only the message with the normal format but also the message with the wrong format, and the analysis result can be more fit with the actual test data. And data calculation is carried out based on a more accurate analysis result, and the finally obtained test result is more accurate.
In a specific embodiment of the present application, the message parsing module 103 is specifically configured to divide a message in test data into a normal format message and an error format message;
analyzing the normal format message by using the test case to obtain a normal message analysis result;
carrying out error correction analysis on the error format message by using the test case to obtain an abnormal message analysis result; and determining the normal message analysis result and/or the abnormal message analysis result as an analysis result.
In a specific embodiment of the present application, the message parsing module 103 is specifically configured to traverse a message in the test data, and determine a message that is in standard match with a message format of a message type as a normal format message;
and determining the message of which the message type is not matched with the message format specification as the message of the abnormal format.
In a specific embodiment of the present application, the message parsing module 103 is specifically configured to clarify error contents of an error format message;
analyzing the correct content in the error format message to obtain data content;
and determining error content and data content as an abnormal message analysis result.
In a specific embodiment of the present application, the message parsing module 103 is specifically configured to, if the missing bytes of the data field are count bytes, obtain count bytes corresponding to a previous frame of a message in an error format;
and after the count value corresponding to the counting byte is added with 1, determining the count value as the count value of the error format message.
In one embodiment of the present application, the method further includes: and the report generating module is used for generating a target report corresponding to the preset output report type by using the test result.
In a specific embodiment of the present application, the test data obtaining module 101 is specifically configured to perform data recording to obtain test data in a process of performing at least one of a product network approval test, an environmental performance test and an electrical performance test on a vehicle electronic control unit.
Corresponding to the above method embodiment, the present application further provides an electronic device, and the electronic device described below and the network communication testing method described above may be referred to correspondingly.
Referring to fig. 4, the electronic device includes:
a memory 332 for storing a computer program;
a processor 322, configured to implement the steps of the network communication testing method of the above method embodiments when executing the computer program.
Specifically, referring to fig. 5, fig. 5 is a schematic diagram of a specific structure of an electronic device provided in this embodiment, which may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer programs 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
The electronic device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the network communication test method described above may be implemented by the structure of the electronic device.
Corresponding to the above method embodiment, the present application further provides a readable storage medium, and a readable storage medium described below and a network communication testing method described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the network communication testing method of the above-mentioned method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relationships such as first and second, etc., are intended only to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms include, or any other variation is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A network communication testing method, comprising:
acquiring test data of a vehicle electronic control unit;
determining a message type corresponding to the test data;
analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result;
and calculating the analysis result according to the data calculation flow in the test case to obtain a test result.
2. The network communication test method of claim 1, wherein analyzing normal format messages and error format messages in the test data by using test cases corresponding to the message types to obtain an analysis result comprises:
dividing the message in the test data into the normal format message and the error format message;
analyzing the normal format message by using the test case to obtain a normal message analysis result;
utilizing the test case to carry out error correction analysis on the error format message to obtain an abnormal message analysis result;
and determining the normal message analysis result and/or the abnormal message analysis result as the analysis result.
3. The network communication testing method of claim 2, wherein dividing the packets in the test data into the normal format packets and the error format packets comprises:
traversing the messages in the test data, and determining the messages which are in standard matching with the message format of the message type as normal format messages;
and determining the message of which the message type is not matched with the message format specification as an abnormal format message.
4. The network communication testing method according to claim 2, wherein performing error correction analysis on the error format packet to obtain an abnormal packet analysis result comprises:
defining the error content of the error format message;
analyzing the correct content in the error format message to obtain data content;
and determining the error content and the data content as the abnormal message analysis result.
5. The network communication test method of claim 4, further comprising:
if the missing bytes of the data field are counting bytes, acquiring the counting bytes corresponding to the last frame of the message with the wrong format;
and after the count value corresponding to the counting byte is added with 1, determining the count value as the count value of the error format message.
6. The network communication test method of claim 1, further comprising:
and generating a target report corresponding to a preset output report type by using the test result.
7. The network communication test method according to any one of claims 1 to 6, wherein the acquiring test data of the vehicle electronic control unit includes:
and in the process of performing at least one of a product network acceptance test, an environmental performance test and an electrical performance test on the vehicle electronic control unit, performing data recording to obtain the test data.
8. A network communication test apparatus, comprising:
the test data acquisition module is used for acquiring test data of the vehicle electronic control unit;
the message type determining module is used for determining the message type corresponding to the test data;
the message analysis module is used for analyzing the normal format message and the error format message in the test data by using the test case corresponding to the message type to obtain an analysis result;
and the test result calculation module is used for calculating the analysis result according to the data calculation flow in the test case to obtain the test result.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network communication test method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the network communication testing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211714820.8A CN115914028A (en) | 2022-12-27 | 2022-12-27 | Network communication testing method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211714820.8A CN115914028A (en) | 2022-12-27 | 2022-12-27 | Network communication testing method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115914028A true CN115914028A (en) | 2023-04-04 |
Family
ID=86471044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211714820.8A Pending CN115914028A (en) | 2022-12-27 | 2022-12-27 | Network communication testing method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115914028A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060003754A (en) * | 2004-07-07 | 2006-01-11 | 현대자동차주식회사 | Test device of can telecommunication network on vehicle and method thereof |
CN102608993A (en) * | 2012-03-09 | 2012-07-25 | 北京经纬恒润科技有限公司 | Network automation test method, cabinet and test host |
CN107562635A (en) * | 2017-09-15 | 2018-01-09 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Embedded software test accessory system |
CN110879787A (en) * | 2019-12-31 | 2020-03-13 | 中国银行股份有限公司 | Client test method and system |
CN112965908A (en) * | 2021-03-19 | 2021-06-15 | 深圳市优必选科技股份有限公司 | Communication test method, communication test device, communication equipment and storage medium |
CN113225232A (en) * | 2021-05-12 | 2021-08-06 | 中国第一汽车股份有限公司 | Hardware testing method and device, computer equipment and storage medium |
CN113485284A (en) * | 2021-06-07 | 2021-10-08 | 东风汽车集团股份有限公司 | Message data processing method, device, equipment and storage medium |
CN114020630A (en) * | 2021-11-09 | 2022-02-08 | 上海浦东发展银行股份有限公司 | Automatic generation method and system for interface use case |
CN114866447A (en) * | 2022-05-11 | 2022-08-05 | 一汽解放汽车有限公司 | Automatic test method and device for message receiving and sending of vehicle controller |
-
2022
- 2022-12-27 CN CN202211714820.8A patent/CN115914028A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060003754A (en) * | 2004-07-07 | 2006-01-11 | 현대자동차주식회사 | Test device of can telecommunication network on vehicle and method thereof |
CN102608993A (en) * | 2012-03-09 | 2012-07-25 | 北京经纬恒润科技有限公司 | Network automation test method, cabinet and test host |
CN107562635A (en) * | 2017-09-15 | 2018-01-09 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Embedded software test accessory system |
CN110879787A (en) * | 2019-12-31 | 2020-03-13 | 中国银行股份有限公司 | Client test method and system |
CN112965908A (en) * | 2021-03-19 | 2021-06-15 | 深圳市优必选科技股份有限公司 | Communication test method, communication test device, communication equipment and storage medium |
CN113225232A (en) * | 2021-05-12 | 2021-08-06 | 中国第一汽车股份有限公司 | Hardware testing method and device, computer equipment and storage medium |
CN113485284A (en) * | 2021-06-07 | 2021-10-08 | 东风汽车集团股份有限公司 | Message data processing method, device, equipment and storage medium |
CN114020630A (en) * | 2021-11-09 | 2022-02-08 | 上海浦东发展银行股份有限公司 | Automatic generation method and system for interface use case |
CN114866447A (en) * | 2022-05-11 | 2022-08-05 | 一汽解放汽车有限公司 | Automatic test method and device for message receiving and sending of vehicle controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109634258B (en) | Bus message checking method, device and system for hardware-in-loop test | |
CN107478455B (en) | Timing truncation reliability test method suitable for Weibull distribution type product | |
CN112272243B (en) | Address allocation method | |
CN115001829B (en) | Protocol vulnerability discovery method, device, equipment and storage medium | |
CN109150587B (en) | Maintenance method and device | |
CN115914028A (en) | Network communication testing method, device, equipment and readable storage medium | |
CN111209180B (en) | Regression testing method and device based on fuzzy matching | |
CN111866921A (en) | Method, device and equipment for searching service fault of 5G base station and storage medium | |
CN118057771A (en) | Test analysis method and device | |
CN115357513B (en) | Program ambiguity test method, device, equipment and storage medium | |
CN111385157A (en) | Server abnormity detection method and device | |
CN112787883B (en) | Method, device and equipment for detecting NAT (network Address translation) fault of equipment | |
CN112583672B (en) | TCP server stability test method based on time stamp | |
CN118210696A (en) | Protocol interface automatic test method and device, storage medium and electronic equipment | |
CN114218011A (en) | Test simulation method and device, terminal equipment and storage medium | |
CN114116522A (en) | Swagger-based method for automatically testing interface | |
CN110958141B (en) | Communication fault diagnosis method, device, equipment and computer readable storage medium | |
CN117272392B (en) | Data security protection and backup control method and system for terminal | |
CN116506326B (en) | Sub-thread data receiving method, data monitoring method, upper computer and robot | |
JP7582446B2 (en) | Protocol analyzer, protocol error detection program, and protocol error detection method | |
CN113242141B (en) | Fault detection method and device for user plane network element | |
JP2020034486A (en) | Inspection system | |
CN117336391A (en) | Detection method and device for analyzing CPU instruction, test system and equipment | |
CN118316826A (en) | CAN communication-based functional safety automatic test method and device | |
CN117560262A (en) | Method and device for detecting data transmission faults between domain controllers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |