Vehicle-mounted software automatic testing method and device and storage medium

By acquiring relevant data from in-vehicle software and utilizing document object modeling and optical character recognition technology, the test mode is accurately determined, solving the problem of poor adaptability in automated testing of in-vehicle software and achieving efficient and accurate batch testing of multiple vehicle models and system versions.

CN122064593APending Publication Date: 2026-05-19FAW CAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FAW CAR CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing automated testing tools for automotive software are inadequate in terms of adaptability, intelligence, and coverage, making it difficult to meet the batch testing needs of multiple vehicle models and system versions.

Method used

By acquiring test case sets and target vehicle software related data, and based on document object model structure data and optical character recognition technology, the test modes of system settings, navigation search results, and multimedia playback interfaces are accurately determined. Combined with the test case sets, the test results are determined, achieving precise positioning and adaptation of interface elements.

Benefits of technology

It improves testing efficiency and accuracy, reduces maintenance costs, is suitable for batch testing of multiple vehicle models and system versions, and enhances scenario adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064593A_ABST
    Figure CN122064593A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted software automatic testing method and device and a storage medium, and the method comprises the steps: responding to a test starting instruction, and obtaining a test case set and target vehicle-mounted software related data, the test case set comprises at least one action instruction and an execution sequence of the at least one action instruction, wherein each action instruction is adapted to control a corresponding element in a corresponding page of the vehicle-mounted human-computer interface, and the target vehicle-mounted software related data comprises page complete document object model structure data and page image data; based on the target vehicle-mounted software related data, test modes are determined, and the test modes comprise a system setting interface test mode, a navigation search result interface test mode and a multimedia playing interface test mode; based on the test mode and the test case set, a test result is determined, and the test result is used for evaluating whether the target vehicle-mounted software passes the test or not. The technical problem that an existing vehicle-mounted software automatic test scene is poor in adaptability is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle software automation technology, and more specifically, to a vehicle software automated testing method, apparatus, and storage medium. Background Technology

[0002] Existing automated testing of automotive software relies on traditional tools such as UIAutomator and Appium, employing single location methods such as control ID and XPath. However, automotive software UI frameworks are diverse (such as Qt, Android, and Linux GUI), and the attributes of controls in the same application can easily change under different vehicle models and screen resolutions. This results in fragile location, high maintenance costs for test scripts, and the need for manual rule setting. It is also unable to adapt to dynamic UIs and unknown test results, has a low level of intelligence, and lacks support for non-standard controls and dynamic content such as custom-drawn controls, video streams, and map rendering. The test coverage is incomplete, making it difficult to meet the batch testing needs of automotive software across multiple vehicle models and system versions.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides an automated testing method, apparatus, and storage medium for in-vehicle software, which at least solves the technical problem of poor adaptability to existing automated testing scenarios for in-vehicle software.

[0005] According to one aspect of the present invention, in order to achieve the above-mentioned objective, an automated testing method for in-vehicle software is provided, comprising: responding to a test start command; acquiring a test case set and target in-vehicle software related data; wherein the test case set includes: at least one action command and the execution order of at least one action command, wherein each action command is adapted to a corresponding element in a corresponding page controlling an in-vehicle human-machine interface; and the target in-vehicle software related data includes: complete document object model structure data of the page and page image data; determining a test mode based on the target in-vehicle software related data; wherein the test mode includes: a system settings interface test mode, a navigation search results interface test mode, and a multimedia playback interface test mode; and determining a test result based on the test mode and the test case set, wherein the test result is used to evaluate whether the target in-vehicle software passes the test.

[0006] Furthermore, based on the target vehicle software-related data, the test mode is determined, including: determining software-related positioning data based on the target vehicle software-related data, wherein the software-related positioning data includes: document object model tree positioning data, optical character recognition positioning data, and target inspection positioning data; determining interface scene types based on the software-related positioning data, wherein the interface scene types include: system settings interface, navigation search results interface, and multimedia playback interface; and determining the test mode based on the interface scene types.

[0007] Furthermore, the software-related positioning data is determined, including: determining the coordinates of the target at the center of the tree structure based on the complete document object model structure data of the page; determining the document object model tree positioning data based on the coordinates of the target at the center of the tree structure; obtaining preprocessed page image data based on page image data through preprocessing methods; determining optical character recognition positioning data based on the preprocessed page image data through an optical character recognition algorithm; and obtaining target inspection positioning data based on page image data through a pre-set standard template library of common vehicle elements.

[0008] Furthermore, based on software-related location data, the interface scene type is determined, including: determining core evaluation parameters based on software-related location data, wherein the core evaluation parameters include: document object model structural integrity, text information density, and element feature complexity; determining the scene evaluation matrix based on the core evaluation parameters; and determining the interface scene type based on the scene evaluation matrix.

[0009] Furthermore, based on the test mode and test case set, the test results are determined, including: determining the before-and-after page feature data and target element color change data based on the test mode and test case set; determining the page jump result based on the before-and-after page feature data, wherein the page jump result includes: page jump valid and page jump invalid; determining the element state change result based on the target element color change data, wherein the element state change result includes: element state change valid and element state change invalid; and determining the test result based on the page jump result and the page jump result.

[0010] Further, based on the feature data of the preceding and following pages, the page redirection result is determined, including: obtaining the page content relevance coefficient using a cosine similarity algorithm based on the feature data of the preceding and following pages; judging the page content relevance coefficient based on a first preset threshold to obtain a first judgment result; in response to the first judgment result that the page content relevance coefficient is less than the first preset threshold, the page redirection result is determined to be valid; in response to the first judgment result that the page content relevance coefficient is greater than or equal to the first preset threshold, the page redirection result is determined to be invalid.

[0011] Further, based on the target element color change data, the element state change result is determined, including: based on the target element color change data, determining the absolute difference of the three primary color channels; based on a second preset threshold, judging the absolute difference of the three primary color channels respectively to obtain a second judgment result; in response to the second judgment result that at least one of the absolute differences of the three primary color channels is greater than the second preset threshold, the element state change result is determined to be valid; in response to the second judgment result that any one of the absolute differences of the three primary color channels is less than or equal to the second preset threshold, the page jump result is determined to be invalid.

[0012] Furthermore, after determining the test results based on the test mode and test case set, the process also includes: generating a visual test report for the target vehicle software in response to the test results. The visual test report for the target vehicle software includes at least a test data table, a test data trend chart, a list of test anomaly details, and test problem location suggestions.

[0013] According to one embodiment of the present invention, an automated testing device for in-vehicle software is also provided, comprising: an acquisition module, configured to respond to a test start command and acquire a test case set and target in-vehicle software related data, wherein the test case set includes: at least one action instruction and the execution order of at least one action instruction, wherein each action instruction is adapted to a corresponding element in a corresponding page controlling the in-vehicle human-machine interface, and the target in-vehicle software related data includes: complete document object model structure data of the page and page image data; a testing module, configured to determine a test mode based on the target in-vehicle software related data, wherein the test modes include: a system settings interface test mode, a navigation search results interface test mode, and a multimedia playback interface test mode; and a result module, configured to determine a test result based on the test mode and the test case set, wherein the test result is used to evaluate whether the target in-vehicle software passes the test.

[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of the present invention.

[0015] In this embodiment of the invention, a test case set containing action instructions and execution order, as well as target vehicle software-related data such as complete document object model structure data and page image data, are obtained by responding to a test start command. Based on this data, three test modes—system settings interface, navigation search results interface, and multimedia playback interface—are accurately determined. The test results are then determined by combining the test modes and the test case set. This achieves precise positioning and adaptation of vehicle software interface elements, and test verification can be completed without manually presetting assertion rules. This significantly improves test efficiency, accuracy, and scenario adaptability, reduces test maintenance costs, and is suitable for batch testing of vehicle software across multiple vehicle models and system versions. It has broad application value and solves the technical problem of poor scenario adaptability in existing automated testing of vehicle software. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of an automated testing method for vehicle software according to one embodiment of the present invention;

[0018] Figure 2 This is a structural block diagram of an automated testing device for vehicle-mounted software according to one embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] According to an embodiment of the present invention, an embodiment of an automated testing method for vehicle software is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0022] This method embodiment can be executed in an electronic device or similar computing device that includes a memory and a processor. Taking operation on a vehicle terminal as an example, the vehicle terminal may include one or more processors (processors may include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), digital signal processing (DSP) chips, microcontroller units (MCUs), field-programmable gate arrays (FPGAs), neural network processors (NPUs), tensor processors (TPUs), artificial intelligence (AI) type processors, etc.) and a memory for storing data. Optionally, the vehicle terminal may also include transmission devices, input / output devices, and display devices for communication functions. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the vehicle terminal. For example, the vehicle terminal may include more or fewer components than described above, or have a different configuration than described above.

[0023] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the vehicle software automated testing method in this embodiment of the invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby realizing the aforementioned vehicle software automated testing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0024] The transmission device is used to receive or send data via a network. Specific examples of the network mentioned above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0025] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0026] Figure 1 This is a flowchart of an automated testing method for in-vehicle software according to one embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0027] Step S110: Respond to the test start command and obtain the test case set and relevant data of the target vehicle software;

[0028] In step S110, the test case set includes: at least one action instruction and the execution order of at least one action instruction, wherein each action instruction is adapted to a corresponding element in the corresponding page of the vehicle human-machine interface, and the target vehicle software related data includes: complete document object model structure data of the page and page image data, the specific contents of which are as follows:

[0029] The system monitors test initiation commands sent by testers via the host computer in real time. Once a command is captured, the data acquisition process begins. Firstly, it acquires a pre-imported test case set, the core basis for test execution. This set contains at least one action command targeting the function of the in-vehicle software, along with a clear execution sequence. Each action command is designed for scenario adaptation, precisely corresponding to a specific element on a specific page within the in-vehicle human-machine interface, ensuring direct mapping to operable elements of the in-vehicle UI. Secondly, it simultaneously acquires relevant data from the target in-vehicle software. This data includes two core types of information: first, complete document object model (DOM) structure data, acquired in real-time via the in-vehicle software system interface, covering structured information such as tag attributes, hierarchical relationships, coordinate parameters, and interaction states of all nodes on the interface, providing a data foundation for subsequent DOM tree localization; second, page image data, acquired through the in-vehicle screen acquisition module, containing unstructured information such as visual features, layout, and distribution of text content elements, providing image support for OCR target recognition, localization, and subsequent assertion analysis. After the two types of data are collected, the system verifies the integrity of the data to ensure that the DOM structure is complete and the images are free from blurring or distortion. Once the verification is successful, the data is temporarily stored in a designated cache area, awaiting subsequent steps.

[0030] Step S120: Determine the test mode based on the relevant data of the target vehicle software;

[0031] In step S120, the test modes include: system settings interface test mode, navigation search results interface test mode, and multimedia playback interface test mode. Step S120, as the core decision-making step of the automated testing method for in-vehicle software, accurately determines the test mode that best suits the characteristics of the target in-vehicle software interface, providing a basis for subsequent targeted testing. The specific execution process is as follows:

[0032] First, based on the target vehicle software-related data, software-related positioning data is generated in three categories: First, determining the document object model (DOM) tree positioning data. This involves obtaining the complete DOM structure data of the page through the vehicle software system interface, traversing all nodes with non-empty Text attributes, locating the target element's hierarchical position in the tree structure, determining the interaction state of the target node and extracting the corresponding coordinate parameters, calculating the center coordinates of the target in the tree structure, and integrating these center coordinates with node association attributes to form the DOM tree positioning data. Second, determining the optical character recognition (OCR) positioning data. This involves first processing the obtained page image data... The process involves three steps: First, a preprocessing flow is executed to obtain preprocessed page image data. This preprocessed page image data is then input into an optical character recognition (OCR) algorithm to extract text information and element contour features from the image. Combined with feature matching results, OCR positioning data containing the target element's position coordinates and matching confidence is generated. Second, target inspection and positioning data is determined by calling a pre-set standard template library of common vehicle elements. The page image data is compared with the element features in the template library, and the optimal matching result is selected to generate target inspection and positioning data containing the target element's position coordinates and matching confidence. These three types of data together constitute the software-related positioning data.

[0033] Next, based on the generated software-related location data, the interface scene type is gradually determined: First, three core evaluation parameters are extracted from the software-related location data: document object model structural integrity, text information density, and element feature complexity. The document object model structural integrity is determined by a combination of node hierarchy integrity and attribute integrity. The text information density is calculated based on the text ratio in the optical character recognition location data. The element feature complexity is determined by analyzing the element contour recognition and matching degree in the target inspection location data. Then, the three core evaluation parameters are quantified and scored, and integrated according to preset weights to form a scene evaluation matrix, clearly presenting the interface's performance in the three parameter dimensions. Finally, the scene evaluation matrix is ​​used to determine the interface type: if the document object model structural integrity score is the highest, it is determined to be a system settings interface; if the text information density score is the highest, it is determined to be a navigation search results interface; and if the element feature complexity score is the highest, it is determined to be a multimedia playback interface.

[0034] Finally, based on the determined interface scenario type, the corresponding test mode is directly matched: if the interface scenario type is a system settings interface, the test mode is determined to be the system settings interface test mode; if the interface scenario type is a navigation search results interface, the test mode is determined to be the navigation search results interface test mode; if the interface scenario type is a multimedia playback interface, the test mode is determined to be the multimedia playback interface test mode, thus completing the accurate determination of the test mode.

[0035] Step S140: Based on the test mode and test case set, determine the test results. The test results are used to evaluate whether the target vehicle software passes the test.

[0036] In step S140, the core logic is to accurately evaluate the functional effectiveness of the target vehicle software based on the established test mode and preset test case set, while outputting traceable and easily analyzable test results. The specific execution process is as follows:

[0037] First, based on the test mode and test case set, two types of core analytical data are accurately collected: using the high-precision positioning benchmark adapted to the test mode as a basis, combined with the action instructions and execution order in the test case set, the specified operation elements in the target vehicle software human-machine interface are locked; before executing each action instruction, feature information such as the text distribution and element layout of the current page is collected to form the previous page feature data, and the original color data of the area where the target element is located is extracted; after the action instruction is triggered in the execution order, feature information such as the text distribution and element layout of the page after the operation is collected synchronously to form the subsequent page feature data, as well as the color data of the area where the target element is located after the operation; the previous page and subsequent page feature data are integrated to form the front and back page feature data, and the color data of the target element before and after the operation are integrated to form the target element color change data.

[0038] Next, based on the feature data of the preceding and following pages, the page jump result is determined step by step: TF-IDF features of the text and HOG features of the element layout are extracted from the feature data of the preceding and following pages. The similarity of the two types of features is calculated using the cosine similarity algorithm, and the average of the similarity of the two types of features is taken as the page content relevance coefficient. A first preset threshold is retrieved, and the page content relevance coefficient is compared with the first preset threshold to obtain a first judgment result. If the first judgment result is that the page content relevance coefficient is less than the first preset threshold, the page jump result is determined to be a valid page jump. If the first judgment result is that the page content relevance coefficient is greater than or equal to the first preset threshold, the page jump result is determined to be an invalid page jump. At the same time, the specific value of the page content relevance coefficient is recorded as the basis for judgment.

[0039] Then, based on the target element color change data, the element state change result is determined step by step: extract the values ​​of the three primary color channels before the operation and the values ​​of the three primary color channels after the operation from the target element color change data, calculate the absolute difference of each primary color channel, and obtain the absolute difference of the three primary color channels; retrieve the second preset threshold, and compare the absolute difference of the three primary color channels with the second preset threshold one by one to obtain the second judgment result; if the second judgment result is that at least one of the absolute differences of the three primary color channels is greater than the second preset threshold, the element state change result is determined to be valid; if the second judgment result is that the absolute difference of any one of the three primary color channels is less than or equal to the second preset threshold, the element state change result is determined to be invalid, and the specific values ​​of the absolute differences of the three primary color channels are recorded simultaneously as the judgment basis.

[0040] Subsequently, based on the page redirection results and element state change results, the test results are comprehensively determined: clear test pass / fail rules are established. If the page redirection result is valid and the element state change result is valid, the test result of the corresponding test case for the target vehicle software is determined to be pass; if the page redirection result is invalid, or the element state change result is invalid, or both are invalid, the test result of the corresponding test case is determined to be fail. After completing the result determination of all test cases according to the execution order of the test case set, the test results of all individual test cases are integrated to form the overall test result of the target vehicle software, clarifying the overall pass rate and the core problem types of the failed test cases.

[0041] Finally, in response to the overall test results, a visual test report of the target vehicle software is generated. The report includes at least four core modules: a test data table covering quantitative statistics of key indicators such as the total number of test cases, the number of passed cases, the number of failed cases, the localization accuracy rate, and the assertion success rate; a test data trend chart, in the form of a line chart or bar chart, intuitively presenting the dynamic changes in localization time and assertion success rate during the test; a test anomaly details list recording in detail the anomalies that occurred during the test, such as freezing, jump failure, and unresponsive status, including key content such as the time of anomaly occurrence, triggering action instructions, related element information, and judgment basis data; and test problem localization suggestions, combining the previous software-related localization data and assertion analysis results, providing specific and actionable improvement suggestions such as interface element localization optimization and control interaction logic adjustment for the problem types of failed test cases, providing precise support for subsequent vehicle software optimization.

[0042] Based on steps S110 to S140 above, in this embodiment of the invention, a test case set containing action instructions and execution order, as well as target vehicle software-related data such as complete document object model structure data and page image data, are obtained by responding to the test start command. Based on this data, three test modes—system settings interface, navigation search results interface, and multimedia playback interface—are accurately determined. Then, the test results are determined by combining the test modes and test case sets. This achieves accurate positioning and adaptation of vehicle software interface elements, and test verification can be completed without manually presetting assertion rules. This significantly improves test efficiency, accuracy, and scenario adaptability, reduces test maintenance costs, and is suitable for batch testing of vehicle software of multiple models and system versions. It has broad application value and solves the technical problem of poor scenario adaptability of existing automated testing of vehicle software.

[0043] The automated testing method for in-vehicle software according to embodiments of the present invention determines a test mode based on relevant data of the target in-vehicle software, including: determining software-related positioning data based on the relevant data of the target in-vehicle software, wherein the software-related positioning data includes: document object model tree positioning data, optical character recognition positioning data, and target inspection positioning data; determining interface scene types based on the software-related positioning data, wherein the interface scene types include: system settings interface, navigation search results interface, and multimedia playback interface; and determining the test mode based on the interface scene type. This method can accurately determine different interface scene types such as system settings interface, navigation search results interface, and multimedia playback interface and match the corresponding test mode, which not only improves the accuracy and stability of interface element positioning, but also enhances the adaptability and targeting of the test scene, effectively reduces the maintenance cost of test scripts, and improves the efficiency and accuracy of in-vehicle software testing.

[0044] Furthermore, based on the target in-vehicle software-related data, software-related positioning data is determined, including: determining the coordinates of the target at the center of the tree structure based on the complete document object model structure data of the page; determining the document object model tree positioning data based on the coordinates of the target at the center of the tree structure; obtaining preprocessed page image data based on page image data through preprocessing methods; determining optical character recognition positioning data based on the preprocessed page image data using an optical character recognition algorithm; and obtaining target inspection positioning data based on page image data using a pre-set standard template library of common in-vehicle elements. This comprehensively covers structured elements, text elements, and visual feature elements, effectively overcoming the limitations of single positioning methods and significantly improving the accuracy, comprehensiveness, and stability of in-vehicle software interface element positioning, adapting to diverse in-vehicle UI scenarios.

[0045] Specifically, based on software-related location data, the interface scenario type is determined, including: determining core evaluation parameters based on the software-related location data, whereby the core evaluation parameters include: document object model structural integrity, text information density, and element feature complexity; determining a scenario evaluation matrix based on the core evaluation parameters; and determining the interface scenario type based on the scenario evaluation matrix. This can accurately and objectively determine the interface scenario type, providing a reliable basis for subsequent matching and adaptation of test modes, and effectively improving the targeting and scenario adaptation capabilities of in-vehicle software testing.

[0046] In an exemplary embodiment, the test results are determined based on the test mode and test case set, including: determining the before-and-after page feature data and the target element color change data based on the test mode and test case set; determining the page jump result based on the before-and-after page feature data, wherein the page jump result includes: page jump valid and page jump invalid; determining the element state change result based on the target element color change data, wherein the element state change result includes: element state change valid and element state change invalid; and determining the test result based on the page jump result and the page jump result. This method can comprehensively verify the effectiveness of the in-vehicle software operation response, significantly improve the reliability and accuracy of test results, and adapt to the testing requirements in different scenarios.

[0047] In this embodiment, determining the page jump result based on the feature data of the preceding and following pages includes: obtaining a page content relevance coefficient using a cosine similarity algorithm based on the feature data of the preceding and following pages; judging the page content relevance coefficient based on a first preset threshold to obtain a first judgment result; in response to the first judgment result that the page content relevance coefficient is less than the first preset threshold, determining the page jump result as valid; in response to the first judgment result that the page content relevance coefficient is greater than or equal to the first preset threshold, determining the page jump result as invalid. The judgment logic is simple and clear, and the quantitative basis is objective and reliable, which can accurately identify the validity of page jumps and improve the accuracy and consistency of in-vehicle software page jump testing.

[0048] In this embodiment, determining the element state change result based on the target element color change data includes: determining the absolute difference of the three primary color channels based on the target element color change data; judging the absolute difference of the three primary color channels respectively based on a second preset threshold to obtain a second judgment result; in response to the second judgment result that at least one of the absolute differences of the three primary color channels is greater than the second preset threshold, the element state change result is determined to be valid; in response to the second judgment result that any one of the absolute differences of the three primary color channels is less than or equal to the second preset threshold, the page jump result is determined to be invalid. This method can efficiently capture state changes after element interaction, improving the accuracy and reliability of element state testing in in-vehicle software.

[0049] In this embodiment, after determining the test results based on the test mode and test case set, the process further includes: generating a visual test report for the target vehicle software in response to the test results. This visual test report includes at least: a test data table, a test data trend chart, a list of test anomalies, and suggestions for locating test problems. It not only presents core test data and trends intuitively but also clearly outlines anomalies and provides targeted optimization directions, enabling testers to quickly grasp the test situation, locate the root cause of problems, and improve the efficiency and focus of subsequent optimization of the vehicle software.

[0050] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0051] This invention also provides an automated testing device for vehicle-mounted software, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0052] Figure 2 An automated testing device for vehicle-mounted software according to one embodiment of the present invention includes:

[0053] The acquisition module 201 is used to respond to the test start command and acquire test case set and target vehicle software related data. The test case set includes at least one action command and the execution order of at least one action command. Each action command is adapted to the corresponding element in the corresponding page of the vehicle human-machine interface. The target vehicle software related data includes: complete document object model structure data of the page and page image data.

[0054] Test module 202 is used to determine the test mode based on the relevant data of the target vehicle software. The test modes include: system settings interface test mode, navigation search results interface test mode, and multimedia playback interface test mode.

[0055] Result module 203 is used to determine the test results based on the test mode and test case set. The test results are used to evaluate whether the target vehicle software passes the test.

[0056] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0057] According to one embodiment of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the above-described automated testing method for vehicle software during runtime.

[0058] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0059] Step S1: Respond to the test start command and obtain the test case set and relevant data of the target vehicle software;

[0060] Step S2: Determine the test mode based on the relevant data of the target vehicle software;

[0061] Step S3: Based on the test mode and test case set, determine the test results. The test results are used to evaluate whether the target vehicle software passes the test.

[0062] According to one embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the storage medium is located to execute the above-described automated testing method for vehicle software.

[0063] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0064] Step S1: Respond to the test start command and obtain the test case set and relevant data of the target vehicle software;

[0065] Step S2: Determine the test mode based on the relevant data of the target vehicle software;

[0066] Step S3: Based on the test mode and test case set, determine the test results. The test results are used to evaluate whether the target vehicle software passes the test.

[0067] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0068] According to one embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-described automated testing method for vehicle software.

[0069] Optionally, in this embodiment, the above-mentioned computer program product can be configured as a computer program that performs the following steps:

[0070] Step S1: Respond to the test start command and obtain the test case set and relevant data of the target vehicle software;

[0071] Step S2: Determine the test mode based on the relevant data of the target vehicle software;

[0072] Step S3: Based on the test mode and test case set, determine the test results. The test results are used to evaluate whether the target vehicle software passes the test.

[0073] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0074] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0075] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.

[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0077] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If the integrated unit is implemented as 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 this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0079] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

[0080] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An automated testing method for vehicle-mounted software, characterized in that, include: In response to the test start command, the test case set and target vehicle software related data are obtained. The test case set includes at least one action command and the execution order of the at least one action command. Each action command is adapted to a corresponding element in the corresponding page of the vehicle human-machine interface. The target vehicle software related data includes complete document object model structure data of the page and page image data. Based on the relevant data of the target vehicle software, a test mode is determined, wherein the test modes include: system settings interface test mode, navigation search results interface test mode, and multimedia playback interface test mode. Based on the test mode and the test case set, the test results are determined, and the test results are used to evaluate whether the target vehicle software passes the test.

2. The automated testing method for vehicle-mounted software according to claim 1, characterized in that, Based on the target vehicle software-related data, the test mode is determined, including: Based on the target vehicle software-related data, software-related positioning data is determined, wherein the software-related positioning data includes: document object model tree positioning data, optical character recognition positioning data, and target inspection positioning data; Based on the software-related location data, the interface scene type is determined, wherein the interface scene type includes: system settings interface, navigation search results interface, and multimedia playback interface. The test mode is determined based on the interface scenario type.

3. The automated testing method for vehicle-mounted software according to claim 2, characterized in that, Based on the target vehicle software-related data, the software-related positioning data is determined, including: Based on the complete document object model structure data of the page, determine the coordinate data of the positioning target at the center of the tree structure; Based on the coordinate data of the positioning target at the center of the tree structure, the document object model tree positioning data is determined; Based on the page image data, preprocessed page image data is obtained through a preprocessing method; Based on the preprocessed page image data, the optical character recognition positioning data is determined using an optical character recognition algorithm; Based on the page image data, the target inspection and positioning data is obtained through a preset standard template library of common vehicle elements.

4. The automated testing method for vehicle-mounted software according to claim 2, characterized in that, Based on the software-related location data, the interface scene type is determined, including: Based on the software-related positioning data, core evaluation parameters are determined, including: document object model structural integrity, text information density, and element feature complexity. Based on the core evaluation parameters, determine the scenario evaluation matrix; Based on the scenario evaluation matrix, the interface scenario type is determined.

5. The automated testing method for vehicle-mounted software according to claim 1, characterized in that, Based on the test mode and the test case set, the test results are determined, including: Based on the test mode and the test case set, determine the feature data of the front and back pages and the color change data of the target element; Based on the aforementioned page feature data, the page redirection result is determined, wherein the page redirection result includes: page redirection valid and page redirection invalid; Based on the target element color change data, the element state change result is determined, wherein the element state change result includes: the element state change is valid and the element state change is invalid; The test result is determined based on the page redirection result and the page redirection result.

6. The automated testing method for vehicle-mounted software according to claim 5, characterized in that, Based on the aforementioned page feature data, the page redirection result is determined, including: Based on the aforementioned front and back page feature data, the page content relevance coefficient is obtained using the cosine similarity algorithm; Based on a first preset threshold, the relevance coefficient of the page content is judged to obtain a first judgment result; If the first determination result is that the relevance coefficient of the page content is less than a first preset threshold, then the page redirection result is determined to be a valid page redirection; If the first determination result is that the relevance coefficient of the page content is greater than or equal to the first preset threshold, then the page redirection result is determined to be invalid.

7. The automated testing method for vehicle-mounted software according to claim 5, characterized in that, Based on the target element color change data, the result of the element state change is determined, including: Based on the color change data of the target element, determine the absolute difference of the three primary color channels; Based on the second preset threshold, the absolute difference of the three primary color channels is judged respectively to obtain the second judgment result; If the second determination result is that at least one of the absolute differences of the three primary color channels is greater than the second preset threshold, then the element state change result is determined to be valid. If the second determination result is that the absolute difference of any one of the three primary color channels is less than or equal to the second preset threshold, then the page jump result is determined to be that the element state change is invalid.

8. The automated testing method for vehicle-mounted software according to claim 1, characterized in that, After determining the test result based on the test mode and the test case set, the process further includes: In response to the test results, a visual test report of the target vehicle software is generated. The visual test report of the target vehicle software includes at least: a test data table, a test data trend chart, a list of test anomaly details, and test problem location suggestions.

9. An automated testing device for vehicle-mounted software, characterized in that, include: The acquisition module is used to respond to the test start command and acquire test case set and target vehicle software related data. The test case set includes at least one action command and the execution order of the at least one action command. Each action command is adapted to a corresponding element in the corresponding page of the vehicle human-machine interface. The target vehicle software related data includes complete document object model structure data of the page and page image data. The testing module is used to determine the testing mode based on the relevant data of the target vehicle software, wherein the testing modes include: system settings interface testing mode, navigation search results interface testing mode, and multimedia playback interface testing mode. The results module is used to determine the test results based on the test mode and the test case set. The test results are used to evaluate whether the target vehicle software passes the test.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device where the storage medium is located to perform the automated testing method for vehicle software as described in any one of claims 1 to 8.