Test method, device and system, storage medium and program product
Through communication between the upper computer and the integrated server on the test, the designated test framework and adaptive plug-ins are used to perform automated upgrade test of the vehicle computer system software, which solves the problem of low testing efficiency of the vehicle computer system software upgrade and achieves efficient and reliable test results .
Patent Information
- Application Number
- CN202411397391.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, the testing efficiency of vehicle system software upgrade is low, and the testing engineer needs to manually conduct automated integrated vehicle software package testing, resulting in high time and labor costs, and difficult to ensure test stability and reliability.
By communicating with the integrated server on the test host computer, using the method classes in the specified test framework and adapter plug-in for automated upgrade tests, obtaining log data and system environment identification, ensuring that the vehicle computer software is successfully upgraded to the target version, and performing multimedia playback, Bluetooth phone function and reverse function test to improve testing efficiency and accuracy.
It realizes automation of vehicle system software upgrade testing, improves testing efficiency and quality, reduces time and labor costs, and ensures the stability and reliability of test results.
Smart Images

Figure CN119271562A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a testing method, device, system, storage medium and program product. Background Art
[0002] In-Vehicle Infotainment (IVI) is an integrated in-vehicle information processing system that uses a dedicated in-vehicle central processor, based on the body bus system and Internet services. The car computer is an important part of the in-vehicle infotainment system (IVI). The IVI system is a comprehensive information processing system, and the car computer, as one of the core devices, is responsible for managing and executing the various functions of the IVI system.
[0003] Testing is an important part of vehicle computer product quality assurance. Smoke testing and endurance testing are two typical testing methods in the iterative development of vehicle computer software. Smoke testing is a rapid basic functional test and verification of the software installation package during the software development process, and is a means of confirming and verifying the basic functions of the software. Endurance testing is a long-term and multiple test and verification of a certain function in a specific software version, and is a means of confirming and verifying the stability and reliability of the software.
[0004] Currently, test engineers are required to manually test the automatically integrated vehicle software package, which results in low testing efficiency. Summary of the invention
[0005] The embodiments of the present application provide a testing method, device, system, storage medium and program product to improve the efficiency of vehicle system software upgrade testing.
[0006] In a first aspect, an embodiment of the present application provides a testing method, which is applied to a testing host computer, wherein the testing host computer is communicatively connected with an integrated server and a vehicle computer, and includes:
[0007] Based on the test start signal provided by the integration server, starting a specified test framework on the test host computer, wherein the test start signal is generated after the integration server successfully integrates the software installation package of the vehicle computer;
[0008] Based on the specified test framework, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
[0009] In a possible implementation, executing the first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtaining an upgrade test result includes:
[0010] Calling multiple method classes encapsulated in the adapter plug-in of the specified test framework, the multiple method classes at least include a first method class, a second method class and a third method class, the first method class is used to obtain log data of the vehicle computer, the second method class is used to communicate and interact with the vehicle computer, and the third method class is used to obtain version information and environment variables of the software installation package;
[0011] Based on the multiple method classes, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
[0012] In a possible implementation manner, the vehicle computer includes at least two vehicle computer systems, and executing the first test case based on the multiple method classes to perform an upgrade test on the vehicle computer to obtain an upgrade test result includes:
[0013] Creating a thread through the first method class to record log data of the vehicle computer during the upgrade test process to obtain first log data information;
[0014] The second method class is used to obtain the system environment identifiers before and after the vehicle computer installs the software installation package, and obtain system environment identifier record information, which is used by the vehicle computer to upgrade the software version of another vehicle computer system in the current vehicle computer system, and switch to the other vehicle computer system after the upgrade is completed;
[0015] Obtaining version information and environment variables of the software installation package from the integrated server through the third method class, obtaining a software version identifier of the software installation package from the publishing server based on the environment variables and the version information, and obtaining a software version identifier of the other vehicle system through the second method class after the vehicle system switches to the other vehicle system, to obtain software version identifier record information;
[0016] An upgrade test result is obtained based on the first log data information, the system environment identification record information and the software version identification record information.
[0017] In a possible implementation, the method further includes:
[0018] Executing a second test case based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtaining a multimedia playback test result;
[0019] The vehicle computer is communicatively connected to an external device, the second test case includes first quantity information, and the first quantity information is quantity information of multimedia resources stored in the external device. The second test case is executed based on the specified test framework to perform a multimedia playback test on the vehicle computer, and a multimedia playback test result is obtained, including:
[0020] During the multimedia test, the second method class is used to sequentially control the power-off of the peripheral chip of the vehicle computer, control the power-on of the peripheral chip of the vehicle computer, control the vehicle computer to start a multimedia application to obtain the quantity information of the multimedia resources stored in the external device, obtain the second quantity information, and control the vehicle computer to play the multimedia resources of the external device;
[0021] Creating a thread through the first method class to record log data of the vehicle computer during the multimedia test process to obtain second log data information;
[0022] A multimedia playback test result is obtained based on the first quantity information, the second quantity information and the second log data information.
[0023] In a possible implementation, the method further includes:
[0024] Executing a third test case based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer, and obtaining a Bluetooth phone function test result;
[0025] The vehicle computer is paired with a communication device, and the third test case is executed based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer to obtain a Bluetooth phone function test result, including:
[0026] During the Bluetooth phone function test, the second method class is used to sequentially control the vehicle computer to turn on the Bluetooth switch, control the vehicle computer to make a Bluetooth call, control the vehicle computer to hang up the Bluetooth call, and control the vehicle computer to turn off the Bluetooth switch;
[0027] Creating a thread through the first method class to record log data of the vehicle computer during the Bluetooth phone function test to obtain third log data information;
[0028] Based on the third log data information, a Bluetooth phone function test result is obtained.
[0029] In a possible implementation, the method further includes:
[0030] Executing a fourth test case based on the specified test framework to perform a reversing function test on the vehicle computer, and obtaining a reversing function test result;
[0031] The test host computer is connected to the vehicle computer through a CAN test tool, and the fourth test case is executed based on the specified test framework to perform a reversing function test on the vehicle computer to obtain a reversing function test result, including:
[0032] During the reversing function test, the CAN test tool is controlled to send a reversing signal through the constructed virtual environment, the vehicle computer is controlled to restart through the second method class, and the CAN test tool is controlled to send a reversing release signal through the constructed virtual environment;
[0033] Creating a thread through the first method class to record log data of the vehicle computer during the reversing function test to obtain fourth log data information;
[0034] Based on the fourth log data information, a reverse function test result is obtained.
[0035] In a possible implementation manner, starting a specified test framework on the test host computer based on a test start signal provided by the integrated server includes:
[0036] Based on the test start signal provided by the integrated server, a virtual environment for testing is constructed on the test host computer;
[0037] In the virtual environment, the specified test framework is started.
[0038] In a second aspect, an embodiment of the present application provides a test device, which is applied to a test host computer, wherein the test host computer is communicatively connected with an integrated server and a vehicle computer, and the device comprises:
[0039] A startup module, used to start a specified test framework on the test host computer based on a test startup signal provided by the integration server, wherein the test startup signal is generated after the integration server successfully integrates the software installation package of the vehicle computer;
[0040] The upgrade test module is used to execute the first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0041] In a possible implementation manner, the upgrade test module is specifically used to:
[0042] Calling multiple method classes encapsulated in the adapter plug-in of the specified test framework, the multiple method classes at least include a first method class, a second method class and a third method class, the first method class is used to obtain log data of the vehicle computer, the second method class is used to communicate and interact with the vehicle computer, and the third method class is used to obtain version information and environment variables of the software installation package;
[0043] Based on the multiple method classes, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
[0044] In a possible implementation manner, the vehicle computer includes at least two vehicle computer systems, and the upgrade test module is specifically used for:
[0045] Creating a thread through the first method class to record log data of the vehicle computer during the upgrade test process to obtain first log data information;
[0046] The second method class is used to obtain the system environment identifiers before and after the vehicle computer installs the software installation package, and obtain system environment identifier record information, which is used by the vehicle computer to upgrade the software version of another vehicle computer system in the current vehicle computer system, and switch to the other vehicle computer system after the upgrade is completed;
[0047] Obtaining version information and environment variables of the software installation package from the integrated server through the third method class, obtaining a software version identifier of the software installation package from the publishing server based on the environment variables and the version information, and obtaining a software version identifier of the other vehicle system through the second method class after the vehicle system switches to the other vehicle system, to obtain software version identifier record information;
[0048] An upgrade test result is obtained based on the first log data information, the system environment identification record information and the software version identification record information.
[0049] In a possible implementation manner, the testing device is further specifically used for:
[0050] Executing a second test case based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtaining a multimedia playback test result;
[0051] The vehicle computer is in communication connection with the external device, the second test case includes first quantity information, the first quantity information is quantity information of multimedia resources stored in the external device, and the test device is further used for:
[0052] During the multimedia test, the second method class is used to sequentially control the power-off of the peripheral chip of the vehicle computer, control the power-on of the peripheral chip of the vehicle computer, control the vehicle computer to start a multimedia application to obtain the quantity information of the multimedia resources stored in the external device, obtain the second quantity information, and control the vehicle computer to play the multimedia resources of the external device;
[0053] Creating a thread through the first method class to record log data of the vehicle computer during the multimedia test process to obtain second log data information;
[0054] A multimedia playback test result is obtained based on the first quantity information, the second quantity information and the second log data information.
[0055] In a possible implementation manner, the testing device is further specifically used for:
[0056] Executing a third test case based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer, and obtaining a Bluetooth phone function test result;
[0057] The vehicle computer is paired with the communication device, and the testing device is further used for:
[0058] During the Bluetooth phone function test, the second method class is used to sequentially control the vehicle computer to turn on the Bluetooth switch, control the vehicle computer to make a Bluetooth call, control the vehicle computer to hang up the Bluetooth call, and control the vehicle computer to turn off the Bluetooth switch;
[0059] Creating a thread through the first method class to record log data of the vehicle computer during the Bluetooth phone function test to obtain third log data information;
[0060] Based on the third log data information, a Bluetooth phone function test result is obtained.
[0061] In a possible implementation manner, the testing device is further specifically used for:
[0062] Executing a fourth test case based on the specified test framework to perform a reversing function test on the vehicle computer, and obtaining a reversing function test result;
[0063] The test host computer is connected to the vehicle computer through a CAN test tool, and the test device is further used for:
[0064] During the reversing function test, the CAN test tool is controlled to send a reversing signal through the constructed virtual environment, the vehicle computer is controlled to restart through the second method class, and the CAN test tool is controlled to send a reversing release signal through the constructed virtual environment;
[0065] Creating a thread through the first method class to record log data of the vehicle computer during the reversing function test to obtain fourth log data information;
[0066] Based on the fourth log data information, a reverse function test result is obtained.
[0067] In a possible implementation manner, the startup module is specifically used to:
[0068] Based on the test start signal provided by the integrated server, a virtual environment for testing is constructed on the test host computer;
[0069] In the virtual environment, the specified test framework is started.
[0070] In a third aspect, an embodiment of the present application provides a test system, including a test host computer, an integrated server and a vehicle computer, wherein the test host computer is communicatively connected with the integrated server and the vehicle computer;
[0071] The integration server is used to generate a test start signal after successfully integrating the software installation package of the vehicle computer, and provide the test start signal to the test host computer;
[0072] The test host computer is used to start a specified test framework on the test host computer based on the test start signal; execute a first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0073] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0074] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0075] The test method, device, system, storage medium and program product provided in the embodiments of the present application can enable the test host computer to start a specified test framework on the test host computer based on the test start signal after receiving the test start signal provided by the integrated server. The upgrade test of the vehicle computer can be performed by executing the first test case through the specified test framework. That is to say, in the embodiments of the present application, after the software installation package of the vehicle computer is integrated, the software version of the vehicle computer system is upgraded based on the software installation package, and based on the test start signal, the upgrade test is automatically performed to determine whether the upgrade to the target version is successful, thereby achieving the effect of improving the efficiency of the vehicle computer system software upgrade test. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0077] Figure 1 A schematic diagram of the scenario of the test method provided for this application;
[0078] Figure 2 Schematic diagram of the test method provided for this application Figure 1 ;
[0079] Figure 3 Schematic diagram of the test method provided for this application Figure 2 ;
[0080] Figure 4 Schematic diagram of the scenario of the automated smoke test provided for this application;
[0081] Figure 5 Schematic diagram of the scenario of the automated durability test provided for this application;
[0082] Figure 6 A schematic diagram of the structure of the test device provided for this application;
[0083] Figure 7 A schematic diagram of the structure of the test host computer provided for this application;
[0084] Figure 8 A schematic diagram of the structure of the test system provided in this application.
[0085] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0086] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0087] The application scenario of the present application is specifically to upgrade the vehicle system software and test the basic functions of the system software upgraded to the target version. In the prior art, the software installation package of the vehicle project usually triggers the daily automated integration in the early morning. The automated integration service starts on time, downloads the code from the code server for compilation and integration, and then uploads the results containing the software package and version information to the publishing server. The test engineer will install this software installation package, upgrade the system software version of the vehicle system to the target version, and then perform a smoke test on the basic functions of this version of the system software. After the test is completed, the test results and logs are uploaded to the publishing server. Software development engineers can obtain relevant information to know whether the software version of the software installation package is available. For some special software versions, test engineers need to perform durability tests on some special functions, such as upgrading 10,000 times, plugging and unplugging a USB flash drive 10,000 times, etc.
[0088] Combined with the above scenarios, it can be seen that with the existing testing methods, test engineers need to go to work before they can perform smoke testing on the software version that is automatically integrated that day. After the test is completed, the software development engineer can know whether the software version is usable, which leads to a long development cycle; the existing testing methods have high time and labor costs, especially for durability testing; moreover, the testing method cannot guarantee the stability of the test, and the test engineer conducts the test according to the description of the test case. When the test case steps are complex, the external environment is affected, and the test is fatigued for a long time, it is easy to cause the test process to be unstable and the test results to be unreliable.
[0089] According to the test method provided by the present application, after receiving the test start signal provided by the integrated server, the test host computer can start the specified test framework on the test host computer based on the test start signal. The upgrade test of the vehicle computer can be performed by executing the first test case through the specified test framework. That is to say, in the embodiment of the present application, after the software installation package of the vehicle computer is integrated, the software version of the vehicle computer system is upgraded based on the software installation package, and based on the test start signal, the upgrade test is automatically performed to determine whether the upgrade to the target version is successful, thereby solving the technical problem of low efficiency of vehicle computer system software upgrade test.
[0090] Figure 1 A schematic diagram of the scenario of the test method provided for this application, such as Figure 1 As shown, the specific application scenario of the present application is to test the communication connection between the host computer and the integrated server and the vehicle computer, and to perform upgrade test and functional test on the vehicle computer system software by testing the host computer. The host computer can be a server. In addition, the host computer can also be a terminal device. The terminal device can be a vehicle-mounted device, a desktop computer, a laptop computer, a tablet computer, a smart phone, etc.
[0091] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0092] Figure 2 Schematic diagram of the test method provided for this application Figure 1 , used to test the host computer, test the communication connection between the host computer and the integrated server and the vehicle computer, such as Figure 2 As shown, the method includes:
[0093] S201. Based on a test start signal provided by the integration server, a specified test framework is started on the test host computer. The test start signal is generated after the integration server successfully integrates the software installation package of the vehicle computer.
[0094] In an embodiment of the present application, the integration server can automatically integrate the software installation package. After the integration is completed, the integration server generates a test start signal and sends the test start signal to the test host computer. The test host computer can start the specified test framework based on the test start signal and execute the test cases in the specified test framework to perform automated testing on the vehicle computer.
[0095] The designated test framework may specifically be an Avocado test framework. By using the Avocado test framework, automated testing can be performed more efficiently, thereby improving test efficiency and quality.
[0096] S202: Execute a first test case based on a specified test framework to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0097] Executing the first test case under the specified test framework can perform an automated upgrade test on the vehicle computer and obtain a corresponding upgrade test result. If the upgrade test result is a test pass, it means that the vehicle computer software has been successfully upgraded to the target version; if the upgrade test result is a test fail, it means that the vehicle computer software has not been successfully upgraded to the target version.
[0098] According to the test method provided in the embodiment of the present application, after receiving the test start signal provided by the integrated server, the test host computer can start the specified test framework on the test host computer based on the test start signal, and the upgrade test of the vehicle computer can be performed by executing the first test case through the specified test framework. That is to say, in the embodiment of the present application, after the software installation package of the vehicle computer is integrated, the software version of the vehicle computer system is upgraded based on the software installation package, and based on the test start signal, the upgrade test is automatically performed to determine whether the upgrade to the target version is successful, thereby achieving the effect of improving the efficiency of the vehicle computer system software upgrade test.
[0099] Figure 3 Schematic diagram of the test method provided for this application Figure 2 , used to test the host computer, test the communication connection between the host computer and the integrated server and the vehicle computer, such as Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the test method is described in detail, and the method comprises:
[0100] S301. Based on a test start signal provided by the integration server, a specified test framework is started on the test host computer. The test start signal is generated after the integration server successfully integrates the software installation package of the vehicle computer.
[0101] In a possible implementation, based on the test start signal provided by the integrated server, starting a specified test framework on the test host computer may specifically include:
[0102] Based on the test start signal provided by the integrated server, a virtual environment for testing is built on the test host computer;
[0103] In the virtual environment, start the specified test framework.
[0104] In an embodiment of the present application, a virtual environment for testing can be constructed on a test host computer based on a test start signal, wherein the virtual environment can specifically be a Python environment. The advantage of using a virtual Python environment is that it is isolated from the host environment and does not interfere with each other, thereby ensuring the normal operation of the test. Among them, a Python virtual environment can be constructed using the virtualenv tool to execute test cases of a specified test framework.
[0105] S302. Call multiple method classes encapsulated in the adapter plug-in of the specified test framework, where the multiple method classes include at least a first method class, a second method class, and a third method class. The first method class is used to obtain log data of the vehicle computer, the second method class is used to communicate and interact with the vehicle computer, and the third method class is used to obtain version information and environment variables of the software installation package.
[0106] The designated test framework may specifically be an Avocado test framework. The Avocado test framework provides plug-in extension capabilities. The adaptation plug-in is newly developed for the embodiment of the present application. A plurality of method classes that can be called are encapsulated in the plug-in.
[0107] The plug-in includes the Dut class for managing vehicle computer instances, the SerialComm class for serial port communication, and the AdbComm class for ADB (Android Debug Bridge) communication. The test host computer is connected to the vehicle computer through the serial port. After the automated test starts, the test host computer can control the serial port to send commands to configure the ADB environment of the vehicle computer through the SerialComm class. The vehicle computer can establish an ADB connection with the test host computer through USB ADB or network ADB. After the ADB connection is established, subsequent test commands and acquisition of vehicle computer log data are implemented by controlling ADB communication through the AdbComm class. Because USB ADB communication is stable, USB ADB communication is preferred if the vehicle computer has a USB OTG interface. If the vehicle computer only has a USB HOST interface, network ADB communication can be used by connecting an external USB network card.
[0108] On the basis that the adapter plug-in has the ADB communication capability, multiple method classes are encapsulated, including a first method class, a second method class and a third method class. The first method class is specifically the Log class, the second method class is specifically the Common class, and the third method class is specifically the Env class.
[0109] S303: Based on the multiple method classes, execute the first test case to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0110] In a possible implementation, the vehicle computer includes at least two vehicle computer systems. Based on multiple method classes, executing the first test case to perform an upgrade test on the vehicle computer and obtaining an upgrade test result may specifically include:
[0111] Create a thread through the first method class to record the log data of the vehicle computer during the upgrade test process to obtain the first log data information;
[0112] The second method class is used to obtain the system environment identifier before and after the vehicle computer installs the software installation package, and obtain the system environment identifier record information, which is used by the vehicle computer to upgrade the software version of another vehicle computer system in the current vehicle computer system, and switch to the other vehicle computer system after the upgrade is completed;
[0113] Obtaining version information and environment variables of the software installation package from the integration server through the third method class, obtaining the software version identifier of the software installation package from the publishing server based on the environment variables and version information, and obtaining the software version identifier of the other vehicle system through the second method class after the vehicle system switches to another vehicle system, to obtain software version identifier record information;
[0114] Based on the first log data information, the system environment identification record information and the software version identification record information, an upgrade test result is obtained.
[0115] The upgrade test results are judged in two ways: one is by matching the software version identifier; the other is by matching the system environment identifier of the vehicle system.
[0116] In this embodiment, the vehicle computer can be an AB double-sided system, and the system software of another vehicle computer system can be upgraded in the current vehicle computer system. After the upgrade is successful, the system software can be switched to the other vehicle computer system after restart. In this embodiment, whether the upgrade is successful can be determined by identifying the system environment identifier before and after the upgrade (its value is A or B). As an example, the specific steps include:
[0117] Create a thread through the Log class to record the log data of the vehicle computer during the upgrade test process, which may include the usage of resources such as CPU and memory, as well as the system log and the log of the tested application. You can determine whether the test is successful by capturing keywords in the system log or the log of the tested application;
[0118] Obtain the system environment identifier of the current vehicle system through the ADB command interface encapsulated in the Common class, recorded as Slot1;
[0119] Obtain the version information and environment variables of the integrated software installation package from the integration server through the Env class, and locate the location of the software installation package in the publishing server based on the obtained version information and environment variables and record the software version identifier of the software installation package, which is recorded as Version1;
[0120] Test that the host computer downloads the software installation package and pushes the software package to the specified location of the vehicle computer through the ADB command interface encapsulated in the Common class;
[0121] The ADB command interface encapsulated in the Common class is used to control the vehicle computer to install the software installation package in another vehicle computer system to upgrade the system software. After the upgrade is successful, the vehicle computer will restart and switch to the other vehicle computer system.
[0122] After the vehicle computer restarts, the software version identifier of the system software in the current vehicle computer system is obtained through the ADB command interface encapsulated in the Common class, which is recorded as Version2;
[0123] If Version2 is the same as Version1, it can be determined that the system software has been successfully upgraded to the target version and the test continues; otherwise, the test fails;
[0124] Obtain the system environment identifier of the current vehicle system through the ADB command interface encapsulated in the Common class, recorded as Slot2;
[0125] If Slot1 and Slot2 are not the same, it can be determined that the vehicle system is switched successfully and the entire upgrade test is successful, otherwise the test fails;
[0126] In a possible implementation manner, the testing method of this embodiment may further include:
[0127] Execute the second test case based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtain a multimedia playback test result;
[0128] The vehicle computer is in communication connection with the external device, the second test case includes first quantity information, the first quantity information is quantity information of multimedia resources stored in the external device, and the second test case is executed based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtain a multimedia playback test result, which may specifically include:
[0129] During the multimedia test, the second method class is used to sequentially control the power-off of the peripheral chip of the vehicle computer, control the power-on of the peripheral chip of the vehicle computer, control the vehicle computer to start the multimedia application to obtain the quantity information of the multimedia resources stored in the external device, obtain the second quantity information, and control the vehicle computer to play the multimedia resources of the external device;
[0130] Create a thread through the first method class to record the log data of the vehicle computer during the multimedia test process, and obtain second log data information;
[0131] A multimedia playback test result is obtained based on the first quantity information, the second quantity information and the second log data information.
[0132] Multimedia playback is a basic function of the vehicle computer. After an external device (such as a USB device) is connected to the vehicle computer, the multimedia scanning service scans the external device and records the multimedia resource information in the external device. The multimedia application in the vehicle computer reads the multimedia resource information, displays multimedia resource thumbnails, etc. The multimedia resource can be played by clicking on the multimedia resource thumbnail. When playing the multimedia resources in the external device, if the connection between the external device and the vehicle computer is disconnected at this time, and then the connection is quickly re-established, it is easy to cause the external device to fail to be recognized or the multimedia scanning service cannot correctly scan the multimedia resource information in the external device. As an example, the test steps for this scenario include:
[0133] The number information of the multimedia resources stored in the external device is passed to the test case for performing the multimedia playback test of the vehicle computer in the form of startup parameters. The number information of the multimedia resources can be recorded as Count1;
[0134] Create a thread through the Log class to record the log data of the vehicle computer during the multimedia test;
[0135] The ADB command interface encapsulated in the Common class is used to control the power off of the peripheral chip of the vehicle computer. The vehicle computer log data is captured through the Log class and the keyword "usb unmount success" is matched. If the match is successful, it can be determined that the vehicle computer is disconnected from the external device and the test continues. Otherwise, the test fails.
[0136] The ADB command interface encapsulated in the Common class is used to control the power-on of the vehicle computer's peripheral chip. The Log class is used to capture the vehicle computer's log data and match the keyword "usb mount success". If the match is successful, it can be determined that the vehicle computer and the external device have been reconnected and the test continues. Otherwise, the test fails.
[0137] Continue to capture the vehicle log data through the Log class and match the keyword "media scan finish". If the match is successful, it can be determined that the multimedia scanning service has successfully scanned the external device and the test continues. Otherwise, the test fails.
[0138] Start the multimedia application through the ADB command interface encapsulated in the Common class and ensure that it is in the foreground. Read the number of multimedia resources in the external device through the multimedia application, recorded as Count2. If Count1 is the same as Count2, it can be determined that the scanned multimedia resource information is correct and the test continues. Otherwise, the test fails.
[0139] The ADB command interface encapsulated in the Common class is used to control the car computer to simulate click events and play multimedia resources in the external device. The Log class is used to capture the car computer log data and match the keyword "media play success". If the match is successful, it can be determined that the multimedia resource is played successfully and the test continues. Otherwise, the test fails.
[0140] Determine whether the agreed number of tests has been reached. If so, the test passes. Otherwise, execute again the step of controlling the power-off of the peripheral chip of the vehicle computer through the ADB command interface encapsulated in the Common class until the agreed number of tests has been reached.
[0141] In a possible implementation manner, the testing method of this embodiment may further include:
[0142] Execute the third test case based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer, and obtain a Bluetooth phone function test result;
[0143] The vehicle computer is paired with the communication device, and the third test case is executed based on the specified test framework to test the Bluetooth phone function of the vehicle computer, and the Bluetooth phone function test result is obtained, which may specifically include:
[0144] During the Bluetooth phone function test, the second method class is used to control the vehicle to turn on the Bluetooth switch, make a Bluetooth call, hang up the Bluetooth call, and turn off the Bluetooth switch.
[0145] Create a thread through the first method class to record the log data of the vehicle computer during the Bluetooth phone function test process to obtain third log data information;
[0146] Based on the third log data information, a Bluetooth phone function test result is obtained.
[0147] Bluetooth phone is a very important function of the car computer. The car computer product needs to automatically connect to the paired communication device after the Bluetooth switch is turned on. The Bluetooth phone application in the car computer can realize the functions of making and hanging up calls. However, the Bluetooth switch is frequently turned on and off, that is, the car computer and the communication device frequently connect and disconnect Bluetooth, which can easily cause the Bluetooth phone to fail to make normal calls. As an example, the test steps for this scenario may include:
[0148] Ensure that the vehicle and the communication device are paired and that the communication device can make and receive calls normally during the Bluetooth phone function test. The vehicle's Bluetooth switch is off by default;
[0149] Create a thread through the Log class to record the log data of the vehicle during the Bluetooth phone function test;
[0150] The ADB command interface encapsulated in the Common class is used to control the car computer to start the Bluetooth switch setting application and ensure that it is in the foreground. The ADB command interface encapsulated in the Common class is used to control the car computer to simulate a click event and control the car computer to turn on the Bluetooth switch. The car computer log data is captured through the Log class and the keyword "bt turn on success" is matched. If the match is successful, it can be determined that the Bluetooth switch is turned on successfully and the test continues. Otherwise, the test fails.
[0151] After the vehicle computer and the communication device are connected via Bluetooth, the vehicle computer log data is captured through the Log class and the keyword "bt connect success" is matched. If the match is successful, it can be determined that the vehicle computer and the communication device are connected via Bluetooth successfully and the test continues. Otherwise, the test fails.
[0152] The ADB command interface encapsulated in the Common class is used to control the car computer to start the Bluetooth phone application and ensure that it is in the foreground. The ADB command interface encapsulated in the Common class is used to control the car computer to simulate click events and control the car computer to make a call that can be answered automatically. After the waiting time is agreed, the car computer log data is captured through the Log class and the keyword "btdial success" is matched. If the match is successful, it can be determined that the Bluetooth phone call is successful and the test continues, otherwise the test fails.
[0153] The ADB command interface encapsulated in the Common class is used to control the car computer to simulate click events, control the car computer to hang up the Bluetooth call, and the car computer log data is captured through the Log class and matched with the keyword "bt hang up success". If the match is successful, it can be determined that the Bluetooth call is hung up successfully and the test continues, otherwise the test fails;
[0154] The ADB command interface encapsulated in the Common class is used to control the vehicle to start the Bluetooth switch setting application and ensure that it is in the foreground. The ADB command interface encapsulated in the Common class is used to control the vehicle to simulate a click event and control the vehicle to turn off the Bluetooth switch. The vehicle log data is captured through the Log class and the keyword "bt turn off success" is matched. If the match is successful, it can be determined that the Bluetooth switch is turned off successfully and the test continues. Otherwise, the test fails.
[0155] Determine whether the agreed number of tests has been reached. If so, the test passes. Otherwise, execute again the steps of controlling the vehicle computer to start the Bluetooth switch setting application through the ADB command interface encapsulated in the Common class and ensure that it is in the foreground until the agreed number of tests has been reached.
[0156] In a possible implementation manner, the testing method of this embodiment may further include:
[0157] Execute the fourth test case based on the specified test framework to perform a reversing function test on the vehicle computer, and obtain a reversing function test result;
[0158] The test host computer is connected to the vehicle computer through the CAN test tool, and the fourth test case is executed based on the specified test framework to test the reversing function of the vehicle computer, and the reversing function test result is obtained, including:
[0159] During the reversing function test, the CAN test tool is controlled by the constructed virtual environment to send a reversing signal, the vehicle computer is controlled to restart by the second method class, and the CAN test tool is controlled by the constructed virtual environment to send a reversing release signal;
[0160] Create a thread through the first method class to record the log data of the vehicle computer during the reversing function test process to obtain fourth log data information;
[0161] Based on the fourth log data information, a reverse function test result is obtained.
[0162] Reversing image is a basic function of the car computer. When the vehicle is in reverse gear, the MCU (Microcontroller Unit) receives the reversing signal from the CAN bus, and notifies the reversing application in the SoC (System on Chip) operating system through RPC (Remote Procedure Call) communication. After receiving the reversing signal, the reversing application displays the reversing image and draws the reversing line. After the vehicle is started, if the reverse gear is immediately engaged, due to the influence of the RPC communication process and the reversing application process startup timing, it is easy for the reversing application to fail to obtain the reversing signal, that is, the reversing image cannot be displayed correctly. As an example, the test steps for this scenario include:
[0163] The test host computer is connected to the vehicle computer through the CAN test tool. The CAN test tool can be controlled by the constructed Python virtual environment to send CAN signals.
[0164] Create a thread through the Log class to record the log data of the vehicle during the reversing function test;
[0165] The constructed Python virtual environment controls the CAN test tool to send a reverse signal, and the ADB command interface encapsulated in the Common class controls the vehicle computer to restart. The Log class captures the vehicle computer log data and matches the keyword "rpcready". If the match is successful, it can be determined that the RPC communication is successfully established and the test continues, otherwise the test fails.
[0166] Continue to capture the car computer log data through the Log class and match the keyword "rvc enable". If the match is successful, it can be determined that the reversing application in the car computer successfully obtains the reversing signal and the test continues. Otherwise, the test fails.
[0167] The CAN test tool is controlled by the constructed Python virtual environment to send the reverse release signal. The vehicle log data is captured by the Log class and the keyword "rvc disable" is matched. If the match is successful, it can be determined that the reverse application successfully obtains the reverse release signal and the test continues. Otherwise, the test fails.
[0168] Determine whether the agreed number of tests is reached. If so, the test passes. Otherwise, execute again the step of controlling the CAN test tool to send a reversing signal through the constructed Python virtual environment until the agreed number of tests is reached.
[0169] In a possible implementation manner, the testing method of this embodiment may further include:
[0170] Determine a comprehensive test result based on one or more of an upgrade test result, a multimedia playback test result, a Bluetooth phone function test result, and a reverse function test result;
[0171] The comprehensive test result is sent to the integration server, and the integration server is used to mark whether the software version of the software installation package is available according to the comprehensive test result.
[0172] In this embodiment, the test host computer can send the comprehensive test results to the integrated server. The Avocado test framework can generate test results in multiple formats. Optionally, the test results in HTML format accessible by the browser can be used, and the test results in HTML format can be uploaded to the publishing server, and the software version of the corresponding software installation package is marked on the integrated server as available.
[0173] Figure 4The scenario diagram of the automated smoke test provided for this application, in which Gerrit can be used as the code server, Jenkins can be used as the integration server, and Appach2 can be used as the release server. The test host computer can be a Linux operating system, and the test host computer can be scheduled by the integration server as a slave device of the integration server. The test host computer and the vehicle computer are connected through the serial port and ADB. As an example, the specific steps of the automated smoke test can include:
[0174] 1. The automatic integration service in the integration server is started at a fixed time every day to obtain the code from the code server for compilation and integration.
[0175] 2. The integration server uploads the compiled integrated software installation package to the publishing server.
[0176] 3. The integration server sends a test start signal to notify the test host computer to trigger the automated test and transmit the integration information of the software installation package.
[0177] 4. The test host computer locates the software installation package of this integration on the publishing server through the integration information and downloads it to the test host computer.
[0178] 5. The test host computer sends the software installation package to the vehicle computer through the serial port and ADB, upgrades the software version of the vehicle computer system to the software version corresponding to the software installation package, and can execute a series of test cases according to the test plan to perform various tests on the vehicle computer, and save the test results and test logs.
[0179] 6. The test host computer uploads the test results and test logs to the same path as the release server and the installation package of this version of the software.
[0180] 7. The test host computer notifies the integrated server that the test is complete, and the integrated server marks whether the software version of the software installation package is available. In addition, you can also create a link, click it and jump to the test results in HTML format published by the server.
[0181] Durability testing is to conduct multiple tests on specific functions of a specific software version over a long period of time to verify the stability and reliability of the software. Figure 5The scenario diagram of the automated durability test provided for this application, as shown in the figure, is parallel tested by adding a test host computer. Because the Avocado test framework runs in a Python virtual environment built by the virtualenv tool, this environment is isolated from the test host computer host environment and does not affect each other, so the consistency of the operating environment of each test host computer can be guaranteed. In addition, multiple car computers can be connected to one test host computer. Because the Avocado test framework supports a multi-tasking mechanism, multiple test cases can be executed at the same time. The test cases distinguish different connected car computers through serial port numbers and ADB numbers. The upper limit of the number of car computers connected to each test host computer can be determined by the number of available ports of the test host computer. In this embodiment, the number of test hosts and the number of car computers connected to each test host computer can be determined according to the actual situation of the test project. The specific test steps of the automated durability test can be as follows:
[0182] 1. The integration server sends a test start signal to notify the test host computer to trigger the automated test and pass the integration information of the software installation package to be tested.
[0183] 2. Each test host computer locates the software installation package of this integration on the publishing server through the integration information and downloads it to the local computer.
[0184] 3. Each test host computer sends the software installation package to the vehicle computer through the serial port and ADB, upgrades the software version of the vehicle computer system to the software version corresponding to the software installation package, and can execute a series of test cases according to the test plan to perform various tests on the vehicle computer, and perform multiple tests on the same case.
[0185] 4. Each test host computer uploads the test results and test logs to the same path as the release server and this version of the software installation package and integrates them.
[0186] 5. Each test host computer feeds back its own test results to the integration server for integration and marks whether the software version is available; at the same time, a link is created, which jumps to the test results in HTML format published by the server after clicking it.
[0187] In the test method provided in the embodiment of the present application, after receiving the test start signal provided by the integration server, the test host computer can start the specified test framework on the test host computer based on the test start signal, and the upgrade test of the vehicle computer can be performed by executing the first test case through the specified test framework. That is to say, in the embodiment of the present application, after the software installation package of the vehicle computer is integrated, the software version of the vehicle computer system is upgraded based on the software installation package, and based on the test start signal, the upgrade test is automatically performed to determine whether it has been successfully upgraded to the target version, so as to improve the efficiency of the vehicle computer system software upgrade test. This test method can automatically trigger the automated test and upload the test results and test logs after the automated integration is successful. This test method can use multiple devices for testing at the same time, saving time and labor costs. This test method controls the entire test process through automated test software, which can ensure that it is carried out strictly in accordance with the test case steps and is not affected by the external environment.
[0188] Figure 6 The structural diagram of the test device provided in this application is used to test the host computer, test the communication connection between the host computer and the integrated server and the vehicle computer, such as Figure 6 As shown, the testing device 60 provided in this embodiment includes:
[0189] The start module 601 is used to start the specified test framework on the test host computer based on the test start signal provided by the integration server. The test start signal is generated after the integration server successfully integrates the software installation package of the vehicle computer;
[0190] The upgrade test module 602 is used to execute the first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0191] In a possible implementation, the upgrade test module is specifically used to:
[0192] Calling multiple method classes encapsulated in the adapter plug-in of the specified test framework, the multiple method classes at least include a first method class, a second method class and a third method class, the first method class is used to obtain the log data of the vehicle computer, the second method class is used to communicate and interact with the vehicle computer, and the third method class is used to obtain the version information and environment variables of the software installation package;
[0193] Based on multiple method classes, execute the first test case to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
[0194] In a possible implementation, the vehicle computer includes at least two vehicle computer systems, and the upgrade test module is specifically used for:
[0195] Create a thread through the first method class to record the log data of the vehicle computer during the upgrade test process to obtain the first log data information;
[0196] The second method class is used to obtain the system environment identifier before and after the vehicle computer installs the software installation package, and obtain the system environment identifier record information, which is used by the vehicle computer to upgrade the software version of another vehicle computer system in the current vehicle computer system, and switch to the other vehicle computer system after the upgrade is completed;
[0197] Obtaining version information and environment variables of the software installation package from the integration server through the third method class, obtaining the software version identifier of the software installation package from the publishing server based on the environment variables and version information, and obtaining the software version identifier of the other vehicle system through the second method class after the vehicle system switches to another vehicle system, to obtain software version identifier record information;
[0198] Based on the first log data information, the system environment identification record information and the software version identification record information, an upgrade test result is obtained.
[0199] In a possible implementation, the testing device is further used to:
[0200] Execute the second test case based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtain a multimedia playback test result;
[0201] The vehicle computer is in communication connection with the external device, the second test case includes first quantity information, the first quantity information is quantity information of multimedia resources stored in the external device, and the test device is further used for:
[0202] During the multimedia test, the second method class is used to sequentially control the power-off of the peripheral chip of the vehicle computer, control the power-on of the peripheral chip of the vehicle computer, control the vehicle computer to start the multimedia application to obtain the quantity information of the multimedia resources stored in the external device, obtain the second quantity information, and control the vehicle computer to play the multimedia resources of the external device;
[0203] Create a thread through the first method class to record the log data of the vehicle computer during the multimedia test process, and obtain second log data information;
[0204] A multimedia playback test result is obtained based on the first quantity information, the second quantity information and the second log data information.
[0205] In a possible implementation, the testing device is further used to:
[0206] Execute the third test case based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer, and obtain a Bluetooth phone function test result;
[0207] Among them, the vehicle computer is paired with the communication equipment, and the test device is also used for:
[0208] During the Bluetooth phone function test, the second method class is used to control the vehicle to turn on the Bluetooth switch, make a Bluetooth call, hang up the Bluetooth call, and turn off the Bluetooth switch.
[0209] Create a thread through the first method class to record the log data of the vehicle computer during the Bluetooth phone function test process to obtain third log data information;
[0210] Based on the third log data information, a Bluetooth phone function test result is obtained.
[0211] In a possible implementation, the testing device is further used to:
[0212] Execute the fourth test case based on the specified test framework to perform a reversing function test on the vehicle computer, and obtain a reversing function test result;
[0213] The test host computer is connected to the vehicle computer through the CAN test tool. The test device is also used for:
[0214] During the reversing function test, the CAN test tool is controlled by the constructed virtual environment to send a reversing signal, the vehicle computer is controlled to restart by the second method class, and the CAN test tool is controlled by the constructed virtual environment to send a reversing release signal;
[0215] Create a thread through the first method class to record the log data of the vehicle computer during the reversing function test process to obtain fourth log data information;
[0216] Based on the fourth log data information, a reverse function test result is obtained.
[0217] In a possible implementation, the startup module is specifically used to:
[0218] Based on the test start signal provided by the integrated server, a virtual environment for testing is built on the test host computer;
[0219] In the virtual environment, start the specified test framework.
[0220] The testing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail in this embodiment.
[0221] Figure 7 This is a schematic diagram of the structure of the test host computer provided in this application. Figure 7 As shown, the test host computer 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the test host computer 70 also includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus.
[0222] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above method.
[0223] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0224] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0225] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0226] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0227] The present application also provides a testing system. Figure 8 The structural diagram of the test system provided in the present application is as follows. The test system 80 includes a test host computer 801, an integrated server 802 and a vehicle computer 803. The test host computer 801 is in communication connection with the integrated server 802 and the vehicle computer 803.
[0228] The integration server 802 is used to generate a test start signal after successfully integrating the software installation package of the vehicle computer, and provide the test start signal to the test host computer;
[0229] The test host computer 801 is used to start a specified test framework on the test host computer based on a test start signal; execute a first test case based on the specified test framework to perform an upgrade test on the vehicle computer, and obtain an upgrade test result.
[0230] The test system provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be described in detail here.
[0231] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0232] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0233] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0234] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0235] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0236] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0237] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0238] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0239] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0240] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A testing method, characterized in that: Applied to a test host computer, the test host computer is communicatively connected with an integrated server and a vehicle computer, and the method includes: Based on the test start signal provided by the integration server, starting a specified test framework on the test host computer, wherein the test start signal is generated after the integration server successfully integrates the software installation package of the vehicle computer; Based on the specified test framework, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
2. The method according to claim 1, characterized in that The step of executing the first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtaining an upgrade test result includes: Calling multiple method classes encapsulated in the adapter plug-in of the specified test framework, the multiple method classes at least include a first method class, a second method class and a third method class, the first method class is used to obtain log data of the vehicle computer, the second method class is used to communicate and interact with the vehicle computer, and the third method class is used to obtain version information and environment variables of the software installation package; Based on the multiple method classes, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
3. The method according to claim 2, characterized in that The vehicle computer includes at least two vehicle computer systems, and executing the first test case based on the multiple method classes to perform an upgrade test on the vehicle computer to obtain an upgrade test result includes: Creating a thread through the first method class to record log data of the vehicle computer during the upgrade test process to obtain first log data information; The second method class is used to obtain the system environment identifiers before and after the vehicle computer installs the software installation package, and obtain system environment identifier record information, which is used by the vehicle computer to upgrade the software version of another vehicle computer system in the current vehicle computer system, and switch to the other vehicle computer system after the upgrade is completed; Obtaining version information and environment variables of the software installation package from the integrated server through the third method class, obtaining a software version identifier of the software installation package from the publishing server based on the environment variables and the version information, and obtaining a software version identifier of the other vehicle system through the second method class after the vehicle system switches to the other vehicle system, to obtain software version identifier record information; An upgrade test result is obtained based on the first log data information, the system environment identification record information and the software version identification record information.
4. The method according to claim 3, characterized in that The method further comprises: Executing a second test case based on the specified test framework to perform a multimedia playback test on the vehicle computer, and obtaining a multimedia playback test result; The vehicle computer is communicatively connected to an external device, the second test case includes first quantity information, and the first quantity information is quantity information of multimedia resources stored in the external device. The second test case is executed based on the specified test framework to perform a multimedia playback test on the vehicle computer, and a multimedia playback test result is obtained, including: During the multimedia test, the second method class is used to sequentially control the power-off of the peripheral chip of the vehicle computer, control the power-on of the peripheral chip of the vehicle computer, control the vehicle computer to start a multimedia application to obtain the quantity information of the multimedia resources stored in the external device, obtain the second quantity information, and control the vehicle computer to play the multimedia resources of the external device; Creating a thread through the first method class to record log data of the vehicle computer during the multimedia test process to obtain second log data information; A multimedia playback test result is obtained based on the first quantity information, the second quantity information and the second log data information.
5. The method according to claim 3, characterized in that: The method further comprises: Executing a third test case based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer, and obtaining a Bluetooth phone function test result; The vehicle computer is paired with a communication device, and the third test case is executed based on the specified test framework to perform a Bluetooth phone function test on the vehicle computer to obtain a Bluetooth phone function test result, including: During the Bluetooth phone function test, the second method class is used to sequentially control the vehicle computer to turn on the Bluetooth switch, control the vehicle computer to make a Bluetooth call, control the vehicle computer to hang up the Bluetooth call, and control the vehicle computer to turn off the Bluetooth switch; Creating a thread through the first method class to record log data of the vehicle computer during the Bluetooth phone function test to obtain third log data information; Based on the third log data information, a Bluetooth phone function test result is obtained.
6. The method according to claim 3, characterized in that The method further comprises: Executing a fourth test case based on the specified test framework to perform a reversing function test on the vehicle computer, and obtaining a reversing function test result; The test host computer is connected to the vehicle computer through a CAN test tool, and the fourth test case is executed based on the specified test framework to perform a reversing function test on the vehicle computer to obtain a reversing function test result, including: During the reversing function test, the CAN test tool is controlled to send a reversing signal through the constructed virtual environment, the vehicle computer is controlled to restart through the second method class, and the CAN test tool is controlled to send a reversing release signal through the constructed virtual environment; Creating a thread through the first method class to record log data of the vehicle computer during the reversing function test to obtain fourth log data information; Based on the fourth log data information, a reverse function test result is obtained.
7. The method according to any one of claims 1 to 6, characterized in that: The starting of a specified test framework on the test host computer based on a test start signal provided by the integrated server includes: Based on the test start signal provided by the integrated server, a virtual environment for testing is constructed on the test host computer; In the virtual environment, the specified test framework is started.
8. A testing device, characterized in that: Applied to a test host computer, the test host computer is communicatively connected with an integrated server and a vehicle computer, and the device comprises: A startup module, used to start a specified test framework on the test host computer based on a test startup signal provided by the integration server, wherein the test startup signal is generated after the integration server successfully integrates the software installation package of the vehicle computer; The upgrade test module is used to execute the first test case based on the specified test framework to perform an upgrade test on the vehicle computer and obtain an upgrade test result.
9. A testing system, characterized in that: It includes a test host computer, an integrated server and a vehicle computer, wherein the test host computer is communicatively connected with the integrated server and the vehicle computer; The integration server is used to generate a test start signal after successfully integrating the software installation package of the vehicle computer, and provide the test start signal to the test host computer; The test host computer is used to start a specified test framework on the test host computer based on the test start signal; Based on the specified test framework, a first test case is executed to perform an upgrade test on the vehicle computer to obtain an upgrade test result.
10. A computer-readable storage medium / computer program product, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor; and / or, The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.