Cross-platform communication protocol stack testing system and method based on Autosar
Through the cross-platform communication protocol stack testing system and method based on Autosar, the DDS communication protocol difference between Autosar CP and AP platform is solved, efficient automated testing is realized, and the rapid iteration needs of intelligent connected vehicles are met.
Patent Information
- Application Number
- CN202510692602.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The existing technology cannot effectively solve the differences in DDS communication protocols between Autosar CP and AP platforms, resulting in low testing efficiency, insufficient adaptability and poor scalability, and the inability to realize automated testing of cross-platform communication protocol stacks.
The cross-platform communication protocol stack testing system and methods based on Autosar are adopted, and the version package is generated using Gitlab server, and the embedded software development tools are automatically compiled and tested to realize interactive testing between Autosar CP and test host AP to meet the cross-platform timing testing needs.
It realizes efficient testing of the communication protocol stack between Autosar CP and AP platforms, improves test accuracy and versatility, and is suitable for the rapid iteration requirements of intelligent connected vehicles.
Smart Images

Figure CN120223558B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of vehicle cross-platform protocol stack testing, and specifically relates to a cross-platform communication protocol stack testing system and method based on Autosar. Background Art
[0002] The Autosar Classic Platform (CP) is the foundational architecture of the automotive electronics industry. Its standardized software architecture improves development efficiency and ensures system reliability and safety. With the increasing electrification of vehicles, the Autosar CP and the Adaptive Platform (AP) are gradually converging to form a hybrid architecture to support complex intelligent connected vehicle systems. However, current testing of cross-platform communication protocol stacks faces multiple challenges, including low test efficiency, insufficient adaptability, and poor scalability. For example, the DDS protocol stack in the Autosar CP platform requires static configuration (e.g., QoS policies and entity behaviors). Existing testing methods rely on manual verification, which is inefficient and prone to missing critical scenarios (e.g., cross-platform communication failures caused by a lack of dynamic discovery). Manual testing is highly repetitive and inefficient, failing to meet the demands of rapid version releases. Traditional DDS testing tools require high-performance computing environments and are not directly adaptable to the lightweight requirements of the Autosar CP platform. Automated solutions for DDS protocol stack testing often rely on commercially available suites or solutions, hindering large-scale deployment and application. Furthermore, dedicated automated testing systems for Autosar CP are lacking.
[0003] Due to the protocol differences in the communication between Autosar CP and AP platforms, the existing test solutions cannot automatically simulate heterogeneous environments. Therefore, a cross-platform communication protocol stack testing method is needed. Summary of the Invention
[0004] The technical purpose of this application is to solve the protocol differences in DDS communication between Autosar CP and AP platforms. The existing test solutions cannot automatically simulate heterogeneous environments. This application provides an Autosar-based cross-platform communication protocol stack testing system and method to achieve cross-platform compatible automated DDS protocol stack testing.
[0005] In order to achieve the above technical objectives, this application adopts the following technical solutions.
[0006] In a first aspect, an embodiment of the present application provides a cross-platform communication protocol stack testing system based on Autosar, comprising:
[0007] The GitLab server is configured to generate the CP and AP packages required for testing through the GitLab pipeline and trigger the test code compilation and communication protocol testing process;
[0008] The first source server is configured to remotely operate a control host installed with an embedded software development tool to use the embedded software development tool to compile a CP test code, trigger the burning of the CP test code compilation product to the Autosar CP, and start a communication protocol test service on the Autosar CP;
[0009] The control host is configured to obtain the CP version package and the AP version package, compile the CP version package using an embedded software development tool to obtain a CP test code compilation product, and compile the AP version package to obtain an AP test code compilation product; burn the CP test code compilation product to the Autosar CP using the embedded software development tool, and upload the AP test code compilation product to the test host AP; and trigger the Autosar CP and the test host AP to execute a communication protocol test service;
[0010] The Autosar CP is configured to perform a communication protocol test service according to the CP test code compilation product;
[0011] The test host AP is configured to execute a communication protocol test service according to the AP test code compilation product.
[0012] In a second aspect, an embodiment of the present application provides a cross-platform communication protocol stack testing method for Autosar, including: a GitLab server generates the CP version package and AP version package required for testing through a GitLab pipeline, and triggers test code compilation and communication protocol testing processes;
[0013] The first source server remotely operates a control host installed with an embedded software development tool to use the embedded software development tool to compile a CP test code, and triggers burning of the CP test code compilation product to Autosar CP and Autosar CP to start a communication protocol test service;
[0014] The control host obtains the CP version package and the AP version package, compiles the CP version package using an embedded software development tool to obtain a CP test code compilation product, and compiles the AP version package using an embedded software development tool to obtain an AP test code compilation product; burns the CP test code compilation product to the Autosar CP using the embedded software development tool, and uploads the AP test code compilation product to the test host AP; and triggers the Autosar CP and the test host AP to execute a communication protocol test service;
[0015] The Autosar CP performs a communication protocol test service according to the CP test code compilation product;
[0016] The test host AP executes a communication protocol test service according to the AP test code compilation product.
[0017] Compared with the prior art, the beneficial technical effects achieved by the Autosar-based cross-platform communication protocol stack testing system and method provided in the embodiments of the present application include: through automated compilation and testing processes, efficient testing of the communication protocol stack between the Autosar CP and AP platforms is achieved, meeting the rapid iteration requirements of automotive electronic systems, effectively improving test accuracy and versatility, and being suitable for testing scenarios of cross-platform communication protocol stacks for intelligent connected vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the present application in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only schematic and are used to help understand the present application. They do not specifically limit the shapes and proportional dimensions of the components of the present application. Those skilled in the art can select various possible shapes and proportional dimensions to implement the present application according to the specific circumstances under the guidance of the present application. In the drawings:
[0019] Figure 1 A schematic diagram of the structure of a cross-platform communication protocol stack test system based on Autosar provided in an embodiment;
[0020] Figure 2 The present invention is a flow chart of a cross-platform communication protocol stack testing method based on Autosar provided in an embodiment. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0022] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more features.
[0023] This application addresses the protocol differences in DDS communication between Autosar CP and AP platforms. Existing test solutions are unable to automatically simulate heterogeneous environments. This application provides an Autosar-based cross-platform communication protocol stack testing system and method. By using Autosar CP and test host AP for interactive testing, cross-platform timing testing is achieved, meeting the lightweight requirements of direct adaptation to the CP platform.
[0024] The present application is further described below with reference to the accompanying drawings and specific embodiments.
[0025] This embodiment provides an Autosar-based cross-platform communication protocol stack testing system, including a Gitlab server, a first source server, a control host, an Autosar CP, and a test host AP.
[0026] Among them, the Gitlab server is configured to generate the CP version package and AP version package required for testing through the Gitlab pipeline, and trigger the test code compilation and communication protocol test process.
[0027] The first source server (or called "control host source server") is configured to remotely operate a control host installed with an embedded software development tool to use the embedded software development tool to compile the CP test code, and trigger the burning of the CP test code compilation product to Autosar CP and Autosar CP to start the communication protocol test service.
[0028] The control host is configured to install an embedded software development tool, obtain a CP version package and an AP version package, compile the CP version package using the embedded software development tool to obtain a CP test code compilation product, and compile the AP version package to obtain an AP test code compilation product; use the embedded software development tool to burn the CP test code compilation product to the Autosar CP, and upload the AP test code compilation product to the test host AP; and trigger the Autosar CP and the test host AP to execute a communication protocol test service.
[0029] The Autosar CP is configured to execute communication protocol test services according to the CP test code compilation product.
[0030] The test host AP is configured to execute a communication protocol test service according to the AP test code compilation product.
[0031] In some embodiments, the GitLab server utilizes an automated pipeline. Specifically, after the GitLab release pipeline generates a release package, it automatically triggers the GitLab downstream test code compilation pipeline. The test code compilation pipeline obtains the release package from the upstream pipeline. For example, the AP release package is used to compile the test code for the AP side of the test host in the Ubuntu x86_64 environment, and the CP release package is used to compile the Autosar CP side test code in the embedded software development tool. After the test code compilation pipeline completes, it automatically triggers the GitLab downstream test execution pipeline.
[0032] In some embodiments, see Figure 1 The system also includes a second source server, which includes an automated test platform database and / or a file server; Autosar CP and / or the test host AP are also configured to upload the test results to the automated test platform database and upload the test log to the file server. The automated test platform can fill in the test data according to the test report template and generate a test report.
[0033] The second source server can deploy the test system backend API service, database and file access system to achieve test data persistence.
[0034] In some embodiments, the system further includes a sub-rendering server, which is connected to the second source server. The sub-rendering server is configured to deploy an automated testing platform front end, display test results, analyze version quality by comparing historical test results, and provide any of the following functions for test log download.
[0035] In one embodiment, the Python Streamlit automated testing platform front-end service is deployed on the sub-rendering server, which displays the test execution version, the number of test execution cases, the number of successful cases, the number of failed cases, and the log path, and provides a test report download button that supports single-click download to the local computer.
[0036] In some embodiments, the test host AP is connected to the Autosar CP side business, and the test execution of the test host AP is completed. The python on the test host AP side calls the API provided by the flask framework of the automated test platform backend deployed on the second source server, and uploads the test execution version, number of test execution cases, number of successful cases, number of failed cases and test logs and other information to the automated test platform database (which can be a Mysql database) and file access system (such as an Ngnix file server) deployed on the second source server. The historical test result data can be compared through the built-in deepseek interface of the automated test platform AI to generate a doc format test report.
[0037] In some embodiments, the first source server remotely controls the host by installing the noVNC server, enabling an HTTP web service, and invoking the Python playwright library. noVNC (HTML5 VNC Client) is an open-source VNC client based on HTML5 and WebSocket technology. It allows users to remotely access VNC servers through standard web browsers (such as Chrome and Firefox) without installing any additional plug-ins. It converts the traditional VNC protocol to the WebSocket protocol, enabling a cross-platform, zero-installation remote desktop experience.
[0038] In some embodiments, the first source server operates the embedded software development tool on the control host to compile the test code based on the release version and test scenario code. After completing the test code compilation, the control host source server also remotely operates the embedded software development tool to burn the compiled code to the Autosar CP board. This process ensures that the compiled test code is accurately deployed on the target hardware platform, allowing the Autosar CP to initiate communication protocol testing services based on this code. The control host source server uses the embedded software development tool to trigger the Autosar CP to initiate the DDS service. Through remote operation, it can start the Autosar CP to execute the communication protocol test service, thereby testing the communication protocol stack.
[0039] The control host performs CMake cross-compilation based on the release version and test code, and uploads the AP test code compilation product and AP version package to the test host AP.
[0040] In some embodiments, the control host remotely operates the test host AP through SSH, triggering it to execute a communication protocol (such as DDS protocol, HTTP / HTTPS protocol, MQTT protocol, RTPS protocol, WebSocket protocol, CAN protocol, etc.) test service.
[0041] In some embodiments, the control host uploads the AP test code compilation product and AP version package to a designated directory on the test host AP using SCP. SCP (Secure Copy Protocol) is a secure file transfer protocol based on SSH (Secure Shell) and is primarily used to securely copy files or directories between different hosts on a network.
[0042] In some embodiments, the first source server compiles the CP version package and the CP test code by finding the coordinates of the target image in the test code and clicking the button of the corresponding coordinates in the embedded software development tool of the control host, burns the CP test code compilation product into the Autosar CP and triggers the execution of the DDS test service on the Autosar CP side.
[0043] For example, the source server clicks the "Compile" button in the embedded software development tool to compile the Autosar CP test code and generate an executable file. Clicking the "Burn" button in the embedded software development tool activates the debug interface (such as JTAG / SWD). The compiled code is then transferred to the Autosar CP's ECU (electronic control unit). After the burning is complete, clicking the "Run" or "Start" button triggers the DDS communication protocol stack on the Autosar CP to begin executing test services (such as publishing / subscribing data).
[0044] In some embodiments, the test host AP is a Linux virtual machine, such as a Linux x86_64 virtual machine.
[0045] Based on the same inventive concept as the cross-platform communication protocol stack test system based on Autosar provided in the above embodiment, the embodiment of the present application also provides a cross-platform communication protocol stack test method based on Autosar, please refer to Figure 2 , including: the Gitlab server generates the CP version package and AP version package required for testing through the Gitlab pipeline, and triggers the test code compilation and communication protocol test process;
[0046] The first source server remotely operates a control host installed with an embedded software development tool to use the embedded software development tool to compile a CP test code, and triggers burning of the CP test code compilation product to the Autosar CP and the Autosar CP to start a communication protocol test service;
[0047] The control host obtains the CP version package and the AP version package, compiles the CP version package using the embedded software development tool to obtain the CP test code compilation product, and compiles the AP version package to obtain the AP test code compilation product; uses the embedded software development tool to burn the CP test code compilation product to the Autosar CP, and uploads the AP test code compilation product to the test host AP; triggers the Autosar CP and the test host AP to execute the communication protocol test service;
[0048] Autosar CP performs communication protocol testing based on the CP test code compilation product;
[0049] The test host AP executes the communication protocol test service according to the AP test code compilation product.
[0050] In some embodiments, the method further includes the Autosar CP and / or the test host AP uploading the test results to an automated test platform database, and uploading the test log to a file server.
[0051] The Autosar-based cross-platform communication protocol stack testing system and method provided in the example of this application can use the GitLab version release pipeline, and use Shell scripts to automatically cross-compile the test codes of AutosarAP and test host AP respectively, and automatically burn the compiled products to Autosar CP or upload them to the test host AP; automatically trigger the execution of test cases; automatically upload the test results to the automated testing platform and generate a test report in Word format, realizing the automation of the entire process from version release to report generation.
[0052] The above is a detailed introduction to the Autosar-based cross-platform communication protocol stack testing system and method provided by this application. Specific examples are used in this article to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the concept of this application and should not be understood as limiting the scope of protection of this application.
Claims
1. A cross-platform communication protocol stack test system based on Autosar, characterized in that: include: The GitLab server is configured to generate the CP and AP packages required for testing through the GitLab pipeline and trigger the test code compilation and communication protocol testing process; The first source server is configured to remotely operate a control host installed with an embedded software development tool to use the embedded software development tool to compile a CP test code, trigger the burning of the CP test code compilation product to the Autosar CP, and start a communication protocol test service on the Autosar CP; The control host is configured to obtain the CP version package and the AP version package, compile the CP version package using the embedded software development tool to obtain a CP test code compilation product, and compile the AP version package to obtain an AP test code compilation product; Using the embedded software development tool to burn the CP test code compilation product to the Autosar CP, and uploading the AP test code compilation product to the test host AP; triggering the Autosar CP and the test host AP to perform a communication protocol test service; The Autosar CP is configured to perform a communication protocol test service according to the CP test code compilation product; The test host AP is configured to execute a communication protocol test service according to the AP test code compilation product.
2. The cross-platform communication protocol stack test system based on Autosar according to claim 1, characterized in that: The first source server installs the noVNC server and starts the http web service, and calls the python playwright library file to remotely operate the control host.
3. The cross-platform communication protocol stack testing system based on Autosar according to claim 1, characterized in that: The control host remotely operates the test host AP through SSH to trigger it to execute the communication protocol test service.
4. The cross-platform communication protocol stack testing system based on Autosar according to claim 1, characterized in that: The system further comprises a second source server comprising an automated testing platform database and / or a file server; The Autosar CP and / or the test host AP are further configured to upload the test results to the automated test platform database and upload the test logs to the file server.
5. The cross-platform communication protocol stack testing system based on Autosar according to claim 4, characterized in that: include: The system also includes a sub-rendering server, which is connected to the second source server and is configured to deploy an automated testing platform front end to achieve any of the following functions: displaying the test results, analyzing version quality by comparing historical test results, and providing test log downloads.
6. The cross-platform communication protocol stack testing system based on Autosar according to claim 1, characterized in that: The test host AP is a Linux virtual machine.
7. The cross-platform communication protocol stack testing system based on Autosar according to claim 1, characterized in that: The control host uses the embedded software development tool to burn the CP test code compilation product into the Autosar CP through a debugging interface, where the debugging interface is a JTAG interface or a SWD interface.
8. The cross-platform communication protocol stack testing system based on Autosar according to claim 1, characterized in that: The control host uploads the AP test code compilation product and the AP version package to the test host AP designated directory through SCP.
9. A cross-platform communication protocol stack testing method based on Autosar, characterized in that: include: The GitLab server generates the CP version package and AP version package required for testing through the GitLab pipeline, and triggers the test code compilation and communication protocol testing process; The first source server remotely operates a control host installed with an embedded software development tool to use the embedded software development tool to compile a CP test code, and triggers burning of the CP test code compilation product to the Autosar CP and the Autosar CP to start a communication protocol test service; The control host obtains the CP version package and the AP version package, compiles the CP version package using the embedded software development tool to obtain a CP test code compilation product, and compiles the AP version package to obtain an AP test code compilation product; Using the embedded software development tool to burn the CP test code compilation product to the Autosar CP, and uploading the AP test code compilation product to the test host AP; triggering the Autosar CP and the test host AP to perform a communication protocol test service; The Autosar CP performs a communication protocol test service according to the CP test code compilation product; The test host AP executes a communication protocol test service according to the AP test code compilation product.
10. The cross-platform communication protocol stack testing method based on Autosar according to claim 9, characterized in that: The method further includes the Autosar CP and / or the test host AP uploading the test results to an automated test platform database and uploading the test log to a file server.
Citation Information
Patent Citations
Automated test system and method for AutoSar AP service
CN116150000A
Center device and data packet generation method
CN118679455A