Automatic testing method and device for touch-free vehicle-mounted terminal screen after dormancy awakening
By simulating multi-touch operations through the controllers, relays, and interactive tools in the automated test system, the problems of low efficiency and high cost of touch-free testing of the vehicle screen after waking up from sleep mode are solved, and efficient verification of the vehicle screen touch function is achieved, reducing hardware and manpower investment.
Patent Information
- Application Number
- CN202510762272.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-16
AI Technical Summary
The existing touch-free testing method for vehicle computer screens after waking from sleep mode has the problems of low testing efficiency and high testing cost.
The controller in the automated test system is connected to the network of the component under test, and multi-touch operations are simulated through relays and automated interactive tools. Click operations are performed and screenshots are taken for image pixel comparison to determine display conditions and perform iterative testing.
Significantly reduce hardware costs and manpower investment, improve test efficiency, alleviate the testing pressure of screen touch functions, and provide guarantees for the stability of the in-vehicle software system.
Smart Images

Figure CN120653561A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile testing technology, and in particular to a touch-free automated testing method and device for a vehicle computer screen after waking up from sleep mode. Background Art
[0002] In in-cabin vehicle testing scenarios, after waking up from sleep mode, the system often experiences interaction failures such as a non-touch screen. Examples include: 1. Complete failure of the touch function; after waking up, the screen becomes unresponsive to any touch operation (e.g., clicking icons or scrolling through interfaces). While the screen displays normally, only the touch layer fails. 2. Touch coordinates shift, such as when the "Back" button opens the "Home" page. Traditional manual stress testing relies on extensive real-car resources, testing personnel, and time. However, automated robotic solutions often incur high equipment procurement and maintenance costs.
[0003] Therefore, the existing touch-free testing method for the vehicle screen after waking up from sleep mode has the problems of low testing efficiency and high testing cost. Summary of the Invention
[0004] The embodiments of the present invention provide a method and device for automatically testing a vehicle screen without touching it after waking up from sleep mode, aiming to solve the problems of low testing efficiency and high testing cost in the existing method for automatically testing a vehicle screen without touching it after waking up from sleep mode.
[0005] In a first aspect, an embodiment of the present invention provides a method for automatically testing a vehicle computer screen without touching it after waking up from sleep mode. The method is applied to a controller of an automated testing system, wherein the controller is connected to at least one component to be tested through a network, and the component to be tested includes a vehicle computer to be tested and a relay electrically connected to the vehicle computer to be tested. The method includes: sending a power-on signal to the vehicle computer to be tested, and sending a first drive signal to the first automated interactive tool via the relay after a preset waiting time, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface; After performing a screenshot operation on the first display interface to obtain a first test image, determining whether the first test image meets a first expected display condition based on a preset first standard image; If the first test image satisfies a first expected display condition, sending a second driving signal to a second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second driving signal to enter a second display interface; After performing a screenshot operation on the second display interface to obtain a second test image, determining whether the second test image meets a second expected display condition based on a preset second standard image; If the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the process returns to the step of sending a power-on signal to the vehicle computer to be tested until the number of cycles reaches a preset number of iterations.
[0006] In a second aspect, an embodiment of the present invention further provides an automated testing device for a vehicle computer screen that is touchless after waking up from sleep mode. The device is configured in a controller of an automated testing system. The controller is connected to at least one component to be tested through a network. The component to be tested includes a vehicle computer to be tested and a relay electrically connected to the vehicle computer to be tested. The device includes: a first sending unit, configured to send a power-on signal to the vehicle computer to be tested, and after a predetermined waiting time, send a first driving signal to the first automated interactive tool via the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first driving signal to enter the first display interface; a first judging unit, configured to, after performing a screenshot operation on the first display interface to obtain a first test image, judge whether the first test image satisfies a first expected display condition based on a preset first standard image; a second sending unit, configured to send a second driving signal to a second automated interactive tool through the relay if the first test image satisfies a first expected display condition, so that the second automated interactive tool performs a corresponding click operation according to the received second driving signal to enter a second display interface; a second judging unit, configured to, after performing a screenshot operation on the second display interface to obtain a second test image, judge whether the second test image satisfies a second expected display condition based on a preset second standard image; The third sending unit is used to send a sleep signal to the vehicle computer to be tested if the second test image meets the second expected display condition, and return to the step of sending a power-on signal to the vehicle computer to be tested after a preset sleep time, until the number of cycles reaches a preset number of iterations.
[0007] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0008] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method described in the first aspect can be implemented.
[0009] The present invention provides a touchless automated testing method and device for a vehicle computer screen after waking up from sleep mode. The method is applied to a controller of an automated testing system. The controller is connected to a network with at least one component to be tested. The component to be tested includes a vehicle computer to be tested and a relay electrically connected to the vehicle computer to be tested. The method comprises: sending a power-on signal to the vehicle computer to be tested, delaying for a preset waiting time, and sending a first drive signal to a first automated interactive tool through the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter a first display interface; after performing a screenshot operation on the first display interface to obtain a first test image, judging the first display interface according to a preset first standard image. Whether the test image meets the first expected display condition; if the first test image meets the first expected display condition, a second drive signal is sent to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second drive signal to enter the second display interface; after performing a screenshot operation on the second display interface to obtain the second test image, whether the second test image meets the second expected display condition is determined according to the preset second standard image; if the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the system returns to execute the step of sending a power-on signal to the vehicle computer to be tested until the number of cycles reaches the preset number of iterations. The embodiment of the present invention realizes efficient verification of the touch function of the vehicle computer screen by simulating multi-touch operations with an automated interactive tool. This solution significantly reduces hardware costs and manpower investment, improves test efficiency, alleviates the test pressure of the screen touch function, and provides a guarantee for the stability of the vehicle software system. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 A flow chart of an automated testing method for detecting touch-free vehicle screen after waking from sleep mode provided by an embodiment of the present invention; Figure 2 A schematic block diagram of an automated testing device for a vehicle screen that is touchless after waking from sleep mode, provided by an embodiment of the present invention; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0012] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0013] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0014] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0015] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations. The embodiment of the present invention provides an automated testing method and device for a vehicle screen that is not touched after waking up from sleep mode. The automated testing method for a vehicle screen that is not touched after waking up from sleep mode is described in detail in the following. Figure 1 , Figure 1 This is a flow chart illustrating a method for automated testing of a touchless vehicle computer screen after waking from sleep mode, as provided in an embodiment of the present invention. The method is applied to a controller in an automated testing system, wherein the controller is network-connected to at least one component under test, including the vehicle computer under test and a relay electrically connected to the vehicle computer under test.
[0016] Figure 1 This is a flow chart of an automated testing method for a vehicle screen that is not touched after waking up from sleep mode provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110-S150.
[0017] S110: Send a power-on signal to the vehicle computer to be tested, and after a preset waiting time, send a first drive signal to the first automated interactive tool through the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface.
[0018] In this embodiment, a power-on signal is sent to the vehicle computer to be tested, and after a preset waiting time, a first drive signal is sent to the first automated interactive tool through the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface. The preset waiting time can be set according to actual application to ensure that the vehicle computer to be tested is in a stable state. The preset waiting time can be set to 100 seconds; the present invention uses the first automated interactive tool to simulate a multi-touch operation to enter the target display interface. The first automated interactive tool can be a low-cost like tool, thereby reducing hardware costs and manpower investment.
[0019] S120: After performing a screenshot operation on the first display interface to obtain a first test image, determine whether the first test image meets a first expected display condition based on a preset first standard image.
[0020] In this embodiment, a screenshot operation can be performed on the first display interface through an ADB command (adb shell screencap -p) to obtain a first test image, and whether the first test image meets the first expected display condition is determined based on a preset first standard image. The first standard image is a normally displayed image captured by the tester on the first display interface before performing the automated test.
[0021] In one embodiment, step S120 includes: performing pixel comparison on the first test image according to the first standard image to obtain a first pixel contrast value; determining whether the first pixel contrast value is within a first standard range in the first expected display condition; if the first pixel contrast value is within the first standard range, determining that the first test image meets the first expected display condition; if the first pixel contrast value is not within the first standard range, determining that the first test image does not meet the first expected display condition.
[0022] In this embodiment, pixel comparison is performed on the first test image according to the first standard image to obtain a first pixel contrast value; it is determined whether the first pixel contrast value is within a first standard range in the first expected display condition; wherein, the first standard range can be set according to actual application, preferably, the first standard range can be set to [0.8, 1]; if the first pixel contrast value is within the first standard range, it is determined that the first test image meets the first expected display condition; if the first pixel contrast value is not within the first standard range, it is determined that the first test image does not meet the first expected display condition.
[0023] In one embodiment, if the first pixel contrast value is not within the first standard range, then after determining that the first test image does not meet the first expected display condition, it also includes: terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface.
[0024] In this embodiment, the currently running program process is terminated, and the vehicle computer to be tested is controlled to maintain the display state of the first display interface, so as to facilitate the tester to reproduce the operation.
[0025] In one embodiment, after terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface, it also includes: generating a first error log file including the exception type, the time when the exception occurred and the first test image, and sending it to a designated contact person.
[0026] In this embodiment, a first error log file including the exception type, the time when the exception occurred, and the first test image is generated and sent to a designated contact person to facilitate rapid fault location, analysis of the cause of the exception, and follow-up repair.
[0027] S130: If the first test image meets the first expected display condition, send a second drive signal to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second drive signal to enter a second display interface.
[0028] In this embodiment, if the first test image meets the first expected display condition, a second drive signal is sent to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second drive signal to enter the second display interface. The second automated interactive tool can be a low-cost like tool, thereby reducing hardware costs and manpower investment.
[0029] S140: After performing a screenshot operation on the second display interface to obtain a second test image, determine whether the second test image meets a second expected display condition based on a preset second standard image.
[0030] In this embodiment, a screenshot operation can be performed on the second display interface through an ADB command (adb shell screencap -p) to obtain a second test image, and whether the second test image meets the second expected display condition is determined based on a preset second standard image. The second standard image is a normally displayed image captured by the tester on the second display interface before executing the automated test.
[0031] In one embodiment, step S140 includes: performing pixel comparison on the second test image according to the second standard image to obtain a second pixel contrast value; determining whether the second pixel contrast value is within a second standard range of the second expected display condition; if the second pixel contrast value is within the second standard range, determining that the second test image meets the second expected display condition; if the second pixel contrast value is not within the second standard range, determining that the second test image does not meet the second expected display condition.
[0032] In this embodiment, pixel comparison is performed on the second test image according to the second standard image to obtain a second pixel contrast value; it is determined whether the second pixel contrast value is within a second standard range in the second expected display condition; the second standard range can be set according to actual application, preferably, the second standard range can be set to [0.8, 1]; if the second pixel contrast value is within the second standard range, it is determined that the second test image meets the second expected display condition; if the second pixel contrast value is not within the second standard range, it is determined that the second test image does not meet the second expected display condition.
[0033] In one embodiment, if the second pixel contrast value is not within the second standard range, then after determining that the second test image does not meet the second expected display condition, it also includes: terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface.
[0034] In this embodiment, the currently running program process is terminated, and the vehicle computer to be tested is controlled to maintain the display state of the second display interface, so as to facilitate the tester to reproduce the operation.
[0035] In one embodiment, after terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface, it also includes: generating a second error log file containing the exception type, the time when the exception occurred and the second test image, and sending it to a designated contact person.
[0036] In this embodiment, a second error log file including the exception type, the time when the exception occurred, and the second test image is generated and sent to a designated contact person to facilitate rapid fault location, analysis of the cause of the exception, and follow-up repair.
[0037] S150: If the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the process returns to the step of sending a power-on signal to the vehicle computer to be tested until the number of cycles reaches a preset number of iterations.
[0038] In this embodiment, if the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and the number of cycles is accumulated; after delaying the preset sleep time, the process returns to execute steps S110-S150 until the number of cycles reaches the preset number of iterations; wherein, the preset sleep time can be set to 100 seconds, and the preset number of iterations can be set to 1000 times.
[0039] To sum up, the embodiment of the present invention realizes efficient verification of the touch function of the vehicle screen by simulating multi-touch operations through the use of automated interactive tools. This solution significantly reduces hardware costs and manpower investment, improves test efficiency, alleviates the testing pressure of the screen touch function, and provides protection for the stability of the vehicle software system.
[0040] Figure 2 This is a schematic block diagram of an automatic testing device for a vehicle screen that does not touch after waking up from sleep mode, provided by an embodiment of the present invention. Figure 2 As shown, corresponding to the above-mentioned automated testing method for the touch-free vehicle screen after waking up from sleep mode, the present invention also provides an automated testing device for the touch-free vehicle screen after waking up from sleep mode, the device being configured in a controller of an automated testing system, the controller being connected to at least one component to be tested through a network, the component to be tested comprising a vehicle to be tested and a relay electrically connected to the vehicle to be tested. Figure 2 The automatic testing device 700 for detecting touch-free vehicle screen after waking from sleep mode includes: The first sending unit 701 is configured to send a power-on signal to the vehicle computer under test, and after a preset waiting time, send a first driving signal to the first automated interactive tool via the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first driving signal to enter the first display interface; A first judging unit 702 is configured to, after performing a screenshot operation on the first display interface to obtain a first test image, judge whether the first test image meets a first expected display condition based on a preset first standard image; The second sending unit 703 is configured to send a second driving signal to the second automated interactive tool through the relay if the first test image meets the first expected display condition, so that the second automated interactive tool performs a corresponding click operation according to the received second driving signal to enter the second display interface; A second judging unit 704 is configured to, after performing a screenshot operation on the second display interface to obtain a second test image, judge whether the second test image satisfies a second expected display condition based on a preset second standard image; The third sending unit 705 is used to send a sleep signal to the vehicle computer to be tested if the second test image meets the second expected display condition, and return to the step of sending a power-on signal to the vehicle computer to be tested after a preset sleep time, until the number of cycles reaches a preset number of iterations.
[0041] In some embodiments, when executing the step of determining whether the first test image meets the first expected display condition according to the preset first standard image, the first determining unit 702 is specifically configured to: Perform pixel comparison on the first test image according to the first standard image to obtain a first pixel contrast value; determine whether the first pixel contrast value is within a first standard range in the first expected display condition; if the first pixel contrast value is within the first standard range, determine that the first test image meets the first expected display condition; if the first pixel contrast value is not within the first standard range, determine that the first test image does not meet the first expected display condition.
[0042] In some embodiments, after executing the step of determining that the first test image does not meet the first expected display condition if the first pixel contrast value is not within the first standard range, the first judgment unit 702 is further configured to: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the first display interface.
[0043] In some embodiments, after executing the steps of terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface, the first judgment unit 702 is further configured to: A first error log file including the exception type, the time when the exception occurred, and the first test image is generated and sent to a designated contact person.
[0044] In some embodiments, when executing the step of determining whether the second test image meets the second expected display condition according to the preset second standard image, the second determining unit 704 is specifically configured to: Perform pixel comparison on the second test image according to the second standard image to obtain a second pixel contrast value; determine whether the second pixel contrast value is within a second standard range of the second expected display condition; if the second pixel contrast value is within the second standard range, determine that the second test image meets the second expected display condition; if the second pixel contrast value is not within the second standard range, determine that the second test image does not meet the second expected display condition.
[0045] In some embodiments, after executing the step of determining that the second test image does not meet the second expected display condition if the second pixel contrast value is not within the second standard range, the second judgment unit 704 is further configured to: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the second display interface.
[0046] In some embodiments, after the step of terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface, the method is further configured to: A second error log file including the exception type, the time when the exception occurred, and the second test image is generated and sent to a designated contact person.
[0047] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned automatic testing device for non-touch of the vehicle screen after waking up from sleep and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, it will not be repeated here.
[0048] The above automatic test device for the vehicle screen being touchless after waking up from sleep mode can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer device shown.
[0049] See also Figure 3 , Figure 3 8 is a schematic block diagram of an electronic device provided by an embodiment of the present invention. The computer device 800 can be a terminal or a server, wherein the terminal can be an electronic device with communication functions. The server can be a standalone server or a server cluster consisting of multiple servers.
[0050] See Figure 3 The electronic device 800 includes a processor 802 , a memory, and a network interface 805 connected via a system bus 801 , wherein the memory may include a non-volatile storage medium 803 and an internal memory 804 .
[0051] The non-volatile storage medium 803 can store an operating system 8031 and a computer program 8032. The computer program 8032 includes program instructions, which, when executed, can cause the processor 802 to perform an automated test method for detecting touch failure on a vehicle screen after waking from sleep mode.
[0052] The processor 802 is used to provide computing and control capabilities to support the operation of the entire electronic device 800.
[0053] The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can perform an automated testing method for the touch-free vehicle screen after waking up from sleep mode.
[0054] The network interface 805 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the electronic device 800 to which the solution of the present invention is applied. The specific electronic device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0055] The processor 802 is configured to execute a computer program 8032 stored in the memory to implement the following steps: A power-on signal is sent to the vehicle computer to be tested, and after a preset waiting time, a first drive signal is sent to the first automated interactive tool through the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface; after performing a screenshot operation on the first display interface to obtain a first test image, whether the first test image meets a first expected display condition is determined based on a preset first standard image; if the first test image meets the first expected display condition, a second drive signal is sent to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second drive signal to enter the second display interface; after performing a screenshot operation on the second display interface to obtain a second test image, whether the second test image meets a second expected display condition is determined based on a preset second standard image; if the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the step of sending a power-on signal to the vehicle computer to be tested is returned to, until the number of loops reaches a preset number of iterations.
[0056] In some embodiments, when the processor 802 implements the step of determining whether the first test image meets the first expected display condition according to the preset first standard image, the processor 802 specifically implements the following steps: Perform pixel comparison on the first test image according to the first standard image to obtain a first pixel contrast value; determine whether the first pixel contrast value is within a first standard range in the first expected display condition; if the first pixel contrast value is within the first standard range, determine that the first test image meets the first expected display condition; if the first pixel contrast value is not within the first standard range, determine that the first test image does not meet the first expected display condition.
[0057] In some embodiments, after implementing the step of determining that the first test image does not meet the first expected display condition if the first pixel contrast value is not within the first standard range, the processor 802 further implements the following steps: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the first display interface.
[0058] In some embodiments, after terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface, the processor 802 further implements the following steps: A first error log file including the exception type, the time when the exception occurred, and the first test image is generated and sent to a designated contact person.
[0059] In some embodiments, when implementing the step of determining whether the second test image meets the second expected display condition according to the preset second standard image, the processor 802 specifically implements the following steps: Perform pixel comparison on the second test image according to the second standard image to obtain a second pixel contrast value; determine whether the second pixel contrast value is within a second standard range of the second expected display condition; if the second pixel contrast value is within the second standard range, determine that the second test image meets the second expected display condition; if the second pixel contrast value is not within the second standard range, determine that the second test image does not meet the second expected display condition.
[0060] In some embodiments, after implementing the step of determining that the second test image does not meet the second expected display condition if the second pixel contrast value is not within the second standard range, the processor 802 further implements the following steps: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the second display interface.
[0061] In some embodiments, after terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface, the processor 802 further implements the following steps: A second error log file including the exception type, the time when the exception occurred, and the second test image is generated and sent to a designated contact person.
[0062] It should be understood that in the embodiment of the present invention, the processor 802 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0063] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0064] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor performs the following steps: A power-on signal is sent to the vehicle computer to be tested, and after a preset waiting time, a first drive signal is sent to the first automated interactive tool through the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface; after performing a screenshot operation on the first display interface to obtain a first test image, whether the first test image meets a first expected display condition is determined based on a preset first standard image; if the first test image meets the first expected display condition, a second drive signal is sent to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second drive signal to enter the second display interface; after performing a screenshot operation on the second display interface to obtain a second test image, whether the second test image meets a second expected display condition is determined based on a preset second standard image; if the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the step of sending a power-on signal to the vehicle computer to be tested is returned to, until the number of loops reaches a preset number of iterations.
[0065] In one embodiment, when the processor executes the program instructions to implement the step of determining whether the first test image meets the first expected display condition based on the preset first standard image, the processor specifically implements the following steps: Perform pixel comparison on the first test image according to the first standard image to obtain a first pixel contrast value; determine whether the first pixel contrast value is within a first standard range in the first expected display condition; if the first pixel contrast value is within the first standard range, determine that the first test image meets the first expected display condition; if the first pixel contrast value is not within the first standard range, determine that the first test image does not meet the first expected display condition.
[0066] In one embodiment, after executing the program instructions to implement the step of determining that the first test image does not meet the first expected display condition if the first pixel contrast value is not within the first standard range, the processor further implements the following steps: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the first display interface.
[0067] In one embodiment, after executing the program instructions to terminate the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface, the processor further implements the following steps: A first error log file including the exception type, the time when the exception occurred, and the first test image is generated and sent to a designated contact person.
[0068] In one embodiment, when the processor executes the program instructions to implement the step of determining whether the second test image meets the second expected display condition based on the preset second standard image, the processor specifically implements the following steps: Perform pixel comparison on the second test image according to the second standard image to obtain a second pixel contrast value; determine whether the second pixel contrast value is within a second standard range of the second expected display condition; if the second pixel contrast value is within the second standard range, determine that the second test image meets the second expected display condition; if the second pixel contrast value is not within the second standard range, determine that the second test image does not meet the second expected display condition.
[0069] In one embodiment, after executing the program instructions to implement the step of determining that the second test image does not meet the second expected display condition if the second pixel contrast value is not within the second standard range, the processor further implements the following steps: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the second display interface.
[0070] In one embodiment, after executing the program instructions to terminate the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface, the processor further implements the following steps: A second error log file including the exception type, the time when the exception occurred, and the second test image is generated and sent to a designated contact person.
[0071] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0072] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0073] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0074] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0075] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the portion 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, stored in a storage medium, includes instructions for enabling a computer device (such as a personal computer, terminal, or network device) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0076] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. An automated testing method for a vehicle screen that is not touched after waking up from sleep mode, characterized in that: The method is applied to a controller of an automated test system, wherein the controller is connected to at least one component to be tested through a network, wherein the component to be tested includes a vehicle computer to be tested and a relay electrically connected to the vehicle computer to be tested. The method includes: sending a power-on signal to the vehicle computer to be tested, and sending a first drive signal to the first automated interactive tool via the relay after a preset waiting time, so that the first automated interactive tool performs a corresponding click operation according to the received first drive signal to enter the first display interface; After performing a screenshot operation on the first display interface to obtain a first test image, determining whether the first test image meets a first expected display condition based on a preset first standard image; If the first test image satisfies the first expected display condition, sending a second driving signal to the second automated interactive tool through the relay, so that the second automated interactive tool performs a corresponding click operation according to the received second driving signal to enter the second display interface; After performing a screenshot operation on the second display interface to obtain a second test image, determining whether the second test image meets a second expected display condition based on a preset second standard image; If the second test image meets the second expected display condition, a sleep signal is sent to the vehicle computer to be tested, and after a preset sleep time, the process returns to the step of sending a power-on signal to the vehicle computer to be tested until the number of cycles reaches a preset number of iterations.
2. The touch-free automated testing method for a vehicle screen after waking up from sleep mode according to claim 1 is characterized in that: The determining, based on a preset first standard image, whether the first test image meets a first expected display condition includes: performing pixel comparison on the first test image according to the first standard image to obtain a first pixel contrast value; determining whether the first pixel contrast value is within a first standard range of the first expected display condition; If the first pixel contrast value is within the first standard range, determining that the first test image meets the first expected display condition; If the first pixel contrast value is not within the first standard range, it is determined that the first test image does not meet the first expected display condition.
3. The touch-free automated testing method for a vehicle screen after waking up from sleep mode according to claim 2 is characterized in that: After determining that the first test image does not meet the first expected display condition if the first pixel contrast value is not within the first standard range, the method further includes: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the first display interface.
4. The touch-free automated testing method for a vehicle computer screen after waking up from sleep mode according to claim 3 is characterized in that: After terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the first display interface, the method further includes: A first error log file including the exception type, the time when the exception occurred, and the first test image is generated and sent to a designated contact person.
5. The touch-free automated testing method for a vehicle computer screen after waking up from sleep mode according to claim 1 is characterized in that: The determining, based on a preset second standard image, whether the second test image meets a second expected display condition includes: performing pixel comparison on the second test image according to the second standard image to obtain a second pixel contrast value; determining whether the second pixel contrast value is within a second standard range of the second expected display condition; If the second pixel contrast value is within the second standard range, determining that the second test image meets the second expected display condition; If the second pixel contrast value is not within the second standard range, it is determined that the second test image does not meet the second expected display condition.
6. The touch-free automated testing method for a vehicle computer screen after waking up from sleep mode according to claim 5 is characterized in that: After determining that the second test image does not meet the second expected display condition if the second pixel contrast value is not within the second standard range, the method further includes: Terminate the currently running program process and control the vehicle computer to be tested to maintain the display state of the second display interface.
7. The touch-free automated testing method for a vehicle computer screen after waking up from sleep mode according to claim 6 is characterized in that: After terminating the currently running program process and controlling the vehicle computer to be tested to maintain the display state of the second display interface, the method further includes: A second error log file including the exception type, the time when the exception occurred, and the second test image is generated and sent to a designated contact person.
8. An automatic testing device for the touch-free vehicle screen after waking up from sleep mode, characterized in that: The device is configured in a controller of an automated testing system, the controller being connected to at least one component to be tested through a network, the component to be tested comprising a vehicle computer to be tested and a relay electrically connected to the vehicle computer to be tested, and the device comprising: a first sending unit, configured to send a power-on signal to the vehicle computer to be tested, and after a predetermined waiting time, send a first driving signal to the first automated interactive tool via the relay, so that the first automated interactive tool performs a corresponding click operation according to the received first driving signal to enter the first display interface; a first judging unit, configured to, after performing a screenshot operation on the first display interface to obtain a first test image, judge whether the first test image satisfies a first expected display condition based on a preset first standard image; a second sending unit, configured to send a second driving signal to a second automated interactive tool through the relay if the first test image satisfies a first expected display condition, so that the second automated interactive tool performs a corresponding click operation according to the received second driving signal to enter a second display interface; a second judging unit, configured to, after performing a screenshot operation on the second display interface to obtain a second test image, judge whether the second test image satisfies a second expected display condition based on a preset second standard image; The third sending unit is used to send a sleep signal to the vehicle computer to be tested if the second test image meets the second expected display condition, and return to the step of sending a power-on signal to the vehicle computer to be tested after a preset sleep time, until the number of cycles reaches a preset number of iterations.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the automated testing method for detecting that the vehicle screen is not touched after waking up from sleep mode according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by the processor, the processor executes the automatic testing method for the touch-free vehicle screen after waking up from sleep as described in any one of claims 1 to 7.