Device testing method, device, electronic device and storage medium
Through the test device between the power supply and electronic equipment, the startup timing and status monitoring are used to determine the abnormal power supply, automatic power outage is achieved, solving the problem that equipment cannot be powered off in time in traditional tests, and improving the reliability and efficiency of the test.
Patent Information
- Application Number
- CN202111020980.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-09-01
AI Technical Summary
Traditional power-on and shutdown tests cannot be powered off in time when startup fails, resulting in the equipment under test being unable to be protected, inefficient and large-scale testing.
Design a device testing method and device, which is located between the power supply and electronic equipment. By starting the timing, monitoring status information and failure signals, it determines the abnormal power supply, updates the number of failures and power off, ensuring that the equipment is powered off in time and avoids long-term power supply.
It improves the reliability of automatic power-on and shutdown tests, prevents equipment damage, and realizes rapid power outage of electronic devices, which is suitable for large-scale testing.
Smart Images

Figure CN115729754B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a device testing method, a device testing apparatus, an electronic device and a readable storage medium. Background Art
[0002] With the continuous development of computer technology, electronic products have become popular, and various electronic devices have poured into people's lives, and the safety and reliability of electronic products have become particularly important.
[0003] Multiple power-on and power-off tests are a must-test item for electronic products, and traditional power-on and power-off tests use manual or automatic power-on and power-off test procedures.
[0004] Manual testing is inefficient and cannot be performed on a large scale. The automatic switch test procedure makes up for the shortcomings of manual testing, but the device under test cannot be powered off in time when the startup fails, and the device under test is not protected. Summary of the invention
[0005] The technical problem to be solved by the embodiments of the present invention is to provide a device testing method, apparatus, electronic device and readable storage medium to solve the problem that the device under test cannot be powered off in time when the startup fails and the test device is not protected.
[0006] In order to solve the above problems, the present invention provides a device testing method, which is applied to a device testing apparatus located between a power supply and an electronic device, and the method comprises:
[0007] After controlling the electronic device to start, start timing;
[0008] Monitoring status information of the electronic device;
[0009] Determining whether a startup abnormality occurs in the electronic device according to the status information and / or the startup timing;
[0010] If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off.
[0011] Optionally, determining whether a startup abnormality occurs in the electronic device according to the status information and / or the startup timing includes:
[0012] If a failure signal sent by the electronic device is received, or a success signal sent by the electronic device is not received before the startup timing reaches the required startup time, it is determined that the electronic device is abnormal.
[0013] Optionally, the method further comprises:
[0014] If a success signal sent by the electronic device is received before the startup timing reaches the required startup time, the number of successful startup times is updated.
[0015] Optionally, the method further comprises:
[0016] A startup failure log of the electronic device is stored.
[0017] Optionally, the method further comprises:
[0018] Obtaining a single power-on duration and a single power-off duration of the electronic device;
[0019] Performing a first timing after receiving a success signal sent by the electronic device;
[0020] If the first timing reaches the duration of the single power-on, the electronic device is controlled to shut down and a second timing is performed;
[0021] If the second timing reaches the duration of the single shutdown, the electronic device is controlled to turn on.
[0022] Optionally, the method further comprises:
[0023] Obtaining the number of tests of the electronic device;
[0024] Before controlling the electronic device to start up, determining whether the number of tests reaches a set number threshold;
[0025] If the test number does not reach the set number threshold, control the electronic device to turn on and update the test number;
[0026] If the test times reaches the set times threshold, the test on the electronic device is stopped.
[0027] Accordingly, the present invention further provides a device testing apparatus, the device testing apparatus is located between a power source and an electronic device, and the apparatus comprises:
[0028] A startup timing module, used for starting timing after controlling the electronic device to start;
[0029] A status monitoring module, used to monitor the status information of the electronic device;
[0030] an abnormality determination module, used to determine whether the electronic device has a startup abnormality according to the state information and / or the startup timing;
[0031] The power-off module is used to update the number of startup failures and cut off the power supply of the electronic device if the electronic device has a startup abnormality.
[0032] Optionally, the abnormality determination module includes:
[0033] The determination submodule is used to determine that an abnormality occurs in the electronic device if a failure signal sent by the electronic device is received, or if a success signal sent by the electronic device is not received before the startup timing reaches the required startup time.
[0034] Optionally, the device further comprises:
[0035] The success number updating module is used to update the number of successful startup times if a success signal sent by the electronic device is received before the startup timing reaches the required startup time.
[0036] Optionally, the device further comprises:
[0037] The log storage module is used to store the startup failure log of the electronic device.
[0038] Optionally, the device further comprises:
[0039] A duration acquisition module, used to acquire a single power-on duration and a single power-off duration of the electronic device;
[0040] A first timing module, configured to perform a first timing after receiving a success signal sent by the electronic device;
[0041] A shutdown module, configured to control the electronic device to shut down and perform a second timing if the first timing reaches the single power-on duration;
[0042] A power-on module is used to control the electronic device to power on if the second timing reaches the single power-off duration.
[0043] Optionally, the device further comprises:
[0044] A times acquisition module, used to acquire the times of testing of the electronic device;
[0045] A times determination module, used for determining whether the test times reaches a set times threshold before controlling the electronic device to start up;
[0046] A times updating module, used for controlling the electronic device to start up and updating the times of the tests if the times of the tests do not reach the set times threshold;
[0047] The stopping module is used to stop the test on the electronic device if the number of tests reaches the set number threshold.
[0048] Accordingly, the present invention also provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0049] Memory, used to store computer programs;
[0050] The processor is used to implement any of the above-mentioned method steps when executing the program stored in the memory.
[0051] Correspondingly, the present invention also provides a readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the above-mentioned device testing method.
[0052] According to an embodiment of the present invention, a device testing device located between a power supply and an electronic device performs a start timing after controlling the electronic device to start up, monitors the status information of the electronic device, and determines whether the electronic device has a startup abnormality based on the status information and / or the start timing. If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off. When the electronic device is automatically powered on and off, if the electronic device under test has an abnormality or times out, the electronic device is powered off as soon as possible to prevent the electronic device from being powered on for a long time and being in an unknown state, thereby avoiding damage to the electronic device and improving the reliability of the automatic power on and off test. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A flowchart showing the steps of a device testing method according to the first embodiment of the present invention is shown;
[0054] Figure 2 shows a structural block diagram of the equipment testing device;
[0055] Figure 3 A flowchart showing the steps of a device testing method according to the second embodiment of the present invention is shown;
[0056] Figure 4 A schematic diagram showing the power on / off test process is shown;
[0057] Figure 5 A structural block diagram of a device testing apparatus embodiment of the third embodiment of the present invention is shown;
[0058] Figure 6 A structural block diagram of an electronic device for device testing according to an exemplary embodiment is shown. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Reference Figure 1 , shows a flow chart of the steps of a device testing method according to the first embodiment of the present invention, which is applied to a first device and may specifically include the following steps:
[0061] Step 101, start timing after controlling the electronic device to start up.
[0062] In an embodiment of the present invention, the electronic device includes a mobile phone, a computer, a tablet computer, etc., or any other applicable device, and the embodiment of the present invention does not limit this. In order to perform a power on and off test on the electronic device, a device testing device is designed, which is located between the power supply (or input power supply) and the electronic device when in use. The device testing device can control the electronic device to start up, and after determining that the electronic device is turned on, the device testing device starts the start timing, and then waits for the electronic device to start up successfully, and sends a success signal of successful startup or a failure signal of failed startup to the device testing device.
[0063] For example, Figure 2 As shown in the structural block diagram of the device testing device, the device testing device can be composed of a microcontroller, a display module, a key module, a control module, a monitoring module, a storage module and a power module; wherein the microcontroller is respectively connected to the power module, the control module, the detection module, the display module, the key module and the storage module, and the microcontroller is used to control each other module in the device testing device; in addition, the microcontroller is also connected to the electronic device for receiving various signals sent by the electronic device and responding to the received signals; the power module is also connected to the control module, and the power module is used to connect an external input power supply to power each module in the device testing device, and output voltage through the control module and the monitoring module, so as to power the electronic device; the control module is also connected to the detection module for controlling the monitoring module, and the control module is used to receive instructions from the microcontroller to control whether to power the electronic device; the monitoring module is connected to the external output power supply, and the monitoring module is used to monitor the status information of the electronic device and feed it back to the microcontroller, so that the microcontroller can determine whether the electronic device is abnormal according to the status information; the display module is used to display the test results; the key module is used to receive the user's operation; the storage module is used to store data. During operation, the input power supply is connected to the power module in the equipment testing device, the monitoring module in the equipment testing device is connected to the output power supply, the output power supply is connected to the electronic device, and the electronic device is also connected to the microcontroller in the equipment testing device; the microcontroller can also directly receive the success signal or failure signal sent by the electronic device.
[0064] Step 102: monitor status information of the electronic device.
[0065] In the embodiment of the present invention, the device testing apparatus may monitor status information of the electronic device, such as current and temperature, or any other applicable information related to the status of the electronic device, which is not limited in the embodiment of the present invention.
[0066] Step 103: Determine whether a startup abnormality occurs in the electronic device according to the status information and / or the start timing.
[0067] In an embodiment of the present invention, the device testing device can determine whether the electronic device has a startup abnormality based on the status information, for example, when the current and temperature are abnormal and reach a certain set threshold, it is determined that the electronic device has a startup abnormality. The device testing device can also determine whether the electronic device has a startup abnormality based on the startup timing, for example, before the startup timing reaches the required startup time, a failure signal sent by the electronic device is received, or before the startup timing reaches the required startup time, a success signal sent by the electronic device is not received, then it is determined that the electronic device has an abnormality. The device testing device can also determine whether the electronic device has a startup abnormality based on the status information and the startup timing, for example, when the current and temperature are abnormal and reach a certain set threshold, and before the startup timing reaches the required startup time, a success signal sent by the electronic device is not received, then it is determined that the electronic device has an abnormality. Specifically, any applicable method for determining the startup abnormality can be set according to actual needs, and the embodiment of the present invention does not limit this.
[0068] In an embodiment of the present invention, optionally, a specific implementation method of determining whether the electronic device has a startup abnormality based on the status information and / or the startup timing may include: if a failure signal sent by the electronic device is received, or a success signal sent by the electronic device is not received before the startup timing reaches the startup time required, it is determined that the electronic device has an abnormality.
[0069] One situation is that when the electronic device fails to start up successfully, it sends a failure signal to the device testing device. The device testing device receives the failure signal sent by the electronic device. Another situation is that the electronic device has an abnormality and cannot communicate with the device testing device after exceeding the set startup time. Before the startup timer reaches the startup time, the device testing device does not receive the success signal sent by the electronic device. Both situations can determine that the electronic device has an abnormality.
[0070] Step 104: If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off.
[0071] In an embodiment of the present invention, if a startup abnormality of an electronic device is monitored, in order to protect the electronic device, the startup test is promptly determined as a startup failure, the number of startup failures is updated, and the power supply of the electronic device is cut off to ensure that the electronic device is shut down and powered off.
[0072] In the embodiment of the present invention, optionally, the method may further include: storing a startup failure log of the electronic device.
[0073] For different boot failure situations, the boot failure log is stored to record the type of boot failure, such as receiving a failure signal, not receiving a success signal after timeout, detecting a boot abnormality, etc., for subsequent analysis by the debugging personnel.
[0074] According to an embodiment of the present invention, a device testing device located between a power supply and an electronic device performs a start timing after controlling the electronic device to start up, monitors the status information of the electronic device, and determines whether the electronic device has a startup abnormality based on the status information and / or the start timing. If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off. When the electronic device is automatically powered on and off, if the electronic device under test has an abnormality or times out, the electronic device is powered off as soon as possible to prevent the electronic device from being powered on for a long time and being in an unknown state, thereby avoiding damage to the electronic device and improving the reliability of the automatic power on and off test.
[0075] Reference Figure 3 , shows a flow chart of the steps of a device testing method according to the second embodiment of the present invention, which may specifically include the following steps:
[0076] Step 201, obtaining a single power-on duration and a single power-off duration of the electronic device, as well as the number of tests.
[0077] In the embodiment of the present invention, before starting the power on / off test of the electronic device, the single power on duration and the single power off duration, as well as the setting number threshold and the startup time required are set. For example, the device test device starts working at the input power supply, and the setting number threshold N, the single power on duration T1, the single power off duration T2, the startup time required T3 and other parameters are set through the key device.
[0078] In the embodiment of the present invention, the equipment testing device records the current test number, and obtains the test number from the memory. For example, the test number O is obtained from the storage module of the equipment testing device.
[0079] Step 202, before controlling the electronic device to start up, determining whether the number of tests reaches a set number threshold.
[0080] In the embodiment of the present invention, before the first power-on, it is not necessary to determine whether the number of tests reaches the set number threshold. Before subsequent tests, it is necessary to determine whether the number of tests reaches the set number threshold. The set number threshold can be set according to actual needs, and the embodiment of the present invention does not limit this.
[0081] Step 203: If the test number does not reach the set number threshold, the electronic device is controlled to power on and the test number is updated.
[0082] In the embodiment of the present invention, if the number of tests does not reach the set number threshold, the electronic device is controlled to power on and the number of tests is updated, that is, the number of tests is increased by one.
[0083] Step 204: If the number of tests reaches the set number threshold, stop testing the electronic device.
[0084] In the embodiment of the present invention, if the number of tests reaches a set number threshold, the test on the electronic device is stopped, and multiple power-on and power-off tests on the electronic device are completed.
[0085] Step 205, starting timing after controlling the electronic device to start up.
[0086] Step 206: monitor the status information of the electronic device.
[0087] Step 207: Determine whether a startup abnormality occurs in the electronic device according to the status information and / or the start timing.
[0088] Step 208: If the electronic device has a startup abnormality, the startup failure count is updated and the power supply of the electronic device is cut off. After the electronic device is shut down, step 212 is executed.
[0089] Step 209: If a success signal sent by the electronic device is received before the startup timing reaches the required startup time, the number of successful startup times is updated.
[0090] In an embodiment of the present invention, the time required for startup is a preset time required for the electronic device to start up, which can be set according to actual needs, and the embodiment of the present invention does not limit this. If a success signal sent by the electronic device is received before the startup timing reaches the time required for startup, it indicates that the electronic device is successfully started this time. The device testing device stores the number of successful startups this time. The number of successful startups is set to 0 when an electronic device is turned on and off for the first time. After receiving the success signal, the number of successful startups can be updated, for example, the number of successful startups is increased by one.
[0091] In the embodiment of the present invention, by counting the number of startup failures and the number of startup successes, the probability of successful startup in multiple tests can be finally obtained.
[0092] Step 210: performing a first timing after receiving a success signal sent by the electronic device.
[0093] In the embodiment of the present invention, after receiving the success signal from the electronic device, it indicates that the electronic device is started successfully, and the first timing starts.
[0094] Step 211: If the first timing reaches the duration of the single power-on, the electronic device is controlled to shut down and a second timing is performed.
[0095] In the embodiment of the present invention, if the first timing reaches the duration of a single power-on, the electronic device is controlled to shut down and the second timing starts.
[0096] Step 212: If the second timing reaches the single shutdown duration, control the electronic device to turn on.
[0097] In an embodiment of the present invention, if the second timing reaches the duration of a single shutdown, the electronic device can be controlled to be turned on, thereby realizing an automatic cycle power on / off test. In an embodiment of the present invention, step 202 can be performed.
[0098] According to an embodiment of the present invention, a device testing device located between a power supply and an electronic device performs a start timing after controlling the electronic device to start up, monitors the status information of the electronic device, and determines whether the electronic device has a startup abnormality based on the status information and / or the start timing. If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off. When the electronic device is automatically powered on and off, if the electronic device under test has an abnormality or times out, the electronic device is powered off as soon as possible to prevent the electronic device from being powered on for a long time and being in an unknown state, thereby avoiding damage to the electronic device and improving the reliability of the automatic power on and off test.
[0099] Furthermore, by obtaining the single power-on duration and the single power-off duration of the electronic device, a first timing is performed after receiving a success signal sent by the electronic device. If the first timing reaches the single power-on duration, the electronic device is controlled to be shut down, and a second timing is performed. If the second timing reaches the single power-off duration, the electronic device is controlled to be turned on, thereby realizing an automatic cycle power on and off test.
[0100] Furthermore, by obtaining the number of tests of the electronic device, before controlling the electronic device to turn on, it is determined whether the number of tests reaches a set number threshold; if the number of tests does not reach the set number threshold, the electronic device is controlled to turn on and the number of tests is updated; if the number of tests reaches the set number threshold, the test of the electronic device is stopped, thereby realizing automatic power on and off testing of the electronic device for a set number of times.
[0101] In order to enable those skilled in the art to better understand the present invention, an implementation of the present invention is described below through specific examples.
[0102] like Figure 4 The schematic diagram of the power on / off test process is shown.
[0103] Step 1. Start testing.
[0104] Step 2: Set the number of times threshold to N.
[0105] Step 3: Set the single power-on duration to T1, the single power-off duration to T2, and the startup time to T3.
[0106] Step 4, control the electronic device to start up, test the number of times O+1, reset the timer T, and start timing.
[0107] Step 5: monitor whether the electronic device has any abnormality. If an abnormality occurs, execute step 8; if no abnormality occurs, execute step 6.
[0108] Step 6: Check whether a success signal is received. If no success signal is received, execute step 7. If a success signal is received, execute step 9.
[0109] Step 7: Determine whether T is greater than T3 or whether a failure signal is received. If T is not greater than T3 and no failure signal is received, continue timing. If T is greater than T3 or a failure signal is received, execute step 8.
[0110] Step 8: Store the abnormal log, the number of startup failures E+1, and then execute step 11.
[0111] Step 9: Store the number of successful boot-ups M+1, and reset T to zero, which means the first timing starts.
[0112] Step 10, determine whether T is equal to T1, if T is not equal to T1, continue the first timing, if T is equal to T1, execute step 11.
[0113] Step 11, control the electronic device to shut down, T is reset to zero, and the second timing begins.
[0114] Step 12, determine whether T is equal to T2, if T is not equal to T2, continue the second timing, if T is equal to T2, execute step 13.
[0115] Step 13, determine whether O is equal to N, if O is not equal to N, execute step 4, if O is equal to N, execute step 14.
[0116] Step 14: End the test.
[0117] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0118] Reference Figure 5 , shows a structural block diagram of an embodiment of a device testing device according to the third embodiment of the present invention, wherein the device testing device is located between a power supply and an electronic device, and may specifically include the following modules:
[0119] A startup timing module 301 is used to start timing after controlling the electronic device to start up;
[0120] A status monitoring module 302, used to monitor the status information of the electronic device;
[0121] An abnormality determination module 303, used to determine whether the electronic device has a startup abnormality according to the state information and / or the startup timing;
[0122] The power-off module 304 is used to update the number of power-on failures and cut off the power supply of the electronic device if the electronic device has a power-on abnormality.
[0123] In the embodiment of the present invention, optionally, the abnormality determination module includes:
[0124] The determination submodule is used to determine that an abnormality occurs in the electronic device if a failure signal sent by the electronic device is received, or if a success signal sent by the electronic device is not received before the startup timing reaches the required startup time.
[0125] In the embodiment of the present invention, optionally, the device further includes:
[0126] The success number updating module is used to update the number of successful startup times if a success signal sent by the electronic device is received before the startup timing reaches the required startup time.
[0127] In the embodiment of the present invention, optionally, the device further includes:
[0128] The log storage module is used to store the startup failure log of the electronic device.
[0129] In the embodiment of the present invention, optionally, the device further includes:
[0130] A duration acquisition module, used to acquire a single power-on duration and a single power-off duration of the electronic device;
[0131] A first timing module, configured to perform a first timing after receiving a success signal sent by the electronic device;
[0132] A shutdown module, configured to control the electronic device to shut down and perform a second timing if the first timing reaches the single power-on duration;
[0133] A power-on module is used to control the electronic device to power on if the second timing reaches the single power-off duration.
[0134] In the embodiment of the present invention, optionally, the device further includes:
[0135] A times acquisition module, used to acquire the times of testing of the electronic device;
[0136] A times determination module, used for determining whether the test times reaches a set times threshold before controlling the electronic device to start up;
[0137] A times updating module, used for controlling the electronic device to start up and updating the times of the tests if the times of the tests do not reach the set times threshold;
[0138] The stopping module is used to stop the test on the electronic device if the number of tests reaches the set number threshold.
[0139] According to an embodiment of the present invention, a device testing device located between a power supply and an electronic device performs a start timing after controlling the electronic device to start up, monitors the status information of the electronic device, and determines whether the electronic device has a startup abnormality based on the status information and / or the start timing. If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off. When the electronic device is automatically powered on and off, if the electronic device under test has an abnormality or times out, the electronic device is powered off as soon as possible to prevent the electronic device from being powered on for a long time and being in an unknown state, thereby avoiding damage to the electronic device and improving the reliability of the automatic power on and off test.
[0140] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0141] Figure 6 1 is a block diagram of an electronic device 700 for device testing according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0142] Reference Figure 6 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0143] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0144] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0145] The power component 704 provides power to various components of the electronic device 700. The power component 704 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0146] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0147] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0148] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0149] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of contact between the user and the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0150] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 714 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 714 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0151] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0152] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0153] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal, enables the terminal to perform a device testing method, applied to a device testing apparatus located between a power source and an electronic device, the method comprising:
[0154] After controlling the electronic device to start, start timing;
[0155] Monitoring status information of the electronic device;
[0156] Determining whether a startup abnormality occurs in the electronic device according to the status information and / or the startup timing;
[0157] If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off.
[0158] Optionally, determining whether a startup abnormality occurs in the electronic device according to the status information and / or the startup timing includes:
[0159] If a failure signal sent by the electronic device is received, or a success signal sent by the electronic device is not received before the startup timing reaches the required startup time, it is determined that the electronic device is abnormal.
[0160] Optionally, the method further comprises:
[0161] If a success signal sent by the electronic device is received before the startup timing reaches the required startup time, the number of successful startup times is updated.
[0162] Optionally, the method further comprises:
[0163] A startup failure log of the electronic device is stored.
[0164] Optionally, the method further comprises:
[0165] Obtaining a single power-on duration and a single power-off duration of the electronic device;
[0166] Performing a first timing after receiving a success signal sent by the electronic device;
[0167] If the first timing reaches the duration of the single power-on, the electronic device is controlled to shut down and a second timing is performed;
[0168] If the second timing reaches the duration of the single shutdown, the electronic device is controlled to turn on.
[0169] Optionally, the method further comprises:
[0170] Obtaining the number of tests of the electronic device;
[0171] Before controlling the electronic device to start up, determining whether the number of tests reaches a set number threshold;
[0172] If the test number does not reach the set number threshold, control the electronic device to turn on and update the test number;
[0173] If the test times reaches the set times threshold, the test on the electronic device is stopped.
[0174] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0175] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0176] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0179] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0180] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0181] The above is a detailed introduction to a device testing method and a device testing apparatus provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A device testing method, characterized in that: Applied to a device testing apparatus located between a power source and an electronic device, the method comprises: After controlling the electronic device to start, start timing; Monitoring status information of the electronic device, wherein the status information includes: current and temperature of the electronic device; Determining whether a startup abnormality occurs in the electronic device according to the status information and the startup timing; If the electronic device has a startup abnormality, the number of startup failures is updated and the power supply of the electronic device is cut off; The determining, based on the status information and the startup timing, whether the electronic device has a startup abnormality includes: When the current and temperature of the electronic device are abnormal and reach a set threshold, it is determined that the electronic device has a startup abnormality; If a failure signal sent by the electronic device is received before the startup timing reaches the required startup time, it is determined that an abnormality occurs in the electronic device, and the abnormality is that the electronic device fails to start successfully; If the success signal sent by the electronic device is not received before the startup timing reaches the required startup time, it is determined that an abnormality occurs in the electronic device, and the abnormality is that the electronic device cannot communicate with the device testing device.
2. The method according to claim 1, characterized in that The method further comprises: If a success signal sent by the electronic device is received before the startup timing reaches the required startup time, the number of successful startup times is updated.
3. The method according to claim 1, characterized in that The method further comprises: A startup failure log of the electronic device is stored.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtaining a single power-on duration and a single power-off duration of the electronic device; Performing a first timing after receiving a success signal sent by the electronic device; If the first timing reaches the duration of the single power-on, the electronic device is controlled to shut down and a second timing is performed; If the second timing reaches the duration of the single shutdown, the electronic device is controlled to turn on.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining the number of tests of the electronic device; Before controlling the electronic device to start up, determining whether the number of tests reaches a set number threshold; If the test number does not reach the set number threshold, control the electronic device to turn on and update the test number; If the test times reaches the set times threshold, the test on the electronic device is stopped.
6. A device testing apparatus, characterized in that: The device testing device is located between a power source and an electronic device, and the device comprises: A startup timing module, used for starting timing after controlling the electronic device to start; A status monitoring module, used to monitor the status information of the electronic device; an abnormality determination module, used to determine whether the electronic device has a startup abnormality according to the state information and the startup timing; A power-off module, used for updating the number of power-on failures and cutting off the power supply of the electronic device if the electronic device has a power-on abnormality; The abnormality determination module comprises: a determination submodule, configured to determine that an abnormality occurs in the electronic device if a failure signal sent by the electronic device is received before the startup timing reaches the required startup time, and the abnormality is that the electronic device fails to start successfully; Or if the success signal sent by the electronic device is not received before the startup timing reaches the required startup time, it is determined that an abnormality occurs in the electronic device, and the abnormality is that the electronic device cannot communicate with the device testing device.
7. The device according to claim 6, characterized in that The device also includes: The success number updating module is used to update the number of successful startup times if a success signal sent by the electronic device is received before the startup timing reaches the required startup time.
8. The device according to claim 6, characterized in that The device also includes: The log storage module is used to store the startup failure log of the electronic device.
9. The device according to any one of claims 6 to 8, characterized in that: The device also includes: A duration acquisition module, used to acquire a single power-on duration and a single power-off duration of the electronic device; A first timing module, configured to perform a first timing after receiving a success signal sent by the electronic device; A shutdown module, configured to control the electronic device to shut down and perform a second timing if the first timing reaches the single power-on duration; A power-on module is used to control the electronic device to power on if the second timing reaches the single power-off duration.
10. The device according to claim 6, characterized in that The device also includes: A times acquisition module, used to acquire the times of testing of the electronic device; A times determination module, used for determining whether the test times reaches a set times threshold before controlling the electronic device to start up; A times updating module, used for controlling the electronic device to start up and updating the times of the tests if the times of the tests do not reach the set times threshold; The stopping module is used to stop the test on the electronic device if the number of tests reaches the set number threshold.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
12. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the device testing method as described in one or more of method claims 1-5.
Citation Information
Patent Citations
Computer startup test system and method
CN101751304A
Startup / shutdown test system and startup / shutdown test method
CN102479120A
Testing method and device for automatic startup and shutdown of electronic products
CN103793306A
Automatic closed loop test method for frequent startup and shutdown of vehicle-mounted display
CN104268041A
Main unit testing system, method and device based on voltage, and readable storage medium
CN107843839A
