Movatterモバイル変換


[0]ホーム

URL:


CN115242665A - Gateway routing data test method and test system - Google Patents

Gateway routing data test method and test system
Download PDF

Info

Publication number
CN115242665A
CN115242665ACN202210636979.6ACN202210636979ACN115242665ACN 115242665 ACN115242665 ACN 115242665ACN 202210636979 ACN202210636979 ACN 202210636979ACN 115242665 ACN115242665 ACN 115242665A
Authority
CN
China
Prior art keywords
network segment
routing
message
source network
target network
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.)
Withdrawn
Application number
CN202210636979.6A
Other languages
Chinese (zh)
Inventor
朱敦尧
邓志文
黄泓辞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Kotei Informatics Co Ltd
Original Assignee
Wuhan Kotei Informatics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Kotei Informatics Co LtdfiledCriticalWuhan Kotei Informatics Co Ltd
Priority to CN202210636979.6ApriorityCriticalpatent/CN115242665A/en
Publication of CN115242665ApublicationCriticalpatent/CN115242665A/en
Withdrawnlegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a gateway routing data test method and a test system, wherein the test method comprises the following steps: acquiring all routing messages of a project to form a message matrix; screening out a routing message of a source network segment and a routing message of a target network segment from a message matrix according to an accessed network segment to be tested; and judging whether the routing message of the source network segment and the routing message of the target network segment are synchronous or not based on the response time of the routing message of the source network segment and the response time of the routing message of the target network segment, if so, executing data comparison operation of the routing message of the source network segment and the routing message of the target network segment, and outputting a test result. Before testing the routing message of the source network segment and the routing message of the target network segment, the invention firstly judges whether the two routing messages are synchronous in terms of time efficiency, and when the two routing messages are synchronous, the comparison of the data messages is executed, thereby avoiding invalid comparison operation of quality inspection of message data with different time efficiencies and improving the efficiency of gateway function testing.

Description

Gateway routing data test method and test system
Technical Field
The present invention relates to the field of gateway routing function testing, and more particularly, to a method and a system for testing gateway routing data.
Background
Along with the function of the automobile is more and more abundant, the communication data volume of the whole automobile is increasingly huge, and the examination on the gateway function is gradually improved. Under the background of huge data volume of the whole vehicle at present, the gateway function is checked by manually comparing data, which is increasingly difficult, and whether message data of different network segments are synchronous or not cannot be judged by manually comparing the data. If the data are asynchronous, the whole test process has no meaning, so a method for automatically and synchronously acquiring gateway routing data and comparing the data is urgently needed to be found under the background.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a gateway routing data testing method and a testing system, which can save a large amount of labor and time and can ensure the quality of gateway data routing function testing.
According to a first aspect of the present invention, there is provided a gateway routing data testing method, including:
acquiring all routing messages of a project to form a message matrix, wherein the message matrix comprises the routing messages of each network segment;
according to the accessed source network segment and the target network segment which need to be tested, screening out a routing message of the source network segment and a routing message of the target network segment from the message matrix;
recording the response time of the routing message of the source network segment and the response time of the routing message of the target network segment;
judging whether the routing message of the source network segment and the routing message of the target network segment are synchronous or not based on the response time of the routing message of the source network segment and the response time of the routing message of the target network segment, if so, executing data comparison operation of the routing message of the source network segment and the routing message of the target network segment, testing the routing message of the source network segment and the routing message of the target network segment, and outputting a test result.
On the basis of the technical scheme, the invention can be improved as follows.
Optionally, the obtaining all routing messages of the project forms a message matrix, which includes:
acquiring an input project routing table, wherein the project routing table comprises routing messages of all network segments;
and forming a message matrix by using the routing messages of each network segment, wherein the message matrix comprises the corresponding relation between each network segment and the routing messages and the acquisition sequence of each routing message.
Optionally, the method further includes:
based on Canoe software, writing an automatic test program of gateway routing data by using a CAPL script;
configuring CAN/CANFD parameters of a test project under a Hardware configuration page according to corresponding source network segment information, target network segment information and Canoe Hardware information, and selecting a Canoe test Channel for a source network segment and a target network segment to be tested in Channel Mapping;
and testing the routing message of the source network segment and the routing message of the target network segment through the Canoe test channel.
Optionally, the screening, according to the accessed source network segment and the accessed target network segment to be tested, a routing packet from the source network segment and a routing packet from the target network segment from the packet matrix includes:
configuring source network segment information and target network segment information in an on message response event in the CAPL;
and screening out the routing message of the source network segment and the routing message of the target network segment from the message matrix as messages to be tested according to the configured source network segment information and target network segment information.
Optionally, the determining whether the routing packet of the source network segment and the routing packet of the target network segment are synchronous based on the response time of the routing packet of the source network segment and the response time of the routing packet of the target network segment includes:
and when the time difference between the response time of the routing message of the source network segment and the response time of the routing message of the target network segment is smaller than a first set time threshold, judging that the routing message of the source network segment is synchronous with the routing message of the target network segment, otherwise, judging that the routing message of the source network segment is asynchronous with the routing message of the target network segment.
Optionally, if the synchronization is performed, executing a data comparison operation between the routing packet of the source network segment and the packet of the target network segment, testing the routing packet of the source network segment and the packet of the target network segment, and outputting a test result, where the data comparison operation includes:
on the basis of synchronization of a routing message of a source network segment and a routing message of a target network segment, if the routing message of the source network segment is equal to the routing message of the target network segment, the routing is successful;
and if the routing message of the source network segment is not equal to the message of the target network segment, the data routing is in error.
Optionally, the determining whether the routing packet of the source network segment and the routing packet of the target network segment are synchronous based on the response time of the routing packet of the source network segment and the response time of the routing packet of the target network segment further includes:
if the routing message of the source network segment and the routing message of the target network segment are judged to be asynchronous, when the time difference value between the response time of the routing message of the source network segment and the response time of the routing message of the target network segment is greater than a first set time threshold value and smaller than a second set time threshold value, judging that the routing delay is overtime, wherein the second set time threshold value is greater than the first set time threshold value;
and when the time difference between the response time of the routing message of the source network segment and the response time of the routing message of the target network segment is greater than a second set time threshold, judging that the routing frame is missed.
According to a second aspect of the present invention, there is provided a gateway routing data testing system, comprising:
the acquisition module is used for acquiring all routing messages of the project to form a message matrix, and the message matrix comprises the routing messages of each network segment;
the screening module is used for screening out routing messages of the source network segment and routing messages of the target network segment from the message matrix according to the accessed source network segment and the target network segment which need to be tested;
the recording module is used for recording the response time of the routing message of the source network segment and the response time of the routing message of the target network segment;
the judging module is used for judging whether the routing message of the source network segment and the routing message of the target network segment are synchronous or not based on the response time of the routing message of the source network segment and the response time of the routing message of the target network segment;
and the comparison test module is used for executing the data comparison operation of the routing message of the source network segment and the target network segment message if the synchronization is realized, testing the routing message of the source network segment and the target network segment message and outputting a test result.
According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor for implementing the steps of the gateway routing data testing method when executing a computer management class program stored in the memory.
According to a fourth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer management class program, which when executed by a processor implements the steps of a gateway routing data testing method.
According to the gateway routing data test method and the gateway routing data test system, before the testing of the routing message of the source network segment and the routing message of the target network segment, whether the two routing messages are synchronous in terms of time efficiency is judged, and when the two routing messages are synchronous, the comparison of the data messages is executed, so that invalid comparison operation of quality inspection of message data with different time efficiencies is avoided, and the efficiency of gateway function testing is improved.
Drawings
Fig. 1 is a flowchart of a gateway routing data testing method provided in the present invention;
fig. 2 is a schematic overall flow chart of a gateway routing data testing method provided by the present invention;
fig. 3 is a schematic structural diagram of a gateway routing data testing system according to the present invention;
FIG. 4 is a schematic diagram of a hardware structure of a possible electronic device provided in the present invention;
fig. 5 is a schematic diagram of a hardware structure of a possible computer-readable storage medium according to the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention, but are not intended to limit the scope of the invention.
Example one
A gateway routing data testing method, referring to fig. 1, the method mainly includes the following steps:
s1, obtaining all routing messages of a project to form a message matrix, wherein the message matrix comprises the routing messages of each network segment.
As an embodiment, the obtaining all the routing messages of the item to form a message matrix includes: acquiring an input project routing table, wherein the project routing table comprises routing messages of all network segments; and forming a message matrix by using the routing messages of the network segments, wherein the message matrix comprises the corresponding relation between each network segment and the routing messages and the acquisition sequence of each routing message.
It can be understood that for a project currently in progress, the gateway routing of the project needs to be functionally tested, and routing messages are organized according to input documents. The input document is an item routing table, and the item routing table includes all routing messages of different network segments of the item.
And organizing a message matrix according to all routing messages of the project, wherein the message matrix comprises the corresponding relation between each network segment and the routing messages, namely which routing messages exist in each network segment. For example, routing messages corresponding to a network segment from a source network segment a to a target network segment b, which routing messages exist on the network segment a, which routing messages exist on the network segment b, and the relationship between the network segments and the routing messages is correspondingly stored in a message matrix. In a network segment, there are usually many routing messages, and then the routing messages need to be sorted according to the collection time sequence of the routing messages.
And S2, screening out the routing message of the source network segment and the routing message of the target network segment from the message matrix according to the accessed source network segment and the accessed target network segment which need to be tested.
As an embodiment, writing an automatic test program of gateway routing data by using a CAPL script based on Canoe software; configuring CAN/CANFD parameters of a test project under a Hardware configuration page according to corresponding source network segment information, target network segment information and Canoe Hardware information, and selecting a Canoe test Channel for a source network segment and a target network segment to be tested in Channel Mapping; and testing the routing message of the source network segment and the routing message of the target network segment through the Canoe test channel.
It can be understood that the functional test program for the gateway routing in the embodiment of the present invention is mainly written based on the Canoe software by using CAPL scripts. According to Network segment information (including source Network segment information and target Network segment information) and Canoe Hardware information which need to be accessed, under a Hardware configuration page of engineering, CAN/CANFD parameters of a test engineering are configured in Network Hardware, canoe Channel selection is carried out in Channel Mapping, and routing messages of a source Network segment and a target Network segment which need to be tested are tested based on the selected Canoe Channel.
As an embodiment, the screening out a routing packet from a source network segment and a routing packet from a target network segment from the packet matrix according to an accessed source network segment and an accessed target network segment which need to be tested includes: configuring source network segment information and target network segment information in an on message response event in the CAPL; and screening out the routing message of the source network segment and the routing message of the target network segment from the message matrix as messages to be tested according to the configured source network segment information and target network segment information.
It can be understood that, according to the source network segment information and the target network segment information which are accessed to the network segment to be tested, the routing message of the source network segment and the routing message of the target network segment are screened from the message matrix, specifically, the message which needs to be routed in the project routing table is responded through an on message response event in the CAPL, and the source network segment routing message and the target network segment routing message are screened through the Channel to be used as the subsequent routing message which needs to be tested.
S3, recording the response time of the routing message of the source network segment and the response time of the routing message of the target network segment; and S4, judging whether the routing message of the source network segment and the routing message of the target network segment are synchronous or not based on the response time of the routing message of the source network segment and the response time of the routing message of the target network segment, if so, executing data comparison operation of the routing message of the source network segment and the routing message of the target network segment, testing the routing message of the source network segment and the routing message of the target network segment, and outputting a test result.
It can be understood that, for the source network segment routing message and the target network segment routing message screened from the message matrix, the source network segment routing message and the target network segment routing message are stored in corresponding memory spaces, and the response times of the source network segment routing message and the target network segment routing message are respectively recorded.
And determining whether the acquired data are synchronous or not by judging the size relationship between the difference value of the target network segment message response time and the source network segment message response time and the gateway routing timeliness. And when the response time difference is larger than the gateway routing timeliness, the data is considered to be asynchronous, and the comparison is not carried out.
Referring to fig. 2, for example, if the difference between the response time of the target network segment message and the response time of the source network segment message is less than 2ms (a first set time threshold), the source network segment message and the target network segment message are considered to be synchronous, at this time, data comparison operation between the source network segment routing message and the target network segment routing message is executed, a function test result of the gateway is obtained according to the comparison result, and when the source network segment routing message is the same as the target network segment routing message, the routing is successful; if not, the data routing is in error.
And when the difference value between the target network segment message response time and the source network segment message response time is more than 2ms, the data comparison operation is not executed. In this case, if the difference between the target network segment message response time and the source network segment message response time is greater than 2ms and less than one period of the current routing message, determining that the routing delay time is overtime; and if the difference value between the target network segment message response time and the source network segment message response time is larger than one period of the current routing message, determining that the current routing frame is missed.
It should be noted that, the embodiment of the present invention is based on the Canoe software to perform the gateway function Test, and can implement the automatic Test, specifically, click the engineering Test toolbar Test, jump out of the Test operation interface, and click the operation button to start the Test. And after the set test time is finished, automatically generating a test report and outputting a result.
The method effectively improves huge data acquisition and comparison work, saves a large amount of manpower and material resources, can solve the problem that whether the acquired data are synchronous or not, which cannot be solved by the traditional manual test, and improves qualitative leap for gateway data routing function test.
Example two
A gateway routing data testing system, referring to fig. 3, the system includes an obtaining module 31, a screening module 32, a recording module 33, a determining module 34, and a comparison testing module 35, wherein:
the acquiring module 31 is configured to acquire all routing messages of a project to form a message matrix, where the message matrix includes routing messages of each network segment;
the screening module 32 is used for screening out a routing message from the source network segment and a routing message from the target network segment from the message matrix according to the accessed source network segment and the target network segment which need to be tested;
the recording module 33 is used for recording the response time of the routing message of the source network segment and the response time of the routing message of the target network segment;
the judging module 34 is configured to judge whether the routing packet of the source network segment and the routing packet of the target network segment are synchronous based on the response time of the routing packet of the source network segment and the response time of the routing packet of the target network segment;
and the comparison test module 35 is configured to, if the synchronization is performed, execute data comparison operation between the routing packet of the source network segment and the target network segment packet, test the routing packet of the source network segment and the target network segment packet, and output a test result.
It can be understood that the gateway routing data test system provided by the present invention corresponds to the gateway routing data test method provided by each of the foregoing embodiments, and the relevant technical features of the gateway routing data test system may refer to the relevant technical features of the gateway routing data test method, which are not described herein again.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the invention. As shown in fig. 4, an embodiment of the present invention provides anelectronic device 400, which includes amemory 410, aprocessor 420, and acomputer program 411 stored in thememory 410 and executable on theprocessor 420, and when theprocessor 420 executes thecomputer program 411, the steps of the gateway routing data testing method according to the first embodiment are implemented.
Example four
Referring to fig. 5, fig. 5 is a schematic diagram of an embodiment of a computer-readable storage medium according to the present invention. As shown in fig. 5, the present embodiment provides a computer-readable storage medium 500, on which acomputer program 511 is stored, and when being executed by a processor, thecomputer program 511 implements the steps of the gateway routing data testing method according to the first embodiment.
The gateway routing data test method and the test system provided by the embodiment of the invention have the following advantages:
1. the automatic test system realizes the synchronous acquisition of routing data of the automobile gateway and the automatic test of data comparison, improves the efficiency of testing the gateway function, and reduces the human input.
2. The whole vehicle can be accessed to collect data in real time and automatically output test results.
3. The method can flexibly meet different routing requirements of each item according to the change of the routing table.
4. The gateway routing function test method can accurately and synchronously acquire data routed by the gateway, ensure the accuracy of the data, ensure the qualitative change of the gateway data routing function test from uncertainty to certainty, and ensure the accuracy of the gateway function test result.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

CN202210636979.6A2022-06-072022-06-07Gateway routing data test method and test systemWithdrawnCN115242665A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210636979.6ACN115242665A (en)2022-06-072022-06-07Gateway routing data test method and test system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210636979.6ACN115242665A (en)2022-06-072022-06-07Gateway routing data test method and test system

Publications (1)

Publication NumberPublication Date
CN115242665Atrue CN115242665A (en)2022-10-25

Family

ID=83668724

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210636979.6AWithdrawnCN115242665A (en)2022-06-072022-06-07Gateway routing data test method and test system

Country Status (1)

CountryLink
CN (1)CN115242665A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115811485A (en)*2022-11-172023-03-17东风汽车股份有限公司Gateway routing conversion time testing method, device, equipment and storage medium
CN115914031A (en)*2022-11-012023-04-04长安新能源南京研究院有限公司 A vehicle gateway routing automatic test method, device, equipment and storage medium
CN115987821A (en)*2022-10-272023-04-18合众新能源汽车股份有限公司 Gateway routing test method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115987821A (en)*2022-10-272023-04-18合众新能源汽车股份有限公司 Gateway routing test method and device
CN115914031A (en)*2022-11-012023-04-04长安新能源南京研究院有限公司 A vehicle gateway routing automatic test method, device, equipment and storage medium
CN115811485A (en)*2022-11-172023-03-17东风汽车股份有限公司Gateway routing conversion time testing method, device, equipment and storage medium

Similar Documents

PublicationPublication DateTitle
CN115242665A (en)Gateway routing data test method and test system
CN107908541B (en)Interface testing method and device, computer equipment and storage medium
CN109388566B (en)Code coverage rate analysis method, device, equipment and storage medium
CN111159049B (en)Automatic interface testing method and system
CN104679658A (en)Test method and test system for WEB pages
CN111651365B (en)Automatic interface testing method and device
CN110597728A (en)Method, device and system for constructing test data
CN115470100A (en) Signal scene test method and device for auto parts
CN114138670A (en)Method based on interface automation test and function, performance and safety test fusion
CN113220488B (en)Recording list pasting method and device based on mobile terminal
CN101145984B (en)Automatic testing method based on self-adapted parameters
CN111209188A (en)Testing method and device for distributed storage system
CN104836686B (en)A kind of method and device for the configuration file generating server
CN109656817A (en)A kind of automation interface test device and equipment
CN114141302A (en)Test method of solid state disk and electronic equipment
CN113722235B (en)Automatic test method and device
CN114637688A (en)Coverage rate statistical method and device based on version branches
CN111897737B (en)Missing detection method and device for program test of micro-service system
CN113886221A (en)Test script generation method and device, storage medium and electronic equipment
CN115567340B (en)CAN bus test engineering generation method, device, equipment and medium
CN115933612A (en)Diagnostic test method, device, equipment and storage medium for vehicle equipment
CN111143724A (en)Data processing method, device, equipment and medium
CN107102938A (en)The update method and device of test script
CN115348200A (en)CAN communication function test method and test system
CN115878448A (en)Database test method, distributed database and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
WW01Invention patent application withdrawn after publication
WW01Invention patent application withdrawn after publication

Application publication date:20221025


[8]ページ先頭

©2009-2025 Movatter.jp