Test method, device and equipment for end-to-end communication protection and medium
The ARXML file is identified through scripts and the E2E automated test cases are automatically generated, which solves the problem of low end-to-end verification testing efficiency, realizes a fast and accurate test process, and ensures the security of signal data transmission.
Patent Information
- Application Number
- CN202411584713.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-18
AI Technical Summary
Existing end-to-end verification tests need to be performed manually, and verification tests need to be performed again after each software version update, resulting in longer time consumption and low testing efficiency.
Identify ARXML files through scripts, export Excel signal list, automatically generate E2E automated test cases, and use pre-generated test cases for rapid testing.
It effectively improves the testing efficiency, reduces the signal and time consumption missing from the test, improves the accuracy of the test, and ensures the security of signal data transmission.
Smart Images

Figure CN119645835A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle development testing technology, and in particular to a test method, device, equipment and medium for end-to-end communication protection. Background Art
[0002] The Automotive Open System Architecture (AUTOSAR) is a cooperative development framework for automotive electronic systems jointly participated by global automobile manufacturers, parts suppliers, and various research and service organizations, and has established an open standard software architecture for automotive control units (ECUs). In the automotive open system framework, software components (SWCs) are the basic building blocks of software. Each software component is designed as an independent module with specific functions that can be reused in different vehicles and applications. During the signal transmission process from one software component to another, some faults may occur accidentally, causing the signal to be interfered, lost, or damaged during the transmission process, so an end-to-end (E2E) module is needed to protect and verify the data to ensure the consistency and integrity of the signal data between the sender and the receiver. Therefore, end-to-end verification is very necessary.
[0003] When the front-end to end verification test needs to be tested manually, and each time the version of the software is updated, the end-to-end new version of the software needs to be re-verified and tested. This repeated testing process consumes a long time and has low testing efficiency. Summary of the invention
[0004] The present invention provides a test method, device, equipment and medium for end-to-end communication protection, so as to improve the efficiency of end-to-end verification test.
[0005] According to one aspect of the present invention, there is provided a method for testing end-to-end communication protection, comprising:
[0006] Determine the input and output of the test cases based on the database normalization file and the Automotive Open System Architecture XML file of the new version of the end-to-end module software;
[0007] Generate test cases for the new version of the software based on the input and output;
[0008] The new version of the software is verified and tested according to the test case.
[0009] According to another aspect of the present invention, there is provided a testing device for end-to-end communication protection, comprising:
[0010] A parameter determination module, for determining input and output of a test case according to a database normalization file and an automotive open system architecture XML file of a new version of software of an end-to-end module;
[0011] A test case generation module, used to generate test cases for the new version of the software according to the input and output;
[0012] The verification test module is used to perform verification test on the new version of the software according to the test case.
[0013] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for testing end-to-end communication protection according to any embodiment of the present invention.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test method for end-to-end communication protection described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the end-to-end communication protection testing method described in any embodiment of the present invention when executed.
[0016] The embodiment of the present invention recognizes ARXML files through scripts and exports Excel signal lists to automatically generate E2E automated test cases. Each time a new version of software is tested, the pre-generated E2E automated test cases can be used for rapid testing, and E2E verification tests can be performed in batches in a short time. This can effectively improve test efficiency, reduce missed signals and time consumed in testing, improve test accuracy, and ensure the security of signal data transmission.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a flow chart of a testing method for end-to-end communication protection provided according to an embodiment of the present invention;
[0020] Figure 2 is a flow chart of a testing method for end-to-end communication protection provided according to another embodiment of the present invention;
[0021] Figure 3 is a structural diagram of a test method for end-to-end communication protection provided according to another embodiment of the present invention;
[0022] Figure 4 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Figure 1This is a flow chart of a test method for end-to-end communication protection provided by an embodiment of the present invention. This embodiment is applicable to the situation where each time the software version of the end-to-end module is updated, a new test case is regenerated according to the software content of the new version of the software to perform targeted testing on the new version of the software. The method can be executed by a test device for end-to-end communication protection, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with corresponding data processing capabilities, such as a vehicle development test system. Figure 1 As shown, the method includes:
[0026] S110 . Determine the input and output of the test case according to the database normalization file and the automotive open system architecture XML file of the new version software of the end-to-end module.
[0027] S120: Generate test cases for the new version of the software according to the input and output.
[0028] S130: Perform verification test on the new version software according to the test case.
[0029] Among them, in the field of automotive electronics and embedded systems, the Controller Area Network (CAN) is a commonly used communication protocol. In order to effectively manage and parse the data on the CAN bus, engineers use database files to define and interpret this data, namely the so-called database normalization (DBC) files. The Automotive Open System Architecture XML (AUTOSAR XML, ARXML) file is an XML-based file format that is mainly used to describe automotive software components and their interfaces. This file format is part of the Automotive Open System Architecture standard, which aims to provide an open and standardized infrastructure for automotive electronic control units (ECUs). ARXML files can be used to define software components, including information such as their properties, ports, and data types. It can describe in detail how software components interact with each other, such as interfaces and signals for data exchange. ARXML files can also contain configuration parameters for software components, which are crucial for the initialization and operation of components. At a broader level, ARXML files can be used to describe the architecture of the entire system, including how the various software components are connected to each other and their relationship with the hardware.
[0030] Specifically, when the version software of the end-to-end module is updated, the ARXML file of the new version software is obtained, and the ARXML file is recognized by a pre-configured script to obtain a software signal list in Excel format.
[0031] The DBC file and the software signal list are imported into the preset analysis program. The analysis program selects the signals and their specific signal values that need to be focused on in the software signal list according to the DBC file as the input and output of subsequent test cases.
[0032] After obtaining the input and output of the test case, the input and output are imported into the test software, and the test software automatically builds and outputs the E2E automated test case based on it.
[0033] After the test bench is powered on, run the automated test cases in the test software to verify the new version of the software, and read the test report after the run is completed.
[0034] The embodiment of the present invention recognizes ARXML files through scripts, exports software signal lists, and automatically generates E2E automated test cases; each time a new version of software is tested, the pre-generated E2E automated test cases can be used for rapid testing, and E2E verification tests can be performed in batches in a short time. This can effectively improve test efficiency, reduce missed signals and time consumed in testing, improve test accuracy, and ensure the security of signal data transmission.
[0035] Figure 2 This is a flow chart of a test method for end-to-end communication protection provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2 As shown, the method includes:
[0036] S210 . Generate a software signal list according to the automotive open system architecture XML file of the new version software of the end-to-end module.
[0037] S220, screening target signals to be verified from the database normalization file according to preset key characters; determining input and output of the test case according to the target signal and the software signal list.
[0038] The preset key characters include: a pause character, a checksum character, a counting character and a timeout character.
[0039] Specifically, when setting up the analysis program, set it in advance to identify signals containing preset key characters such as Paused, Checksum, Liveconter, Timeout, etc., to filter out the target signal to be E2E verified in the DBC file, and the target signal contains at least one key character. After determining the target signal containing the preset key characters, traverse the software signal list, determine each target signal in the list and its specific signal value, and organize the input and output of the test case.
[0040] Optionally, the step of determining the input and output of the test case according to the database normalization file and the automotive open system architecture XML file of the new version software of the end-to-end module includes:
[0041] For each node of the software signal list, determining a first signal value of an input signal in the current node and a second signal value of an output signal in the current node;
[0042] Determine the input signal and the first signal value as input of a test case corresponding to a current node;
[0043] The output signal and the second signal value are determined as outputs of a test case corresponding to a current node.
[0044] The input signal includes a pause signal, and the output signal includes a checksum signal, a counting signal and a timeout signal.
[0045] Specifically, when the E2E module is working, it usually pauses the transmission or processing of data first, and then counts, checks or timeouts it to obtain the corresponding counting results, check results and or timeout results. That is, the E2E module always starts working in response to a pause signal and ends working by outputting a counting signal, a checksum signal and a timeout signal. Therefore, according to which preset key characters are specifically included in the target signal, it can be further divided into an input signal and an output signal. The former only has a pause signal containing a pause character, and the latter has a checksum signal containing a checksum character, a counting signal containing a counting character, and a timeout signal containing a timeout character.
[0046] For the same signal, different signal values have different meanings. Therefore, the E2E module has different processing methods for different situations. Therefore, the correct correspondence between the signal value of the input signal and the signal value of the output signal should also be obtained from the software signal list.
[0047] There are multiple nodes in the form of structures in the software signal list, and the signals under each node have specific signal values. For each node, determine the signal value of the input signal under the current node as the first signal value, as the input of the test case corresponding to the current node; determine the signal value of the output signal under the current node as the output of the test case corresponding to the current node. When the subsequent test case is run, the input signal and the first signal value are input into the new version of the software. If the actual signal value of the output is consistent with the expected second signal value, the test passes; if not, the test fails. Correspondingly, as many test cases will be generated as there are nodes. By sorting out the input and output of the test cases corresponding to each node, you can get the test case template file shown in Table 1:
[0048] Table 1
[0049]
[0050] Among them, the input signal corresponding to test case 1 is "PDCF_1_Paused", and its signal value is 1. Its corresponding output signals are Signal_1_Timeout, Signal_2_Timeout, Signal_3_Timeout, PDCF_1_Checksum, and PDCF_1_Livecounter, and their signal values are 1, 1, 1, 1, and 1, respectively.
[0051] S230: Map the input and output to the parameters in the test case to generate a test case for the new version of the software.
[0052] Specifically, after the test software reads the test case template file, it maps the input and output with the parameters in the test case and generates an E2E automated test case.
[0053] S240: Perform verification test on the new version software according to the test case.
[0054] The embodiment of the present invention determines the input and output of the test case by deeply analyzing the software signal list, thereby improving the accuracy of the test case parameters.
[0055] Figure 3 A schematic diagram of the structure of a test device for end-to-end communication protection provided by another embodiment of the present invention. Figure 3 As shown, the device comprises:
[0056] A parameter determination module 310, for determining the input and output of the test case according to the database normalization file and the automotive open system architecture XML file of the new version software of the end-to-end module;
[0057] A test case generation module 320, used to generate a test case for the new version of the software according to the input and output;
[0058] The verification test module 330 is used to perform verification test on the new version software according to the test case.
[0059] The end-to-end communication protection testing device provided in the embodiment of the present invention can execute the end-to-end communication protection testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0060] Optionally, the parameter determination module 310 includes:
[0061] A signal reading unit, for generating a software signal list according to an automotive open system architecture XML file of a new version of software of an end-to-end module;
[0062] A signal screening unit, used for screening target signals to be verified from a database normalization file according to preset key characters;
[0063] A parameter determination unit is used to determine the input and output of the test case according to the target signal and the software signal list.
[0064] Optionally, the target signal includes an input signal and an output signal, and the parameter determination unit is specifically used to: for each node in the software signal list, determine a first signal value of the input signal in the current node and a second signal value of the output signal in the current node; determine the first signal value and the second signal value as the input and output of the test case corresponding to the current node.
[0065] Optionally, the preset key characters include: a pause character, a checksum character, a count character and a timeout character; correspondingly, the input signal includes a pause signal, and the output signal includes a checksum signal, a count signal and a timeout signal.
[0066] Optionally, the use case generation module 320 is specifically used to: map the input and output with parameters in the test case to generate a test case for the new version of the software.
[0067] The end-to-end communication protection test device further described can also execute the end-to-end communication protection test method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0068] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0069] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0070] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0071] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the test method for end-to-end communication protection.
[0072] In some embodiments, the test method for end-to-end communication protection may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the test method for end-to-end communication protection described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the test method for end-to-end communication protection in any other appropriate manner (e.g., by means of firmware).
[0073] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0074] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0075] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0076] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0077] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0078] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0079] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0080] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A test method for end-to-end communication protection, characterized in that: The method comprises: Determine the input and output of the test cases based on the database normalization file and the Automotive Open System Architecture XML file of the new version of the end-to-end module software; Generate test cases for the new version of the software based on the input and output; The new version of the software is verified and tested according to the test case.
2. The method according to claim 1, characterized in that Determining the input and output of the test case according to the database normalization file and the automotive open system architecture XML file of the new version software of the end-to-end module includes: Generate a software signal list based on the Automotive Open System Architecture XML file of the new version of the end-to-end module software; Filter the target signal to be verified from the database normalization file according to the preset key characters; The input and output of the test case are determined according to the target signal and the software signal list.
3. The method according to claim 2, characterized in that The target signal includes an input signal and an output signal, and the step of determining the input and output of the test case according to the target signal and the software signal list includes: For each node of the software signal list, determining a first signal value of an input signal in the current node and a second signal value of an output signal in the current node; Determine the input signal and the first signal value as input of a test case corresponding to a current node; The output signal and the second signal value are determined as outputs of a test case corresponding to a current node.
4. The method according to claim 2, characterized in that: The preset key characters include: a pause character, a checksum character, a count character and a timeout character; correspondingly, the input signal includes a pause signal, and the output signal includes a checksum signal, a count signal and a timeout signal.
5. The method according to claim 2, characterized in that: The step of generating a test case for the new version of the software according to the input and output includes: The input and output are mapped to the parameters in the test case to generate a test case for the new version of the software.
6. A test device for end-to-end communication protection, characterized in that: The device comprises: A parameter determination module, for determining input and output of a test case according to a database normalization file and an automotive open system architecture XML file of a new version of software of an end-to-end module; A test case generation module, used to generate test cases for the new version of the software according to the input and output; The verification test module is used to perform verification test on the new version of the software according to the test case.
7. The device according to claim 6, characterized in that The parameter determination module comprises: A signal reading unit, for generating a software signal list according to an automotive open system architecture XML file of a new version of software of an end-to-end module; A signal screening unit, used for screening target signals to be verified from a database normalization file according to preset key characters; A parameter determination unit is used to determine the input and output of the test case according to the target signal and the software signal list.
8. The device according to claim 7, characterized in that The target signal includes an input signal and an output signal, and the parameter determination unit is specifically used to: for each node in the software signal list, determine a first signal value of the input signal in the current node and a second signal value of the output signal in the current node; determine the first signal value and the second signal value as the input and output of the test case corresponding to the current node.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the end-to-end communication protection testing method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the end-to-end communication protection testing method according to any one of claims 1 to 5 when executed.