A test system and test method for AutoSAR architecture

By designing a test system for vehicle controllers and clients in the AutoSAR architecture, and using an automated test software framework and complex device driver modules to achieve automated testing, the problems of high cost and low efficiency of AutoSAR architecture are solved, and low cost and high efficiency are achieved test.

CN118363863BActive Publication Date: 2024-12-27MEIJIA (WUHAN) TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410555431.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-12-27
Estimated Expiration
2044-05-07

AI Technical Summary

Technical Problem

AutoSAR architecture has high testing costs and low testing efficiency, especially due to the high purchasing costs and complex usage requirements of existing toolchains, making it difficult for companies with insufficient strength to conduct effective testing.

Method used

A test system with AutoSAR architecture was designed, including vehicle controllers and clients. The vehicle controller is deployed with AutoSAR software framework and complex device driver modules, and the client is deployed with an automated test software framework, and through complex device driver modules and automated test software Communication between frameworks enables automated testing of application modules, reducing testing costs and improving efficiency.

Benefits of technology

Through the use of automated testing software framework, the cost of testing tools is significantly reduced, testing efficiency is improved, vulnerabilities during function development and business updates can be discovered in a timely manner, and problems occur after the software is released.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118363863B_ABST
    Figure CN118363863B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of automated testing, and discloses a test system and a test method of an AutoSAR architecture, wherein the system comprises a vehicle controller and a client, wherein an AutoSAR software framework is deployed in the vehicle controller, wherein a complex device driver module is deployed in the AutoSAR software framework, wherein the complex device driver is used to drive a target device interface of the vehicle controller, so as to receive data of the client or send data to the client through the target device interface, and to test an application module in the AutoSAR software framework in response to the received data; wherein an automated testing software framework is deployed in the client, wherein test case information is deployed in the automated testing software framework, and the test case information is used to generate test data by running in the client. The present invention significantly reduces the cost of test tools and improves test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated testing technology, and in particular to a testing system and a testing method for an AutoSAR architecture. Background Art

[0002] AutoSAR CP (AutoSAR Classical Platform) is an open architecture standard for automotive electronic software, which is widely used in the development of various controller software in the automotive electronics industry. AutoSAR development has a set of strict specifications and processes to ensure the consistency and quality of the software development process. AutoSAR architecture development has many advantages, but also some obvious disadvantages. For example, the obvious disadvantage of AutoSAR development is that the tool chain supporting AutoSAR is expensive to use, and the purchase cost basically starts at one million. In addition, the use of the tool chain requires engineers who are familiar with it, and errors may occur during the tool configuration process due to human operation. For the AutoSAR architecture module integration step, some module testing is required, and the test tool chain is needed at this time. However, due to its high purchase cost, companies with insufficient strength do not have the ability to purchase and use it, nor do they have the ability to train technical personnel to learn how to use the tool chain. The current alternative is to pile in the program module of the AutoSAR architecture, and use the debugging tool to breakpoint the location where verification is required to debug one by one. This method is more suitable when the number of programs is small, but it will be cumbersome and inefficient when a large amount of data needs to be verified. Summary of the invention

[0003] In view of this, the present invention provides a test system and a test method for an AutoSAR architecture to solve the problems of high test cost and low test efficiency of the AutoSAR software framework.

[0004] In a first aspect, the present invention provides a test system for an AutoSAR architecture, the test system for the AutoSAR architecture comprising a vehicle controller and a client, the vehicle controller being deployed with an AutoSAR software framework, the AutoSAR software framework being deployed with a complex device driver module, the complex device driver being used to drive a target device interface of the vehicle controller to receive data from the client or send data to the client through the target device interface, and being used to test application modules in the AutoSAR software framework in response to the received data; the client being deployed with an automated testing software framework, the automated testing software framework being deployed with test case information, the test case information being used to run in the client to generate test data.

[0005] In an optional implementation, the complex device driver module includes an interface driver unit and a test suite unit; the interface driver unit is used to drive the target device interface to receive test data sent by the client or send feedback data to the client; the test suite unit is used to parse the test data received by the interface driver unit, and use the test commands obtained by the analysis to test the application module, and to receive feedback data output by the application module and pass the feedback data to the interface driver unit.

[0006] In an optional implementation, the AutoSAR architecture test system further includes a communication tool device, which is used to convert the format of data transmitted between the vehicle controller and the client; a communication tool control module is deployed in the automated testing software framework, and the communication tool control module is used to control the operation of the communication tool device.

[0007] In a second aspect, the present invention provides a testing method for an AutoSAR architecture, which is applied to a vehicle controller and includes: driving a target device interface of the vehicle controller through a complex device driver module, receiving test data sent by a client, wherein the test data is data generated by the client running test case information in an automated testing software framework; responding to the test data through the complex device driver module to test an application module in the AutoSAR software framework; and sending feedback data output by the application module to the client through the complex device driver module.

[0008] In an optional implementation, the complex device driver module responds to the test data to test the application module in the AutoSAR software framework, including: parsing the test data received by the interface driver unit from the client through a test suite unit to obtain a test command; outputting the test command to the corresponding application module through the test suite unit to control the application module to perform a corresponding test action; obtaining feedback data output by the application module after completing the test action through the test suite unit, and packaging the feedback data.

[0009] In an optional embodiment, sending the feedback data output by the application module to the client through the complex device driver module includes: receiving the feedback data packaged by the test suite unit through an interface driver unit; sending the feedback data to a communication tool device, so that the client accesses the communication tool device through a communication tool control module and receives the feedback data.

[0010] In a third aspect, the present invention provides a test method for an AutoSAR architecture, the method being applied to a client, comprising: running test case information in an automated testing software framework to generate test data;

[0011] The test data is sent to the vehicle controller so that the vehicle controller drives the target device interface of the vehicle controller through a complex device driver module, receives the test data, and then responds to the test data through the complex device driver module to test the application module in the AutoSAR software framework; and feedback data sent by the vehicle controller through the complex device driver module is received, and the feedback data is feedback data output after the application module test is completed.

[0012] In an optional implementation, sending the test data to the vehicle controller includes: sending the test data to a communication tool device through a communication tool control module, controlling the communication tool device to convert the format of the test data, and then sending the converted test data to the vehicle controller.

[0013] In an optional embodiment, the receiving of feedback data sent by the vehicle controller through the complex device driver module includes: accessing the communication tool device through the communication tool control module and detecting whether there is feedback data; when it is detected that the communication tool device has the feedback data, reading the feedback data from the communication tool device through the communication tool control module.

[0014] In a fourth aspect, the present invention provides a testing method for an AutoSAR architecture, comprising: a client runs test case information in an automated testing software framework to generate test data; the client sends the test data to a vehicle controller; the vehicle controller drives a target device interface of the vehicle controller through a complex device driver module to receive the test data; the vehicle controller responds to the test data through a complex device driver module to test an application module in the AutoSAR software framework; the vehicle controller sends feedback data output by the application module to the client through the complex device driver module; and the client receives the feedback data.

[0015] The technical solution provided by the present invention has the following advantages:

[0016] The present invention deploys an open-source and free automated testing software framework through a client, and the automated testing software framework can be used for automated testing of equipment, and then test case information is deployed in the automated testing software framework. A special driver for communicating with the client automated testing software framework is developed based on the complex device driver module of the AutoSAR software framework, thereby realizing the function of delivering the test command of the automated testing software framework to the vehicle controller and testing the AutoSAR software framework. The test system developed using this method can promptly discover loopholes that may arise during function development and business updates, and make modifications in a timely manner to reduce problems that arise after the software is released. Since the automated testing software framework is open-source and free, the cost of testing tools can be significantly reduced. In addition, based on the automated testing software framework for testing, multiple test cases can be run simultaneously, which significantly improves test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a structural schematic diagram of a test system for an AutoSAR architecture according to an embodiment of the present invention;

[0019] Figure 2 is a flow chart of a test method of an AutoSAR architecture according to an embodiment of the present invention;

[0020] Figure 3 1 is another flowchart of a method for testing an AutoSAR architecture according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0022] AutoSAR CP (AutoSAR Classical Platform) is an open architecture standard for automotive electronic software. It is widely used in the development of various controller software in the automotive electronics industry because it implements software layered design and improves software reusability. Autosar is mainly divided into three levels, including the application module layer, the real-time operating environment layer and the basic software layer. The application module layer is used to deploy various application modules; the real-time operating environment layer is used to provide the resources required by the application layer, and at the same time isolate the application layer from the bottom layer, providing communication capabilities between application modules of the application layer and between application modules and the basic software layer; the basic software layer is used to encapsulate the hardware into a standard operating system state so that the upper layer can call system services in a standardized manner.

[0023] The development of AutoSAR has a strict set of specifications and processes. Generally speaking, the requirements engineer first needs to collect and analyze the system requirements, and then define the corresponding software requirements specifications; next, the software architect will design the system's software architecture and define the interfaces of modules and functions; then in the development stage, the software engineer implements the corresponding application modules according to the software architecture and performs unit tests to verify the correctness of its functions; then the integration engineer integrates different application modules and performs corresponding integration tests; finally, the system engineer will perform system tests in the entire system environment to ensure the stability and performance of the system. Through this set of specifications and processes, AutoSAR development can be carried out efficiently and reliably, thereby improving the quality and safety of automotive software.

[0024] However, an obvious disadvantage of AutoSAR development is that the supporting tool chain has a high cost. When the AutoSAR architecture module is integrated, some application module tests need to be performed. The virtual target test platform supporting AutoSAR development can simulate and monitor the vehicle controller and test the internal component modules (such as CAN communication). However, due to its high purchase cost, the purchase cost basically starts at one million. For companies with insufficient strength, they are unable to purchase and use it. In addition, the use of the tool chain requires engineers who are familiar with it, and errors may occur due to human operation during the tool configuration process. At present, for companies that cannot afford to purchase the supporting test tools for AutoSAR development, the common alternative is to pile in the AutoSAR application module, use the debugging tool to breakpoint the location that needs to be verified, and debug one by one. This method is more suitable when the number of tests is small, but it will be cumbersome and inefficient when a large amount of data needs to be verified. Therefore, it is very necessary to propose a new method to test the functions of the corresponding modules, which has the advantages of low cost and high efficiency.

[0025] According to an embodiment of the present invention, a test system of an AutoSAR architecture is provided to solve the above problems. Figure 1 As shown, the test system of the AutoSAR architecture includes a vehicle controller and a client. The AutoSAR software framework is deployed in the vehicle controller. The complex device driver module is deployed in the AutoSAR software framework. The complex device driver is used to drive the target device interface of the vehicle controller to receive data from the client or send data to the client through the target device interface, and to test the application module in the AutoSAR software framework in response to the received data; an automated testing software framework is deployed in the client. The automated testing software framework is deployed with test case information, and the test case information is used to run in the client to generate test data.

[0026] Specifically, the automated testing software framework is an open source, software testing environment deployment standard. The use of framework design can minimize the maintenance of test scripts. Based on the open source characteristics of the automated testing software framework, the development flexibility of its test cases is higher and the development cost of the test system is lower. For example, commonly used automated testing software frameworks include but are not limited to RobotFramework, Pytest, Junit, WebDriverIO, Citrus, etc. Among them, RobotFramework is a communication automated testing framework written in Python. It uses a keyword-driven method to simplify the writing of test scripts. This framework is very suitable for testing various applications. It has high scalability and flexibility, can adapt to different testing requirements, and will generate corresponding test reports based on test cases. RobotFramework provides a rich built-in library, provides a large number of testing tools and functions, and it is an open source tool. To build the RobotFramework test environment, this embodiment can use the open source tool RIDE software to build it in the client.

[0027] In a specific application embodiment, the present invention designs an AutoSAR communication test method based on RobotFramework, takes RobotFramework as the test framework, and writes a complex device driver module in the AutoSAR architecture. The complex device driver module is used to interact with the application module under test and RobotFramework for data.

[0028] Specifically, the test system of the AutoSAR architecture provided in an embodiment of the present invention mainly includes two hardware devices. One is a vehicle controller for deploying the AutoSAR software framework, which is the object to be tested; the other is a client, which can be a personal computer, mobile phone, tablet computer or other computer device, used to deploy an automated testing software framework (i.e., RobotFramework), so that the client has a software environment for testing the vehicle controller.

[0029] Usually in the AutoSAR software framework, some standard hardware drivers of the vehicle controller are pre-deployed in the basic software layer. However, since the test equipment of the client is a specially developed test tool, there is no docking driver available. Therefore, the embodiment of the present invention deploys a complex device driver module in the AutoSAR software framework based on the complex driver mechanism in the AutoSAR software framework. The complex device driver module spans between the microcontroller hardware layer and the real-time operating environment layer. Its main task is to integrate non-standard functional modules with special purposes and cannot be configured with the basic software layer, and embed this part of the function into the AUTOSAR basic software layer, so as to realize the processing of the specific functions and time requirements of complex sensors and actuators, and provide integrated special-purpose functions, such as device drivers, which are not specified in AutoSAR and have very high time constraints or are used for migration purposes.

[0030] In an embodiment of the present invention, the deployed complex device driver module is specifically used to drive the target device interface of the vehicle controller (for example, a serial port, USB interface, etc., which are specifically used to communicate with the client) to receive data from the client or send data to the client through the target device interface, and the deployed complex device driver module is also used to parse and identify the test data sent by the client, perform some conversions on the message format and protocol, and generate corresponding test commands in response to the received test data, and control the application modules in the AutoSAR software framework through the test commands to execute some test functions, thereby realizing the test.

[0031] Users add test case information in RobotFramework. Test case information is a symbolic description formed by some keywords combined with specific syntax, which is used to describe the action steps to control the application module to test the functions of certain application modules. Therefore, when users perform tests, they run some test cases through the automated testing software framework in the client, and the generated test data will be sent to the vehicle controller. The vehicle controller receives the test data based on the complex device driver module driving the target device interface. Then the complex device driver module can effectively identify and parse the test data, so as to control the application module to perform the corresponding test actions. Finally, the complex device driver module feeds back the feedback data output during the application module test to the client, so that users can view and analyze the test results.

[0032] Through the technical solution provided by the embodiment of the present invention, it is possible to timely discover loopholes that may occur during function development and business updates, and to make modifications in a timely manner, thereby reducing problems that occur after software release. Since the automated testing software framework is open source and free, the cost of testing tools can be significantly reduced. In addition, compared with the program stubbing test method, when testing based on the automated testing software framework, multiple test cases can be run simultaneously, while also taking into account the improvement of testing efficiency.

[0033] In an optional implementation, the complex device driver module includes an interface driver unit and a test suite unit; the interface driver unit is used to drive the target device interface to receive test data sent by the client or send feedback data to the client; the test suite unit is used to parse the test data received by the interface driver unit, and use the test commands obtained by the analysis to test the application module, and to receive feedback data output by the application module and pass the feedback data to the interface driver unit.

[0034] Specifically, in an embodiment of the present invention, in order to realize the two core functions of the complex device driver module, namely, sending and receiving data and executing tests, the corresponding functions are realized in the complex device driver module through two parts of program units. The first part is the interface driver unit, which is the interface driver for the vehicle controller to communicate with the client. Taking the serial port as an example, the interface driver unit is implemented in the form of a complex device driver module as a serial port driver, which is responsible for data interaction with the client, obtaining data from the client and sending data from the vehicle controller to the client. The second part is the test suite unit. The test suite unit, as an internal test suite, directly interacts with the CAN application module, COM application module, E2E application module, SecOC application module, etc. inside AutoSAR, and parses the data received by the interface driver, identifies what kind of test command it is, and then executes the corresponding control command to obtain data from other modules or modify data. The complex device driver module configured by the embodiment of the present invention can perform corresponding tests internally for the test data sent by the client, so that there is no need to perform complicated operations such as program stubbing.

[0035] In some optional implementations, the test system of the AutoSAR architecture also includes a communication tool device, which is used to convert the format of data transmitted between the vehicle controller and the client; a communication tool control module is deployed in the automated testing software framework, and the communication tool control module is used to control the operation of the communication tool device.

[0036] Specifically, in some practical application scenarios, since the output port of the vehicle volume controller does not match the standard of the output port of the client, it is necessary to use some communication tools as a communication bridge between the client and the vehicle controller, such as a serial port to USB conversion device, a CAN box for transmitting CAN data, etc. This embodiment is only an example and is not limited to this. Based on this, this embodiment also deploys a communication tool control module in the automated test software framework, and the communication tool control module is used to control the operation of the communication tool device, thereby further ensuring the accurate and efficient transmission of test data.

[0037] According to an embodiment of the present invention, a test method for an AutoSAR architecture is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here. Figure 2 As shown, a test method of an AutoSAR architecture provided by the present invention includes steps S101 to S103 executed by a client and steps S201 to S203 executed by a vehicle controller, and the specific steps are as follows:

[0038] Step S101, the client runs the test case information in the automated testing software framework to generate test data;

[0039] Step S102, the client sends the test data to the vehicle controller;

[0040] Step S201, the vehicle controller drives the target device interface of the vehicle controller through the complex device driver module to receive test data;

[0041] Step S202, the vehicle controller responds to the test data through the complex device driver module to test the application module in the AutoSAR software framework;

[0042] Step S203, the vehicle controller sends the feedback data output by the application module to the client through the complex device driver module;

[0043] Step S103: the client receives feedback data.

[0044] Specifically, based on the test system of the AutoSAR architecture provided in the aforementioned embodiment, when the user needs to continue to perform software testing, by operating on the client and running the corresponding test case, the client can generate corresponding test data for the test case and send it to the vehicle controller. The vehicle controller automatically parses the received data, controls the corresponding application module through the self-configured complex device driver module to automatically execute the test, and finally the client receives the feedback data sent by the vehicle controller to obtain the test result. Through the technical solution provided by the embodiment of the present invention, it is possible to timely discover loopholes that may arise during function development and business updates, and make modifications in a timely manner to reduce problems that arise after the software is released. Since the automated testing software framework is open source and free, the cost of testing tools can be significantly reduced. In addition, compared with the program stubbing test method, multiple test cases can be run simultaneously based on the automated testing software framework, and the test efficiency can also be improved for situations where a large amount of data needs to be verified.

[0045] In some optional implementations, the above step S202 includes:

[0046] Step a1, parsing the test data received by the interface driver unit from the client through the test suite unit to obtain a test command;

[0047] Step a2, outputting a test command to a corresponding application module through the test suite unit to control the application module to perform a corresponding test action;

[0048] Step a3: obtaining feedback data output by the application module after completing the test action through the test suite unit, and packaging the feedback data.

[0049] Specifically, in order to realize the two core functions of the complex device driver module, namely, sending and receiving data and executing tests, the corresponding functions are realized in the complex device driver module through two program units. The first part is the interface driver unit, which is the interface driver program for the vehicle controller to communicate with the client. Taking the serial port as an example, the interface driver unit is implemented in the form of a complex device driver module as a serial port driver, which is responsible for data interaction with the client, obtaining data from the client, and sending data from the vehicle controller to the client. Thus, the vehicle controller drives the target device interface of the vehicle controller through the complex device driver module, and the specific implementation method of receiving test data is to drive the target device interface through the interface driver unit to receive the test data.

[0050] The second part is the test suite unit. As an internal test suite, the test suite unit directly interacts with the CAN application module, COM application module, E2E application module, SecOC application module, etc. inside AutoSAR, and parses the data received by the interface driver to identify what kind of test command it is, and then executes the corresponding control command to obtain data from other modules or modify data. Finally, the test suite unit also obtains the feedback data output by the application module after completing the test action, and packages the feedback data so that the packaged feedback data can be returned to the client for the user to view and analyze the test results. Through the test suite unit configured in the complex device driver module according to the embodiment of the present invention, the test data sent by the client can be parsed into the test code that can be executed inside AutoSAR, and the corresponding test can be performed internally, so that there is no need to perform complicated operations such as program stubbing.

[0051] In some optional implementations, step S102 includes:

[0052] Step b1, sending the test data to the communication tool device through the communication tool control module, and controlling the communication tool device to convert the format of the test data, and then sending the converted test data to the vehicle controller.

[0053] In some optional implementations, the aforementioned step S203 includes:

[0054] Step b2: receiving feedback data packaged by the test suite unit through the interface driver unit.

[0055] Step b3, sending the feedback data to the communication tool device, so that the client accesses the communication tool device through the communication tool control module and receives the feedback data.

[0056] In some optional implementations, the aforementioned step S103 includes:

[0057] Step b4, accessing the communication tool device through the communication tool control module, and detecting whether there is feedback data;

[0058] Step b5: when it is detected that the communication tool device has feedback data, the feedback data is read from the communication tool device through the communication tool control module.

[0059] Specifically, in some practical application scenarios, since the output port of the vehicle controller does not match the standard of the output port of the client, it is necessary to use some communication tools as a communication bridge between the client and the vehicle controller, such as a serial port to USB conversion device, a CAN box for transmitting CAN data, etc. This embodiment is only an example and is not limited to this. Based on this, this embodiment also deploys a communication tool control module in the automated test software framework, and the communication tool control module is used to control the operation of the communication tool device, thereby further ensuring the accurate and efficient transmission of the test data. Take the RobotFramework environment as an example to write a Python script. The Python script is used to implement the control of the communication tool. For example, when using a CAN box, you can call the dynamic library provided by the CAN box manufacturer to make an API call to control the CAN box to send and receive; if it is to test CAN communication and support E2E and SecOC, then the Python script also needs to implement the E2E and SecOC functions to support the encryption and decryption of the message; in addition, the Python script needs to implement test cases, and each test case needs to match the functions available in the test suite unit.

[0060] It should be noted that in the embodiment of the present invention, the communication tool device refers to a general term for a type of device used as a communication bridge. This embodiment can use multiple communication tool devices at the same time, and the communication tool devices used at the same time are not limited to one. For example, in a specific embodiment, this embodiment can use a serial communication device that converts between USB and serial ports, and a CAN box that converts between CAN messages and USB. When the user actually performs a test, if the user tests the CAN module output test in the AutoSAR software framework, the user's operation steps are as follows:

[0061] 1. The user runs the test case for testing the CAN module output in the client to generate test data;

[0062] 2. The client controls the serial communication device through the communication tool control module to send the test data to the serial port of the vehicle controller;

[0063] 3. The vehicle controller drives the serial port to receive test data through the interface driver unit;

[0064] 4. The vehicle controller parses the test data through the test suite unit and obtains the test command that can be recognized by the AutoSAR software framework, thereby controlling the CAN application software module to execute the test action of outputting the CAN message through the test command;

[0065] 5. After receiving the CAN message, the on-board controller no longer returns feedback data through the serial port, but sends the CAN message to the CAN box through the CAN communication interface in the basic software layer;

[0066] 6. The client reads feedback data from the CAN box through the communication tool control module.

[0067] Based on the technical solution provided by the embodiment of the present invention, Figure 3 As shown, a complete application embodiment is shown below.

[0068] 1. Write complex device driver modules in the vehicle controller, specifically write test suite units and interface driver units.

[0069] 2. Write Python scripts on the client. The Python scripts mainly realize the control of communication tool equipment, test case business function functions and detection and comparison verification of feedback data.

[0070] 3. Build the RobotFramework test environment on the client. You can use the open source tool RIDE software to build it, and complete the input of the test case logic in the test environment according to the test cases in the Python script.

[0071] 4. Connect the communication tools and equipment needed in the test link.

[0072] 5. When everything is ready, the user operates on the client and the test cases are automatically run. All test cases can be run in batches, or only a specific test case can be run.

[0073] 6. When all selected use cases are executed, the client receives feedback data from the vehicle controller and automatically generates a test report based on the feedback data.

[0074] The technical solution provided by the present invention can not only save the development cost of enterprises and avoid purchasing expensive testing tools, but also develop a testing system with certain versatility. The testing system is conducive to timely discovering loopholes that may occur during function development and business updates, and timely modifying them to reduce problems that occur after software release.

[0075] In an embodiment of the present invention, both the client and the vehicle controller can be implemented based on the hardware structure of the computer device. The computer device includes: one or more processors, a memory, and an interface for connecting various components, including a high-speed interface and a low-speed interface. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). This embodiment takes a processor as an example.

[0076] The processor may be a central processing unit, a network processor or a combination thereof. The processor may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0077] The memory stores instructions executable by at least one processor, so that the at least one processor executes the method shown in the above embodiment.

[0078] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0079] The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid state drive; the memory may also include a combination of the above types of memory.

[0080] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.

[0081] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0082] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0083] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A test system for AutoSAR architecture, characterized in that: The test system of the AutoSAR architecture includes a vehicle controller and a client, wherein the vehicle controller is deployed with an AutoSAR software framework, wherein the AutoSAR software framework is deployed with a complex device driver module, wherein the complex device driver is used to drive a target device interface of the vehicle controller to receive data from the client or send data to the client through the target device interface, and to test application modules in the AutoSAR software framework in response to the received data; wherein the client is deployed with an automated testing software framework, wherein test case information is deployed with the automated testing software framework, and wherein the test case information is used to run in the client to generate test data; The complex device driver module includes an interface driver unit and a test suite unit; The interface driver unit is used to drive the target device interface to receive test data sent by the client or to send feedback data to the client; the test suite unit is used to parse the test data received by the interface driver unit, and use the test commands obtained by the analysis to test the application module, and to receive feedback data output by the application module and pass the feedback data to the interface driver unit.

2. The test system of the AutoSAR architecture according to claim 1, characterized in that: The test system of the AutoSAR architecture also includes a communication tool device, which is used to convert the format of data transmitted between the vehicle controller and the client; a communication tool control module is deployed in the automated testing software framework, and the communication tool control module is used to control the operation of the communication tool device.

3. A test method for AutoSAR architecture, characterized in that: The method is applied to a vehicle controller and comprises: The target device interface of the vehicle controller is driven by a complex device driver module to receive test data sent by a client, wherein the test data is data generated by the client running test case information in an automated testing software framework; Testing the application module in the AutoSAR software framework by responding to the test data through the complex device driver module; Sending the feedback data output by the application module to the client through the complex device driver module; The method of testing the application modules in the AutoSAR software framework by responding to the test data through the complex device driver module includes: parsing the test data received by the interface driver unit from the client through the test suite unit to obtain a test command; outputting the test command to the corresponding application module through the test suite unit to control the application module to perform the corresponding test action; obtaining the feedback data output by the application module after completing the test action through the test suite unit, and packaging the feedback data.

4. The method according to claim 3, characterized in that The step of sending the feedback data output by the application module to the client through the complex device driver module includes: Receiving the feedback data packaged by the test suite unit through an interface driving unit; The feedback data is sent to the communication tool device, so that the client accesses the communication tool device through the communication tool control module and receives the feedback data.

5. A test method for AutoSAR architecture, characterized in that: The method is applied to a client and includes: Run test case information in the automated testing software framework to generate test data; The test data is sent to the vehicle controller so that the vehicle controller drives the target device interface of the vehicle controller through the complex device driver module, receives the test data, and then responds to the test data through the complex device driver module to test the application module in the AutoSAR software framework; the vehicle controller drives the target device interface of the vehicle controller through the complex device driver module, receives the test data, and then responds to the test data through the complex device driver module to test the application module in the AutoSAR software framework, including: receiving the test data from the client through the interface driver unit; parsing the test data received by the interface driver unit from the client through the test suite unit to obtain a test command; outputting the test command to the corresponding application module through the test suite unit to control the application module to perform the corresponding test action; obtaining the feedback data output by the application module after completing the test action through the test suite unit, and packaging the feedback data; Receive feedback data sent by the vehicle controller through the complex device driving module, where the feedback data is feedback data output after the application module test is completed.

6. The method according to claim 5, characterized in that The sending of the test data to the vehicle controller comprises: The test data is sent to the communication tool device through the communication tool control module, and the communication tool device is controlled to convert the format of the test data, and then the converted test data is sent to the vehicle controller.

7. The method according to claim 6, characterized in that The receiving feedback data sent by the vehicle controller through the complex device driver module includes: Accessing the communication tool device through the communication tool control module and detecting whether there is feedback data; When it is detected that the communication tool device has the feedback data, the feedback data is read from the communication tool device by the communication tool control module.

8. A test method for AutoSAR architecture, characterized in that: include: The client runs the test case information in the automated testing software framework to generate test data; The client sends the test data to the vehicle controller; The vehicle controller drives the target device interface of the vehicle controller through a complex device driver module to receive the test data; The vehicle controller drives the target device interface of the vehicle controller through a complex device driver module, and receiving the test data includes: receiving the test data from the client through an interface driver unit; The vehicle controller responds to the test data through a complex device driver module to test the application module in the AutoSAR software framework; the vehicle controller responds to the test data through a complex device driver module to test the application module in the AutoSAR software framework, including: parsing the test data received by the interface driver unit from the client through a test suite unit to obtain a test command; outputting the test command to the corresponding application module through the test suite unit to control the application module to perform a corresponding test action; obtaining feedback data output by the application module after completing the test action through the test suite unit, and packaging the feedback data; The vehicle controller sends the feedback data output by the application module to the client through the complex device driver module; The client receives the feedback data.

Citation Information

Patent Citations

  • Automatic test method and device, vehicle, and storage medium

    CN110673576A

  • CAN equipment safety test system and test method

    CN110912944A

  • Message pushing method and device, electronic equipment and storage medium

    CN113992352A

  • Vehicle information security test method and device, and storage medium

    CN115168219A

  • UDS diagnosis automatic test system based on AUTOSAR standard

    CN115546927A