CN114124767A - Automatic testing method and device for gateway network management strategy - Google Patents
Automatic testing method and device for gateway network management strategy Download PDFInfo
- Publication number
- CN114124767A CN114124767A CN202111431890.8A CN202111431890A CN114124767A CN 114124767 A CN114124767 A CN 114124767A CN 202111431890 A CN202111431890 A CN 202111431890A CN 114124767 A CN114124767 A CN 114124767A
- Authority
- CN
- China
- Prior art keywords
- gateway
- network management
- test
- wake
- gateway 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 185
- 230000007958 sleep Effects 0.000 claims abstract description 31
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000012545 processing Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 5
- 238000010998 test method Methods 0.000 claims description 4
- 238000012797 qualification Methods 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 12
- 230000005059 dormancy Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 101000685724 Homo sapiens Protein S100-A4 Proteins 0.000 description 4
- 102100023087 Protein S100-A4 Human genes 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013522 software testing Methods 0.000 description 2
- 206010063385 Intellectualisation Diseases 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/12—Network monitoring probes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Small-Scale Networks (AREA)
Abstract
The application relates to the technical field of automatic testing, in particular to an automatic testing method and device for a gateway network management strategy, wherein the method comprises the following steps: sending a wake-up message to the gateway after receiving the sleep frame sent by the gateway; judging whether receiving a wake-up frame sent by a gateway responding to the wake-up message; if the wake-up frame is received, acquiring interval time between the received wake-up frame and the received sleep frame, and judging that the gateway network management strategy test is qualified when the difference value between the interval time and the critical wake-up time of the gateway network management strategy is within an error range, or judging that the gateway network management strategy test is unqualified. Therefore, the problems that in the related art, a testing workbench is manually set up to perform qualification testing of the gateway network management strategy, manual repeated triggering is needed, testing efficiency and testing precision are low, millisecond-level testing cannot be achieved, testing reliability is low and the like are solved.
Description
Technical Field
The present application relates to the field of automated testing technologies, and in particular, to an automatic testing method and apparatus for a gateway network management policy, a vehicle, and a storage medium.
Background
In a vehicle, the gateway needs to perform unified management on sleep awakening of the whole vehicle network while realizing communication data interaction, and if the gateway network management strategy is unqualified, the problem that the gateway cannot accurately realize sleep awakening of the whole vehicle network, and the problem of vehicle battery feed and the like may be caused, so that the gateway network management strategy needs to be subjected to qualified test.
In the related art, a manual test bench is usually used to perform a qualification test on the gateway network management policy. However, the manually built test bench needs manual repeated triggering during testing to realize testing, so that the testing efficiency is low, millisecond-level testing cannot be realized, the testing precision is low, and the testing reliability is greatly reduced.
Disclosure of Invention
The application provides an automatic testing method and device for a gateway network management strategy, a vehicle and a storage medium, and aims to solve the problems that in the related art, a testing workbench is manually set up to perform a qualified test on the gateway network management strategy, manual repeated triggering is needed, millisecond-level testing cannot be achieved, testing efficiency and testing precision are low, testing reliability is lowered, and the like.
An embodiment of a first aspect of the present application provides an automatic testing method for a gateway network management policy, including the following steps: sending a wake-up message to a gateway after receiving a sleep frame sent by the gateway; judging whether receiving a wake-up frame sent by the gateway responding to the wake-up message; if the wake-up frame is received, acquiring interval time between the receipt of the wake-up frame and the receipt of the sleep frame, and judging that the gateway network management strategy test is qualified when the difference value between the interval time and the preset critical wake-up time of the gateway network management strategy is within an error range, or judging that the gateway network management strategy test is unqualified.
Further, still include: and if the awakening frame is not received, resending the awakening message to the gateway after a preset time interval.
Further, the acquiring the interval duration between the receiving of the wakeup frame and the receiving of the sleep frame includes: setting an initial time value for sending the awakening message according to the test script; and calculating the interval time length according to the resending times of the awakening message, the preset time length and the initial time value.
Further, still include: and generating a test report of the gateway network management strategy according to the test script.
An embodiment of a second aspect of the present application provides an automatic testing apparatus for a gateway network management policy, including: the sending module is used for sending a wake-up message to the gateway after receiving the sleep frame sent by the gateway; the judging module is used for judging whether receiving the awakening frame sent by the gateway responding to the awakening message; and the processing module is used for acquiring interval time length between the received awakening frame and the received sleeping frame if the awakening frame is received, judging that the gateway network management strategy is qualified in test when the difference value between the interval time length and the preset critical awakening time length of the gateway network management strategy is within an error range, and otherwise judging that the gateway network management strategy is unqualified in test.
Further, still include: and the circulating module is used for retransmitting the awakening message to the gateway after a preset time interval when the awakening frame is not received.
Further, the setting unit is used for setting an initial time value for sending the wake-up message according to the test script; and the calculating unit is used for calculating the interval time according to the resending times of the awakening message, the preset time and the initial time value.
Further, still include: and the generating module is used for generating a test report of the gateway network management strategy according to the test script.
An embodiment of a third aspect of the present application provides a vehicle, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a method of automatic testing of gateway network management policies as described in the above embodiments.
A fourth aspect of the present application provides a computer-readable storage medium, which stores computer instructions for causing the computer to execute the method for automatically testing the gateway network management policy according to the foregoing embodiment.
Therefore, the application has at least the following beneficial effects:
can test gateway network management strategy through the mode of automated test is quick accurate, effectively promote efficiency of software testing, and the measuring accuracy can be accurate to millisecond, when satisfying the test demand of the millisecond test case of gateway network management strategy, promote the credibility of test, and need not manual repetitive trigger during the test, greatly reduced cost of labor promotes efficiency of software testing to have certain continuation and scalability, practice thrift the test cost. Therefore, the problems that in the related art, a manual test bench is manually set up to perform the qualification test of the gateway network management strategy, manual repeated triggering is needed, millisecond-level test cannot be realized, the test efficiency and the test precision are low, the test reliability is reduced, and the like are solved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a method for automatically testing a gateway network management policy according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for automatically testing a gateway network management policy according to an embodiment of the present application;
fig. 3 is a block diagram illustrating an automatic testing apparatus for a gateway network management policy according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
Due to the further improvement of the requirements of the consumer market on the comfort, the power performance and the intellectualization of the automobile, the number of electronic control units in the automobile is increased rapidly, so that the communication interaction flow of the whole automobile controller is complex, and the gateway (CGW) is used as a communication main node of an electronic control module and must ensure that messages of other slave nodes on each CAN bus in the network CAN be received efficiently and orderly. The gateway also needs to perform unified management on the network dormancy awakening of the whole vehicle while realizing communication data interaction.
In various large host factories at home and abroad, the bus dormancy awakening is not well done, the power feeding of an automobile storage battery causes great complaints of customers and after-sales, and the traditional manual rack test is difficult to completely test the scene of bus dormancy awakening. The automatic test of the embodiment of the application is completed by the rack building and testing to the functional verification through the method of embedding the test case in the upper computer, the whole process is commanded by the upper computer code, an engineer only needs to evaluate the result, and the working efficiency and the test precision can be greatly improved.
An automatic testing method, an apparatus, a vehicle, and a storage medium for a gateway network management policy according to an embodiment of the present application are described below with reference to the drawings. Aiming at the prior art mentioned in the background technology center, the qualification test of the gateway network management strategy is carried out by manually setting up a test workbench which needs to be manually and repeatedly triggered, and the millisecond-level test can not be realized, the test efficiency and the test precision are lower, the reliability of the test is reduced, and the like, the application provides an automatic test method of the gateway network management strategy, in the method, the gateway network management strategy can be rapidly and accurately tested in an automatic test mode, the test efficiency is effectively improved, the testing precision can be accurate to millisecond level, the testing requirement of the millisecond level test case of the gateway network management strategy is met, the testing reliability is improved, and manual repeated triggering is not needed during testing, so that the labor cost is greatly reduced, the testing efficiency is improved, certain usability and expandability are realized, and the testing cost is saved. Therefore, the problems that in the related art, a manual test bench is manually set up to perform the qualification test of the gateway network management strategy, manual repeated triggering is needed, millisecond-level test cannot be realized, the test efficiency and the test precision are low, the test reliability is reduced, and the like are solved.
Specifically, fig. 1 is a schematic flowchart of an automatic testing method for a gateway network management policy according to an embodiment of the present application.
As shown in fig. 1, the method for automatically testing the gateway network management policy includes the following steps:
in step S101, after receiving the sleep frame sent by the gateway, a wake-up message is sent to the gateway.
The wake-up message refers to a message which is sent by a gateway and used for waking up the gateway when a whole vehicle network is in a sleep state due to the fact that a sleep frame is sent by the gateway, and the wake-up message can include a network management message or an application message and the like; the gateway can be understood as a master node of the entire vehicle network, and the other controllers can be understood as slave nodes.
In this embodiment, the embodiment of the present application may simulate other controllers through the test script to automatically send the wake-up message to the gateway, so as to perform a test on the gateway network management policy.
In step S102, it is determined whether a wakeup frame sent by the gateway in response to the wakeup packet is received.
In step S103, if the wake-up frame is received, acquiring an interval duration between the received wake-up frame and the received sleep frame, and when a difference between the interval duration and a preset critical wake-up duration of the gateway network management policy is within an error range, determining that the gateway network management policy test is qualified, otherwise determining that the gateway network management policy test is not qualified.
The interval duration may be understood as an actual critical wake-up duration of the gateway network management policy.
The preset critical wake-up time and the error range may be specifically set according to a gateway network management policy, for example, the preset critical wake-up time may be set to 100ms, and the error range may be set to be within 10% of the preset critical wake-up time, which is not specifically limited in this respect.
It should be noted that a gateway network management policy is usually configured in the gateway, where the gateway network management policy includes a dormancy wakeup policy managed by the gateway network, and may be used to manage dormancy wakeup of the entire vehicle network, specifically: the gateway network management strategy requires that the gateway sends a sleep frame within the error range of the preset critical awakening time, if other controllers still send awakening messages to the gateway on the CAN bus, the gateway CAN not be awakened if the other controllers ignore awakening requests of other controllers, and when the preset critical awakening time is exceeded, the gateway responds to the awakening messages on the CAN bus and is awakened.
Based on the principle, the embodiment of the application can judge whether the gateway network management strategy is qualified according to whether the actual critical awakening time obtained by testing is within the error range of the preset critical awakening time, so as to judge whether the actual critical awakening time meets the design requirement of the gateway network management strategy.
For example, after the test is finished, if the actual critical wake-up time is 95ms, the design requirement of the critical wake-up time of the gateway network management policy is 100ms, and the error is 10%, it can be known through calculation that 95ms is within the error range of 100ms, so that it can be determined that the gateway network management policy is qualified in the test, that is, the design requirement of the gateway network management policy is satisfied.
In this embodiment, if the wakeup frame is not received, the wakeup packet is retransmitted to the gateway after a preset time interval.
The preset time length refers to an interval transmission time length between adjacent wakeup messages which are retransmitted when the wakeup frame is not received, and can be specifically set according to test requirements, which is not specifically limited.
It can be understood that if the wake-up frame is not received, it indicates that the gateway does not respond to the wake-up message, i.e. the gateway is not woken up. In order to obtain the actual critical awakening time of the gateway through testing, the method and the device for automatically sending the awakening message can set the interval sending time for automatically sending the awakening message, the awakening message can be automatically sent to the gateway at a certain interval when the gateway is not awakened, iteration is continuously performed until the gateway is awakened, the iteration is stopped, and the awakening message is sent to the gateway, so that the awakening message is automatically sent to the gateway through an iteration mode, the automatic testing of the gateway network management strategy is realized, manual repeated triggering is not needed, the labor cost is greatly reduced, and the testing efficiency is improved.
In this embodiment, the interval duration between the receiving of the wakeup frame and the receiving of the sleep frame may be obtained in various ways, which is not specifically limited.
As a possible implementation manner, acquiring an interval duration between receiving a wakeup packet and receiving a sleep frame includes: and obtaining the interval duration according to the difference value of the time of receiving the awakening frame and the time of receiving the sleeping frame. The time of receiving the wakeup frame and the time of receiving the sleep frame refer to the time of receiving, for example, the time of receiving the sleep frame is a, the time of receiving the wakeup frame is B, and the interval duration is B-a.
As another possible implementation manner, obtaining an interval duration between receiving the wakeup packet and receiving the sleep frame includes: setting an initial time value for sending the awakening message according to the test script; and calculating the interval time length according to the resending times of the awakening message, the preset time length and the initial time value.
The initial time value refers to a time value for starting sending the wake-up message to the gateway after the gateway sends the sleep frame. For example, the initial time value may be set to 50ms or 60ms, so that the wake-up packet may be sent to the gateway after 50ms or 60ms of the sleep frame sent by the gateway during the test.
It should be noted that the actual critical wake-up time of the qualified gateway network management policy is within the preset range of the preset critical wake-up time, and if the wake-up message is sent to the gateway for testing after the sleep frame sent by the gateway is received, the testing time and the number of iterations in the testing process are increased; for the unqualified gateway network management strategy, whether the awakening message is sent to the gateway after the dormancy frame sent by the gateway is received or the awakening message is sent to the gateway after the dormancy frame sent by the gateway is received for a certain time length, the test judgment of the unqualified gateway network management strategy cannot be influenced.
Therefore, the embodiment of the application can set the initial time value of the sending of the wake-up message, and can effectively reduce the iteration times of the test and improve the test efficiency on the basis of not influencing the test result of the gateway network management strategy.
The number of retransmissions may be understood as the number of iterations of retransmission of the wake-up packet.
In the specific calculation, the interval duration is the initial time value + the number of retransmissions × the preset duration, for example, if the initial time value is 50ms, the number of retransmissions is 10, and the preset duration is 5ms, the interval duration is 50+10 × 5 is 100 ms.
Further, after the test is finished, the embodiment of the application can generate a test report of the gateway network management policy according to the test script, so that a tester can analyze and improve the gateway network management policy conveniently.
According to the automatic test method of the gateway network management strategy provided by the embodiment of the application, the gateway network management strategy can be tested quickly and accurately in an automatic test mode, the test efficiency is effectively improved, the test precision can be accurate to millisecond level, the test requirement of a millisecond test case of the gateway network management strategy is met, the test reliability is improved, manual repeated triggering is not needed during testing, the labor cost is greatly reduced, the test efficiency is improved, certain usability and expandability are achieved, and the test cost is saved.
In the following embodiments, automatic testing is performed by using a testing tool created with a testing script, for example, a CANOE-based self-contained CAPL programming tool, and then the testing script may be a testing program developed by the CANOE-based self-contained CAPL programming tool and loaded in a CANOE virtual node. At test time, other test hardware may include: the CANOE-equipped electronic equipment (such as an upper computer), CANOE hardware equipment VN1640, a program-controlled power supply, a test box capable of being connected with a CAN (controller area network) line, a gateway sample piece, a connecting line containing a bus, a connector and the like.
The testing tool may verify whether the actual critical wake-up time of the gateway to be tested is within an error range of a preset critical wake-up time of the gateway network management policy, for example, the preset critical wake-up time may be 100ms, and then, during testing, verify whether the actual critical wake-up time of the gateway to be tested is 100ms (the error may be 10%), so as to determine whether software development of the gateway to be tested meets the gateway network management policy specification definition, wherein the gateway network management policy in this embodiment mainly refers to a sleep wake-up policy in gateway network management; as shown in fig. 2, the method for automatically testing the management policy of the gateway network includes the following steps:
step 1, opening the CANoe software, right-clicking the CAN bus (red line) on a Simulation Setup interface, selecting Insert CAPL Test Moude, inserting a Test script, and adding a Test case of compiling OK (double-click shape is yellow small pen) on a Vector CAPL Browser interface.
And 2, clicking START of the CANOE interface, and running an initialization program of the test script.
The first step is as follows: first, the program-controlled supply voltage (15/30) is set: v is 13V, wherein 15 power means on gear power, and 30 power means normal power; secondly, the parameter t is used to represent the actual critical wake-up time value fed back by the gateway, and the initial time value of the actual critical wake-up time value t fed back by the gateway is set to be t equal to 50ms, where the initial time value refers to the time value when the program starts to send the wake-up message after the gateway sends the sleep frame, for example, when the initial time value is 50ms, the program starts to send the wake-up message after the gateway sends 50ms of the sleep frame.
The second step is that: and setting a program to control to disconnect 15 electricity, and waiting for the gateway to send a wakeup frame, wherein the header value of the wakeup frame is as follows: d1-620, D2-300, D3-710, the period of the wake-up frame: t is 10ms, the number of transmission frames of the wakeup frame: p2 frames.
The third step: and the setting program sends a wake-up message after the gateway sends a sleep frame for t milliseconds (t is greater than or equal to an initial time value, such as 50ms, in the third step), and judges whether the gateway is awakened according to whether the gateway responds to the wake-up message, namely the test program of the test script judges whether the gateway is awakened, wherein if a wake-up frame sent by the gateway responding to the wake-up message is received, the gateway can be determined to be awakened, and otherwise, the gateway is not awakened.
If the network gateway is not awakened: and executing t +5, jumping to the second step in the step 2 by the program, and continuously repeating the operation until the gateway is awakened and the program jumps out.
If the gateway is awakened: skipping to record an actual critical awakening time value t fed back by the gateway, judging whether the t is within a 10% error range of a preset critical awakening time value in a gateway network management strategy, if the t is within the 10% error range of the preset critical awakening time value (can be specifically modified according to actual test), generating a Pass test report, and ending the process; and if t exceeds the error range of 10% of the preset critical awakening time value, generating a Fail test report, and ending the process.
And 3, evaluating and analyzing the test report by the tester, namely judging whether the actual critical awakening time value t fed back by the gateway meets the definition requirement on the critical awakening time value in the gateway network management strategy.
In summary, the embodiment of the application can simulate and send the wake-up message through the test script of the test tool to automatically test the gateway network management strategy, and compared with the manual key triggering test, the test precision can be accurate to millisecond level by using the test tool to automatically test the gateway network management strategy; meanwhile, a platform rack can be built by using a test tool, and the tested gateway has certain continuity and expandability in the same train system, is equivalent to an iterative product, and can effectively save the test cost.
Next, an automatic testing apparatus for a gateway network management policy proposed according to an embodiment of the present application is described with reference to the drawings.
Fig. 3 is a block diagram illustrating an apparatus for automatically testing a gateway network management policy according to an embodiment of the present application.
As shown in fig. 3, the automatic test apparatus 10 for a gateway network management policy includes: a sending module 100, a judging module 200 and a processing module 300.
The sending module 100 is configured to send a wakeup packet to the gateway after receiving a sleep frame sent by the gateway; the judging module 200 is configured to judge whether a wakeup frame sent by a gateway responding to the wakeup packet is received; the processing module 300 is configured to, if the wakeup frame is received, obtain an interval duration between the received wakeup frame and the received sleep frame, and determine that the gateway network management policy is qualified in the test when a difference between the interval duration and a critical wakeup duration of the gateway network management policy is within an error range, or determine that the gateway network management policy is unqualified in the test.
Further, still include: and the circulating module is used for retransmitting the awakening message to the gateway after a preset time interval when the awakening frame is not received.
Further, the processing module 300 includes: a setting unit and a calculating unit. The device comprises a setting unit, a sending unit and a receiving unit, wherein the setting unit is used for setting an initial time value for sending the awakening message according to a test script; and the calculating unit is used for calculating the interval time according to the resending times of the awakening message, the preset time and the initial time value.
Further, still include: and the generating module is used for generating a test report of the gateway network management strategy according to the test script.
It should be noted that the foregoing explanation of the embodiment of the method for automatically testing a gateway network management policy is also applicable to the automatic testing apparatus of a gateway network management policy of this embodiment, and is not repeated here.
According to the automatic test method of the gateway network management strategy provided by the embodiment of the application, the gateway network management strategy can be tested quickly and accurately in an automatic test mode, the test efficiency is effectively improved, the test precision can be accurate to millisecond level, the test requirement of a millisecond test case of the gateway network management strategy is met, the test reliability is improved, manual repeated triggering is not needed during testing, the labor cost is greatly reduced, the test efficiency is improved, certain usability and expandability are achieved, and the test cost is saved.
Fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application. The vehicle may include:
The processor 402, when executing the program, implements the method for automatically testing the gateway network management policy provided in the above embodiments.
Further, the vehicle further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing computer programs executable on the processor 402.
If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may complete mutual communication through an internal interface.
The processor 402 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the automatic testing method of the gateway network management policy is implemented.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of implementing the embodiments of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (10)
1. An automatic test method for a gateway network management strategy is characterized by comprising the following steps:
sending a wake-up message to a gateway after receiving a sleep frame sent by the gateway;
judging whether receiving a wake-up frame sent by the gateway responding to the wake-up message; and
if the wake-up frame is received, acquiring interval time between the receipt of the wake-up frame and the receipt of the sleep frame, and judging that the gateway network management strategy test is qualified when the difference value between the interval time and the preset critical wake-up time of the gateway network management strategy is within an error range, or judging that the gateway network management strategy test is unqualified.
2. The method of claim 1, further comprising:
and if the awakening frame is not received, resending the awakening message to the gateway after a preset time interval.
3. The method of claim 2, wherein obtaining the interval duration between the receiving of the wake-up frame and the receiving of the sleep frame comprises:
setting an initial time value for sending the awakening message according to the test script;
and calculating the interval time length according to the resending times of the awakening message, the preset time length and the initial time value.
4. The method of claim 1, further comprising:
and generating a test report of the gateway network management strategy according to the test script.
5. An apparatus for automatically testing a gateway network management policy, comprising:
the sending module is used for sending a wake-up message to the gateway after receiving the sleep frame sent by the gateway;
the judging module is used for judging whether receiving the awakening frame sent by the gateway responding to the awakening message; and
and the processing module is used for acquiring interval time length between the received awakening frame and the received sleeping frame if the awakening frame is received, judging that the gateway network management strategy is qualified in test when the difference value between the interval time length and the preset critical awakening time length of the gateway network management strategy is within an error range, and otherwise judging that the gateway network management strategy is unqualified in test.
6. The apparatus of claim 5, further comprising:
and the circulating module is used for retransmitting the awakening message to the gateway after a preset time interval when the awakening frame is not received.
7. The apparatus of claim 7, wherein the processing module comprises:
the setting unit is used for setting an initial time value for sending the wake-up message according to the test script;
and the calculating unit is used for calculating the interval time according to the resending times of the awakening message, the preset time and the initial time value.
8. The apparatus of claim 6, further comprising:
and the generating module is used for generating a test report of the gateway network management strategy according to the test script.
9. A vehicle, characterized by comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of automatic testing of gateway network management policies according to any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored, the program being executable by a processor for implementing a method for automatic testing of a gateway network management policy according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111431890.8A CN114124767B (en) | 2021-11-29 | 2021-11-29 | Automatic test method and device for gateway network management strategy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111431890.8A CN114124767B (en) | 2021-11-29 | 2021-11-29 | Automatic test method and device for gateway network management strategy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114124767A true CN114124767A (en) | 2022-03-01 |
CN114124767B CN114124767B (en) | 2024-06-04 |
Family
ID=80371387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111431890.8A Active CN114124767B (en) | 2021-11-29 | 2021-11-29 | Automatic test method and device for gateway network management strategy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114124767B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115687102A (en) * | 2022-10-21 | 2023-02-03 | 广州汽车集团股份有限公司 | Test method of vehicle-mounted controller, and test script generation method and device |
CN116032814A (en) * | 2022-12-30 | 2023-04-28 | 中国重汽集团济南动力有限公司 | CAN gateway automatic test system, method and tester based on CAPL |
CN116067618A (en) * | 2023-01-12 | 2023-05-05 | 深圳市光为光通信科技有限公司 | Automatic production and adjustment method for 800G high-speed optical module |
CN117651012A (en) * | 2024-01-25 | 2024-03-05 | 江铃汽车股份有限公司 | Vehicle central gateway testing method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104977979A (en) * | 2014-04-09 | 2015-10-14 | 珠海全志科技股份有限公司 | Clock source switching method and clock source switching system |
CN106301846A (en) * | 2015-05-29 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | WOL systematic analytic method and device |
WO2018040817A1 (en) * | 2016-08-30 | 2018-03-08 | 华为技术有限公司 | Transmission method and apparatus for wake-up packet in wireless local area network |
CN109921915A (en) * | 2019-01-08 | 2019-06-21 | 百富计算机技术(深圳)有限公司 | Test the method, apparatus and electronic equipment of real-time clock module arousal function |
CN113110967A (en) * | 2021-03-23 | 2021-07-13 | 东风汽车集团股份有限公司 | Early warning method, device and equipment for abnormal dormancy awakening of vehicle and readable storage medium |
-
2021
- 2021-11-29 CN CN202111431890.8A patent/CN114124767B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104977979A (en) * | 2014-04-09 | 2015-10-14 | 珠海全志科技股份有限公司 | Clock source switching method and clock source switching system |
CN106301846A (en) * | 2015-05-29 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | WOL systematic analytic method and device |
WO2018040817A1 (en) * | 2016-08-30 | 2018-03-08 | 华为技术有限公司 | Transmission method and apparatus for wake-up packet in wireless local area network |
CN109921915A (en) * | 2019-01-08 | 2019-06-21 | 百富计算机技术(深圳)有限公司 | Test the method, apparatus and electronic equipment of real-time clock module arousal function |
CN113110967A (en) * | 2021-03-23 | 2021-07-13 | 东风汽车集团股份有限公司 | Early warning method, device and equipment for abnormal dormancy awakening of vehicle and readable storage medium |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115687102A (en) * | 2022-10-21 | 2023-02-03 | 广州汽车集团股份有限公司 | Test method of vehicle-mounted controller, and test script generation method and device |
CN116032814A (en) * | 2022-12-30 | 2023-04-28 | 中国重汽集团济南动力有限公司 | CAN gateway automatic test system, method and tester based on CAPL |
CN116067618A (en) * | 2023-01-12 | 2023-05-05 | 深圳市光为光通信科技有限公司 | Automatic production and adjustment method for 800G high-speed optical module |
CN116067618B (en) * | 2023-01-12 | 2024-02-02 | 深圳市光为光通信科技有限公司 | Automatic production and adjustment method for 800G high-speed optical module |
CN117651012A (en) * | 2024-01-25 | 2024-03-05 | 江铃汽车股份有限公司 | Vehicle central gateway testing method and system |
CN117651012B (en) * | 2024-01-25 | 2024-05-31 | 江铃汽车股份有限公司 | Vehicle central gateway testing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN114124767B (en) | 2024-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114124767A (en) | Automatic testing method and device for gateway network management strategy | |
CN103568863B (en) | Real-time monitoring and diagnosing system and method for battery management system of electric vehicle | |
WO2022007710A1 (en) | Method for testing generator of vehicle, and battery tester | |
CN104834303A (en) | Vehicle fault diagnosis method and system, and vehicle | |
CN113589787B (en) | Hardware-in-loop test method, test device, test system and readable storage medium | |
CN107370637B (en) | Vehicle-mounted ECU communication function automatic test system and method | |
CN110739025A (en) | storage equipment power failure test method, device and system | |
CN115542875A (en) | Vehicle detection method based on SOA service and related equipment | |
CN114756008A (en) | Fault injection system, automatic test system and method for automobile hybrid bus integrated rack | |
CN111381150A (en) | Chip automatic verification system and method thereof | |
CN101800672A (en) | Equipment detection method and equipment | |
CN116090380B (en) | Automatic method and device for verifying digital integrated circuit, storage medium and terminal | |
CN113360389A (en) | Performance test method, device, equipment and storage medium | |
CN113030753A (en) | Test method, device and test system for battery management system BMS | |
CN111142502A (en) | Processing method, device and equipment for ECU detection and storage medium | |
CN116302758A (en) | Power failure detection method, device, communication equipment and readable storage medium | |
CN109307818A (en) | A kind of electronic product test macro | |
CN115685959A (en) | Diagnostic write configuration test method, device, equipment and storage medium | |
CN115629596A (en) | Remote control test method and device for networked controller, electronic equipment and storage medium | |
CN112650099B (en) | Control method and control system of battery monitoring platform | |
CN110908296A (en) | Method and system for automatically testing virtual power plant regulation and control system | |
CN113992555B (en) | Automatic testing method and system for main node network | |
CN112463704B (en) | Method, device and equipment for identifying topology of case and storage medium | |
CN111930091B (en) | Network test method and device for electronic control unit of electric vehicle | |
US11386725B2 (en) | Vehicle diagnostic apparatus |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240419 Address after: 241009 No. 8, Changchun Road, Wuhu economic and Technological Development Zone, Anhui, China Applicant after: CHERY AUTOMOBILE Co.,Ltd. Country or region after: China Address before: 241000 Building 8, science and Technology Industrial Park, 717 Zhongshan South Road, Yijiang District, Wuhu City, Anhui Province Applicant before: Chery Commercial Vehicles (Anhui) Co., Ltd. Country or region before: China |
|
GR01 | Patent grant | ||
GR01 | Patent grant |