Test method, device to be tested and test system

By introducing the first and second frames into the device under test and using atcmdserver to select the first target channel to communicate with the modem, the problem that the CP side cannot receive test instructions in factory test mode is solved, fast current testing is achieved, and test efficiency is improved.

CN120835109APending Publication Date: 2025-10-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410434169.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-10-24

Smart Images

  • Figure CN120835109A_ABST
    Figure CN120835109A_ABST
Patent Text Reader

Abstract

The invention provides a test method, a to-be-tested device and a test system, relates to the field of current test, and is used for enabling a CP side of the to-be-tested device to receive a test instruction from a control device in a factory test mode. The method comprises the steps that a to-be-tested device enters a factory test mode based on a factory test instruction; an atcmdserver in a first framework of the to-be-tested device takes a first target channel as a test channel based on a first target selection channel instruction from the control device; and the modem of the to-be-tested device receives the first target test instruction through the first target channel, and the modem of the to-be-tested device controls the to-be-tested device to be in a first test state based on the first target test instruction. Wherein the first target channel is used for an atcmdserver of the to-be-tested device to communicate with the modem through a factory test service of a second framework of the to-be-tested device, and in the first test state, the control device can be used for testing the current of the to-be-tested device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of current testing, and in particular to a testing method, a device under test and a testing system. BACKGROUND

[0002] Hardware current testing is a necessary testing item in the production process of a device under test (such as a mobile phone). Specifically, in the hardware current testing process, after a control device is communicatively connected with the device under test, the control device controls the device under test to start up in a normal mode, and then sends corresponding testing instructions to the device under test, so that the device under test is in a corresponding testing state. In the above process, the control device can obtain the current of the device under test in different testing states such as startup, so as to determine whether the device under test is qualified.

[0003] However, the normal startup mode process is relatively complicated and time-consuming, which can result in a long testing time and low testing efficiency. Therefore, in some embodiments, the control device controls the device under test to start up in a factory testing mode. However, in the factory testing mode, the CP side of some devices under test cannot receive part of the testing instructions from the control device, which results in that the control device cannot obtain the current of the device under test in part of the testing states. SUMMARY

[0004] Embodiments of the present application provide a testing method, a device under test and a testing system, which are used to enable the CP side of the device under test to receive the testing instructions from the control device in the factory testing mode.

[0005] To achieve the above object, embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a testing method is provided. The testing method can be applied to a device under test (such as a mobile phone). The device under test includes a first framework and a second framework. The first framework includes an atcmd server, and the second framework includes a factory testing service. The testing method can include:

[0007] First, the device under test enters a factory testing mode based on a factory testing instruction from a control device; second, an atcmd server in the first framework of the device under test selects a first target channel as a testing channel based on a first target selection channel instruction from the control device; third, a modem of the device under test can accept a first target testing instruction from the control device through the first target channel, and the modem of the device under test controls the device under test to be in a first testing state based on the first target testing instruction. The first target channel is used for the atcmd server of the device under test to communicate with the modem of the device under test through the factory testing service of the device under test, and in the first testing state, the control device can be used to test the current of the device under test.

[0008] Compared with entering the normal mode, the time for the device under test to enter the factory test mode is more. In this way, the control device can test the current of the device under test faster, thereby improving the test efficiency. In addition, the first target selection channel instruction in the present application can make the device under test take the first target channel as the test channel. The first target channel can be used for the atcmdserver (AP side) in the first framework to communicate with the modem (CP side) in the device under test through the factory test service (AP side) in the second framework. That is, in the factory test mode, the AP side and the CP side of the device under test can communicate. Based on this, the CP side of the device under test can make the device under test enter the first test state based on the first target test instruction from the control device, so that the control device can obtain the current of the device under test in the first test state.

[0009] In a possible implementation manner of the first aspect, the device under test entering the factory test mode based on the factory test instruction from the control device can include: first, the small core of the device under test sets the configuration file androidboot.init.rc to factory_init.rc based on the factory test instruction; then, the small core of the device under test allocates the configuration file factory_init.rc to the initialization service through the kernel; and finally, the initialization service runs the configuration file factory_init.rc to start the factory test service. After the factory test service is started, the device under test enters the factory test mode.

[0010] In another possible implementation manner of the first aspect, the test method in the present application can further include: in the process of the initialization service running the configuration file factory_init.rc, the device under test provides a PCUI port for the control device.

[0011] The PCUI port of the device under test is used for the device under test to receive instructions from the control device, and the instructions include the first target selection channel instruction, the second target selection channel instruction, the first target test instruction, the second target test instruction and the third target test instruction.

[0012] In another possible implementation manner of the first aspect, the first target channel includes a first sub-channel and a second sub-channel. The first sub-channel is used for the atcmdserver of the device under test to communicate with the modem of the device under test through the factory test service, and the second sub-channel is used for the atcmdserver of the device under test to communicate with the second module in the second framework of the device under test through the factory test service.

[0013] In a possible implementation manner of the first aspect, the test method provided by the present application can further include that the second module in the second framework of the device under test can receive a second target test instruction from the control device through the second sub-channel, and the second module controls the device under test to be in a second test state based on the second target test instruction. In the second test state, the control device is configured to test the current of the device under test.

[0014] In a possible implementation manner of the first aspect, the device under test in the present application can further include a socket service. The atcmd server in the device under test and the factory test service in the device under test can communicate through the socket service.

[0015] In a possible implementation manner of the first aspect, the first framework of the device under test in the present application includes a first module. The test method provided by the present application can further include that first, the atcmd server of the device under test selects a second target channel as a test channel based on a second target selection channel instruction from the control device; second, the first module receives a third target test instruction from the control device through the second target channel; and finally, the first module controls the device under test to be in a third test state based on the third target test instruction.

[0016] In the third test state, the control device can be configured to test the current of the device under test.

[0017] In a second aspect, the present application provides a device under test, including a memory, a processor and a communication interface. The memory and the communication interface are coupled with the processor. The communication interface is configured to connect a control device. The processor is configured with a first framework and a second framework. The first framework includes an atcmd server, and the second framework includes a factory test service. The memory stores instructions. When the processor executes the instructions, the method described in the first aspect and any possible implementation manner thereof is executed.

[0018] In a third aspect, the present application provides a test system, including a control device and a power supply. The power supply is connected with the control device. The power supply is connected with a device under test. The power supply and the control device are further configured to connect the device under test. The control device is configured to send an instruction to the device under test. When the device under test executes the instruction, the method described in the first aspect and any possible implementation manner thereof is executed.

[0019] In a fourth aspect, a computer readable storage medium is provided, including instructions. When the instructions are executed on the device under test, the device under test executes the method described in the first aspect and any possible implementation manner thereof.

[0020] In a fifth aspect, a computer program product is provided, which contains instructions, when the instructions are run on the device under test, cause the device under test to perform the method according to the first aspect and any possible implementation thereof.

[0021] In a sixth aspect, a chip system is provided, which includes a processor for supporting the device under test to implement the functions involved in the first aspect and any possible implementation thereof. In a possible design, the device under test further includes an interface circuit, which can be configured to receive a signal from another device (e.g., a memory) or send a signal to another device (e.g., a communication interface). The chip system can include a chip, and can also include other discrete devices.

[0022] It should be noted that the technical effects of the second aspect to the sixth aspect can refer to the technical effects of the first aspect and any possible implementation thereof, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 A structural schematic diagram of a hardware current test system provided by an embodiment of the present application;

[0024] Figure 2 A schematic diagram of a device under test starting up in a normal mode provided by an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a process of executing a test instruction sent by a control device by a device under test after the device under test starts up in a normal mode provided by an embodiment of the present application;

[0026] Figure 4 A structural schematic diagram of a device under test provided by an embodiment of the present application;

[0027] Figure 5 A structural schematic diagram of a control device provided by an embodiment of the present application;

[0028] Figure 6 A flowchart of a test method provided by an embodiment of the present application;

[0029] Figure 7 A flowchart of a test method provided by an embodiment of the present application;

[0030] Figure 8 A structural schematic diagram of a device under test provided by an embodiment of the present application;

[0031] Figure 9 A flowchart of a test method provided by an embodiment of the present application;

[0032] Figure 10A structural schematic diagram of a chip system is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0033] The terms "first", "second", etc. involved in the embodiments of the present application are only used for the purpose of distinguishing the same type of features, and cannot be understood as indicating relative importance, quantity, order, etc.

[0034] The terms "exemplary" or "for example" or the like involved in the embodiments of the present application are used to represent an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the terms "exemplary" or "for example" are intended to present the relevant concept in a specific manner.

[0035] First, some concepts involved in the present application are briefly introduced:

[0036] AP: refers to an application processor (application processor, AP). It is usually used to refer to a mobile phone terminal, which can be understood as the upper layer protocol of the device under test.

[0037] CP: refers to a communication processor (communication processor, CP). It can be understood as a modem.

[0038] AT instruction: refers to an attention (attention, AT) instruction, which is an instruction applied to the connection and communication between a terminal device (such as a device under test) and a control device.

[0039] Rild service: refers to a service between the AP side and the CP side, which is a service in the media tek (media tek, MTK) native framework.

[0040] atcmdserver: refers to a self-developed service in the self-developed framework of the device under test in the present application, which is a core service for processing AT instructions.

[0041] Figure 1 A structural schematic diagram of a hardware current test system is shown. As shown in FIG. 1, the hardware current test system includes a hardware current test system 100 and a host computer 200. Figure 1As shown, the hardware current test system 100 can include a device under test 110, a control device 120, a power supply 130, a universal serial bus (USB) cable 140, a communication cable (such as a general purpose interface bus (GPIB) cable) 150, a test bench 160, and a charging cable 170. The power supply 130 is coupled to the control device 120 through the communication cable 150. The power supply 130 is coupled to the test bench 160 through the charging cable 170. The device under test 110 is electrically connected to test pins of the test bench 160. In this way, the power supply 130 supplies power to the device under test 110 through the charging cable 170 and the test bench 160. A first end of the USB cable 140 is coupled to the control device 120, a second end of the USB cable 140 is coupled to the power supply 130, and a third end of the USB cable 140 is coupled to a USB port of the device under test 110. The power supply 130 can supply power to the USB port of the device under test 110 through the USB cable 140.

[0042] In an embodiment, the first end of the USB cable 140 can include a power port and a ground port, the second end of the USB cable 140 can include a data port and a ground port, and the third end of the USB cable 140 can include a power port, a ground port, and a data port.

[0043] During the hardware current test, the power supply 130 can supply power to the device under test 110 through the charging cable 170 and the test bench 160. On one hand, the control device 120 can send instructions (such as factory test instructions, etc.) to the device under test 110 through the USB cable 140, so that the device under test 110 is powered on in a corresponding mode, thereby being in the corresponding mode, or so that the device under test 110 is in a corresponding test state (such as a standby state, etc.). On the other hand, the control device 120 can acquire information (such as current, etc.) of the device under test 110 in the corresponding test state from the power supply 130 through the communication cable 150. In this way, the purpose of automatically testing the current of the device under test 110 in the corresponding test state can be achieved.

[0044] It should be noted that, during the entire test process, the battery of the device under test 110 is not connected to the power supply 130, and the battery of the device under test 110 is also not connected to other modules in the device under test 110. That is, the power supply 130 only supplies power to the device under test 110, and the device under test 110 is also only powered by the power supply 130 (that is, the battery of the device under test 110 does not supply power to the device under test 110). In this way, the accuracy of the test result can be ensured.

[0045] In one embodiment, after the power supply 130 supplies power to the device under test 110, the control device 120 first controls the device under test 110 to boot up. After the device under test 110 boots up, the control device 120 can obtain the boot-up current of the device under test 110 from the power supply 130. The boot-up of the device under test 110 is the basis for the control device 120 to control the device under test 110 to be in other test states, and thus the boot-up of the device under test 110 by the control device 120 is the basis for the entire test process. The process of the control device 120 controlling the device under test 110 to boot up is described in detail below.

[0046] Figure 2 A schematic diagram of the device under test booting up in the normal mode is shown. Figure 3 A schematic diagram of the process of the device under test executing the test instruction sent by the control device after the device under test boots up in the normal mode is shown.

[0047] In one embodiment, as shown in Figure 2 After the device under test 110 is powered on, the control device 120 establishes a communication connection with the preloader 210 of the device under test 110, and within a first preset time period after the communication connection is established, the control device 120 does not send any instruction to the preloader 210. In this way, the preloader 210 of the device under test 110 does not receive any instruction within the first preset time period. At this time, the little kernel (LK) 220 of the device under test 110 sets the configuration file androidboot.init.rc to init.rc through the kernel command line (cmdline). Then, the little kernel of the device under test allocates the configuration file init.rc to the init service 240 through the kernel 230. The init service 240 can run the configuration file init.rc. In this way, the device under test enters the Android system and the Android service (such as the Android desktop application service) in the Java environment. Then, after the device under test 110 enters the Android system and the Android service, the device under test 110 can provide the PCUI port to the control device 120. That is, at this time, the control device 120 can query the PCUI port of the device under test 110. In this way, the control device can send the corresponding test instruction to the PCUI port of the device under test 110. Through the above process, the device under test 110 completes the boot-up process and is in the normal mode.

[0048] In summary, when the device under test is powered on in normal mode, it needs to enter the Android system and Android services. However, the system resources consumed by the device under test entering the Android system and Android services are relatively large, resulting in a longer time (e.g., 27 seconds) for the device under test to enter the Android system and Android services, which in turn results in a longer time (e.g., 21 seconds) for the control device to query the PCUI port of the device under test. In other words, the time required for the device under test to boot in normal mode is relatively long (e.g., 48 seconds). The longer boot-up time of the device under test will not only result in a longer time for the control device to obtain the boot-up current of the device under test, but will also increase the test time of the entire test process, thereby reducing test efficiency.

[0049] In one embodiment, if Figure 3 As shown, after the device under test 110 is powered on, the control device 120 sends a test command to the PCUI port of the device under test 110. The PCUI port of the device under test 110 belongs to the AP side of the device under test 110. After the AP side of the device under test 110 receives the test command, the atcmdserver on the AP side sends the test command to the modem (i.e., the CP side) of the device under test 110 through the Rild service of the device under test 110. The CP side of the device under test 110 can execute the test command, thereby placing the device under test 110 in the corresponding test state.

[0050] In one embodiment, to improve test efficiency, the control device controls the device under test to start up in factory test mode (or AT mode), thereby placing the device under test in factory test mode. In factory test mode, the device under test does not need to access the Android system and Android services, thereby shortening the startup time.

[0051] However, in factory test mode, the AP and CP sides of some devices under test cannot communicate. This results in the CP side of the device under test being unable to receive and execute test instructions sent by the control device. As a result, the device under test cannot enter the corresponding test state, and the control device is unable to obtain the current of the device under test in the corresponding test state. In other words, for these devices under test, the above technical problems remain unresolved.

[0052] In one embodiment, in the factory test mode, the self-developed framework of some devices under test is incompatible with the MTK native framework, resulting in the CP side of the device under test being unable to receive some test instructions sent by the control device.

[0053] For example, in the factory test mode, some of the devices under test do not have Rild services, resulting in no corresponding test channel between the CP side and the AP side of these devices under test. Therefore, after the AP side of these devices under test receives the channel selection instruction (such as AT^MODEM = 1) sent by the control device, the devices under test cannot select the corresponding test channel of the CP side, so that the CP side cannot continue to receive the corresponding test instruction sent by the control device, and the control device cannot control the devices under test to perform partial current tests (such as current tests related to radio frequency parameters).

[0054] Therefore, in the method provided by the embodiments of the present application, the startup process of the device under test and the test instruction of the control device are optimized, so that the device under test can normally perform various current tests in the factory test mode. Specifically, after the device under test is powered on, the control device controls the device under test to enter the factory test mode. In this process, the device under test starts the factory test service. Compared with the Android system and the Android service, the factory test service consumes less system resources during startup, so the factory test service takes less time to start. During the process of starting the factory test service, the control device queries the PCUI port of the device under test. That is, the control device can query the PCUI port of the device under test without entering the Android system and the Android service, so the control device takes less time to query the PCUI port.

[0055] Then, the atcmdserver in the self-developed framework (such as the first framework referred to in this paper) of the device under test can communicate with the factory test service in the MTK native framework (such as the second framework referred to in this paper). Specifically, after the PCUI port of the device under test receives the second channel selection instruction (for example, AT^MODEM = 20) from the control device, the device under test can select a first target channel as a test channel in the factory test mode. The first target channel can be used for the atcmdserver to communicate with the modem (i.e., the CP side) of the device under test through the factory test service. In this way, the AP side and the CP side of the device under test can establish communication, so that the CP side of the device under test can receive the test instruction sent by the control device in the factory test mode. After the CP side of the device under test executes the test instruction, the device under test can be in a corresponding test state, so that the control device can obtain the current of the device under test in the corresponding test state.

[0056] From the above, in the embodiment of the application, the control device can control the to-be-tested device to start in the factory test mode. In the factory test mode, the to-be-tested device does not need to enter the Android system and the Android service, and the time for the control device to query the PCUI port of the to-be-tested device is shortened, so that the start time of the to-be-tested device (for example, 15-18 seconds) is shortened, thereby the test efficiency can be improved. Meanwhile, in the factory test mode, the CP side of the to-be-tested device can receive and execute the test instruction from the control device, so that the to-be-tested device is in the corresponding test state, thereby the control device can test the current of the to-be-tested device in the corresponding test state.

[0057] In the embodiment of the application, the to-be-tested device 110 can be mobile or fixed, and can be an incomplete assembled electronic device. The electronic device can be deployed on land (for example, indoor or outdoor, handheld or vehicle-mounted, etc.), on water (for example, a ship, etc.), or in the air (for example, an airplane, a balloon, a satellite, etc.). The electronic device can be referred to as a user equipment (UE), an access terminal, a terminal unit, a subscriber unit, a terminal station, a mobile station (MS), a mobile terminal, a terminal agent, or a terminal device, etc. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a smart bracelet, a smart watch, a headset, a smart speaker, a virtual reality (VR) device, an augmented reality (AR) device, a terminal in industrial control, a terminal in self driving, a terminal in remote medical, a terminal in smart grid, a terminal in transportation safety, a terminal in smart city, a terminal in smart home, etc. The specific type and structure of the electronic device are not limited in the embodiment of the application. The specific structure of the electronic device will be described briefly in combination with the drawings.

[0058] Figure 4 A structure schematic diagram of a to-be-tested device provided in the embodiment of the application is shown. The specific structure of the to-be-tested device will be described in combination with the drawings. Figure 4 The hardware structure of the to-be-tested device is introduced.

[0059] In an embodiment, as shown in FIG. 1, the to-be-tested device 110 includes a central processing unit (CPU) 111, a memory 112, a display 113, a user interface (UI) 114, a power management (PM) 115, a sensor 116, a communication interface (CI) 117, and a power management integrated circuit (PMIC) 118. Figure 4As shown, the DUT 110 can include a processor 410, a USB interface 420, a battery 430, a power management module 440, and a load module 450, etc. Specifically, the processor 410 can be coupled to the data terminals D1+ and D1- of the USB interface 420, the battery 430, the power management module 440, and the load module 450. The power management module 440 can be coupled to the power terminal VBUS1 of the USB interface 420, the battery 430, the power management module 440, and the load module 450. The ground terminal of the USB interface 420 can be coupled to the ground terminal GND of the DUT.

[0060] The processor 410 can include one or more processing units. For example, the processor can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can be the nerve center and command center of the DUT. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions.

[0061] The power management module 440 can be configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. For example, in a hardware test scenario, the power management module 440 can receive charging input from an external power source (such as the power source 130) through the USB interface 420 via a wired charger. For another example, the power management module 440 can receive wireless charging input through a wireless charging coil of the DUT.

[0062] The power management module 440 can supply power to the DUT while charging the battery 430. Specifically, the power management module 440 can receive input current from the battery 430 to supply power to the processor 410, the load module 450, etc. The power management module 440 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. of the battery 430. In some other embodiments, the power management module 440 can also be disposed in the processor 410.

[0063] In the hardware test scenario, the battery 430 is not connected or disconnected with the power management module 440 and the load module 450. At this time, the external power supply 130 supplies power to each module of the device under test. Figure 4 The "X" between the battery 430 and the power management module 440 means that the battery 430 is not connected or disconnected with the power management module 440. Similarly, Figure 4 The "X" between the battery 430 and the load module 450 means that the battery 430 is not connected or disconnected with the load module 450.

[0064] The load module 450 can include one or more of the following: a memory, an antenna, a communication sub-module, a display sub-module, an audio sub-module, a camera, a sensor sub-module, but is not limited thereto.

[0065] In an embodiment, the power supply 130 involved in the embodiments of the present application can be a program-controlled power supply, which is used to supply power to the device under test 200 and provide the control device 120 with information such as current of the power supply 130 in at least one test state. In order to enable the power supply 130 to normally supply power to the device under test 200, the voltage of the positive electrode of the power supply 130 needs to be greater than or equal to the sum of the voltage when the battery of the device under test 200 is fully charged and the adjustment voltage of the power management module 440 of the device under test 200. The adjustment voltage can be the voltage difference between the input voltage and the output voltage of the power management module 440.

[0066] For example, when the voltage when the battery of the device under test is fully charged is 4.45V and the adjustment voltage of the power management module 440 is 0.3V, the voltage of the positive electrode of the power supply 130 can be greater than or equal to 4.75V.

[0067] In an embodiment, the test state described above can include at least one of the following: a boot state, a standby state, a flight state, a call state, a data transmission state, but is not limited thereto.

[0068] The control device 120 related to the embodiments of the present application can be mobile or fixed. The control device 120 can be deployed on land (for example, indoors or outdoors, handheld or vehicle-mounted, etc.), on water (for example, a ship, etc.), or in the air (for example, an airplane, a balloon, a satellite, etc.). The control device 120 can be referred to as a user equipment (UE), an access terminal, a terminal unit, a subscriber unit, a terminal station, a mobile station (MS), a mobile terminal, a terminal agent, or a terminal apparatus, etc. For example, the control device 120 can be a notebook computer, a desktop computer, a subnotebook computer, etc. The embodiments of the present application do not limit the specific type and structure of the control device 120.

[0069] Figure 5 A hardware structure schematic diagram of a control device is shown. The following describes the hardware structure of the control device 120 in detail. Figure 5 The hardware structure of the control device is introduced.

[0070] In an embodiment, as shown in Figure 5 The control device 120 can include at least one processor 510, a communication line 520, a memory 530, and at least one communication interface 540. The communication line 520 can include a path for transmitting information between the above components. The communication interface 540 uses any transceiver-like device for communicating with other devices (for example, the device under test 110, the power supply 130).

[0071] The processor 510 is configured to send corresponding test instructions to the processor 410 of the device under test 110. The processor 510 can be a chip. For example, the processor 510 can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC) system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0072] The memory 530 is configured to store the current of the power supply in at least one test state obtained from the power supply, and store the current. The memory 530 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM) and direct rambus RAM (DRRAM). It should be noted that the memory of the system and method described herein is intended to include, but not limited to, these and any other suitable types of memory.

[0073] It should be noted that the control device 120 is installed with media tek (MTK) test platform software. The test platform software is pre-set with test instructions corresponding to different test states. These test instructions include test instructions corresponding to the factory test mode (FTM).

[0074] In an embodiment, the test instructions corresponding to the factory test mode can include test instructions corresponding to radio frequency, standby test instructions, but not limited thereto. The specific content of various test instructions will not be described here, and will be described in detail below.

[0075] The following will be described in combination with Figures 6-9 The test method provided by the embodiment of the present application and the internal software architecture of the device under test will be introduced.

[0076] Figure 6 A flowchart of one of the test methods provided by the embodiment of the present application is shown. As shown in the figure, the test method provided by the embodiment of the present application includes the following steps:Figure 6 As shown, the test method can include:

[0077] S601, the detection port of the to-be-tested device receives the factory test instruction sent by the control device.

[0078] The factory test instruction is used to instruct the to-be-tested device to enter a factory test mode. In some examples, the factory test mode can also be referred to as an ATA mode.

[0079] For example, the factory test instruction can be FACTFACT, but is not limited to this. The specific content of the factory test instruction can be set according to actual conditions, which is not limited herein.

[0080] In an embodiment, continue as Figure 1 As shown, in a hardware current test scenario, after the power supply 130 supplies power to the to-be-tested device 110, the to-be-tested device 110 first provides the detection port to the control device 120, that is, the control device 120 can first query the detection port of the to-be-tested device 110. At this stage, the control device 120 can establish a communication connection with the detection port of the to-be-tested device 110, so as to control the to-be-tested device 110 to enter a download mode, a radio frequency verification mode, a factory test mode, a normal mode, etc.

[0081] In this embodiment, the ATA tool in the MTK test platform software installed in the control device 120 can send a factory test instruction to the detection port of the to-be-tested device 110. After the control device 120 establishes a communication connection with the detection port of the to-be-tested device 110, if the detection port of the to-be-tested device 110 receives the factory test instruction within a first preset time length, the to-be-tested device 110 can enter the factory test mode. If the to-be-tested device 110 does not receive the factory test instruction within the above-mentioned first preset time length, the to-be-tested device 110 will not enter the factory test mode, but will enter the normal mode.

[0082] In another embodiment, in addition to sending a factory test instruction to the detection port of the to-be-tested device to make the to-be-tested device enter a factory test mode, the control device can also send a low level to the general-purpose input / output (GPIO) port of the processor (such as a central processing unit CPU) of the to-be-tested device, so as to make the to-be-tested device enter the factory test mode.

[0083] S602, the detection port of the to-be-tested device sends the factory test instruction to the microkernel of the to-be-tested device.

[0084] The small kernel of the device under test is configured according to the corresponding instruction received by the probe port of the device under test, so that the initialization (init) service in the device under test determines the configuration file actually required to run, so that the device under test starts the Android system and Android service in the Java environment, or starts the factory test service.

[0085] In the embodiment, after the small kernel of the device under test receives the factory test instruction, the initialization service in the device under test determines that the configuration file actually required to run is factory_init.rc, so that the device under test starts the factory test service.

[0086] S603, the small kernel of the device under test sets the configuration file androidboot.init.rc to factory_init.rc according to the factory test instruction.

[0087] In one embodiment, after the small kernel of the device under test receives the factory test instruction, the configuration file androidboot.init.rc in the Android is set to factory_init.rc through the kernel command line, so that the initialization service in the device under test runs factory_init.rc, that is, the device under test starts the factory test service.

[0088] In one embodiment, within a first preset time period after the control device establishes a communication connection with the probe port of the device under test, if the device under test does not receive the factory test instruction, the small kernel of the device under test sets the configuration file androidboot.init.rc to init.rc. In this way, the initialization service in the device under test runs init.rc, that is, the device under test starts the Android system and Android service.

[0089] S604, the small kernel of the device under test allocates the configuration file factory_init.rc to the initialization service through the kernel.

[0090] The kernel of the device under test is responsible for allocating the configuration file set in the small kernel to the corresponding service. For example, the kernel allocates factory_init.rc to the initialization service.

[0091] S605, the initialization service of the device under test runs the configuration file factory_init.rc.

[0092] The process of the initialization service of the device under test running the configuration file factory_init.rc can be understood as the process of the service initialized by the device under test starting the factory test service.

[0093] The initialization service runs the configuration file factory_init.rc, and the system resources consumed are less (for example, the memory of the device under test is less occupied), so the system resources consumed in the factory test service starting process are less, which makes the time spent in the factory test service starting shorter. Based on this, compared with the device under test starting in the normal mode, the starting mode in the embodiment of the application can save the starting time, not only the time for obtaining the starting current, but also the test time spent in the whole test process, that is, the test efficiency is improved.

[0094] Further, in the embodiment, the initialization service of the device under test runs the configuration file factory_init.rc, and the device under test provides the PCUI port to the control device, that is, the PCUI port of the device under test can be displayed on the control device. That is, in the process of the initialization service of the device under test running the configuration file factory_init.rc, the control device can query the PCUI port of the device under test. Compared with starting an Android system and an Android service which consume more system resources, starting a factory test service which consumes less system resources, the time spent is less, and more so in the process of starting the factory test service, the control device can query the PCUI port, so that the time spent in the control device querying the PCUI port of the device under test is less.

[0095] As can be seen, the embodiment of the application can also shorten the time of the control device obtaining the PCUI port of the device under test. In this way, the time of the control device sending other test instructions to the device under test can be shortened, and the test time spent in the whole test process is further saved, that is, the test efficiency is further improved.

[0096] S606, the control device sends a starting current query instruction to the power supply.

[0097] Since the power supply only supplies power to the device under test, and the device under test is only powered by the power supply, the current provided by the power supply to the device under test can indicate the current of the device under test. Therefore, the control device can send a current query instruction to the power supply through a communication cable (such as a GPIB cable) to obtain the current of the power supply, and thus obtain the current of the device under test.

[0098] In one embodiment, the control device can send a starting current query instruction to the power supply after S601 is executed, and a second preset time period elapses. In this way, sufficient time can be left for the device under test to complete the starting process.

[0099] S607, the power supply sends the starting current to the control device.

[0100] Figure 7FIG2 shows a flow chart of a test method provided in an embodiment of the present application. Figure 7 As shown, the test method may include:

[0101] S701: The control device sends a channel selection instruction to the atcmdserver of the device under test through the PCUI port of the device under test.

[0102] The channel selection instruction may include, but is not limited to, a first channel selection instruction and a second channel selection instruction. Different channel selection instructions correspond to different channels. Different channels mean that different specific modules in the device under test execute the test instructions. In this way, the device under test will transmit subsequently received test instructions through the selected (or switched) channel, so that the module corresponding to the selected channel executes the subsequently received test instructions. This is described in detail below.

[0103] In one embodiment, the first channel selection instruction is: AT^MODEM=0. Figure 8 As shown, the channel corresponding to the first select channel instruction is the first channel, i.e., the channel through which the atcmdserver of the device under test directly communicates with the second module of the device under test. The first module is the module corresponding to the AP side of the device under test (which can be simply referred to as the first module). In other words, the first channel is the AP side channel of the device under test in factory test mode.

[0104] In one embodiment, the second channel selection instruction is: AT^MODEM=20. Figure 8 As shown, the channel corresponding to the second channel selection instruction includes the second channel. The second channel includes a first subchannel and a second subchannel. The first subchannel refers to the communication channel between the client in the atcmdserver of the device under test, the server in the factory test service, and the modem of the device under test, i.e., the communication channel on the CP side. The second subchannel refers to the communication channel between the client in the atcmdserver of the device under test, the server in the factory test service, and the second module of the device under test.

[0105] It should be noted that both the first module and the second module are modules corresponding to the AP side of the device under test. However, the first module is a module in the first framework of the device under test, while the second module is a module in the second framework of the device under test. The first framework can be a self-developed framework of the device under test, while the second framework can be a native MTK framework. In addition, unlike the first module, the second module can communicate with the factory test service in the second framework.

[0106] In an embodiment, the second module can be a module for putting the device under test into a bright screen, dark screen, standby, or the like test mode. The first module can be a module other than the module for putting the device under test into a bright screen, dark screen, standby, or the like test mode. For example, the first module can be a module for controlling the state of a communication module (such as a Bluetooth module) of the device under test.

[0107] S702, based on the selection channel instruction being a first selection channel instruction, the atcmd server of the device under test selects a first channel as a test channel.

[0108] In an embodiment, in the first channel, a socket service is used to pass information (such as corresponding test instructions, and corresponding return values referred to herein, etc.) between the atcmd server and the first module.

[0109] In some embodiments, the first selection channel instruction can be referred to as a second target selection channel instruction.

[0110] S703, based on the device under test successfully selecting the first channel as a test channel, the atcmd server of the device under test sends a first return value to the control device through the PCUI port.

[0111] The control device can determine whether the device under test has successfully switched to the corresponding channel according to the return value sent by the device under test. In this way, the test instructions subsequently sent by the control device to the device under test will be transmitted along the corresponding channel and executed by the corresponding module. The first return value is used to indicate that the device under test has successfully selected the first channel as a test channel.

[0112] In an embodiment, if the device under test has not successfully switched to the corresponding channel, the control device will not receive the corresponding return value.

[0113] S704, the control device sends a first test instruction to the PCUI port of the device under test.

[0114] In an embodiment, the first test instruction can include AT^FACINFO?, AT^FACINFO=0, but is not limited thereto. Wherein, AT^FACINFO? is used to indicate querying whether to write a current test flag bit; AT^FACINFO=0 is used to indicate writing a current test flag bit.

[0115] In some embodiments, the first test instruction can be referred to as a second target test instruction.

[0116] It should be noted that the control device executes S704 after receiving the first return value.

[0117] S705, the PCUI port of the device under test sends the first test instruction to the first module through the atcmd server.

[0118] In some embodiments, the PCUI port of the device under test sends the first test instruction to the first module through the atcmd server, which can be understood as that the first test instruction is sent to the first module through the first channel.

[0119] S706, the first module of the device under test executes the first test instruction, so that the device under test is in a third test state corresponding to the first test instruction.

[0120] S707, the control device sends a first current query instruction to the power supply.

[0121] In an embodiment, the control device can send the first current query instruction to the power supply after S704 is executed and a first time duration elapses. In this way, sufficient time is left for the first module of the device under test to execute the first test instruction, so that the device under test is in the test state corresponding to the first test instruction.

[0122] S708, the power supply sends a first current to the control device.

[0123] The first current refers to the current of the device under test in the test state corresponding to the first test instruction.

[0124] S709, the atcmd server of the device under test selects a second channel as a test channel based on a second selection channel instruction.

[0125] In an embodiment, in the second channel, the socket service is used to transmit information (such as corresponding test instructions and corresponding return values involved in this document) between the client in the atcmd server and the server in the factory test service.

[0126] In some embodiments, the second selection channel instruction can be referred to as a first target selection channel instruction.

[0127] It should be noted that after the device under test selects the second channel as the test channel, whether the test instruction received by the device under test subsequently is transmitted along the first sub-channel or the second sub-channel depends on the test instruction. The test instruction corresponding to the second channel has a mapping relationship with the first sub-channel and the second sub-channel.

[0128] When the device under test selects the second channel, if a test instruction received by the device under test corresponds to the first sub-channel, the test instruction is automatically transmitted from the factory test service to the modem (i.e., the CP side) of the device under test, so that the modem executes the test instruction. If a test instruction received by the device under test corresponds to the second sub-channel, the test instruction is automatically transmitted from the factory test service to the second module of the device under test, so that the second module executes the test instruction.

[0129] S710, based on the device under test successfully selecting the second channel as the test channel, the atcmd server of the device under test sends a second return value to the control device through the PCUI port.

[0130] The second return value is used to indicate that the device under test successfully selects the second channel as the test channel.

[0131] S711, the control device sends a second test instruction to the PCUI port of the device under test.

[0132] S712, based on the second test instruction corresponding to the first sub-channel, the PCUI port of the device under test sends the second test instruction to the modem through the atcmd server and the factory test service.

[0133] In some embodiments, the second test instruction corresponding to the first sub-channel can be referred to as a first target test instruction.

[0134] S713, the modem of the device under test executes the second test instruction, so that the device under test is in a first test state corresponding to the second test instruction.

[0135] S714, the control device sends a second current query instruction to the power supply.

[0136] In an embodiment, the control device can send the second current query instruction to the power supply after executing S711 for a second predetermined time period. In this way, sufficient time is left for the modem of the device under test to execute the second test instruction, so that the device under test is in a test state corresponding to the second test instruction.

[0137] S715, the power supply sends a second current to the control device.

[0138] The second current refers to the current when the device under test is in a test state corresponding to the second test instruction after the modem of the device under test executes the second test instruction.

[0139] S716, based on the second test instruction corresponding to the second sub-channel, the PCUI port of the device under test sends the second test instruction to the second module of the device under test through the atcmd server and the factory test service.

[0140] In some embodiments, the second test instruction corresponding to the second sub-channel can be referred to as a second target test instruction.

[0141] S717, the second module of the device under test executes the second test instruction, so that the device under test is in a second test state corresponding to the second test instruction.

[0142] S718, the control device sends a third current query instruction to the power supply.

[0143] In an embodiment, the control device can send the third current query instruction to the power supply after a second preset time period after executing S711. In this way, sufficient time can be left for the second module of the device under test to execute the second test instruction, so that the device under test is in the test state corresponding to the second test instruction.

[0144] S719, the power supply sends a third current to the control device.

[0145] The third current refers to the current of the device under test in the corresponding test state after the second module of the device under test executes the second test instruction.

[0146] It should be noted that in S701-S719, if S702-S708 are executed, none of S709-S719 will be executed. Or, if S709-S719 are executed, S702-S708 will not be executed. However, for S709-S719, only one of S712-S715, S716-S719 will be executed.

[0147] In summary, in the embodiments of the present application, a second selection channel instruction is added, so that the device under test can communicate between the AP side and the CP side in the factory test mode. Based on this, the control device can send test instructions to the CP side of the device under test in the factory test mode, so as to control the device under test to be in the corresponding test state, and then obtain the current of the device under test in the corresponding test state.

[0148] In an embodiment, the second test instruction can include the instruction shown in Table 1, but is not limited thereto.

[0149] Table 1

[0150]

[0151] It should be noted that Table 1 only exemplifies the content of the second test instruction.

[0152] Figure 9Fig. 3 shows a flowchart of a third embodiment of the test method provided by the present application. As shown in Fig. 3, the test method can include the following steps. Figure 9

[0153] S901, the control device sends a mode query instruction to the PCUI port of the device under test.

[0154] The mode query instruction can be used to query whether the device under test has successfully entered the factory test mode.

[0155] For example, the mode query instruction can be AT^shellcmd=getprop ro.bootmode, but is not limited thereto. The specific content of the mode query instruction can be set according to actual conditions, which is not limited herein.

[0156] S902, the PCUI port of the device under test sends the mode query instruction to the initialization service.

[0157] S903, based on that the device under test is in the factory test mode, the initialization service of the device under test sends a third return value to the control device through the PCUI port of the device under test.

[0158] The third return value is used to indicate that the device under test is in the factory test mode. For example, the third return value can be factory.

[0159] In an embodiment, the initialization service of the device under test is to start different services after running the configuration file androidboot.init.rc, and different services started by the initialization service indicate different modes of the device under test. Therefore, after receiving the mode query instruction, the initialization service can determine the mode category of the device under test according to the currently started services. For example, when the configuration file androidboot.init.rc is factory_init.rc, the initialization service starts the factory test service, so the initialization service can determine that the device under test is in the factory test mode; when the configuration file androidboot.init.rc is init.rc, the initialization service does not start the factory test service, but enters the Android system and Android service in the java environment, so the initialization service can determine that the device under test is in the normal mode.

[0160] S904, based on that the device under test is in the normal mode, the initialization service of the device under test sends a fourth return value to the control device through the PCUI port of the device under test.

[0161] The fourth return value is used to indicate that the device under test is in the normal mode. For example, the fourth return value can be normal.

[0162] ​It should be noted that the S901-S904 provided in this embodiment can be executed before the S701 described above, so as to make the control device determine whether the to-be-tested device successfully enters the factory test mode.

[0163] As shown in Figure 10 The chip system 1000 includes at least one processor 1001 and at least one interface circuit 1002. The at least one processor 1001 and the at least one interface circuit 1002 can be interconnected through a line. The processor 1001 is configured to support the to-be-tested device to implement each step in the method embodiments described above. The at least one interface circuit 1002 can be configured to receive a signal from another device (for example, a memory) or send a signal to another device (for example, a communication interface). The chip system can include a chip and can also include other discrete devices.

[0164] The embodiments of the present application further provide a computer storage medium including instructions, when the instructions are executed on the to-be-tested device, the to-be-tested device performs each step in the method embodiments described above.

[0165] The embodiments of the present application further provide a computer program product including instructions, when the instructions are executed on the to-be-tested device, the to-be-tested device performs each step in the method embodiments described above.

[0166] The technical effects of the chip system, the computer storage medium, and the computer program product are referred to the technical effects of the method embodiments described above.

[0167] It should be understood that, in various embodiments of the present application, the size of the sequence number of each process described above does not mean the order of execution, the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0168] Those skilled in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0169] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and module described above can refer to the corresponding process in the method embodiments described above, which will not be repeated here.

[0170] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the embodiments of the device described above are merely schematic. For example, the division of the modules is merely logical function division. There can be another division manner for the actual implementation. For example, a plurality of modules or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be in electrical, mechanical or other forms.

[0171] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one device or distributed on a plurality of devices. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0172] In addition, each functional module in each embodiment of the present application can be integrated in one device, or each module can be physically present alone, or two or more modules can be integrated in one device.

[0173] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer storage medium or transmitted from one computer storage medium to another computer storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer storage medium can be any available medium that can be accessed by a computer or include one or more data storage devices such as servers, data centers, etc. integrated with the medium. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)) and the like.

[0174] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A test method characterized by, The method is applied to a device under test, the device under test comprising a first framework and a second framework; the first framework comprising an atcmd server, and the second framework comprising a factory test service; the method comprising: The device under test enters a factory test mode based on a factory test instruction from a control device; The atcmd server of the device under test selects a first target channel as a test channel based on a first target channel selection instruction from the control device; wherein the first target channel is used for the atcmd server to communicate with a modem of the device under test through the factory test service; The modem of the device under test receives a first target test instruction from the control device through the first target channel; The modem controls the device under test to be in a first test state based on the first target test instruction; wherein in the first test state, the control device is used to test a current of the device under test.

2. The test method of claim 1, wherein, The device under test enters a factory test mode based on a factory test instruction from a control device, comprising: A small kernel of the device under test sets a configuration file androidboot.init.rc to factory_init.rc based on the factory test instruction; The small kernel of the device under test allocates the configuration file factory_init.rc to an initialization service through a kernel; The initialization service runs the configuration file factory_init.rc to start a factory test service; wherein after the factory test service is started, the device under test enters the factory test mode.

3. The test method of claim 2, wherein, The method further comprises: During the process that the initialization service runs the configuration file factory_init.rc, the device under test provides a PCUI port for the control device; Wherein the PCUI port is used for the device under test to receive an instruction from the control device, the instruction comprising the first target channel selection instruction, a second target channel selection instruction, the first target test instruction, a second target test instruction and a third target test instruction.

4. The test method according to any one of claims 1 to 3, characterized in that, The first target channel comprises a first sub-channel, which is used for the atcmd server to communicate with the modem of the device under test through the factory test service; The first target channel further comprises a second sub-channel, which is used for the atcmd server to communicate with a second module in the second framework through the factory test service.

5. The test method of claim 4, wherein, The method further comprises: The second module receives a second target test instruction from the control device through the second sub-channel; The second module controls the device under test to be in a second test state based on the second target test instruction; wherein in the second test state, the control device is used to test a current of the device under test.

6. The test method according to any one of claims 1 to 5, characterized in that, The device under test further comprises a socket service; the atcmd server and the factory test service communicate through the socket service.

7. The test method according to any one of claims 1 to 6, characterized in that, The first framework comprises a first module; the method further comprises: The atcmd server of the device under test selects a second target channel as a test channel based on a second target selection channel instruction from the control device; wherein the second target channel is used for communication between the atcmd server and the first module; The first module receives a third target test instruction from the control device through the second target channel; The first module controls the device under test to be in a third test state based on the third target test instruction; wherein in the third test state, the control device is used to test the current of the device under test.

8. A device under test, characterized by, comprises a memory, a processor and a communication interface; the memory and the communication interface are coupled with the processor; the communication interface is used to connect a control device; the processor is configured with a first framework and a second framework, the first framework comprises an atcmd server, and the second framework comprises a factory test service; the memory stores instructions, and when the processor executes the instructions, the method in any one of claims 1-7 is executed.

9. A test system, characterized by comprises a control device and a power supply, the power supply is connected with the control device, and the power supply and the control device are further used to connect a device under test; the control device is used to send an instruction to the device under test, and when the device under test executes the instruction, the method in any one of claims 1-7 is executed.

10. A computer-readable storage medium, characterized in that, comprises instructions, and when the instructions are executed on a device under test, the device under test executes the method in any one of claims 1-7.

11. A computer program product, characterised in that, comprises instructions, and when the instructions are executed on a device under test, the device under test executes the method in any one of claims 1-7.