Test method, device and electronic equipment based on AUTOSAR network management mechanism
Through the test method based on the Autosar network management mechanism, the network management status conversion of the automotive electronic control unit is automatically tested using preset test cases and network management status flags, solving the problems of low testing efficiency and insufficient reliability in the existing technology, and achieving efficient and reliable automated testing.
Patent Information
- Application Number
- CN202210550848.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-05-18
AI Technical Summary
The prior art lacks automated testing methods to verify the Autosar network management mechanism of automotive electronic control units, resulting in long test time, large workload, low efficiency and error-prone.
Provide a test method based on the Autosar network management mechanism, by obtaining the state transition mode to be tested and the network management message ID, matching and updating the preset test case, executing the test case, obtaining the test data, and determining the test result based on the preset network management status flag.
Automatic testing of the Autosar network management mechanism is realized, testing efficiency is improved, manual analysis time is reduced, and the reliability of state transition testing of electronic control components is ensured.
Smart Images

Figure CN114968777B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automobile technology, and in particular to a testing method, device and electronic equipment based on an AUTOSAR network management mechanism. Background Art
[0002] Automotive Open System Architecture (Autosar) is an alliance dedicated to developing automotive electronic software standards. The Autosar initiative defines a software architecture for controllers that separates the hardware and software of the device, puts the functional model software and software components together, independently developed by different manufacturers, and then combines them into a specific project through some automatic configuration processes.
[0003] At present, the Autosar network management module of the automotive electronic control unit (Electronic Control Unit, abbreviated as EUC) controls the sleep and wake-up of individual components and the entire vehicle, and realizes the coordinated sleep and wake-up of each ECU. However, there is no common automated testing method in the industry for the Autosar network management mechanism of automotive electronic control units. The verification of the Autosar network management mechanism is still mainly based on manual testing. The network management wake-up nodes of different ECUs are different, and test cases and test scripts need to be redeveloped, resulting in long testing time, heavy workload, low work efficiency and easy errors. If problems are not discovered early in the development process, it will greatly increase the subsequent maintenance costs and extend the product development life cycle. Summary of the invention
[0004] In view of this, the purpose of the present disclosure is to propose a testing method, device and electronic equipment based on the AUTOSAR network management mechanism.
[0005] Based on the above objectives, in a first aspect, the present disclosure provides a testing method based on the Autosar network management mechanism, comprising:
[0006] Obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested;
[0007] According to the state transition mode to be tested and the network management message ID, matching and updating the preset test case;
[0008] Execute the updated test case;
[0009] Acquire test data, determine test results based on a preset network management status flag and the test data, and output the test results;
[0010] Wherein, the preset network management state flag bit matches the state transition mode to be tested;
[0011] The network management status flag includes at least one preset flag item and its preset status information.
[0012] Furthermore, the step of determining and outputting the test result according to the preset network management status flag and the test data specifically includes:
[0013] Based on the preset flag item, the test data is processed to obtain test status information;
[0014] comparing the test status information with the preset status information;
[0015] If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
[0016] Furthermore, the step of processing the test data based on the preset flag item to obtain the test status information includes:
[0017] Based on the preset flag item, filtering the test data to obtain test flag data;
[0018] Based on the test flag data, the test status information is obtained.
[0019] Furthermore, it also includes:
[0020] The preset network management state flag is determined according to the state transition mode to be tested and a preset network management state flag library; wherein the preset network management state flag library includes at least one network management state and its corresponding network management state flag.
[0021] Furthermore, the preset network management status flag library is determined based on the Autosar network management specification.
[0022] In a second aspect, the present disclosure further provides a test device based on the Autosar network management mechanism, comprising:
[0023] Acquisition module: used to obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested;
[0024] A configuration module, used to match and update preset test cases according to the state transition mode to be tested and the network management message ID;
[0025] an execution module for executing the updated test cases; and
[0026] The detection module is used to obtain test data and determine the test result according to a preset network management status flag and the test data; wherein the network management status flag includes at least one preset flag item and its preset status information.
[0027] Furthermore, the detection module is also used for:
[0028] Based on the preset flag item, the test data is processed to obtain test status information;
[0029] comparing the test status information with the preset status information;
[0030] If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
[0031] Furthermore, the detection module is also used for:
[0032] Based on the preset flag item, filtering the test data to obtain test flag data;
[0033] Based on the test flag data, the test status information is obtained.
[0034] Furthermore, the configuration module is also used to:
[0035] The preset network management state flag is determined according to the state transition mode to be tested and a preset network management state flag library; wherein the preset network management state flag library includes at least one network management state and its corresponding network management state flag.
[0036] In a third aspect, the present disclosure further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the test method as described in any one of the preceding items when executing the program.
[0037] As can be seen from the above, the test method, device and electronic device based on the Autosar network management mechanism provided by the present disclosure first obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested; then match the preset test case and update it according to the state transition mode to be tested and the network management message ID; then execute the updated test case; finally obtain the test data, and determine the test result and output it according to the preset network management state flag and the test data; wherein the network management state flag includes at least one preset flag item and its preset state information. With such a technical solution, it is only necessary to determine the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested, so as to determine the preset test case and update it, without manually changing the parameter configuration, which is fast and convenient; using the preset network management state flag and test data, the test result can be directly obtained, without manual analysis, saving time, and finally achieving automatic testing of the Autosar network management mechanism, while improving the test efficiency, greatly ensuring the reliability of the network state transition test of the electronic control element. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 A schematic diagram of the mode status of Autosar network management shown in an embodiment of the present disclosure;
[0040] Figure 2 A flow chart of a test method based on the Autosar network management mechanism provided in an embodiment of the present disclosure;
[0041] Figure 3 A schematic diagram of a process for determining and outputting test results provided in an embodiment of the present disclosure;
[0042] Figure 4 A schematic diagram of a process for obtaining test status information provided by an embodiment of the present disclosure;
[0043] Figure 5 A schematic diagram of the structure of a testing device provided in an embodiment of the present disclosure;
[0044] Figure 6 A schematic diagram of the structure of an electronic device for executing a testing method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0046] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The words "including" or "comprising" and the like used in the embodiments of the present disclosure mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The words "connected" or "connected" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0047] With the advent of the era of software-defined cars, the automotive industry has undergone earth-shaking changes, covering automotive development, development tools, sales models, etc. It is precisely because of this that the AUTOSAR development tool has been favored and recognized by many car companies since its appearance, and this is just a microcosm of the changes in the automotive industry.
[0048] AUTOSAR Network Management (AUTOSAR NM) is the network management mechanism in the AUTOSAR system. The AUTOSAR network management module of the automotive electronic control unit (EUC) controls the sleep and wake-up of individual components and the entire vehicle. Figure 1 As shown, the states of the Autosar network management state machine mainly include bus-sleep mode, prepare bus-sleep mode and network mode; among them, the network mode includes three sub-states, namely repeat message state (Repeat Message State, abbreviated RMS), normal operation state (Normal Operation State, abbreviated NOS) and ready sleep state (Ready-Sleep State, abbreviated RSS).
[0049] Furthermore, sleep mode is what we call hibernation. When the ECU has no local network wake-up source and remote wake-up request source, the controller will enter this sleep mode. In this state, the ECU is in a low-power state, most power-consuming peripherals are turned off, and only some wake-up source detections are left. In this mode, network management messages are only received but not sent, and application messages are neither received nor sent.
[0050] From the literal meaning of pre-sleep mode, we can know that this is a state of preparing to enter sleep. Application messages are neither sent nor received, and network management messages are only received but not sent. When the ECU enters this state, it is in a state of only receiving NM frames. It will wait for a period of time T_WAIT_BUS_SLEEP to allow all ECUs in the vehicle to sleep together. When T_WAIT_BUS_SLEEP times out, it enters sleep mode.
[0051] The repeated message state (RMS) includes two states: NM PDU Normal immediate state and NM PDU Normal Transmit State. The NM PDU Normal immediate state is mainly when the ECU is the main wake-up node. When it detects a local wake-up source (such as switch detection / Bluetooth connection / NFC card proximity and other wake-up conditions), it will first wake up from the vehicle network. At this time, it will send several NM frames in a fast cycle (for example, 5 times in a 10ms cycle) to quickly notify other ECUs that it has "come online" and is ready to communicate on the network. After the fast sending is completed, it enters the NM PDU Normal Transmit State state, and at this time, the NM message is sent in a normal cycle.
[0052] Normal working state (NOS), when the ECU enters RMS for a period of time, it will jump to the normal working state. In this state, NM messages can be received and sent, and application messages (abbreviated as APP messages) can be received and sent. NOS can indicate that the ECU is in a real wake-up state and can communicate normally.
[0053] Ready to sleep state (RSS), when the ECU is ready to enter sleep from working state, it must go through this state, mainly to do some preparations before sleep, for example, some data to be stored in EEPROM is still in writing operation, ESCL electronic steering column lock unlocking action has not been completed, or the motor controller may detect that the motor is not in the stopped state. In other words, this state is to complete the preparations before sleep, that is, the peripherals of the ECU must be in idle state. In RSS state, NM messages can only be received but not sent, while APP messages can be received and sent.
[0054] At present, there is still a lack of systematic and efficient testing methods for the verification of Autosar network management mechanisms. The network management wake-up nodes of different ECUs are different, and test cases and test scripts need to be redeveloped for the above five different states, resulting in long testing time, heavy workload, low work efficiency and easy errors.
[0055] In view of this, our company provides a testing method based on the Autosar network management mechanism to achieve efficient automated testing based on the Autosar network management mechanism.
[0056] Combine the following Figure 2 The flowchart of is used to describe the test method for implementing automated testing provided by the exemplary embodiment of the present disclosure. Specifically, the test method shown includes:
[0057] Step 201: Obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested.
[0058] Exemplarily, the state transition mode to be tested may be from the repeat message state (RMS) to the normal working state (NOS), and from the normal working state (NOS) to the ready to sleep state (RSS), which are not listed here one by one.
[0059] Here, the state transition mode to be tested and the network management message ID can be obtained by means of an input device, which includes but is not limited to a touch screen, a keyboard, a voice input device or other electronic devices capable of realizing the above functions.
[0060] It should be noted that the corresponding network management message ID includes a sent (Tx) network management message ID and a received (Rx) network management message ID.
[0061] Step 202: According to the state transition mode to be tested and the network management message ID, a preset test case is matched and updated.
[0062] It should be noted that for different state transition modes, corresponding test cases can be developed to form preset test cases, and multiple test cases constitute a test case library (see Figure 5 ).
[0063] Optionally, the test case library is developed based on the Specification of CAN Network Management AUTOSAR to meet the testing needs of the automotive electronic control unit network management module.
[0064] In some embodiments, according to the state transition mode to be tested, a preset test case is matched in a pre-developed test case library. Further, the preset test case is updated using the network management message ID.
[0065] Those skilled in the art can understand that by using preset test cases, this process does not require human intervention and can quickly and easily refine the test items for subsequent execution.
[0066] Step 203: Execute the updated test case.
[0067] Here, executing the updated test case includes sending / receiving a network management message to the electronic control unit to be tested. It should be understood that the specific execution content includes but is not limited to the aforementioned network management message.
[0068] Step 204: Acquire test data, determine the test result according to the preset network management status flag and the test data, and output it;
[0069] Wherein, the preset network management state flag bit matches the state transition mode to be tested;
[0070] The network management status flag includes at least one preset flag item and its preset status information.
[0071] It should be noted that, taking the AUTOSAR network management specification as an example, corresponding to different network management states, there are differences in the sending and receiving states of network management messages and application messages and / or the current state of the power bus. Therefore, the embodiment of the present disclosure predefines a network management state flag bit for each network management state, so as to automatically process the test data and directly output the test results.
[0072] It can be seen from the above embodiments that it is only necessary to determine the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested, so that the preset test case can be determined and updated, without the need to manually change the parameter configuration, which is quick and convenient; using the preset network management state flag and test data, the test results can be directly obtained without manual analysis, saving time, and ultimately achieving automatic testing of the Autosar network management mechanism, which greatly ensures the reliability of the state transition test of the electronic control component while improving the test efficiency.
[0073] Based on the testing method disclosed in the present invention, the tester only needs to input the state transition mode and the network management message ID corresponding to the electronic control unit to implement the state test of the electronic control unit, which facilitates the efficient testing of multiple state transition modules and multiple electronic control units, saving time for automobile design.
[0074] Optionally, the test results include test failure and test success. Correspondingly, a success report is output based on test success; a failure report is output based on test failure. Optionally, the failure report includes a failure flag item and its corresponding status information, as well as preset status information. Such a test includes, which is conducive to the tester to centrally analyze the test failure content, and improves the test efficiency and reliability of the network management status of the electronic control element.
[0075] In some embodiments, Figure 3As shown, the step of determining and outputting the test result according to the preset network management status flag and the test data specifically includes:
[0076] Step 301: Based on the preset flag item, the test data is processed to obtain test status information.
[0077] It should be noted that after executing the updated test case, the test data obtained includes multiple items, such as bus current, application message, and NM message. For the status of a certain network management, it is only necessary to judge the flag item without judging the non-flag item (see Table 1), and there is no need to parse it in detail, such as parsing the timestamp of the non-flag item. Therefore, processing the test data using the preset flag item can effectively reduce the complexity of the following comparison step 302 and improve the comparison efficiency.
[0078] Step 302: Compare the test status information with the preset status information.
[0079] Step 303: If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
[0080] For example, for the Ready-Sleep State (RSS), the preset flag items include sending application messages and sending network messages (see Table 1). If the states of sending application messages and sending network messages both meet the corresponding preset state information, the electronic control element is in the Ready-Sleep State and the test is successful. If either or both do not meet the corresponding preset state information, the test fails.
[0081] This test data processing method eliminates the need for manual intervention, saves manpower, and helps improve the efficiency and accuracy of result judgment.
[0082] In some embodiments, see Figure 4 The step of processing the test data based on the preset flag item to obtain the test status information includes:
[0083] Step 401: Based on the preset flag item, the test data is filtered to obtain test flag data.
[0084] Here, the data removed by filtering includes but is not limited to the data corresponding to the non-flag items (please refer to Table 1), which can effectively reduce the workload of subsequent data analysis and improve work efficiency.
[0085] Step 402: Based on the test mark data, obtain the test status information.
[0086] Exemplarily, for the sleep-ready state, the test flag item data includes the sending status of the application message and the sending status of the network management message. If the application message is sent, the test status information is satisfied; if the application message is not sent, the test status information is not satisfied. If the network management message is sent, the test status information is satisfied; if the network management message is not sent, the test status information is not satisfied.
[0087] Therefore, by adopting the technical solution of the present disclosure, the test status information can be conveniently compared with the preset status information, which is efficient and convenient.
[0088] In some embodiments, the testing method further comprises:
[0089] According to the state transition mode to be tested and the preset network management state flag library (see Figure 5 ), determine the preset network management status flag; wherein the preset network management status flag library includes at least one network management state and its corresponding network management status flag.
[0090] It should be understood that each network management state corresponds to a network management state flag. Based on the state of the state transition mode to be tested, the corresponding network management state flag can be determined from a preset network management state flag library. It should be understood that the network management state flag includes at least one network management state flag item.
[0091] Optionally, the preset network management status flag library is determined based on the Autosar network management specification. Referring to Table 1, the embodiment of the present disclosure provides a network management status flag library determined based on the Autosar network management specification.
[0092] Table 1 Network management status flag library determined based on Autosar network management specification
[0093]
[0094] Note: satisfy
[0095] ○: Not satisfied
[0096] -: The current mode is not judged, that is, it is a non-flag item.
[0097] It should be understood that the test data filtered out in step 401 is data corresponding to the non-flag items of the current mode in the above table.
[0098] The specific specifications of the NM Timeout Timer and Repeat Message Timer in the above table can be determined according to design requirements, such as 1 minute, and are not specifically limited here.
[0099] Exemplarily, the flag bit of Prepare Bus-Sleep Mode includes three flag items, one of which is NMTimeoutTimer expiration, and the corresponding preset status information is satisfied. That is to say, the embodiment of the present disclosure does not focus on the specific specification of NMTimeout Timer, but only focuses on whether NM TimeoutTimer expiration is satisfied.
[0100] Optionally, the test method can be used for network management mode conversion testing, and can also be used for regression testing of a certain failed network management state based on previous test results. The present disclosure does not specifically limit the application scenario of the test method.
[0101] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as the bus acquisition simulation tool VN1640A. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0102] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0103] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a testing device.
[0104] refer to Figure 5 , the testing device comprises:
[0105] Acquisition module 501: used to acquire the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested;
[0106] Configuration module 502, used to match and update preset test cases according to the state transition mode to be tested and the network management message ID;
[0107] An execution module 503, configured to execute the updated test case; and
[0108] The detection module 504 is used to obtain test data and determine the test result according to the preset network management status flag and the test data;
[0109] Wherein, the preset network management state flag bit matches the state transition mode to be tested;
[0110] The network management status flag includes at least one preset flag item and its preset status information.
[0111] Optionally, the testing device further includes an output module 505 for outputting test results.
[0112] It should be understood that the output module can be any electronic device capable of displaying results, such as a display screen and a printer, and is not specifically limited here.
[0113] In some embodiments, the detection module is further used to:
[0114] Based on the preset flag item, the test data is processed to obtain test status information;
[0115] comparing the test status information with the preset status information;
[0116] If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
[0117] In some embodiments, the detection module is further used to:
[0118] Based on the preset flag item, filtering the test data to obtain test flag data;
[0119] Based on the test flag data, the test status information is obtained.
[0120] In some embodiments, the configuration module is further used to:
[0121] The preset network management state flag is determined according to the state transition mode to be tested and a preset network management state flag library; wherein the preset network management state flag library includes at least one network management state and its corresponding network management state flag.
[0122] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0123] The device of the above embodiment is used to implement the corresponding test method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0124] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the test method described in any of the above embodiments is implemented.
[0125] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0126] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0127] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0128] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0129] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0130] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0131] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0132] The electronic device of the above embodiment is used to implement the corresponding test method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0133] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the test method described in any of the above embodiments.
[0134] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0135] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the test method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0136] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0137] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0138] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0139] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A test method based on the Autosar network management mechanism, comprising: Obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested; According to the state transition mode to be tested and the network management message ID, matching and updating the preset test case; Execute the updated test case; Acquire test data, determine test results based on a preset network management status flag and the test data, and output the test results; Wherein, the preset network management state flag bit matches the state transition mode to be tested; Wherein, the network management status flag includes at least one preset flag item and its preset status information; The state transition mode to be tested at least includes a transition from a repeating message state to a normal working state, and from a normal working state to a ready-to-sleep state; Wherein, matching and updating a preset test case according to the state transition mode to be tested and the network management message ID includes: According to the state transition mode to be tested, the preset test case is matched in a pre-developed test case library; further, the preset test case is updated using the network management message ID; When the network management status flag is Prepare Bus-Sleep Mode, one of the preset flag items corresponding to Prepare Bus-SleepMode is NM TimeoutTimer expiration, and the preset status information corresponding to NM TimeoutTimer expiration is satisfied.
2. The testing method according to claim 1, wherein: The step of determining and outputting the test result according to the preset network management status flag and the test data specifically includes: Based on the preset flag item, the test data is processed to obtain test status information; comparing the test status information with the preset status information; If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
3. The testing method according to claim 2, wherein: The step of processing the test data based on the preset flag item to obtain the test status information includes: Based on the preset flag item, filtering the test data to obtain test flag data; Based on the test flag data, the test status information is obtained.
4. The testing method according to claim 1, wherein: Also includes: The preset network management state flag is determined according to the state transition mode to be tested and a preset network management state flag library; wherein the preset network management state flag library includes at least one network management state and its corresponding network management state flag.
5. The testing method according to claim 4, wherein: The preset network management status flag library is determined based on the Autosar network management specification.
6. A test device based on the Autosar network management mechanism, comprising: Acquisition module: used to obtain the state transition mode to be tested and the network management message ID corresponding to the electronic control unit to be tested; A configuration module, used to match and update preset test cases according to the state transition mode to be tested and the network management message ID; An execution module, used to execute the updated test cases; and A detection module, used to obtain test data, and determine the test result according to a preset network management status flag and the test data; wherein the network management status flag includes at least one preset flag item and its preset status information; The state transition mode to be tested at least includes a transition from a repeating message state to a normal working state, and from a normal working state to a ready-to-sleep state; The configuration module is specifically used to match the preset test case in the pre-developed test case library according to the state transition mode to be tested; further, the preset test case is updated using the network management message ID; When the network management status flag is Prepare Bus-Sleep Mode, one of the preset flag items corresponding to Prepare Bus-SleepMode is NM TimeoutTimer expiration, and the preset status information corresponding to NM TimeoutTimer expiration is satisfied.
7. The testing device according to claim 6, wherein: The detection module is further used for: Based on the preset flag item, the test data is processed to obtain test status information; comparing the test status information with the preset status information; If each of the test status information matches the preset status information, the test is successful; otherwise, the test fails.
8. The testing device according to claim 7, wherein: The detection module is further used for: Based on the preset flag item, filtering the test data to obtain test flag data; Based on the test flag data, the test status information is obtained.
9. The testing device according to claim 6, wherein: The configuration module is also used for: The preset network management state flag is determined according to the state transition mode to be tested and a preset network management state flag library; wherein the preset network management state flag library includes at least one network management state and its corresponding network management state flag.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the testing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
CAN network capable of synchronous dormancy, and control method for CAN network
CN107360072A
Consistency test method, device and system for automobile open system
CN112306032A