Power consumption test method and device

Through the auxiliary machine, the communication between the upper computer and the test machine is realized, and the identification mechanism of the start code and the end code is used to control the power supply of the test power supply and read the power consumption data in real time. This solves the problems of insufficient automation of the existing power consumption testing methods, difficulty in obtaining real-time data and difficulty in realizing non-invasive testing, and realizes efficient, flexible and accurate power consumption testing.

CN119902947APending Publication Date: 2025-04-29GUANGDONG RUIQIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411986447.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing power consumption testing methods have problems such as insufficient automation, difficulty in obtaining real-time data and difficulty in implementing non-invasive testing, resulting in low testing efficiency, poor operation flexibility and low result accuracy.

Method used

By setting up an auxiliary machine, the communication between the upper computer and the test machine is realized. The test machine generates and displays the start code and the end code. The auxiliary machine shoots and transmits images to the upper computer for identification. The upper computer controls the auxiliary machine to send a test signal and controls the test power supply to read the power consumption data of the test machine in real time.

Benefits of technology

It realizes automated, real-time acquisition of test data and non-invasive power consumption testing, improving testing efficiency, operation flexibility and result accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902947A_ABST
    Figure CN119902947A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption test method and device. The test method comprises the steps that a test machine starts a test program and generates and displays a start code; the auxiliary machine shoots the start code and sends the start code to the upper computer; if the upper computer identifies the start code, the auxiliary machine is controlled to send out a test starting signal, and power consumption data of the test machine is controlled to be read in real time; if the test machine receives the test starting signal, executing a use case script in the test program; after executing the case script, the test machine generates an end code and displays the end code; the auxiliary machine shoots the end code and sends a shot image to the upper computer; and the upper computer identifies the received image, and if the received image is identified as an end code, power consumption data of the test power supply is acquired. According to the power consumption test method, the power consumption test can be automatically carried out, test data can be obtained in real time, the non-intrusive power consumption test is realized, and the test efficiency, the operation flexibility and the result accuracy of the power consumption test are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power consumption testing, and in particular to a power consumption testing method and device. Background Art

[0002] Mobile terminals such as mobile phones and tablets are required to undergo power consumption tests: operate the device in various major usage scenarios, collect the device's power consumption data through instruments, and then analyze and determine whether the device's power consumption meets the standards by summarizing the power consumption data.

[0003] The traditional power consumption test method is based on the connection, operation mode and manual participation of test machines, test instruments and other equipment. There are three specific methods:

[0004] Method A: Figure 1 As shown, the mobile phone is manually operated to execute the test case scenario and process, the power data of the mobile phone is manually read, and the read data is manually summarized. However, the disadvantage of method A is that the tester needs to participate in the whole process, the test efficiency is low, it is easy to make mistakes, and the operation consistency of each tester is not high, which easily leads to unreliable test results.

[0005] Method B: Figure 2 As shown, the host computer controls the mobile phone to execute corresponding instructions through ADB command communication to run the test case scenario and process. At the same time, the test instrument is controlled to collect the power data of the mobile phone, and the test data is automatically analyzed and judged after the power consumption test is completed, thereby realizing the fully automated test of the host computer. However, the disadvantage of method B is that the mobile phone is directly connected to the host computer, which may have the side effect of USB charging or WiFi connection loss, and there is additional command communication loss, which interferes with the accuracy of the power consumption result. In addition, in some scenarios (such as call recording), it is impossible to use ADB to control, which will cause the command to be invalid.

[0006] Method C: Figure 3 As shown in the figure, by developing an Android application (APP) to realize the setting of the test scene and the advancement of the test process, it can be automatically started and run on the test mobile phone, and the power data of the test mobile phone is collected by the host computer. After the test is completed, the use case operation data is manually exported from the test mobile phone to the host computer, and then the test results are analyzed and judged in combination with the collected instrument data. In this way, there is no side effect of USB charging and communication loss. However, the disadvantage of method C is that it is impossible to view the use case execution status in real time to analyze and judge the test results. After the test task starts, it cannot be paused or resumed, and manual data aggregation is required after the test is completed. The flexibility of the test operation is not high, and it is not suitable for long-term and multi-use case test tasks. Summary of the invention

[0007] The purpose of the present invention is to provide a power consumption test method and device, which can realize automatic and real-time acquisition of test data and non-intrusive power consumption testing, and effectively improve the test efficiency, operation flexibility and result accuracy of the power consumption test.

[0008] In order to achieve the above object, the present invention discloses a power consumption testing method, which comprises:

[0009] The test machine starts the test program and generates and displays a start code;

[0010] The auxiliary machine captures the start code and sends the captured image to the host computer;

[0011] The host computer recognizes the received image. If it is recognized as a start code, it controls the auxiliary machine to send a start test signal, controls the test power supply to supply power to the test machine, and reads the power consumption data of the test machine in real time;

[0012] The test machine determines whether the signal receiver set by the test machine receives the start test signal, and if the start test signal is received, executes the use case script in the test program;

[0013] After executing the test case script, the test machine generates an end code and displays it;

[0014] The auxiliary machine captures the end code and sends the captured image to the host computer;

[0015] The host computer recognizes the received image, and if it is recognized as an end code, it obtains the power consumption data of the test machine read by the test power supply.

[0016] Furthermore, the test start signal is a bright light emitted by the host computer controlling the auxiliary machine, the signal receiver is a screen display component provided on the test machine, and the “test machine determines whether the signal receiver provided therein receives the test start signal” includes:

[0017] The test machine reads the brightness value of the screen display component;

[0018] The test machine determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a start test signal is received.

[0019] Furthermore, after the “the host computer identifies the received image and, if it is identified as an end code, obtains the power consumption data of the test machine read by the test power supply”, it also includes:

[0020] The host computer reads the operation instruction and determines whether the operation instruction is to continue the test. If it is determined to continue the test, the host computer controls the auxiliary machine to send a signal to continue the test.

[0021] The test machine determines whether the signal receiver set by it receives the continue test signal. If the continue test signal is received, the next use case script in the test program is executed.

[0022] Furthermore, the test continuation signal is a bright light emitted by the host computer controlling the auxiliary machine, the signal receiver is a screen display component provided on the test machine, and the “test machine determines whether the signal receiver provided therein receives the test continuation signal” includes:

[0023] The test machine reads the brightness value of the screen display component;

[0024] The test machine determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a continue test signal is received.

[0025] Furthermore, after the “the host computer identifies the received image and, if it is identified as an end code, obtains the power consumption data of the test machine read by the test power supply”, it also includes:

[0026] The host computer reads the operation instruction and determines whether the operation instruction is to stop the test. If it is determined to stop the test, the test power supply is controlled to stop supplying power to the test machine.

[0027] Furthermore, before the “controlling the test power supply to supply power to the test machine”, the method further includes:

[0028] Record the start time of executing the current use case script;

[0029] Before the step of “obtaining the power consumption data of the test machine read by the test power supply”, the method further includes:

[0030] Record the end time of executing the current use case script;

[0031] The “obtaining the power consumption data of the test machine read by the test power supply” further includes:

[0032] The power consumption data of the test machine read during the corresponding time of the test power supply is acquired according to the recorded start time and end time.

[0033] Further, the “auxiliary machine photographs the start code” and / or the “auxiliary machine photographs the end code” includes:

[0034] The auxiliary machine takes pictures of the test machine's screen in a cycle at a set time.

[0035] In order to achieve the above-mentioned purpose, the present invention also discloses a power consumption testing device, which includes: a testing machine, an auxiliary machine, a host computer and a testing power supply, wherein the testing machine, the auxiliary machine, the host computer and the testing power supply are used to execute the power consumption testing method as mentioned above.

[0036] The present invention realizes the communication between the host computer and the test machine by setting an auxiliary machine. When the test machine starts the test program, it will generate and display a start code. The auxiliary machine will take a picture of the start code and send it to the host computer for identification. If the host computer recognizes it as a start code, it will control the auxiliary machine to send a start test signal, and control the test power supply to supply power to the test machine and read the power consumption data of the test machine in real time. The test machine receives the start test signal through the signal receiver set by it. After receiving the start test signal, the test machine will start to execute the use case script in the test program, and generate an end code for display after execution. The auxiliary machine takes a picture of the end code and sends it to the host computer for identification. If the host computer recognizes it as an end code, the power consumption data of the test machine read by the test power supply is obtained. The above-mentioned cooperation between the auxiliary machine, the host computer and the test machine can realize automatic and real-time acquisition of test data and non-invasive power consumption testing, effectively improving the test efficiency, operation flexibility and result accuracy of power consumption testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a structural diagram of the existing power consumption test method A.

[0038] Figure 2 It is a structural diagram of the existing power consumption test method B.

[0039] Figure 3 It is a structural diagram of the existing power consumption test method C.

[0040] Figure 4 The figure is a flow chart of a power consumption testing method according to an embodiment of the present invention.

[0041] Figure 5 The figure is a schematic diagram of the structure of a power consumption test device according to an embodiment of the present invention.

[0042] Figure 6 4 is a system diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0044] Embodiment 1

[0045] See also Figure 4 and Figure 5 The present invention discloses a power consumption test method, which comprises:

[0046] 101. The test machine 201 starts the test program and generates and displays a start code;

[0047] It can be understood that the test machine 201 is installed with a developed use case script APP, which is used to run various specified preconditions and test scenarios when testing power consumption. Specifically, in this embodiment, the start code is a QR code with a start state. When performing power consumption testing, first start the use case script APP, and select and determine the corresponding use case to be tested. The test machine 201 will display the start code on the screen and enter a waiting state, but is not limited to this.

[0048] 102. The auxiliary machine 202 shoots a start code and sends the shot image to the host machine 203;

[0049] Furthermore, the “secondary machine 202 shooting start code” includes:

[0050] 1021. The auxiliary machine 202 takes photos of the screen of the testing machine 201 in a cycle according to the set time.

[0051] 103. The host computer 203 identifies the received image. If it is identified as a start code, it controls the auxiliary machine 202 to send a start test signal, and controls the test power supply 204 to supply power to the test machine 201 and read the power consumption data of the test machine 201 in real time;

[0052] By using the host computer 203 and the auxiliary computer 202 to cooperate with the test computer 201 to implement standardized power consumption test case scenarios and processes, the consistency of power consumption testing can be effectively achieved and the test efficiency can be improved.

[0053] It should be noted that the test machine 201 and the auxiliary machine 202 are placed horizontally or vertically through a bracket, and the rear camera of the auxiliary machine 202 is ensured to capture the complete content displayed on the screen of the test machine 201. The host computer 203 is connected to the auxiliary machine 202 via a USB cable, and realizes data interaction with the auxiliary machine 202 through ADB.

[0054] It is understandable that after the host computer 203 starts the test software, it controls the rear camera of the auxiliary machine 202 to continuously shoot the content displayed on the current screen of the test machine 201 at a cycle of once every five seconds, and transmits the shot pictures back to the host computer 203 so that the host computer 203 can recognize them. If the host computer 203 recognizes that the picture contains an information QR code, the QR code is parsed. If the analysis obtains a start task signal, the host computer 203 controls the auxiliary machine 202 to turn on the flashlight, that is, sends a start signal for executing the use case, and is not limited to this.

[0055] It can be understood that the power consumption data includes the voltage data and current data of the test machine 201. The test power supply 204 is a programmable power supply and is connected to the test machine 201. After receiving the start-up command from the host computer 203, the programmable power supply is started according to the relevant configuration to supply power to the test machine 201 and measure the voltage and current of the mobile phone in real time, but is not limited to this.

[0056] 104. The test machine 201 determines whether the signal receiver set therein receives a start test signal. If the start test signal is received, the test machine 201 executes the use case script in the test program.

[0057] Furthermore, the test start signal is a bright light emitted by the host computer 203 to control the auxiliary machine 202, and the signal receiver is a screen display component set on the test machine 201. "The test machine 201 determines whether the signal receiver set by it receives the test start signal" includes:

[0058] 1041. The testing machine 201 reads the brightness value of the screen display component;

[0059] 1042. The test machine 201 determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a start test signal is received.

[0060] In addition to executing the use case script, the test machine 201 has no other active communication behavior. Instead, it communicates with the host computer 203 through the camera shooting and flashlight switching of the auxiliary machine 202. The advantage of indirect communication is that the power loss of communication is transferred to the auxiliary machine 202, thereby eliminating the additional power consumption error caused by automation.

[0061] It can be understood that the screen display component includes a screen, a brightness adjustment module and a photosensitive element. When the upper computer 203 controls the auxiliary machine 202 to turn on the flashlight, the brightness adjuster module will lower the brightness parameters of the screen according to the external environment brightness sensed by the photosensitive element. After the test machine 201 enters the waiting state, it will execute operations 1041 and 1042 in real time, waiting for the continue signal of the auxiliary machine 202. If it is monitored that the brightness parameters of the screen are reduced, it means that the surrounding ambient light intensity has increased, that is, the auxiliary machine 202 sends a test start signal, then the test machine 201 starts to execute each corresponding use case script in sequence, but is not limited to this.

[0062] 105. After executing the use case script, the test machine 201 generates an end code and displays it;

[0063] It should be noted that in this embodiment, the end code is also a QR code. After each use case script is executed, the use case script APP of the test machine 201 will generate an end code based on the number of the use case script and the test results obtained by executing the use case script, and display it on the screen of the test machine 201, and is not limited to this.

[0064] 106. The auxiliary machine 202 shoots the end code and sends the shot image to the host machine 203;

[0065] Furthermore, the "secondary machine 202 shooting end code" includes:

[0066] 1061. The auxiliary machine 202 takes photos of the screen of the testing machine 201 in a cycle according to the set time.

[0067] It can be understood that the setting of operation 1061 is consistent with that of operation 1021. Please refer to the explanation of the above operation 1021 for details, which will not be repeated here.

[0068] Furthermore, after “the host computer 203 identifies the received image and, if the image is identified as an end code, obtains the power consumption data of the test machine 201 read by the test power supply 204”, it also includes:

[0069] 107. The host computer 203 reads the operation instruction and determines whether the operation instruction is to continue the test. If it is determined to continue the test, the host computer 203 controls the auxiliary computer 202 to send a signal to continue the test.

[0070] 108. The test machine 201 determines whether the signal receiver configured therein receives a continue test signal. If a continue test signal is received, the next use case script in the test program is executed.

[0071] Only the interval is set between use cases, and the QR code is displayed and the screen brightness is read. The impact of these operations on the power consumption data is negligible, which is conducive to the implementation of high-precision automated testing of mobile phone power consumption.

[0072] Furthermore, the continuing test signal is a bright light emitted by the host computer 203 to control the auxiliary machine 202, and the signal receiver is a screen display component set on the test machine 201, and "the test machine 201 determines whether the signal receiver set by it receives the continuing test signal" includes:

[0073] 1081. The testing machine 201 reads the brightness value of the screen display component;

[0074] 1082. The test machine 201 determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a continue test signal is received.

[0075] 109 . The host computer 203 identifies the received image. If the image is identified as an end code, the host computer 203 obtains the power consumption data of the test machine 201 read by the test power supply 204 .

[0076] Furthermore, after “the host computer 203 identifies the received image and, if the image is identified as an end code, obtains the power consumption data of the test machine 201 read by the test power supply 204”, it also includes:

[0077] 110. The host computer 203 reads the operation instruction and determines whether the operation instruction is to stop the test. If it is determined to stop the test, the test power supply 204 is controlled to stop supplying power to the test machine 201.

[0078] By acquiring the data and execution status of the test machine 201 in real time through the upper computer 203, it is possible to analyze and determine the results of the test machine 201 executing the use case script in real time, and to pause and resume the test of the test machine 201 after the execution of a use case script is completed, thereby realizing temporary manual intervention. It has strong flexibility and is suitable for long-term testing of multiple use cases.

[0079] It is understandable that after the test machine 201 executes each use case script of the power consumption test, it is necessary to input an operation instruction to continue the test or stop the test to the software of the upper computer 203, so that the upper computer 203 can identify and determine whether to continue the power consumption test or pause the power consumption test, and determine whether to execute operation 107 or operation 110, and then decide whether to control the auxiliary machine 202 to turn on the light, so as to realize the control of pausing or resuming the power consumption test task.

[0080] It is understandable that after executing operation 108 to start executing the next use case script, the testing machine 201 will return to executing operation 105, but the present invention is not limited thereto.

[0081] It is understandable that the test power supply 204 will suspend power output to the test machine 201 according to the stop command sent by the host computer 203 .

[0082] Furthermore, before “obtaining the power consumption data of the test machine 201 read by the test power supply 204”, it also includes:

[0083] Before “controlling the test power supply 204 to supply power to the test machine 201”, it also includes:

[0084] 111. Record the start time of executing the current use case script;

[0085] Before “obtaining the power consumption data of the test machine 201 read by the test power supply 204”, it also includes:

[0086] 112. Record the end time of executing the current use case script;

[0087] “Obtaining power consumption data of the test machine 201 read by the test power supply 204” also includes:

[0088] 113. Obtain the power consumption data of the test machine 201 read within the corresponding time of the test power supply 204 according to the recorded start time and end time.

[0089] It can be understood that after identifying the start code and the end code, the upper computer 203 will record the corresponding time respectively, and obtain the data recorded by the test power supply 204 in the corresponding time period by recording the start time and the end time of executing each use case script, so as to obtain the power consumption data of the test machine 201 in the process of executing each use case script when performing the power consumption test task.

[0090] The test machine 201 and the host computer 203 are not connected via USB or WiFi, but use the auxiliary machine 202 as an intermediate device, and use the software functions of photosensitive sensors, camera shooting, flash light and adaptive adjustment of screen brightness to realize indirect communication between the host computer 203 and the test machine 201. The communication overhead of such a new non-invasive test method has extremely low impact on the additional power consumption of the test machine 201, and basically has no additional interference with the power consumption test results of the test machine 201. It effectively avoids the side effects and communication losses of the direct connection mode between the host computer 203 and the test machine 201, and can be applied to the test fields of mobile phone power consumption, battery life, temperature rise, etc., to achieve high-precision testing and reduce the error of power consumption testing.

[0091] In addition, the power consumption data of the test machine 201 collected by the test power supply 204 during the execution phase of each use case can also be obtained in real time, realizing functions such as real-time measurement and real-time monitoring.

[0092] The present invention realizes communication between the host computer 203 and the test machine 201 by setting up an auxiliary machine 202. When the test machine 201 starts the test program, it will generate and display a start code. The auxiliary machine 202 will capture the start code and send it to the host computer 203 for identification. If the host computer 203 recognizes it as a start code, it will control the auxiliary machine 202 to send a start test signal, and control the test power supply 204 to supply power to the test machine 201 and read the power consumption data of the test machine 201 in real time. The test machine 201 receives the start test signal through the signal receiver set by it. After receiving the start test signal, the test machine 201 will start to execute the use case script in the test program, and generate an end code for display after execution. The auxiliary machine 202 captures the end code and sends it to the host computer 203 for identification. If the host computer 203 recognizes it as an end code, it obtains the power consumption data of the test machine 201 read by the test power supply 204. By performing the above cooperation among the auxiliary machine 202, the host computer 203 and the test machine 201, it is possible to realize automatic and real-time acquisition of test data and non-intrusive power consumption testing, thereby effectively improving the test efficiency, operational flexibility and result accuracy of the power consumption test.

[0093] Embodiment 2

[0094] See also Figure 4 and Figure 5 The present invention discloses a power consumption test device, which comprises:

[0095] Test machine 201, auxiliary machine 202, host computer 203 and test power supply 204,

[0096] The test machine 201 , the auxiliary machine 202 , the host computer 203 and the test power supply 204 are used to execute the power consumption test method according to any one of claims 1 to 7 .

[0097] Embodiment 3

[0098] See also Figure 4 and Figure 6 , the present invention discloses an electronic device, comprising:

[0099] One or more processors 301;

[0100] One or more memories 302 are used to store one or more programs. When the one or more programs are executed by the processor, the processor implements the power consumption test method as described above.

[0101] Embodiment 4

[0102] An embodiment of the present application discloses a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the power consumption test method as described above is implemented.

[0103] Embodiment 5

[0104] The embodiment of the present application discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of an electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device performs the above-mentioned power consumption test method.

[0105] It should be understood that in the embodiments of the present application, the processor referred to may be a central processing unit (CPU), and the processor may also 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. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by hardware related to computer program instructions, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0107] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.

Claims

1. A power consumption test method, characterized in that: include: The test machine starts the test program and generates and displays a start code; The auxiliary machine captures the start code and sends the captured image to the host machine; The host computer recognizes the received image. If it is recognized as a start code, it controls the auxiliary machine to send a start test signal, controls the test power supply to supply power to the test machine, and reads the power consumption data of the test machine in real time; The test machine determines whether the signal receiver set by the test machine receives the start test signal, and if the start test signal is received, executes the use case script in the test program; After executing the test case script, the test machine generates an end code and displays it; The auxiliary machine captures the end code and sends the captured image to the host computer; The host computer recognizes the received image, and if it is recognized as an end code, it obtains the power consumption data of the test machine read by the test power supply.

2. The power consumption test method according to claim 1, characterized in that: The test start signal is a bright light emitted by the host computer control auxiliary machine, the signal receiver is a screen display component set on the test machine, and the "test machine determines whether the signal receiver set by it receives the test start signal" includes: The test machine reads the brightness value of the screen display component; The test machine determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a start test signal is received.

3. The power consumption test method according to claim 1, characterized in that: After the above-mentioned "the host computer recognizes the received image, and if it is recognized as an end code, obtains the power consumption data of the test machine read by the test power supply", it also includes: The host computer reads the operation instruction and determines whether the operation instruction is to continue the test. If it is determined to continue the test, the host computer controls the auxiliary machine to send a signal to continue the test. The test machine determines whether the signal receiver set by it receives the continue test signal. If the continue test signal is received, the next use case script in the test program is executed.

4. The power consumption test method according to claim 3, characterized in that: The test continuation signal is a bright light emitted by the host computer control auxiliary machine, the signal receiver is a screen display component set on the test machine, and the "test machine determines whether the signal receiver set by it receives the test continuation signal" includes: The test machine reads the brightness value of the screen display component; The test machine determines whether the read brightness value decreases. If the brightness value decreases, it is determined that a continue test signal is received.

5. The power consumption test method according to claim 1, characterized in that: After the above-mentioned "the host computer recognizes the received image, and if it is recognized as an end code, obtains the power consumption data of the test machine read by the test power supply", it also includes: The host computer reads the operation instruction and determines whether the operation instruction is to stop the test. If it is determined to stop the test, the test power supply is controlled to stop supplying power to the test machine.

6. The power consumption test method according to claim 1, characterized in that: Before the "controlling the test power supply to supply power to the test machine", it also includes: Record the start time of executing the current use case script; Before the "obtaining the power consumption data of the test machine read by the test power supply", it also includes: Record the end time of executing the current use case script; The "obtaining the power consumption data of the test machine read by the test power supply" also includes: The power consumption data of the test machine read during the corresponding time of the test power supply is acquired according to the recorded start time and end time.

7. The power consumption test method according to claim 1, characterized in that: The “auxiliary machine photographs the start code” and / or the “auxiliary machine photographs the end code” include: The auxiliary machine takes pictures of the test machine's screen in a cycle at a set time.

8. A power consumption test device, characterized in that: include: Test machine, auxiliary machine, host computer and test power supply, The test machine, the auxiliary machine, the host computer and the test power supply are used to execute the power consumption test method as described in any one of claims 1 to 7.

9. An electronic device, comprising: One or more processors 301; One or more memories 302 are used to store one or more programs. When the one or more programs are executed by the processor, the processor implements the power consumption testing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the power consumption testing method according to any one of claims 1 to 7 is implemented.