Automatic testing method and device for vehicle-mounted software, electronic equipment and medium

By judging the test conditions based on the vehicle status and software version on the Android platform, selecting the target test script and generating a report, the problem of full regression testing is solved, and efficient on-board software testing is achieved.

CN120448272APending Publication Date: 2025-08-08CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510555695.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Full regression testing is time-consuming and has a lot of work on the Android platform, especially when facing the problem of mobile fragmentation, resulting in serious resource consumption.

Method used

By obtaining the current vehicle status and software version, we can determine whether the preset test conditions are met, select the target test script under the preset environmental stress conditions and execute it, and generate a test report to evaluate the performance of the on-board software.

Benefits of technology

Reduces repetitive workload, improves test efficiency and coverage, and reduces test costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448272A_ABST
    Figure CN120448272A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle software testing, in particular to an automatic testing method and device for vehicle-mounted software, electronic equipment and a medium, and the method comprises the steps: judging whether to-be-tested vehicle-mounted software meets a preset testing condition or not according to the state of a current vehicle and the software version of at least one piece of to-be-tested vehicle-mounted software; if the at least one piece of to-be-tested vehicle-mounted software meets the preset test condition, selecting a target test script matched with the at least one piece of to-be-tested vehicle-mounted software from a preset test script library under a preset environmental stress condition, and executing the target test script to obtain a test result; and generating a test report according to the test result, and evaluating the performance of the at least one to-be-tested vehicle-mounted software according to the test report. Therefore, the problems of long time consumption and large test workload of total regression in the prior art are solved, the repetitive workload is reduced, the test efficiency and the coverage rate are improved, and the test cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle software testing, and in particular to an automated testing method, device, electronic equipment, and medium for vehicle-mounted software. Background Art

[0002] With the increasing popularity of mobile devices and the continuous expansion of their functionality, the number of mobile applications (Apps) is rapidly increasing, and the number of App regression test cases has also increased dramatically. However, full regression testing consumes a lot of time and resources, especially when faced with the severe fragmentation problem of mobile terminals.

[0003] As one of the largest mobile operating systems, the Android platform's compatibility issues have become a typical manifestation of fragmentation. Due to the existence of many different manufacturers, models, and versions, applications on this platform need to be tested in multiple environments to ensure compatibility and stability, which consumes a lot of time and resources and urgently needs to be resolved. Summary of the Invention

[0004] The present application provides an automated testing method, device, electronic device and medium for vehicle-mounted software to solve the problems of long time-consuming full regression and large testing workload in the background technology, reduce repetitive workload, improve test efficiency and coverage, and reduce testing costs.

[0005] A first embodiment of the present application provides an automated testing method for vehicle-mounted software, comprising the following steps:

[0006] Obtaining a current vehicle status and a software version of at least one in-vehicle software to be tested installed on the current vehicle, and determining whether the at least one in-vehicle software to be tested meets a preset test condition based on the current vehicle status and the software version;

[0007] If the at least one vehicle-mounted software to be tested meets the preset test condition, then under the preset environmental stress condition, selecting a target test script that matches the at least one vehicle-mounted software to be tested from a preset test script library, and executing the target test script to obtain a test result;

[0008] A test report is generated according to the test result, so as to evaluate the performance of the at least one vehicle-mounted software to be tested according to the test report.

[0009] According to one embodiment of the present application, selecting a target test script that matches at least one vehicle-mounted software to be tested from a preset test script library, and executing the target test script to obtain a test result includes:

[0010] Executing at least one test case based on the target test script to perform automated testing on a user interface function of the at least one in-vehicle software to be tested, and obtaining a first test result;

[0011] Alternatively, at least one random event is generated based on the target test script, and an automated test is performed on the at least one vehicle-mounted software to be tested according to the at least one random event to obtain a second test result.

[0012] According to one embodiment of the present application, generating at least one random event based on the target test script includes:

[0013] Based on a preset automated testing tool and the target test script, the at least one random event is generated according to a predefined random event type and a predefined random event generation rule.

[0014] According to one embodiment of the present application, the preset environmental stress condition includes at least one of temperature stress, humidity stress and electrical stress.

[0015] According to one embodiment of the present application, after generating a test report according to the test results, the method further includes:

[0016] Determining whether the at least one in-vehicle software to be tested meets a preset performance indicator according to the test report;

[0017] If there is any vehicle-mounted software to be tested that does not meet the preset performance indicators, a corresponding software improvement reminder message is generated;

[0018] Prompt according to the software improvement reminder information.

[0019] According to the automated testing method for in-vehicle software of the present application, if the in-vehicle software to be tested meets preset test conditions based on the current vehicle status and software version, a target test script matching the in-vehicle software to be tested is selected from a preset test script library under preset environmental stress conditions and executed to obtain test results. A test report is generated based on the test results, and the performance of the in-vehicle software to be tested is evaluated based on the test report. This solves the problems of long full regression time and heavy testing workload in the prior art, reduces repetitive workload, improves test efficiency and coverage, and reduces testing costs.

[0020] A second embodiment of the present application provides an automated testing device for vehicle-mounted software, including:

[0021] a determination module, configured to obtain a current vehicle status and a software version of at least one vehicle-mounted software to be tested installed on the current vehicle, and determine whether the at least one vehicle-mounted software to be tested meets a preset test condition based on the current vehicle status and the software version;

[0022] a testing module configured to select, if the at least one vehicle-mounted software to be tested meets the preset test conditions, a target test script that matches the at least one vehicle-mounted software to be tested from a preset test script library under preset environmental stress conditions, and execute the target test script to obtain a test result;

[0023] A generating module is used to generate a test report according to the test result, so as to evaluate the performance of the at least one vehicle-mounted software to be tested according to the test report.

[0024] According to one embodiment of the present application, the testing module is used to:

[0025] Executing at least one test case based on the target test script to perform automated testing on a user interface function of the at least one in-vehicle software to be tested, and obtaining a first test result;

[0026] Alternatively, at least one random event is generated based on the target test script, and an automated test is performed on the at least one vehicle-mounted software to be tested according to the at least one random event to obtain a second test result.

[0027] According to one embodiment of the present application, the testing module is used to:

[0028] Based on a preset automated testing tool and the target test script, the at least one random event is generated according to a predefined random event type and a predefined random event generation rule.

[0029] According to one embodiment of the present application, the preset environmental stress condition includes at least one of temperature stress, humidity stress and electrical stress.

[0030] According to one embodiment of the present application, after generating a test report according to the test results, the generating module is further configured to:

[0031] Determining whether the at least one in-vehicle software to be tested meets a preset performance indicator according to the test report;

[0032] If there is any vehicle-mounted software to be tested that does not meet the preset performance indicators, a corresponding software improvement reminder message is generated;

[0033] Prompt according to the software improvement reminder information.

[0034] According to the automated testing device for vehicle software in the embodiment of the present application, if the vehicle software to be tested meets preset test conditions based on the current vehicle status and software version, a target test script matching the vehicle software to be tested is selected from a preset test script library under preset environmental stress conditions, and the target test script is executed to obtain a test result. A test report is generated based on the test result, and the performance of the vehicle software to be tested is evaluated based on the test report. This solves the problems of the long time and heavy testing workload of the background technology full regression, reduces repetitive workload, improves test efficiency and coverage, and reduces testing costs.

[0035] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automated testing method for vehicle-mounted software as described in the above embodiment.

[0036] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the automated testing method for vehicle-mounted software as described in the above embodiment.

[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0039] Figure 1 This is a flowchart of an automated testing method for vehicle-mounted software provided according to an embodiment of the present application;

[0040] Figure 2 A schematic diagram of stress combing for verifying a vehicle fatigue monitoring system according to one embodiment of the present application;

[0041] Figure 3 is a schematic diagram of an Arrhenius model according to one embodiment of the present application;

[0042] Figure 4 is a schematic diagram of an electrical stress cycle according to one embodiment of the present application;

[0043] Figure 5 is a schematic diagram of a power-on sequence according to one embodiment of the present application;

[0044] Figure 6 A schematic diagram of executing all app test cases according to one embodiment of the present application;

[0045] Figure 7 A schematic diagram of executing a separate test case for a test app or test case according to one embodiment of the present application;

[0046] Figure 8 A schematic diagram of viewing the system log of the UI test of the system under test according to one embodiment of the present application;

[0047] Figure 9 A schematic diagram of generating a test report by executing a command line according to an embodiment of the present application;

[0048] Figure 10 This is a schematic diagram of a test report viewing interface according to one embodiment of the present application;

[0049] Figure 11 Schematic diagram of a monkey stability test according to one embodiment of the present application;

[0050] Figure 12 A schematic diagram of viewing a system log of a stability test of a system under test according to an embodiment of the present application;

[0051] Figure 13 Schematic diagram of a block diagram of an automated testing device for vehicle-mounted software according to an embodiment of the present application;

[0052] Figure 14 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0054] The following describes, with reference to the accompanying drawings, an automated testing method, apparatus, electronic device, and medium for vehicle-mounted software according to an embodiment of the present application. To address the time-consuming and labor-intensive testing issues mentioned in the background art, the present application provides an automated testing method for vehicle-mounted software, aiming to reduce the repetitive work and workload of testers. The method implements automated testing through code tool integration. The test system involved in the automated testing method for vehicle-mounted software according to an embodiment of the present application specifically includes components such as a test computer server, a test vehicle, a vehicle cabin, and a test bench.

[0055] Specifically, Figure 1 A flowchart of an automated testing method for in-vehicle software provided in an embodiment of the present application.

[0056] like Figure 1 As shown, the automated testing method for the vehicle-mounted software includes the following steps:

[0057] In step S101, the status of the current vehicle and the software version of at least one vehicle-mounted software to be tested installed on the current vehicle are obtained, and whether the at least one vehicle-mounted software to be tested meets the preset test conditions is determined based on the status of the current vehicle and the software version.

[0058] Specifically, before conducting automated testing of in-vehicle software, it is first necessary to ensure that the overall condition of the vehicle is good. The embodiment of the present application can obtain the current vehicle status by reading data from the current vehicle's electronic control unit or the corresponding in-vehicle system. In addition to checking the current vehicle status, in order to avoid the problem of inaccurate test results due to software versions, the embodiment of the present application can obtain the specific version information of at least one in-vehicle software to be tested installed on the vehicle through the in-vehicle system interface, and determine whether each in-vehicle software to be tested meets the preset test conditions based on the current vehicle status and software version information.

[0059] Furthermore, before performing automated testing of the in-vehicle software, the embodiment of the present application also needs to verify whether the system version of the vehicle computer (including the platform and cockpit) supports the debug mode, and ensure that the ADB (Android Debug Bridge) switch is turned on, so that a communication connection can be established with the vehicle computer through the computer command line tool.

[0060] Furthermore, complete the necessary software and environment configuration work on the test computer server, including the installation and setup of tools such as Pycharm, Python, ADB, Android SDK, Appium, etc., to ensure that the entire test environment is ready.

[0061] Furthermore, use a dual-port USB cable to connect the test computer to the vehicle system, execute the "adb devices" command through the test computer command line to confirm whether it is successfully connected to the vehicle system, and after the test computer and the vehicle system are successfully connected, write or download the completed automated test project framework on the test computer, so that you can subsequently execute test cases, view test reports, exception cases, and other operations through Python test scripts.

[0062] Therefore, when the current vehicle status is good, the vehicle software version matches, the test computer is successfully connected to the vehicle system, and the automated test project framework is installed, it is determined whether the vehicle software to be tested meets the preset test conditions.

[0063] In step S102, if at least one vehicle-mounted software to be tested meets the preset test conditions, a target test script matching the at least one vehicle-mounted software to be tested is selected from a preset test script library under preset environmental stress conditions, and the target test script is executed to obtain a test result.

[0064] In some embodiments, the preset environmental stress condition includes at least one of temperature stress, humidity stress and electrical stress.

[0065] Specifically, the embodiment of the present application analyzes the potential failure modes of the vehicle system operating mode as shown in Table 1:

[0066] Table 1

[0067]

[0068] Furthermore, the main reliability failure modes include moisture penetration, excessive internal temperature and other factors, which lead to problems such as circuit board short circuits and disconnections, and poor contact of connectors.

[0069] Furthermore, the verification methods of the vehicle system under different environmental stresses are analyzed. Figure 2 As shown, Figure 2 A green dot indicates verified, and a red dot indicates unverified.

[0070] Specifically, environmental stresses that may be encountered during transportation and storage, whether vibration and temperature changes caused by transportation, or temperature / humidity fluctuations and sunlight caused by warehouse storage or outdoor storage, are verified at the component and system levels. For the dust impact conditions during outdoor storage, user simulation testing is limited to the vehicle level.

[0071] The working environment stress during use includes factors such as vibration, impact and electromagnetic interference caused by road driving, activities in the car and closing doors. All of these are verified at the component and system levels to ensure the stability and reliability of the system.

[0072] The vehicle undergoes component and system-level verification for conditions potentially encountered in the natural environment, including high temperature and low humidity, high temperature and high humidity, rapid temperature and humidity fluctuations, combined temperature, vibration, electrical stress, dust, and light. However, user simulation testing is limited to the vehicle itself for the effects of rain and snow.

[0073] The user interface, including daily operating hours and static and dynamic operating states, has also been fully validated to ensure the system operates reliably in real-world situations. Furthermore, customer-desired features, such as sealing, have been verified, but false alarm-free and safe and reliable performance require further verification through user simulations in a full vehicle environment.

[0074] Furthermore, the installation locations and environmental conditions of the components of the vehicle system are shown in Table 2:

[0075] Table 2

[0076] Product Name Installation location Service temperature screen Central control instrument panel -40℃~90℃ Host Module Inside the dashboard -40℃~90℃

[0077] According to the environmental stress and installation location, the user correlation of each environmental stress in the system is analyzed as shown in Table 3:

[0078] Table 3

[0079]

[0080] Furthermore, to ensure the vehicle system can operate stably throughout its expected service life, the embodiment of the present application designs a high-temperature operation acceleration scheme. Based on the expected use of the system, the total operating time during its entire life cycle is estimated to be 5475 hours.

[0081] Specifically, the working time ratio of the vehicle system at each temperature point is shown in Table 4:

[0082] Table 4

[0083] Temperature Distribution -40℃ 6% 23℃ 20% 40℃ 65% 85℃ 8% 90℃ 1%

[0084] Furthermore, based on the high temperature working acceleration model - Arrhenius model, the calculation formula is as follows:

[0085]

[0086] Among them, A T,i is the acceleration factor for each temperature point; e is a constant with a value of 2.71828, which is the corresponding exp constant in Excel; E A is the activation energy of the failure reaction, which is 0.45 eV; K is the Boltzmann constant, which is 8.617 x 10 - 5 eV / K; T pruf is the test temperature (unit: °C); T Feld,i for each temperature point.

[0087] The final acceleration factor calculation formula is as follows:

[0088]

[0089] where t Betrieb is the required life span of the system, which is 5475h; P i is the ratio for each temperature point.

[0090] Further, according to Figure 3The calculation formula shown in the figure shows that it only needs to run at a high temperature of 90°C for 1881 hours, which is equivalent to a service life of 10 years.

[0091] Furthermore, in order to ensure that the vehicle-mounted system can operate stably within its expected service life, the embodiment of the present application also designs a humidity cycle acceleration solution.

[0092] According to the Lawson model, the acceleration factor is calculated as follows:

[0093]

[0094] Among them, A T / RH is the Lawson model acceleration factor; e is the constant 2.71828, which is the corresponding exp constant in Excel; T FeldParken is the average relative humidity in a parked car (unit: °C); b is a constant with a value of 5.57 x 10 -4 RH pruf The relative humidity (95%) to which the test is accelerated; RH FeldParken is the average relative humidity in a parked car (65%); -273.15℃ is absolute zero.

[0095] Therefore, based on the above parameters, it can be calculated that when accelerated to 90°C and 95% RH, the corresponding acceleration factor A is T / RH It is 375.

[0096] According to the previously calculated high humidity time of 10*78*24=18720h, combined with the acceleration factor, calculate the accelerated test time t pruf :

[0097]

[0098] Therefore, the acceleration time after accelerating to 95% RH was 50 h.

[0099] Furthermore, combined with the total high-temperature operation acceleration test time of 1881 h, high-humidity environmental stress was applied for 1 h every 36 h during the test.

[0100] In addition, the embodiment of the present application also designs an electric stress acceleration scheme, wherein the electric stress refers to the general standard of electronic appliances, and the electric stress cycle is as follows: Figure 4 As shown in the figure, the cyclic variation of electrical stress under different voltage levels is shown. Three key voltage values are defined in the figure: the upper limit is 16V, the nominal value is 14V, and the lower limit is 9V. The variation process of electrical stress is divided into three stages:

[0101] Initial state (point 1): electrical stress starts from a nominal value of 14V.

[0102] Decline stage (point 1 to point 2): the electrical stress gradually decreases from the nominal value of 14V to the lower limit of 9V.

[0103] Rising stage (point 2 to point 3): the electrical stress gradually increases from the lower limit of 9V to the upper limit of 16V.

[0104] Furthermore, the power-on sequence is as follows Figure 5 As shown in the figure, during the initial phase, from 0 to 90 minutes, the system is not powered on. At the 90th minute, the system is briefly powered on, and again briefly powered on at the 150th minute. At the 360th minute, the system starts to power on, and remains powered on until the 600th minute.

[0105] In summary, the following test conditions were obtained by superimposing temperature, humidity, and electrical stress: 1881 hours of high-temperature operation, equivalent to a 10-year service life. After the comprehensive stress test, the system was tested on a full vehicle to verify its ability to properly identify the driver's actions and output correct signals to related components.

[0106] Furthermore, based on the above environmental stress, automated testing was performed for 360-600 minutes at a normal operating voltage of 14V. Through ADB system operation, the system function test was performed by executing ADB commands based on Python language and using the subprocess module.

[0107] Furthermore, in some embodiments, a target test script matching at least one vehicle-mounted software to be tested is selected from a preset test script library, and the target test script is executed to obtain a test result, including: executing at least one test case based on the target test script to perform automated testing on the user interface function of at least one vehicle-mounted software to be tested, to obtain a first test result; or, generating at least one random event based on the target test script, and performing automated testing on at least one vehicle-mounted software to be tested according to the at least one random event, to obtain a second test result.

[0108] In step S103 , a test report is generated according to the test result, so as to evaluate the performance of at least one vehicle-mounted software to be tested according to the test report.

[0109] Specifically, if Figure 6 As shown, the embodiment of the present application can run the main.py file in the root directory of the Python project to execute the test cases of all the vehicle-mounted software to be tested, so as to perform automated testing on the user interface (UI, User Interface) functions of all the vehicle-mounted software to be tested, that is, to use the Python scripting language to implement user simulation operations and determine whether the expected test results are consistent with the actual results.

[0110] Further, if Figure 7As shown, the embodiment of the present application can also execute a separate use case for a certain vehicle-mounted software to be tested or a test case (under the / tests directory) to perform automated testing on the user interface function of the target vehicle-mounted software to be tested.

[0111] Furthermore, when the user interface function of the vehicle software to be tested is automatically tested, the execution status of the use case and the vehicle display screen are viewed in real time, and after the automated test is completed, Figure 8 As shown, view the system log of the software to be tested in the Appium_log file in the project root directory.

[0112] Further, if Figure 9 As shown in the figure, the results of the test case execution of the vehicle software to be tested are in the project root directory reports / allure-report. Execute allure server / reports / allure-report / on the command line to view all the statistics of the test results.

[0113] Furthermore, a test report is generated based on the test results. For example, the test report of the embodiment of the present application can be as follows: Figure 10 shown.

[0114] Furthermore, in some embodiments, generating at least one random event based on a target test script includes: generating at least one random event based on a preset automated testing tool and a target test script according to a predefined random event type and a predefined random event generation rule.

[0115] Specifically, the embodiment of the present application can perform monkey stability testing on the vehicle software to be tested based on preset automated testing tools and target test scripts, and use the tools provided by the Android SDK to randomly generate fake touch screen events, key events, etc. to simulate random human operations, so as to test the stability of the application.

[0116] Further, if Figure 11 As shown, run the scripts / execute_adb.py file in the project root directory, set parameters according to the scenario, and view the Appium_log file and the vehicle screen in real time.

[0117] Further, if Figure 12 As shown in the figure, after the stability test is completed, the log of the tested system can be viewed in the Appium_log file in the project root directory, and the adb log can be copied and viewed from the vehicle computer.

[0118] Furthermore, in some embodiments, after generating a test report based on the test results, it also includes: judging whether at least one vehicle-mounted software to be tested meets the preset performance indicators based on the test report; if there is vehicle-mounted software to be tested that does not meet the preset performance indicators, generating corresponding software improvement reminder information; and providing reminders based on the software improvement reminder information.

[0119] The preset performance indicators may be indicators pre-set by those skilled in the art and are not specifically limited here.

[0120] Specifically, after completing the automated testing of the in-vehicle software and generating a detailed test report, the report is used to determine whether each in-vehicle software to be tested meets the preset performance indicators, including the software's functional correctness, response time, stability, and other aspects, and compare them with the pre-set standards.

[0121] For software that fails to meet preset performance indicators, corresponding software improvement reminder information will be automatically generated. The improvement reminder information includes the specific problems existing in the software and the possible negative impacts it may bring, and provides preliminary improvement suggestions to facilitate the subsequent execution of necessary code modifications or other forms of adjustments, and retesting to verify the improvement effect.

[0122] According to the automated testing method for vehicle software in an embodiment of the present application, if the vehicle software to be tested meets preset test conditions based on the current vehicle status and software version, a target test script matching the vehicle software to be tested is selected from a preset test script library under preset environmental stress conditions and executed to obtain test results. A test report is generated based on the test results, and the performance of the vehicle software to be tested is evaluated based on the test report. This solves the problems of long full regression time and heavy testing workload in the background technology, reduces repetitive workload, improves the efficiency and coverage of regression testing, and reduces testing costs. It is easy to integrate and expand, and supports other types of automated testing.

[0123] Next, an automated testing device for vehicle-mounted software according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0124] Figure 13 It is a block diagram of an automated testing device for vehicle-mounted software according to an embodiment of the present application.

[0125] like Figure 13 As shown, the automated testing device 10 for vehicle-mounted software includes: a judgment module 100 , a testing module 200 and a generation module 300 .

[0126] Among them, the judgment module 100 is used to obtain the status of the current vehicle and the software version of at least one vehicle-mounted software to be tested installed on the current vehicle, and judge whether the at least one vehicle-mounted software to be tested meets the preset test conditions based on the status of the current vehicle and the software version; the testing module 200 is used to select a target test script that matches the at least one vehicle-mounted software to be tested from a preset test script library under preset environmental stress conditions if the at least one vehicle-mounted software to be tested meets the preset test conditions, and execute the target test script to obtain a test result; the generation module 300 is used to generate a test report based on the test results, so as to evaluate the performance of the at least one vehicle-mounted software to be tested based on the test report.

[0127] Further, in some embodiments, the testing module 200 is used to: execute at least one test case based on a target test script to perform automated testing on the user interface function of at least one vehicle-mounted software to be tested to obtain a first test result; or generate at least one random event based on the target test script, and perform automated testing on at least one vehicle-mounted software to be tested according to the at least one random event to obtain a second test result.

[0128] Furthermore, in some embodiments, the testing module 200 is configured to generate at least one random event based on a preset automated testing tool and a target test script, according to a predefined random event type and a predefined random event generation rule.

[0129] Furthermore, in some embodiments, the preset environmental stress condition includes at least one of temperature stress, humidity stress, and electrical stress.

[0130] Furthermore, in some embodiments, after generating a test report based on the test results, the generation module 300 is also used to: determine whether at least one vehicle-mounted software to be tested meets the preset performance indicators based on the test report; if there is vehicle-mounted software to be tested that does not meet the preset performance indicators, generate corresponding software improvement reminder information; and provide reminders based on the software improvement reminder information.

[0131] It should be noted that the above explanation of the embodiment of the automated testing method for vehicle-mounted software is also applicable to the automated testing device for vehicle-mounted software in this embodiment, and will not be repeated here.

[0132] According to the automated testing device for vehicle software in the embodiment of the present application, if the vehicle software to be tested meets preset test conditions based on the current vehicle status and software version, a target test script matching the vehicle software to be tested is selected from a preset test script library under preset environmental stress conditions, and the target test script is executed to obtain a test result. A test report is generated based on the test result, and the performance of the vehicle software to be tested is evaluated based on the test report. This solves the problems of the long time and heavy testing workload of the background technology full regression, reduces repetitive workload, improves test efficiency and coverage, and reduces testing costs.

[0133] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0134] Memory 1401 , processor 1402 , and computer programs stored in the memory 1401 and executable on the processor 1402 .

[0135] When the processor 1402 executes the program, the automated testing method for the vehicle-mounted software provided in the above embodiment is implemented.

[0136] Furthermore, the electronic device further includes:

[0137] The communication interface 1403 is used for communication between the memory 1401 and the processor 1402 .

[0138] The memory 1401 is used to store computer programs that can be run on the processor 1402 .

[0139] The memory 1401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0140] If the memory 1401, processor 1402, and communication interface 1403 are implemented independently, the communication interface 1403, memory 1401, and processor 1402 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 14Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0141] Optionally, in a specific implementation, if the memory 1401, the processor 1402 and the communication interface 1403 are integrated on a chip, the memory 1401, the processor 1402 and the communication interface 1403 can communicate with each other through an internal interface.

[0142] The processor 1402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0143] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned automated testing method for vehicle-mounted software.

[0144] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0145] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0146] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An automated testing method for vehicle-mounted software, characterized in that: The following steps are involved: Obtaining a current vehicle status and a software version of at least one in-vehicle software to be tested installed on the current vehicle, and determining whether the at least one in-vehicle software to be tested meets a preset test condition based on the current vehicle status and the software version; If the at least one in-vehicle software to be tested meets the preset test condition, then under the preset environmental stress condition, selecting a target test script that matches the at least one in-vehicle software to be tested from a preset test script library, executing the target test script, and obtaining a test result; A test report is generated according to the test result, so as to evaluate the performance of the at least one vehicle-mounted software to be tested according to the test report.

2. The method according to claim 1, characterized in that The step of selecting a target test script that matches at least one vehicle-mounted software to be tested from a preset test script library and executing the target test script to obtain a test result includes: Executing at least one test case based on the target test script to perform automated testing on a user interface function of the at least one in-vehicle software to be tested, and obtaining a first test result; Alternatively, at least one random event is generated based on the target test script, and an automated test is performed on the at least one vehicle-mounted software to be tested according to the at least one random event to obtain a second test result.

3. The method according to claim 2, characterized in that Generating at least one random event based on the target test script includes: Based on a preset automated testing tool and the target test script, the at least one random event is generated according to a predefined random event type and a predefined random event generation rule.

4. The method according to claim 1, wherein The preset environmental stress condition includes at least one of temperature stress, humidity stress and electrical stress.

5. The method according to claim 1, wherein After generating a test report according to the test results, the method further includes: Determining whether the at least one in-vehicle software to be tested meets a preset performance indicator according to the test report; If there is any vehicle-mounted software to be tested that does not meet the preset performance indicators, a corresponding software improvement reminder message is generated; Prompt according to the software improvement reminder information.

6. An automated testing device for vehicle-mounted software, characterized in that: include: a determination module, configured to obtain a current vehicle status and a software version of at least one vehicle-mounted software to be tested installed on the current vehicle, and determine whether the at least one vehicle-mounted software to be tested meets a preset test condition based on the current vehicle status and the software version; a testing module configured to select, if the at least one vehicle-mounted software to be tested meets the preset test conditions, a target test script that matches the at least one vehicle-mounted software to be tested from a preset test script library under preset environmental stress conditions, and execute the target test script to obtain a test result; A generating module is used to generate a test report according to the test result, so as to evaluate the performance of the at least one vehicle-mounted software to be tested according to the test report.

7. The device according to claim 6, characterized in that The test module is used to: Executing at least one test case based on the target test script to perform automated testing on a user interface function of the at least one in-vehicle software to be tested, and obtaining a first test result; Alternatively, at least one random event is generated based on the target test script, and an automated test is performed on the at least one vehicle-mounted software to be tested according to the at least one random event to obtain a second test result.

8. The device according to claim 7, characterized in that The test module is used to: Based on a preset automated testing tool and the target test script, the at least one random event is generated according to a predefined random event type and a predefined random event generation rule.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automated testing method for vehicle-mounted software as described in any one of claims 1 to 5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the automated testing method for vehicle-mounted software as described in any one of claims 1 to 5.