Power consumption test method and device, electronic equipment and storage medium

By using a test computer to automatically select test scenarios and automated data acquisition in baseband power consumption testing, the inefficiency and accuracy problems caused by manual intervention in the prior art are solved, and a more efficient and reliable testing process is achieved.

CN119310327APending Publication Date: 2025-01-14SHANGHAI WINGTECH INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411343617.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing baseband power consumption testing methods require manual switching of test scenarios and recording current data, which are inefficient and inaccurate, limiting the time flexibility of the test and the reliability of the results.

Method used

Through the test computer, automatically selects the test scenario, obtains control information and sends operation instructions, and combines the USB switching box and SIM card plug-in and unplugging equipment to realize automated current data collection, reduces manual intervention, and improves testing efficiency and accuracy.

Benefits of technology

It realizes automation of baseband power consumption testing, improves test efficiency and result accuracy, reduces manual errors, can be tested during abnormal working hours, and improves testing flexibility and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119310327A_ABST
    Figure CN119310327A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a power consumption test method and device, electronic equipment and a storage medium, the power consumption test method and device are applied to a test computer in a power consumption test system, at least two different test scenes are pre-stored in the test computer, and the method comprises the steps that control information of a scene corresponding to equipment to be tested is obtained, the control information comprises control position information, and different scenes correspond to different controls; selecting a target test scene from the test scene, wherein the target test scene is a scene corresponding to any control; an operation instruction for a target control corresponding to the target test scene is sent to the to-be-tested device, the operation instruction is used for instructing the to-be-tested device to open the target test scene, and the operation instruction comprises position information of the target control; and acquiring current data of the to-be-tested equipment in the target test scene from the test instrument, thereby simplifying the power consumption test process and improving the power consumption test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a power consumption testing method, device, electronic device and storage medium. Background Art

[0002] In related technologies, baseband power consumption testing usually requires connecting a mobile phone to a current measuring instrument. This process requires manual switching of different test scenarios on the mobile phone, such as making calls, surfing the Internet, and streaming video. After each switch, the current data is checked on the test computer to determine the test results.

[0003] Therefore, how to simplify the testing process and improve the efficiency and accuracy of baseband power consumption testing is an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide a power consumption testing method, device, electronic device and storage medium, which can simplify the baseband power consumption testing process, improve the efficiency and accuracy of the baseband power consumption testing, and further enhance the user experience.

[0005] A first aspect of the present application provides a power consumption test method, which is applied to a test computer in a power consumption test system, wherein the power consumption test system further includes a test meter, wherein the test computer and the test meter are respectively connected to a device to be tested, and at least two different test scenarios are pre-stored in the test computer, wherein the method includes:

[0006] Obtaining control information of the scene corresponding to the device to be tested, wherein the control information includes control position information, and different scenes correspond to different controls;

[0007] Select a target test scene from the test scenes, the target test scene being a scene corresponding to any control;

[0008] Sending an operation instruction for a target control corresponding to the target test scenario to the device under test, wherein the operation instruction is used to instruct the device under test to open the target test scenario, and the operation instruction includes location information of the target control;

[0009] The current data of the device to be tested in the target test scenario is obtained from the test meter.

[0010] In some embodiments, obtaining current data of the device to be tested in the target test scenario from the test meter includes:

[0011] Sending a test instruction to the test instrument, wherein the test instruction is used to instruct the test instrument to test the current data of the device to be tested in the target test scenario;

[0012] A current data acquisition instruction is sent to the test instrument, where the current data acquisition instruction is used to acquire the current data of the device to be tested within a preset time period under the target test scenario.

[0013] In some embodiments, the power consumption test system further includes: a USB switch box, the test computer and the device to be tested are connected via the USB switch box, and before sending the test instruction to the test instrument, the method further includes:

[0014] The test computer sends a disconnection instruction to the port of the USB switch box to control the USB switch box to disconnect the communication connection between the test computer and the device to be tested.

[0015] In some embodiments, after obtaining from the test meter the current data of the device to be tested by the test meter in the target test scenario, the method further includes:

[0016] The test computer sends a communication connection instruction to the port of the USB switch box, and the communication connection instruction is used for the communication connection between the test computer and the device to be tested.

[0017] In some embodiments, the power consumption test system further includes: a SIM card plug-in device, the device to be tested is connected to the test computer via the SIM card plug-in device, a SIM card using a different wireless communication standard is inserted into the SIM card plug-in device, the test computer pre-stores data transmission configuration parameters corresponding to the card slots of the SIM cards using the different wireless communication standards, and the method further includes:

[0018] The test computer sends an instruction containing identification information of the target SIM card to control the SIM card insertion device to switch to the target SIM card, wherein the target SIM card is any SIM card inserted into the SIM card insertion device that is different from the SIM card currently used for communication;

[0019] The test instruction is sent to the test meter to measure the current data of the device to be tested when communicating in the mode of the target SIM card.

[0020] In some embodiments, the target SIM card includes at least one standard, the target test scenario is a standard switching scenario corresponding to a target standard control, the target standard is a standard corresponding to any control, and sending an operation instruction for a target control corresponding to the target test scenario to the device to be tested, the operation instruction being used to instruct the device to be tested to open the target test scenario, includes: sending an operation instruction for a target control corresponding to the target standard to the device to be tested, the operation instruction being used to instruct the device to be tested to open the target standard, and the operation instruction including location information of the target control.

[0021] In some embodiments, the control information includes text and / or a control ID, and the control ID and the text correspond to the location information of the control; the operation instruction includes the location information of the target control corresponding to the control information text of the target control or the location information of the target control corresponding to the target control ID.

[0022] A second aspect of the present application provides a power consumption test method, which is applied to the device to be tested in a power consumption test system, wherein the power consumption test system further includes: a test computer and a test instrument, wherein the test computer and the test instrument are respectively connected to the device to be tested, and the method includes:

[0023] Sending control information of the scenes included in the device to be tested to the test computer, wherein the control information includes control position information, and different scenes correspond to different controls;

[0024] Receive an operation instruction for a target control corresponding to the target test scenario sent by the test computer, and execute the operation instruction, wherein the operation instruction is used to instruct the device to be tested to open the target test scenario, the operation instruction includes location information of the target control, and the target test scenario is any scene included in the scene of the device to be tested.

[0025] A third aspect of the present application provides an electronic device, the electronic device comprising:

[0026] processor;

[0027] a memory for storing instructions executable by the processor;

[0028] Among them, the processor is configured to execute the instructions to implement the power consumption testing method as described in any embodiment of the first aspect and the second aspect of the present application.

[0029] The fourth aspect embodiment of the present application proposes a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the power consumption testing method described in any embodiment of the first aspect embodiment or the second aspect embodiment of the present application are implemented.

[0030] The technical solution provided by the embodiment of the present application includes at least the following beneficial effects:

[0031] The power consumption testing method provided in the embodiment of the present application automatically selects the test scenario through the test computer. The test computer can send a control instruction corresponding to the target test scenario through the control position corresponding to the control information of the test scenario, thereby simulating manual automatic switching of test scenarios, reducing the time-consuming, labor-intensive and inefficient manual work during baseband power consumption testing, thereby improving the efficiency of power consumption testing, and at the same time solving problems that may exist in the testing process and improving the accuracy of the results. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1-1 is a schematic diagram of a system architecture of a power consumption testing method provided in an embodiment of the present application;

[0033] Figure 1-2 is a schematic diagram of a system architecture of another power consumption testing method provided in an embodiment of the present application;

[0034] Figure 2 It is a flowchart of a power consumption testing method provided in an embodiment of the present application;

[0035] Figure 3 It is a flowchart of another power consumption testing method provided in an embodiment of the present application;

[0036] Figure 4 It is a flowchart of another power consumption testing method provided in an embodiment of the present application;

[0037] Figure 5 It is a flowchart of another power consumption testing method provided in an embodiment of the present application;

[0038] Figure 6 It is a schematic block diagram of a device for a power consumption testing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0040] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first instruction and the second instruction are to distinguish different user instructions, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.

[0041] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0042] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0043] In the research and development and production of modern communication equipment, baseband power consumption testing plays a vital role because it is directly related to the energy efficiency performance of the product and its competitiveness in the market. This test is specifically aimed at the baseband processing unit in mobile communication equipment, and is designed to accurately measure and evaluate the power consumed by the unit when performing its functions. By simulating different communication scenarios and workloads, using specialized test equipment and software, engineers can measure the power consumption of the device under various conditions. Such testing is not only crucial for optimizing battery life and improving device energy efficiency, but also ensures that the product can meet strict energy efficiency standards. In addition, baseband power consumption testing helps engineers identify and solve power consumption-related issues, thereby optimizing product design, improving user experience, and ensuring that products comply with all relevant energy efficiency regulations and standards before being brought to market, which is crucial to the long-term success and user satisfaction of the product.

[0044] Baseband is a term used in communication systems to refer to the lowest frequency portion of a signal, i.e., the original signal that has not been modulated to a higher frequency. In mobile communications, baseband processing includes digital processing of wireless signals, such as encoding, decoding, modulation, and demodulation, to facilitate transmission and reception of signals in wireless channels.

[0045] Power consumption refers to the amount of electrical energy consumed by a device while performing its functions. In battery-powered devices such as mobile phones, power consumption is an important consideration because it is directly related to battery life. It is usually measured in watts (W) or milliwatts (mW).

[0046] Testing is the process of evaluating, verifying and determining whether the performance of equipment, materials, components or systems meets specific standards or expected results through a series of methods and procedures. In engineering and scientific research, testing is a key step to ensure product quality and safety.

[0047] Existing baseband power consumption testing technology usually relies on real-time monitoring of the test phone through a dedicated current measurement instrument. This test method requires operators to manually execute a series of predefined usage scenarios on the phone, such as making calls, data transmission, video playback, etc., to simulate various situations that users may encounter in actual use.

[0048] Each time a new test scenario is switched, the operator needs to use the PC tool that comes with the measuring instrument to capture and view the current current data. This data is then used to analyze the power consumption characteristics of the baseband under different working conditions to evaluate its energy efficiency performance. However, this test method has some significant limitations:

[0049] First, testers need to personally switch between different usage scenarios on their phones, such as making calls and surfing the Internet, to simulate actual usage. Then, they must use specialized meters to monitor and record current data, a process that is not only cumbersome but also time-consuming. Because this process requires continuous manual monitoring, testing can usually only be performed during normal working hours, and automated testing at night or on weekends cannot be achieved, which limits the time flexibility and duration of the test.

[0050] In addition, the efficiency of manually switching scenarios and recording data is affected by the speed and accuracy of testers’ operations, which may lead to longer test cycles and increased reliance on professional testers. Human factors, such as fatigue and distraction, may also lead to inaccurate data recording, which in turn affects the reliability of test results. These limitations not only reduce test efficiency, but may also lead to a waste of resources because more human resources are required to complete the same amount of work.

[0051] Based on this, the present application embodiment proposes a power consumption test method.

[0052] In order to obtain reliable test results, it is essential to build a stable and controllable test environment. The embodiment of this application will introduce in detail how to build an environment for mobile phone power consumption testing, including hardware connection, device configuration and software settings.

[0053] For example, Figure 1-1 and Figure 1-2 A schematic diagram of the system architecture of a power consumption testing method is provided for an embodiment of the present application.

[0054] For example, Figure 1-1 This is an example of setting up an environment before a baseband power consumption test. The hardware included in the above environment setting includes: a device to be tested 101, a test computer 102, and a test instrument 103, wherein the test computer 102 and the test instrument 103 are respectively connected to the device to be tested 101. Based on the above system structure diagram, a USB switching box can also be included, and the test computer and the device to be tested are connected via the USB switching box.

[0055] In addition, the system architecture may also include a SIM card plug-in device, through which the device to be tested 101 is connected to the test computer 102. Figure 1-2 The embodiment of the present invention also provides another example of environment construction before baseband power consumption testing. The hardware included in the above environment construction includes: a device to be tested 101, a test computer 102, a test instrument 103, a USB switching box 104, and a SIM card insertion and removal device 105.

[0056] In some possible embodiments, the above-mentioned device to be tested 101 includes but is not limited to the following categories: smart phones, tablet computers, laptops and other android devices, and the operating system running on the device to be tested may include but is not limited to Android system, IOS system, Linux, Windows, Unix, etc. This application embodiment is not specifically limited.

[0057] In some possible embodiments, the test computer 102 can be an ordinary computer host, which is mainly used to run specific test software and manage the test process. This test computer needs to have sufficient processing power and memory to run the test software, and process and store test data at the same time. The operating system may include but is not limited to Windows, Linux or any other operating system suitable for running the test software. The choice of operating system usually depends on the compatibility of the test software and the user's operating habits. The limitations of the operating system may include support for specific hardware drivers, compatibility of the test software, and the ability to multi-task. For example, some test software may only run on a specific version of the operating system, or the operating system may need to provide specific permissions or configurations to work properly.

[0058] In baseband power consumption testing, each component has a specific role and function. The following is a detailed explanation of the components:

[0059] Exemplarily, the device to be tested 101 is a mobile phone or other mobile device for power consumption testing. During the test, it will be connected to the test system and perform a series of operations, such as standby, call, data transmission, etc., in order to measure the power consumption in different working states.

[0060] For example, the terminal device may be installed with a dummy battery, which is connected to a current test meter to measure the current consumption of the device under different operations.

[0061] The test computer 102 is the core of the entire test system, which controls the test process and collects data. The test software running on the computer can automatically execute the test sequence, control the SIM card insertion and removal equipment, and control the device to be tested through the USB switch box.

[0062] In addition, the test computer is also responsible for recording and analyzing the data collected from the test instrument and SIM card insertion and removal equipment to generate power consumption test reports.

[0063] The test meter 103 refers to a high-precision current and voltage measuring device, such as a digital multimeter or a dedicated power analyzer, which can accurately measure the current and voltage of the device under test in different operation modes, thereby calculating the power consumption.

[0064] For example, the test instrument may be connected to the test computer via USB, GPIB or other interfaces to facilitate automatic data collection and analysis.

[0065] The USB switch box 104 is a hardware device that allows the test computer to control multiple devices to be tested simultaneously through the USB interface. In the power consumption test, multiple mobile phones may need to be tested simultaneously. The USB switch box can switch between different devices for centralized management and testing.

[0066] Exemplarily, the switch box can be operated manually or automatically controlled by software on a test computer to implement an automated test process.

[0067] In the embodiment of the present application, the USB switch box is automatically controlled by software on the test computer to achieve the connection or disconnection function.

[0068] The SIM card insertion and removal device 105 is an automated device used to automatically insert and remove the SIM card during the test. This is very useful for simulating actual network connection and disconnection operations, especially when testing the network power consumption of mobile phones. This device can simulate the user's operations such as inserting a SIM card, registering a network, making a call or data connection without manual intervention, thereby improving the efficiency and accuracy of the test.

[0069] In baseband power consumption testing, these components work together to ensure the accuracy and repeatability of the test. Through the automated test process, a large amount of data can be collected, which is then used to analyze and optimize the power consumption performance of the mobile phone.

[0070] The above is a brief introduction to the components needed for baseband power consumption. The following will introduce how to connect the various components into a complete baseband power consumption test system.

[0071] The device to be tested is connected to the USB switch box, and the USB switch box is connected to the test computer;

[0072] The card slot of the device to be tested is connected to the SIM card insertion device, and the SIM card insertion device is further connected to the test computer;

[0073] The external test battery of the device to be tested is connected to the test meter, and the test meter is further connected to the test computer.

[0074] After setting up the test environment of the test computer and the device to be tested, the hardware environment of the test computer should be ensured: sufficient computing power is required to run the test software and simulate user operations. This usually means a CPU with certain performance, sufficient RAM, sufficient hard disk storage space, and specific hardware devices that may be required, such as a USB switching box and a SIM card insertion device. The hardware configuration should be able to simulate the performance of the device used by actual users.

[0075] In order to ensure the comprehensiveness and accuracy of software testing, you first need to install a suitable operating system, such as Windows, Linux or Android, as the basic platform for testing. Then, you must install all necessary dependent software, including database systems such as MySQL or Oracle, and Web servers such as Apache or Nginx, which are all to simulate the services that the software may rely on in the actual operating environment.

[0076] The construction of the test environment also requires a stable and controllable network connection, which can be achieved by configuring network devices such as routers and switches. It may also be necessary to use network testing tools to simulate different network conditions to ensure that the software can run normally in various network environments.

[0077] Finally, in order to improve the efficiency and automation of testing, it is necessary to install and configure automated testing tools and libraries, such as the ADB tool for automated testing of Android devices, Python's pyvisa library for communicating with instruments, and the serial port operation library serial for serial communication. The installation and configuration of these tools and libraries is an indispensable part of the automated testing process.

[0078] It should be understood that the system architecture shown in FIG. 1 does not constitute a limitation on the system, and the system architecture of the power consumption testing method proposed in the embodiment of the present application may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0079] After understanding the composition of the power consumption test method system of the embodiment of the present application, the detailed step flow of the power consumption method proposed in the embodiment of the present application is introduced next, so as to fully understand the functions of each component of the power consumption test system architecture.

[0080] In some embodiments, the power consumption testing method is applied to a test computer in a power consumption testing system, wherein the power consumption testing system also includes a test instrument, wherein the test computer and the test instrument are respectively connected to a device to be tested, and at least two different test scenarios are pre-stored in the test computer.

[0081] After the test environment is set up and the test computer is installed with the corresponding test software, Figure 2 , the test computer performs the following steps:

[0082] Step 201: Obtaining the control information of the scene corresponding to the device to be tested;

[0083] The control information includes control position information, and different scenes correspond to different controls;

[0084] In the device usage scenario power consumption test, step 201 involves obtaining the control information of the device under test in a specific scenario. This step is to ensure that the test script can accurately interact with the user interface (UI) and simulate user operations. The following is a detailed explanation and expansion of this step:

[0085] Control information usually refers to the properties of user interface elements, such as buttons, text boxes, drop-down menus, etc. These properties include but are not limited to the control's ID, text value, location coordinates, size, state (enabled / disabled), type, etc.

[0086] So how do you get the scene's control information? This application embodiment gives the following examples:

[0087] Exemplarily, a UI automation tool is pre-configured on the test computer and is used, for example, an automated testing tool such as Selenium or Appium, and control information can be obtained programmatically.

[0088] Exemplarily, an ADB command is used: when the device to be tested is an Android device, the "adb shell uiautomator dump" command of the Android Debug Bridge (ADB) can be used to obtain the UI layout information of the screen.

[0089] Exemplarily, the test computer test software will send the "adb shell uiautomator dump" command to obtain the scene control information of the device to be tested through the adb (i.e., android debug bridge) tool of the android device according to the checked scene content. The device to be tested will output a file in XML format, which contains control information and position information corresponding to the control information. The test computer transfers the file output by the device to be tested to the test computer through the "adb pull" command, opens it with the Sublime software in the test computer, and after formatting it, the position information of the target control can be obtained according to the text text or control ID of the target control. Wherein, the control information described in the XML file includes text text and / or control ID, and the control ID and the text correspond to the position information of the control; the operation instruction includes the position information corresponding to the text of the target control or the position information corresponding to the target control ID. The position information of the control to be processed is found through text or control ID, and the position information includes: the position coordinates of the target control on the screen of the device to be tested, and the position information of the control usually refers to the coordinates of the control on the screen, which is crucial for performing operations such as clicking and sliding. The position information can be represented by absolute coordinates (relative to the screen) or relative coordinates (relative to the parent control).

[0090] Different test scenarios may require interaction with different controls. For example, one scenario may involve user login, and another may involve data entry. Each scenario requires specific control information to execute the test script.

[0091] In some applications, the control information may change due to user operations or changes in the application state. For example, when using Text information to obtain the name of the test scenario control, the device under test changes the text information. To avoid this situation, the test environment needs to be able to handle this dynamic nature and ensure that the test script is still valid when the control information changes. For example, before the test is completed, the device under test does not change its settings and corresponds one-to-one with the state of the test case pre-set by the test computer.

[0092] Step 202: Select a target test scenario from the test scenarios;

[0093] The test scenario is an actual application scenario that is preset by the test computer and corresponds to the device to be tested. One test scenario corresponds to one control, and the target test scenario is the scenario corresponding to any control. Selecting the target test scenario from the test scenario means selecting the next scene to be tested from the controls of all preset test scenarios, that is, after obtaining the control information of the target test scenario, automatically retrieve the control position information of the target test scenario according to the text information in the control information and the control ID. For example, the coordinate information of the control is used to select the target test scenario.

[0094] Exemplarily, in the test computer, the scenes to be tested are arranged in sequence, for example: 01 call scene, 02 video playback scene, etc. When choosing to switch scenes, you can switch the test scenes in sequence, or you can switch scenes arbitrarily and select the target test scene. While ensuring that the same scene is not selected repeatedly, the power consumption of the device to be tested in all scenes is tested.

[0095] After the test computer selects the target test scenario, it sends an operation instruction for the target control corresponding to the target test scenario to the device to be tested; the operation instruction is used to instruct the device to be tested to open the target test scenario; the operation instruction includes the location information of the target control;

[0096] Exemplarily, after the test computer selects the target test scene and obtains the location information of the control of the target test scene, the test computer sends "adb shell input tap coordinates" to the device to be tested, and operates the device to be tested to click the control. The coordinates are the control location information corresponding to the target test scene, thereby realizing the function of the test computer switching test scenes.

[0097] In some embodiments, the power consumption test system further includes: a USB switch box, the test computer and the device to be tested are connected via the USB switch box, and before sending the test instruction to the test instrument, the method further includes:

[0098] The test computer sends a disconnection instruction to the port of the USB switch box to control the USB switch box to disconnect the communication connection between the test computer and the device to be tested.

[0099] When testing the power consumption of a mobile phone, it is very important to ensure the accuracy of the test results. When using a USB cable to connect a mobile phone and a computer for control, the results of the power consumption test may indeed be affected by the micro-current in the USB cable. This is because the USB interface is not only a channel for data transmission, it also provides a power supply function. Even when data transmission is not in progress, there may still be a tiny current flowing, which cannot be ignored for precise power consumption testing.

[0100] Exemplarily, in order to solve this problem, the present application embodiment uses a USB cut-off box (or USB switch box) to connect the device to be tested to the test computer. The USB cut-off box can cut off the power line in the USB data line when necessary, but keep the data line connected, so that the power line can be turned off without affecting data transmission, thereby avoiding the influence of the micro-current in the USB line on the power consumption test. The specific operation steps are as follows:

[0101] 1. After the scene switching of the device to be tested (mobile phone) is completed, the USB disconnection box is controlled by the computer to disconnect the power path of the data line. In this way, the mobile phone no longer receives current through the USB line, and the current test can be started.

[0102] 2. After the current data is acquired, the USB cutting box is controlled by the computer to connect the power path again. In this way, the data connection between the mobile phone and the computer can be restored, and the next control operation can be continued.

[0103] The benefit of using a USB cable cut-off box is that it provides a physical switch to control the on and off of the power line without affecting the data line. This method is very useful when you need to accurately measure the power consumption of a device in a specific working state, such as when testing the battery consumption of a mobile phone under different usage scenarios. In this way, you can more accurately simulate the various situations encountered by users in actual use, so as to obtain test results that are closer to actual applications.

[0104] After selecting the target test scenario, disconnect the test computer and mobile phone, and then you can start measuring the current data in the target scenario. The steps are as follows:

[0105] Step 203: Acquire current data of the device to be tested in the target test scenario from the test instrument.

[0106] When connecting the test meter to the device to be tested, the device to be tested (e.g., a mobile phone) is connected to a dummy battery, that is, a test battery, and connected to the current measuring test meter. At the same time, the test meter is connected to the computer through a GPIB (General-Purpose Interface Bus) card. GPIB is a standardized communication interface used to connect computers to various test and measurement instruments.

[0107] GPIB card, also known as IEEE-488 card, is a computer interface card that allows computers to communicate with a variety of instruments and devices through the GPIB interface. This interface card is widely used in laboratory measurement, automated testing, and instrument control. The main functions of GPIB card include data transmission, instrument control, and automated testing. It can realize data transmission between computer and instrument, and realize functions such as reading data, setting parameters, and controlling operations of instruments by sending instructions and receiving responses. In addition, GPIB card can also realize remote control of connected instruments, including turning on / off instruments, setting measurement ranges, setting sampling rates, etc., thereby improving work efficiency in laboratory environments.

[0108] The communication of GPIB system is realized through a bus structure, which contains data lines, handshake lines and management lines. In GPIB system, devices can be designated as "speakers" (devices that send data), "listeners" (devices that receive data) and "controllers" (devices that control the data transmission process). GPIB cards are usually set as "controllers" in the system by default.

[0109] The installation steps of GPIB card usually include selecting the appropriate GPIB card and driver, inserting the GPIB card into the PCI slot or USB interface of the computer, installing the driver, connecting instruments and devices, testing and debugging, writing and running applications, and optimizing and maintaining. These steps ensure that the GPIB card can be installed correctly and communicate effectively with other devices.

[0110] Although GPIB may face challenges in some applications, such as being slow compared to other interfaces such as USB and LAN, it is still widely used in many fields, especially in test and measurement environments where stable and reliable communication is required. In addition, the emergence of devices such as GPIB to USB acquisition cards has made it easier for GPIB interface instruments to be compatible with modern computer systems, thus expanding its application range.

[0111] In general, GPIB is a mature and widely used interface standard that provides an effective solution in the field of test and measurement for high-speed data transmission and control between computers and instruments.

[0112] The device to be tested is connected to the test instrument. After the test instrument is connected to the test computer via the GPIB card, the battery power consumption under the target test scenario can be tested. The example is as follows:

[0113] After the test computer selects the target test scenario, the test computer sends a test instruction to the test meter, wherein the test instruction is used to instruct the test meter to test the current data of the device to be tested under the target test scenario;

[0114] A current data acquisition instruction is sent to the test instrument, where the current data acquisition instruction is used to acquire the current data of the device to be tested within a preset time period under the target test scenario.

[0115] Exemplarily, the test software on the test computer sends a visa command to the test instrument through the pyvisa library of python to obtain the return value, which is the current value of the current test, and saves the value into a file through the csv library of python.

[0116] For example, the Python pyvisa library is used to communicate with the test instrument, and the acquired data is saved into a CSV file through the csv library. The specific execution steps are as follows:

[0117] First, make sure that pyvisa and the csv library are installed in your test computer's environment. The csv library is part of the Python standard library and usually does not need to be installed separately.

[0118] (1) Write a Python script to import necessary modules: for example, import visa, CSV library, etc.

[0119] Connect to the test instrument. Before connecting the test instrument, you need to know the VISA address of the test instrument and modify it according to the actual situation. The VISA address of the test instrument can usually be found in the user manual of the test instrument.

[0120] (2) Send a command and read the return value: Send a command, such as querying the current value;

[0121] (3) Write the current data return value to a CSV file.

[0122] Exemplarily, if the CSV file does not exist, one is created and named as test current data, and the current data after the test is automatically saved in the file.

[0123] Depending on the specific commands of the test instrument, it may be necessary to adjust the command string sent.

[0124] For example, if the test needs to be executed repeatedly at a certain time interval, a loop and appropriate delay (using the sleep function) can be added to the script.

[0125] To understand the baseband power consumption in a specific mobile phone usage scenario, it is usually necessary to estimate it by measuring current data. Baseband power consumption refers to the power consumed by the mobile phone communication module when processing wireless signals. When saving current data for a large number of test scenarios, such as standby current, call current, data transmission current, etc., they are all obtained by measuring the current value within a preset time.

[0126] Next, determine the voltage of the phone. The voltage of the phone is usually fixed when it is working, and the standard discharge voltage is generally 3.7 V. Therefore, you can calculate the power consumption by the formula P = I × U (where P is power, I is current, and U is voltage), where the current unit is ampere (A) and the voltage unit is volt (V).

[0127] Through the above steps, the power consumption data of the mobile phone baseband in different usage scenarios can be tested, and further analysis and optimization can be carried out accordingly.

[0128] In some embodiments, after obtaining from the test meter the current data of the device to be tested by the test meter in the target test scenario, the method further includes:

[0129] The test computer sends a communication connection instruction to the port of the USB switch box, and the communication connection instruction is used for the communication connection between the test computer and the device to be tested. The software uses the serial port operation library serial to send serial port commands through the port of the USB switch box to achieve the connection and disconnection function between the USB switch box and the test machine.

[0130] A USB cable box is a device used to control the USB connection status. It can disconnect and connect the connection by sending specific serial port commands. When writing a Python script to communicate with the USB cable box using the pyserial library, you need to know the instruction set of the cable box in order to send the correct command.

[0131] The instruction set is usually provided by the manufacturer of the cable box, which defines the command format and parameters required to communicate with the cable box. These commands may include but are not limited to: connection command: used to establish a connection between the USB cable box and the test machine; disconnect command: used to disconnect an established connection; query status command: used to query the current connection status; configuration command: used to configure certain parameters of the cable box, such as baud rate, data bit, stop bit, etc.

[0132] The steps of controlling the USB disconnection box to disconnect or connect the computer under test and the device under test are as follows:

[0133] Using a serial communication library: In Python, you can use the pyserial library to communicate with the USB cable box. This library allows the test computer to send and receive serial commands.

[0134] Test computer runs control script: Write a Python script and use the pyserial library to open a serial port connection with the USB cable box. Then, according to the instruction set of the USB cable box, send corresponding commands to control the disconnection and connection of the connection.

[0135] The test computer sends control commands: In the script, use the write() method to send commands to the USB cutting box. These commands will instruct the cutting box to disconnect or connect to the test machine. For example, you can send a specific byte sequence to trigger the action of the cutting box.

[0136] Exemplarily, the test computer may also use the read() method to read the response of the USB cable box to confirm that the command has been executed.

[0137] The USB switching box is controlled by the test computer operation instructions to connect again so that the test computer and the terminal device to be tested are connected again. The test computer can select the next target test scene again, and after obtaining the position information of the control corresponding to the target scene, it sends the instruction to click the target control again to complete the scene switching, and continue to the next step of testing the current data of the target scene to obtain the power consumption data under the scene.

[0138] For example, the flow chart is as follows Figure 3 As shown, the device to be tested is an Android device (such as a mobile phone).

[0139] Wherein, Num is the scene to be tested, step 301: select the target test scene from the test field; step 302: disconnect the communication connection between the test computer and the device to be tested through the USB switch box; step 303: obtain the current data of the device to be tested under the target test scene from the test instrument; when the test starts, the test software will send the "adb shell uiautomator dump" command through the adb (i.e., android debug bridge) tool of the android device according to the selected target scene content to obtain the current screen control information, find the location information of the control to be processed through text or control ID, and then send "adb shell input tap coordinates" to achieve the function of operating the test machine to switch scenes. Then, in order to avoid the connection between the device to be tested and the test computer causing inaccurate power consumption test, the connection is disconnected through step 302: switch and disconnect the connection between the test computer and the device to be tested through USB, the USB switch box module is pre-connected, one power supply line is connected to the computer, one control line is also connected to the computer, and another external line is connected to the test machine. The software uses the serial port operation library serial to send serial port commands through the port of the USB cutting box to achieve the connection and disconnection functions between the USB cutting box and the test machine.

[0140] Then, when the test computer is connected to the test instrument, the software sends the visa command through the pyvisa library of python to obtain the return value, which is the current value of the current test, and saves the value to a file through the csv library of python.

[0141] Step 304: Establishing a communication connection between the test computer and the device to be tested through a port of the USB switch box.

[0142] In this way, when one scenario is finished, the process starts over again until all scenarios are tested.

[0143] It should be understood that Figure 3 The flowchart shown is only for demonstration. The various components contained therein and the specific implementation details of these steps have been discussed in detail in previous examples, so they will not be repeated here.

[0144] In some embodiments, the test scenario needs to verify a power consumption test on SIM cards of different standards, so it is necessary to pre-set multiple SIM cards of different wireless communication standards (different operators) to perform tests one by one under different standards.

[0145] In some embodiments, the power consumption test system further includes: a SIM card plug-in device, the device to be tested is connected to the test computer via the SIM card plug-in device, a SIM card using a different wireless communication standard is inserted into the SIM card plug-in device, and the test computer pre-stores data transmission configuration parameters of the corresponding card slots of the SIM cards using different wireless communication standards. The method further includes the following steps: Figure 4 :

[0146] Step 401: the test computer sends an instruction containing identification information of the target SIM card to control the SIM card insertion and removal device to switch to the target SIM card;

[0147] The target SIM card is any SIM card inserted into the SIM card insertion device that is different from the SIM card currently used for communication; illustratively, the identification information may be the serial number information of the SIM card on the current SIM card insertion device, and the instruction for the test computer to send the identification information of the target SIM card is to send a corresponding serial port command according to the port of the device on the computer side, i.e., the card slot position where the SIM card is located, through the serial port operation library serial of the SIM card insertion device to implement the SIM card switching function, wherein the serial port command is matched according to the instruction document of the SIM card insertion device, and different devices may have different commands.

[0148] When designing a power consumption test system, the following are some test examples involving the interaction between the SIM card insertion device and the device under test and the current data: The power consumption test system needs to interact with the device under test, which usually involves sending communication instructions to the device under test through the SIM card insertion device. These communication instructions may include AT commands or APDU instructions based on the ISO-7816 protocol, which are used to activate the SIM card and establish a communication connection.

[0149] Once the communication connection is established, the system will send a test command to the test instrument, instructing the test instrument to measure the current data of the device under test in the target SIM card mode. This process can be achieved through SCPI (Standard Commands for Programmable Instruments) commands, which is a standardized command set used to control programmable test and measurement instruments.

[0150] Exemplarily, in the scenario of implementing the SIM card switching function, each step involved and its example are as follows:

[0151] 1. Pre-insert SIM cards of different standards;

[0152] Insert the corresponding SIM card into the SIM card slot of the SIM card insertion device according to the wireless communication standard supported by the device. These SIM cards may support different standards to ensure that the device can work in different network environments.

[0153] 2. Test software through the serial port operation library serial;

[0154] Exemplarily, the test computer uses the "pyserial" library in Python to communicate with the SIM card insertion and removal device.

[0155] 3. Send serial port commands according to the device port;

[0156] Depending on the port that the SIM card insertion and removal device is connected to on the computer, the software needs to determine the correct COM port. For example, if the device is connected to the COM3 port, the software will send commands to that port.

[0157] 4. Realize the SIM card switching function;

[0158] By sending specific AT commands to control the SIM card insertion and removal device, the SIM card can be switched. Different devices may require different commands, and these commands need to refer to the device's documentation.

[0159] Sample AT command: “AT+QSIMSWITCH=<slot_id> ",in"<slot_id> ” is the number of the SIM card slot.

[0160] 5. Serial port command matching;

[0161] According to the instruction document of the SIM card insertion and removal device, test the computer to match and send the correct serial port commands. These commands may include those for detecting the SIM card status, switching the SIM card slot, setting network parameters, etc.

[0162] After completing the switching of the SIM card on the SIM card insertion and removal device, the test instrument measures the current data of the device to be tested in each SIM card mode.

[0163] Step 402: Send a test instruction to the test meter to measure current data of the device to be tested when communicating in the mode of the target SIM card.

[0164] In this process, after the test computer selects the target test scenario, the target test scenario records and tests the current data of SIM cards of different standards in the first SIM card mode.

[0165] In the baseband power consumption automation test method proposed in the embodiment of the present application, in some test scenarios, it is necessary to test the power consumption performance of the device under different wireless communication standards.

[0166] The purpose of pre-setting SIM cards of different communication standards is to simulate different network environments in automated testing. This ensures that the device can work properly under various network conditions and understands the power consumption performance under different network environments. This is very important for device R&D, production testing and quality assurance.

[0167] In this way, the power consumption performance of the device under different network standards can be fully tested to ensure that the device can work normally and have good energy efficiency in various environments.

[0168] In some embodiments, the target SIM card includes at least one standard, the target test scenario is a standard switching scenario corresponding to a target standard control, the target standard is a standard corresponding to any control, and sending an operation instruction for a target control corresponding to the target test scenario to the device to be tested, the operation instruction being used to instruct the device to be tested to open the target test scenario, includes: sending an operation instruction for a target control corresponding to the target standard to the device to be tested, the operation instruction being used to instruct the device to be tested to open the target standard, and the operation instruction including location information of the target control.

[0169] In the field of mobile communications, "different standards" refer to different mobile communication standards and technical systems. Common different standards mainly include different types of network technologies, such as 2G, 3G, 4G, 5G, etc., as well as the specific technologies and standards they use.

[0170] Another embodiment provides a power consumption test method, which is applied to the device to be tested in the power consumption test system, wherein the power consumption test system further includes: a test computer and a test instrument, wherein the test computer and the test instrument are respectively connected to the device to be tested, and the method includes the following steps:

[0171] Step 501: Sending the control information of the scene included in the device to be tested to the test computer;

[0172] The control information includes control position information, and different scenes correspond to different controls;

[0173] Step 502: receiving an operation instruction for a target control corresponding to the target test scenario sent by the test computer, and executing the operation instruction;

[0174] The operation instruction is used to instruct the device to be tested to open the target test scene, the operation instruction includes the location information of the target control, and the target test scene is any scene included in the device to be tested.

[0175] Another embodiment provides a computer-readable storage medium, which is used to store a computer program. The computer program includes instructions for implementing the method described in the embodiment of the present application. By installing the computer program on a computer, the computer can execute the corresponding method to perform power consumption testing.

[0176] Another embodiment proposes that this embodiment provides a computer program product, which includes computer program codes. When these computer program codes are run on a computer, they enable the computer to implement the method proposed in the embodiment of the present application. In this way, the user can test the power consumption test of the target scenario by using this computer program product.

[0177] It should be understood that although Figure 2-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0178] For example, Figure 6 It is a schematic block diagram of a device for another power consumption testing method provided in an embodiment of the present application.

[0179] The device 600 is composed of four parts: a processor 601 , a memory 602 , a communication interface 603 , and a bus 604 .

[0180] Figure 6 The power consumption test method device 600 shown is designed to achieve accurate and convenient power consumption testing. The functions and effects of each component of the device will be explained in detail below:

[0181] In the baseband power consumption test, the roles and functions of the various components of the device 600 are as follows:

[0182] Processor 601 is the core of the baseband power consumption test device and plays the role of the control center. It is responsible for coordinating and executing all calculation and logic tasks in the entire test process to ensure the smooth progress of the test. The processor executes test scripts and programs, controls every step of the test process, from start to stop, and monitors the real-time status of the test. It also processes data from the test instrument and performs real-time analysis or post-processing analysis to ensure the accuracy of the data. In addition, the processor interacts with the memory, reads test data and writes test results, and communicates with other devices through the communication interface, sends control commands and receives responses, ensuring the accurate transmission of test data and the coordinated operation of the equipment.

[0183] The memory 602 plays the role of a data storage center in the device, and is responsible for storing all test-related software, data, and results. The memory stores test programs, scripts, and configuration files, providing necessary information and guidance for the test. During the test, it temporarily stores the collected data for subsequent processing and analysis. After the test is completed, the memory saves the test results and analysis reports for subsequent review and evaluation. In addition, the memory may contain firmware or an operating system to provide the processor with the necessary software environment to ensure that the processor can smoothly perform its functions.

[0184] The communication interface 603 is a connection bridge between the device and other devices, which allows the device to exchange data and communicate with other devices. The communication interface communicates with the device to be tested, sends test commands, receives test data, and ensures the accurate transmission of test instructions and the effective collection of data. It is also connected to the test instrument to obtain power consumption measurement results, and communicates with the SIM card insertion and removal device to control the insertion and removal of the SIM card. The communication interface may support multiple communication protocols and interfaces, such as USB, GPI B, Ethernet, etc., to adapt to different test equipment and environments.

[0185] The bus 604 plays a vital role inside the device and is responsible for transmitting data and control signals between various components. It connects the processor, memory and communication interface to ensure data synchronization and communication between them. The bus transmits test commands, test data and status information, coordinates the work of various components, and ensures the smooth progress of the test process. It may support high-speed data transmission to meet the needs of rapid processing of large amounts of data, thereby improving test efficiency and accuracy. The design and performance of the bus are crucial to the stability and reliability of the entire test system.

[0186] These components together constitute a complete baseband power consumption test system, and each part plays an indispensable role. The processor acts as the brain to control the entire test process; the memory acts as the memory center to store all necessary data and programs; the communication interface acts as a bridge for external connections to achieve communication with other devices; and the bus acts as an internal connection channel to ensure fast and accurate transmission of data and signals. Through this design, the device 600 can achieve efficient and accurate baseband power consumption testing.

[0187] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) 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 be any conventional processor, etc.

[0188] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0189] Those of ordinary skill 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, or a combination of computer software and electronic hardware. 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 embodiments of the present application.

[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0191] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0194] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0195] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiment of the present application, which should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

Claims

1. A power consumption test method, characterized in that: A test computer used in a power consumption test system, wherein the power consumption test system further comprises a test instrument, wherein the test computer and the test instrument are respectively connected to a device to be tested, and at least two different test scenarios are pre-stored in the test computer, wherein the method comprises: Obtaining control information of the scene corresponding to the device to be tested, wherein the control information includes control position information, and different scenes correspond to different controls; Select a target test scene from the test scenes, the target test scene being a scene corresponding to any control; Sending an operation instruction for a target control corresponding to the target test scenario to the device under test, wherein the operation instruction is used to instruct the device under test to open the target test scenario, and the operation instruction includes location information of the target control; The current data of the device to be tested in the target test scenario is obtained from the test meter.

2. The method according to claim 1, characterized in that: Acquiring current data of the device to be tested in the target test scenario from the test meter, the method comprising: Sending a test instruction to the test instrument, wherein the test instruction is used to instruct the test instrument to test the current data of the device to be tested in the target test scenario; A current data acquisition instruction is sent to the test instrument, where the current data acquisition instruction is used to acquire the current data of the device to be tested within a preset time period under the target test scenario.

3. The method according to claim 1, characterized in that The power consumption test system further includes: a USB switch box, the test computer and the device to be tested are connected via the USB switch box, and before sending the test instruction to the test instrument, the method further includes: The test computer sends a disconnection instruction to the port of the USB switch box to control the USB switch box to disconnect the communication connection between the test computer and the device to be tested.

4. The method according to claim 3, characterized in that After obtaining, from the test meter, current data of the device to be tested tested by the test meter in the target test scenario, the method further includes: The test computer sends a communication connection instruction to the port of the USB switch box, and the communication connection instruction is used for the communication connection between the test computer and the device to be tested.

5. The method according to claim 1, characterized in that The power consumption test system further includes: a SIM card plug-in device, the device to be tested is connected to the test computer via the SIM card plug-in device, SIM cards using different wireless communication standards are inserted into the SIM card plug-in device, the test computer pre-stores data transmission configuration parameters corresponding to the card slots of the SIM cards using different wireless communication standards, and the method further includes: The test computer sends an instruction containing identification information of the target SIM card to control the SIM card insertion device to switch to the target SIM card, wherein the target SIM card is any SIM card inserted into the SIM card insertion device that is different from the SIM card currently used for communication; The test instruction is sent to the test meter to measure the current data of the device to be tested when communicating in the mode of the target SIM card.

6. The method according to claim 5, characterized in that The target SIM card includes at least one standard, the target test scenario is a standard switching scenario corresponding to a target standard control, the target standard is a standard corresponding to any control, and the operation instruction for the target control corresponding to the target test scenario is sent to the device to be tested, and the operation instruction is used to instruct the device to be tested to open the target test scenario, including: An operation instruction for a target control corresponding to the target format is sent to the device under test, wherein the operation instruction is used to instruct the device under test to open the target format, and the operation instruction includes position information of the target control.

7. The method according to claim 1, characterized in that The control information includes text and / or control ID, and the control ID and the text correspond to the position information of the control; the operation instruction includes the position information of the target control corresponding to the control information text of the target control or the position information of the target control corresponding to the target control ID.

8. A power consumption test method, characterized in that: The device to be tested is applied to a power consumption test system, wherein the power consumption test system further comprises: a test computer and a test instrument, wherein the test computer and the test instrument are respectively connected to the device to be tested, and the method comprises: Sending control information of the scenes included in the device to be tested to the test computer, wherein the control information includes control position information, and different scenes correspond to different controls; Receive an operation instruction for a target control corresponding to a target test scenario sent by the test computer, and execute the operation instruction, wherein the operation instruction is used to instruct the device to be tested to open the target test scenario, the operation instruction includes location information of the target control, and the target test scenario is any scene included in the scene of the device to be tested.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the power consumption testing method according to any one of claims 1-8.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the power consumption testing method according to any one of claims 1 to 8 are implemented.