CN115640182A - Test method, chip, electronic device, and storage medium - Google Patents
Test method, chip, electronic device, and storage medium Download PDFInfo
- Publication number
- CN115640182A CN115640182A CN202211351479.4A CN202211351479A CN115640182A CN 115640182 A CN115640182 A CN 115640182A CN 202211351479 A CN202211351479 A CN 202211351479A CN 115640182 A CN115640182 A CN 115640182A
- Authority
- CN
- China
- Prior art keywords
- test
- starting
- detection
- electronic device
- anomaly detection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The application provides a test method, a chip, an electronic device and a storage medium, wherein the method comprises the following steps: starting a starting-up test in response to a starting operation of a user, wherein the starting-up test is used for testing a starting-up function by circularly starting up the electronic equipment; in the starting-up test process, acquiring system information of the electronic equipment, and performing anomaly detection based on the system information; and if the abnormity is detected, ending the starting test. The method provided by the application can effectively detect the abnormity of the electronic equipment in the starting test process.
Description
Technical Field
The present application relates to the field of terminal testing, and in particular, to a testing method, a chip, an electronic device, and a storage medium.
Background
The power on/off function is a very important function of an intelligent terminal (for example, a mobile phone), once a problem occurs in the power on/off process, an irreversible influence is caused, the use of a user is seriously influenced, and the stability of the power on/off function has a crucial influence on the quality of a product.
Therefore, in the stability test, the test of the switch machine class is the most basic and the most important test item, and the improvement of the stability of the switch machine is beneficial to improving the user experience.
Currently, in the test of the power on and power off, only the abnormality which can not be normally turned on and off can be found, and other types of abnormality, such as the abnormality of software class, can not be detected. After the software type exception of some subsystems in the intelligent terminal occurs, the intelligent terminal may still be normally turned on and turned off, however, the software type exception may affect the use of other functions, may affect the use of the user, and thus may affect the experience of the user.
Disclosure of Invention
The application provides a test method, a chip, electronic equipment and a storage medium, which can effectively detect the abnormity of the electronic equipment in the starting test.
In a first aspect, the present application provides a testing method applied to an electronic device, including:
starting a starting-up test in response to a starting operation of a user, wherein the starting-up test is used for testing a starting-up function by circularly starting up the electronic equipment;
in the starting-up test process, acquiring system information of the electronic equipment, and performing anomaly detection based on the system information;
and if the abnormity is detected, ending the starting test.
In the application, the abnormity of the electronic equipment can be effectively detected through the detection of the abnormity in the starting test process, and the function abnormity of the electronic equipment caused by the abnormity can be avoided, so that the influence on a user can be reduced.
In one possible implementation manner, the anomaly detection at least includes software anomaly detection and/or peripheral anomaly detection, where the software anomaly detection is used to detect software, and the peripheral anomaly detection is used to detect a peripheral.
In one possible implementation manner, the software type anomaly detection is an android framework layer restart detection, in the process of the power-on test, system information of the electronic device is acquired, and performing anomaly detection based on the system information includes:
in the process of the starting-up test, after the electronic equipment is started up every time, judging whether the android frame layer is restarted;
and performing abnormality detection based on the judgment result.
In one possible implementation manner, the software-based anomaly detection includes modem assertion detection, modem blocking detection, or wireless connection assertion detection, and in the boot test process, acquiring system information of the electronic device, and performing anomaly detection based on the system information includes:
in the process of the starting-up test, after the electronic equipment is started up every time, monitoring an abnormal notification;
performing anomaly detection based on the anomaly notification;
wherein the exception notification is a notification issued when the modem assertion, modem blocking, or wireless connection assertion occurs.
In one possible implementation manner, the software-based abnormality detection is abnormal system restart detection, and in the process of the start-up test, obtaining system information of the electronic device, and performing abnormality detection based on the system information includes:
in the process of the starting-up test, reading the value of the system attribute after the electronic equipment is started up each time;
anomaly detection is performed based on the values of the system attributes.
In one possible implementation manner, the software-type anomaly detection is sensor anomaly detection, the acquiring system information of the electronic device during the boot test, and performing anomaly detection based on the system information includes:
in the process of the starting-up test, after the electronic equipment is started up every time, acquiring a sensor object which is registered successfully;
judging whether the sensor corresponding to the sensor object which is successfully registered on the electronic equipment or not;
and performing abnormality detection based on the judgment result.
In one possible implementation manner, the software-based anomaly detection is an anomaly detection of a secure digital SD card, and the acquiring system information of the electronic device during the boot test includes:
in the process of the starting-up test, after the electronic equipment is started up every time, detecting whether a path of an SD card is stored in the electronic equipment or not;
and performing abnormity detection based on the path detection result.
In one possible implementation manner, the software type anomaly detection is a USB plug and play (OTG) anomaly detection, and the acquiring system information of the electronic device during the boot test includes:
in the process of the starting-up test, after the electronic equipment is started up every time, matching the total number of the USB equipment objects in the USB equipment list with the total number of the actually connected USB equipment;
and performing anomaly detection based on the matching result.
In one possible implementation manner, the method further includes:
and if the abnormality is detected, recording the abnormality information.
In one possible implementation manner, the method further includes:
and if the abnormality is detected, sending a prompt to the user.
In one possible implementation manner, the method further includes:
and if the accumulated times of the starting test exceeds a preset threshold value, ending the starting test.
In a second aspect, the present application provides a chip comprising one or more functional modules for performing the test method according to the first aspect.
In a third aspect, the present application provides an electronic device, comprising: a processor and a memory for storing a computer program; the processor is configured to run the computer program to implement the testing method according to the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to carry out the testing method according to the first aspect.
In a fifth aspect, the present application provides a computer program, which, when run on a processor of an electronic device, causes the electronic device to perform the testing method of the first aspect.
In a possible design, the program of the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a testing method provided herein;
fig. 2 is a schematic structural diagram of a chip provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the embodiments of the present application, unless otherwise specified, the character "/" indicates that the former and latter associated objects are in one or the other relationship. For example, A/B may represent A or B. "and/or" describes the association relationship of the association object, indicating that there may be three relationships. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone.
It should be noted that the words "first", "second", and the like, referred to in the embodiments of the present application, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit indication of the number of technical features indicated, nor as indicating or implicit order.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. Further, "at least one of the following" or similar expressions refer to any combination of these items, and may include any combination of a single item or a plurality of items. For example, at least one (one) of a, B, or C, may represent: a, B, C, A and B, A and C, B and C, or A, B and C. Each of a, B, and C may itself be an element, or may be a set including one or more elements.
In the present application embodiments, "exemplary," "in some embodiments," "in another embodiment," and the like are used to mean serving as an example, illustration, or description. Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term using examples is intended to present concepts in a concrete fashion.
In the embodiments of the present application, "of", "corresponding", and "corresponding" may be sometimes used in combination, and it should be noted that the intended meaning is consistent when the difference is not emphasized. In the embodiments of the present application, communication and transmission may be mixed, and it should be noted that the expressions are consistent when the differences are not emphasized. For example, a transmission may include a transmission and/or a reception, either a noun or a verb.
The method can be used with a larger than device and is applicable to the technical scheme adopted when the size is larger than the size, and can also be used with a smaller than device and is applicable to the technical scheme adopted when the size is smaller than the size. It should be noted that, when the ratio is equal to or greater than the ratio, the ratio is not equal to or less than the ratio; when the ratio is equal to or less than the combined ratio, the ratio is not greater than the combined ratio.
At present, in a test of a power on/off device, only an abnormality that the power on/off device cannot be normally turned on/off can be found, but an abnormality of a software class cannot be detected, for example, after the abnormality of the software class of some subsystems in an intelligent terminal occurs, the intelligent terminal may still be normally turned on/off, however, the abnormality of the software class may affect the use of other functions, may affect the use of a user, and thus may affect the experience of the user. Therefore, it is an urgent problem to effectively detect software exception in the power on/off test.
Based on the above problem, an embodiment of the present application provides a testing method, which is applied to an electronic device, where the electronic device may be an intelligent terminal with an operating system. Illustratively, the operating system includes, but is not limited to, android, IOS, and the like. The electronic device may be a fixed terminal, such as a desktop computer, a monitoring device, a smart screen, a large screen, a notebook computer, and the like, and the electronic device may also be a mobile terminal, such as a mobile phone, a tablet, a vehicle-mounted terminal, a vehicle-mounted recorder, and the like. A mobile terminal can also be called a User Equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a User terminal, a wireless communication device, a User agent, or a User Equipment. The Mobile terminal may be a Station (ST) in a WLAN, and may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with Wireless communication capability, a computing device or other processing device connected to a Wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite radio device, a Wireless modem card, a Set Top Box (STB), a Customer Premises Equipment (CPE), and/or other devices for communicating over a Wireless system, as well as a next generation communication system, such as a Mobile terminal in a 5G Network or a Mobile terminal in a future-evolution Public Land Mobile Network (PLMN) Network, and the like. The mobile terminal may also be a wearable device. Wearable equipment also can be called wearing formula smart machine, is the general term of using wearing formula technique to carry out intelligent design, developing the equipment that can wear to daily wearing, like glasses, wrist-watch etc..
The test method provided by the embodiment of the present application is now exemplified with reference to fig. 1. The testing method provided by the embodiment of the application can be applied to electronic devices with different operating systems, and for convenience of description, an android operating system is taken as an example for exemplary description, but the embodiment of the application is not limited enough.
Fig. 1 is a schematic flow chart of an embodiment of a testing method provided in the present application, which specifically includes the following steps:
step 101, responding to a starting operation of a user, starting a starting test.
Specifically, the user may operate on an interface of the electronic device to initiate the power-on test. For example, the user may click on an icon of the application for the power-on test. And responding to the starting operation of the user, and starting the starting test. The boot test is used for testing a boot function by circularly booting the electronic equipment.
It is understood that the manner of clicking the application icon to start the power-on test is merely an example, and does not limit the embodiments of the present application, and in some embodiments, the power-on test may be started in other manners. The software for the boot test may exist independently as an application program, or may be integrated by other systems or tools.
The power-on test can at least comprise the following three test modes.
Mode 1, on/off test mode
The power-on and power-off test mode may be a test mode consisting of an independent power-on action and an independent power-off action. For example, taking the power-on test software as an application program, after the test is started, the application program may first send a power-off command, and in response to the received power-off command, the electronic device is automatically powered off, so that the automatic power-on and power-off test of the electronic device may be implemented. It can be understood that the application program may directly send the shutdown command after the test is started, or may send the shutdown command after the first preset time period, where the first preset time period may be set according to actual needs, and this is not particularly limited in this embodiment of the application. The electronic device may be automatically turned on after being turned off, and it may be understood that the automatic turning on may be performed immediately after the electronic device is turned off, or may be performed after a preset second time period is set, where the preset second time period may be set according to an actual need, and this is not particularly limited in this embodiment of the present application. And when the electronic equipment is restarted, and the electronic equipment is restarted according to the shutdown mode, and the cycle is repeated, so that repeated startup and shutdown tests can be realized.
Mode 2, restart test mode
The restart test mode may be a test mode consisting of a set of associated power-on and power-off actions. For example, taking the boot test software as the application program, after the test is started, the application program may send a restart command, and in response to the received restart command, the electronic device is automatically powered off, and is powered on immediately after being powered off, so that the automatic restart test of the electronic device may be implemented. It is understood that after the electronic device is powered on, the application program may send the restart command again, thereby implementing repeated restart tests.
Mode 3, timed boot test mode
The timed-on test mode is a test mode capable of performing timed-on. For example, taking the boot test software as the application program, the user may preset the boot time, and after the test is started, the application program may first send a shutdown command, and in response to the received shutdown command, the electronic device is automatically shutdown. Then, the electronic device can automatically start at the preset starting time, so that automatic timing starting test can be realized. It is understood that after the electronic device is powered on, the application program may send the power-off command again, thereby implementing the repeated timed power-on test.
It is understood that, in the embodiment of the present application, the three power-on test modes are taken as examples for illustration, but the embodiment of the present application is not limited to the examples, and in some embodiments, other modes of power-on test modes may also be included.
The user can pre-configure one or a combination of multiple modes of the three modes to perform the boot test, which is not particularly limited in the embodiment of the present application, so that the method can be applied to different test scenarios, thereby improving the flexibility of the boot test.
102, in the starting-up test process, system information of the electronic equipment is obtained, and abnormality detection is carried out based on the system information.
Specifically, the abnormality detection may include at least 2 types, for example, software-based abnormality detection and peripheral-based abnormality detection. The software anomaly detection can be used for detecting software, and can include restarting of an android frame (Framework) layer, kernel crash (kernel crash), modem assertion (modem alert), modem block (modem block), wireless connection assertion (wcn alert), abnormal system restart and abnormal sensor detection, wherein the sensors include but are not limited to an acceleration sensor, a gyroscope sensor, an ambient light sensor, an electromagnetic field sensor, a direction sensor, a pressure sensor, a distance sensor, a temperature sensor and the like. The peripheral type abnormality detection can be used for detecting peripherals, and can include detection of a Secure Digital (SD) card abnormality and a Universal Serial Bus On-The-Go (USB OTG) peripheral abnormality, so that software and/or peripherals can be detected, and The abnormality detection range is widened.
It is understood that the above-mentioned software-based exception detection and peripheral-based exception detection are only exemplary, but do not limit the embodiments of the present application, and in some embodiments, other types of exception detection may be included.
For example, when the android frame layer is restarted, the cumulative number of times of restarting the android frame layer can be recorded. After the electronic device is started up each time, the number of accumulated times for restarting the android framework layer can be detected first, if the android framework layer is found to be restarted in the test process through detection, for example, an initial value of the number of accumulated times for restarting the android framework layer can be set to 0, after the android framework layer is restarted, the number of accumulated times for restarting the android framework layer can be automatically increased to 1, if the number of accumulated times for restarting the android framework layer is detected to be 1, the android framework layer can be considered to be restarted, at this moment, the abnormality can be considered to be detected, and step 103 can be further executed.
Taking modem assertion detection as an example, when a modem assertion occurs, its corresponding module, e.g., modem, may send an exception notification in the form of a broadcast for notifying that a modem assertion has occurred. The electronic device may monitor the exception notification during the test process, for example, after the electronic device is powered on each time, if the exception notification is monitored, the exception may be identified, for example, whether the exception is a modem assertion may be identified, and if the exception is identified as a modem assertion, step 103 may be further performed.
It is to be understood that the detection of modem blocking and radio connection assertion may specifically refer to the detection of modem assertion described above, and will not be described herein again.
Taking the abnormal restart detection of the system as an example, the system attribute of the android, for example, ro.bootmode, has a normal value at the time of normal startup, for example, normal; when the system is abnormally powered on, the value of the system attribute is an abnormal value, such as unknow, special, panic, etc. Therefore, after the electronic device is powered on each time, the value of the system attribute may be detected, and if it is detected that the value of the system attribute is not a normal value, it may be considered that an abnormality is detected, and step 103 may be further performed.
Taking sensor anomaly detection as an example, various sensors are registered in the system during the startup process of the electronic device. After the electronic device is powered on each time, the electronic device may obtain the sensor objects that have been successfully registered through a relevant interface, for example, a sensoranger interface, and detect one by one whether the sensor corresponding to each sensor object is successfully registered on the electronic device through traversal of the sensor objects, and if the sensor corresponding to any sensor object fails to be registered, for example, the sensor corresponding to any sensor object is not found on the electronic device, it may be considered that an anomaly is detected, and step 103 may be further performed.
Taking the SD card abnormality detection as an example, if the SD card can be normally mounted on the electronic device, a path may indicate the SD card in the file system of the electronic device, for example, the path may be/storage/4793-09F 9. After the electronic device is turned on each time, the electronic device may detect whether the path exists, and if the path does not exist, it may be considered that an abnormality is detected, and step 103 may be further performed.
Taking the USB OTG peripheral anomaly detection as an example, if the USB device is successfully mounted on the electronic device, the object of the USB device will be written into the USB device list. After the electronic device is powered on each time, the electronic device may obtain a USB device list through a relevant portal, for example, a UsbManger interface, where the USB device list includes a USB device object that has been successfully mounted. Next, the electronic device may compare the total number of USB device objects in the USB device list with the total number of actually connected USB devices, and if the total number of USB device objects in the USB device list is not consistent with the total number of actually connected USB devices, it may be considered that an abnormality is detected, and step 103 may be further performed.
Step 103, if the abnormality is detected, ending the boot test.
Specifically, when an anomaly is detected, the power-on test may be terminated. Thus, abnormal information can be positioned.
In some optional embodiments, after the abnormality is detected, the abnormality information may be further recorded, for example, a test log may be generated based on the abnormality information and stored. The exception information may include a corresponding exception type.
In some optional embodiments, after the abnormality is detected, the abnormality information may be reminded to remind a user of the abnormality found in the boot test process. The reminding mode includes but is not limited to voice reminding, screen flashing reminding, light reminding, vibration reminding and the like.
In some optional embodiments, the user may also preset a maximum test time, when the electronic device performs a power-on test, first, whether the cumulative time of the current test reaches the preset maximum test time may be detected, and if the cumulative time of the current test reaches the preset maximum test time, the power-on test may be ended; if the accumulated times of the current test does not reach the preset maximum test times, the startup test can be continued, and therefore the flexibility of the test can be improved.
In the embodiment of the application, the abnormity of the electronic equipment can be effectively detected by detecting the abnormity in the starting test process, and the function abnormity of the electronic equipment caused by the abnormity can be avoided, so that the influence on a user can be reduced.
Fig. 2 is a schematic structural diagram of an embodiment of a chip of the present application, and as shown in fig. 2, the chip 20 may include: a starting module 21, a detecting module 22 and a stopping module 23; wherein,
a starting module 21, configured to start a startup test in response to a starting operation of a user, where the startup test is used to perform a test of a startup function by circularly starting up the electronic device;
the detection module 22 is configured to, during the boot test, acquire system information of the electronic device, and perform anomaly detection based on the system information;
and the stopping module 23 is configured to end the boot test if the abnormality is detected.
In one possible implementation manner, the anomaly detection at least includes software anomaly detection and/or peripheral anomaly detection, where the software anomaly detection is used to detect software and the peripheral anomaly detection is used to detect a peripheral.
In one possible implementation manner, the software type anomaly detection is android frame layer restart detection, and the detection module 22 is specifically configured to determine whether an android frame layer restart has occurred after the electronic device is started each time in the process of the startup test;
and performing abnormality detection based on the judgment result.
In one possible implementation manner, the software-based anomaly detection includes modem assertion detection, modem blocking detection, or wireless connection assertion detection, and the detection module 22 is specifically configured to monitor an anomaly notification after the electronic device is powered on each time in the process of the power-on test;
performing anomaly detection based on the anomaly notification;
wherein the exception notification is a notification issued when the modem assertion, modem blocking, or wireless connection assertion occurs.
In one possible implementation manner, the software anomaly detection is a system abnormal restart detection, and the detection module 22 is specifically configured to, in the process of the start-up test, read a value of a system attribute after the electronic device is started up each time;
anomaly detection is performed based on the values of the system attributes.
In one possible implementation manner, the software anomaly detection is sensor anomaly detection, and the detection module 22 is specifically configured to, in the process of the power-on test, obtain a sensor object that has been successfully registered after the electronic device is powered on every time;
judging whether the sensor corresponding to the sensor object which is successfully registered on the electronic equipment or not;
and performing abnormality detection based on the judgment result.
In one possible implementation manner, the software-based anomaly detection is an anomaly detection of a secure digital SD card, and the detection module 22 is specifically configured to detect whether a path of the SD card is stored in the electronic device after the electronic device is powered on each time in the process of the power-on test;
and performing anomaly detection based on the path detection result.
In one possible implementation manner, the software type anomaly detection is a USB plug and play (OTG) anomaly detection, and the detection module 22 is specifically configured to match the total number of USB device objects in the USB device list with the total number of actually connected USB devices after the electronic device is powered on each time in the process of the power-on test;
and carrying out anomaly detection based on the matching result.
In one possible implementation manner, the chip 20 further includes:
and the recording module is used for recording the abnormal information if the abnormality is detected.
In one possible implementation manner, the chip 20 further includes:
and the reminding module is used for sending a reminder to the user if the abnormity is detected.
In one possible implementation manner, the stopping module 23 may be further configured to terminate the power-on test if the cumulative number of times of the power-on test exceeds a preset threshold.
In one possible implementation manner, the power-on test mode includes one or more of a power-on/off test mode, a restart test mode, and a timed power-on test mode.
The chip 20 provided in the embodiment shown in fig. 2 may be used to implement the technical solution of the method embodiment shown in the present application, and the implementation principle and the technical effect thereof may be further referred to the related description in the method embodiment.
It should be understood that the above division of the modules of the chip 20 is only a division of logical functions, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can all be implemented in the form of software invoked by a processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the detection module may be a separate processing element, or may be integrated into a chip of the electronic device. The other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
In the above embodiments, the processors may include, for example, a CPU, a DSP, a microcontroller, or a digital Signal processor, and may further include a GPU, an embedded Neural Network Processor (NPU), and an Image Signal Processing (ISP), and the processors may further include necessary hardware accelerators or logic Processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program according to the technical solution of the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
An exemplary electronic device provided in embodiments of the present application is further described below in conjunction with fig. 3. Fig. 3 shows a schematic structural diagram of an electronic device 300.
The electronic device 300 may include: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the test method provided by the embodiment shown in fig. 1.
Fig. 3 illustrates a block diagram of an exemplary electronic device 300 suitable for implementing embodiments of the present application. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: one or more processors 310, a memory 320, a communication bus 340 connecting the various system components (including the memory 320 and the processors 310), and a communication interface 330.
A program/utility having a set (at least one) of program modules may be stored in memory 320, such program modules including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules generally perform the functions and/or methodologies of the embodiments described herein.
The processor 310 executes various functional applications and data processing, for example, implementing the test method provided by the embodiment of the present application, by executing the program stored in the memory 320.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is only an exemplary illustration, and does not limit the structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
In the above embodiments, the processors may include, for example, a CPU, a DSP, a microcontroller, or a digital Signal processor, and may further include a GPU, an embedded Neural Network Processor (NPU), and an Image Signal Processing (ISP), and the processors may further include necessary hardware accelerators or logic Processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program according to the technical solution of the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
Embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the method provided by the embodiments shown in the present application.
Embodiments of the present application also provide a computer program product, which includes a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiments shown in the present application.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or a part of the technical solution may be as DD223212I
The software product is embodied in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.
The above description is only an embodiment of the present application, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and all of them should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.
Claims (15)
1. A testing method is applied to electronic equipment, and the method comprises the following steps:
starting a starting-up test in response to a starting operation of a user, wherein the starting-up test is used for testing a starting-up function by circularly starting up the electronic equipment;
in the starting-up test process, system information of the electronic equipment is obtained, and abnormality detection is carried out based on the system information;
and if the abnormity is detected, ending the starting test.
2. The method according to claim 1, wherein the anomaly detection comprises at least software-based anomaly detection for detecting software and/or peripheral-based anomaly detection for detecting a peripheral.
3. The method according to claim 2, wherein the software-based anomaly detection is android framework layer restart detection, the acquiring system information of the electronic device during the boot test, and performing anomaly detection based on the system information includes:
in the process of the starting-up test, after the electronic equipment is started up every time, judging whether the android frame layer is restarted;
and performing abnormality detection based on the judgment result.
4. The method of claim 2, wherein the software-based anomaly detection comprises modem assertion detection, modem blocking detection, or wireless connection assertion detection, and wherein during the boot test, obtaining system information of the electronic device, and performing anomaly detection based on the system information comprises:
in the process of the starting-up test, after the electronic equipment is started up every time, monitoring an abnormal notification;
performing anomaly detection based on the anomaly notification;
wherein the exception notification is a notification issued when the modem assertion, modem blocking, or wireless connection assertion occurs.
5. The method according to claim 2, wherein the software-class anomaly detection is system abnormal restart detection, the acquiring system information of the electronic device during the boot test, and performing anomaly detection based on the system information includes:
in the process of the starting-up test, reading the value of the system attribute after the electronic equipment is started up each time;
anomaly detection is performed based on the values of the system attributes.
6. The method according to claim 2, wherein the software-based anomaly detection is sensor anomaly detection, and the acquiring system information of the electronic device during the boot test includes:
in the process of the starting-up test, after the electronic equipment is started up every time, acquiring a sensor object which is registered successfully;
judging whether the sensor corresponding to the sensor object which is successfully registered on the electronic equipment or not;
and performing abnormality detection based on the judgment result.
7. The method according to claim 2, wherein the software-based anomaly detection is an anomaly detection of a secure digital SD card, and the acquiring system information of the electronic device during the boot test, and performing the anomaly detection based on the system information includes:
in the process of the starting-up test, after the electronic equipment is started up every time, detecting whether a path of an SD card is stored in the electronic equipment or not;
and performing abnormity detection based on the path detection result.
8. The method according to claim 2, wherein the software-class exception detection is USB over the Universal Serial Bus (USB) over the air (OTG) exception detection, and the obtaining system information of the electronic device during the boot test includes:
in the process of the starting-up test, after the electronic equipment is started up every time, matching the total number of the USB equipment objects in the USB equipment list with the total number of the actually connected USB equipment;
and carrying out anomaly detection based on the matching result.
9. The method according to any one of claims 1-8, further comprising:
and if the abnormality is detected, recording the abnormality information.
10. The method according to any one of claims 1-8, further comprising:
and if the abnormality is detected, sending a prompt to the user.
11. The method according to any one of claims 1-8, further comprising:
and if the accumulated times of the starting test exceeds a preset threshold value, ending the starting test.
12. The method of any of claims 1-8, wherein the power-on test mode comprises one or more of a power-on/off test mode, a reboot test mode, and a timed power-on test mode.
13. A chip, comprising:
the starting module is used for responding to the starting operation of a user and starting a starting test, and the starting test is used for testing the starting function by circularly starting the electronic equipment;
the detection module is used for acquiring system information of the electronic equipment in the starting-up test process and carrying out abnormity detection based on the system information;
and the stopping module is used for ending the starting test if the abnormity is detected.
14. An electronic device, comprising: a processor and a memory for storing a computer program; the processor is adapted to run the computer program to implement the testing method according to any of claims 1-12.
15. A computer-readable storage medium, characterized in that it stores a computer program which, when run on a computer, implements the testing method according to any one of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211351479.4A CN115640182A (en) | 2022-10-31 | 2022-10-31 | Test method, chip, electronic device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211351479.4A CN115640182A (en) | 2022-10-31 | 2022-10-31 | Test method, chip, electronic device, and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115640182A true CN115640182A (en) | 2023-01-24 |
Family
ID=84947716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211351479.4A Pending CN115640182A (en) | 2022-10-31 | 2022-10-31 | Test method, chip, electronic device, and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115640182A (en) |
-
2022
- 2022-10-31 CN CN202211351479.4A patent/CN115640182A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101782246B1 (en) | Methods and apparatus for controlled recovery of error information between independently operable processors | |
CN110286281B (en) | Method and equipment for aging test of intelligent equipment | |
CN109542744B (en) | Method, device, storage medium and terminal for detecting abnormal starting problem of terminal | |
CN109522147A (en) | Method, device, storage medium and terminal for recording abnormal startup information | |
CN102567177B (en) | System and method for detecting error of computer system | |
CN107885635B (en) | Black screen detection method, mobile terminal and computer readable storage medium | |
WO2022037495A1 (en) | Display screen anomaly recovery method and apparatus, computer device, and storage medium | |
US10219135B1 (en) | Near field communication (NFC) enhanced computing systems | |
CN109375956B (en) | A method for restarting an operating system, a logical device and a control device | |
CN107765922B (en) | Card screen detection and solution method, mobile terminal and computer readable storage medium | |
CN107908491B (en) | Card screen detection and solution method, mobile terminal and computer readable storage medium | |
CN104750537B (en) | Method and device for executing test case | |
CN111176958B (en) | Information monitoring method, system and storage medium | |
CN105893221B (en) | Method and device for alarming terminal running time | |
CN106021024B (en) | A user terminal stops responding prompt method and user terminal | |
US8769252B2 (en) | Computer system and method for resetting the same | |
CN107609114B (en) | Log information reporting method, device and storage medium, ADSP and terminal | |
CN107818036B (en) | Black screen detection method, mobile terminal and computer readable storage medium | |
CN107861827B (en) | Card screen detection method, mobile terminal and computer readable storage medium | |
CN115640182A (en) | Test method, chip, electronic device, and storage medium | |
CN111208363B (en) | Test method and electronic device | |
CN105844179A (en) | Terminal protection method and device | |
CN106603526B (en) | WiFi/hotspot starting method and device | |
CN104503881B (en) | The method of handheld device consumption detection, device and handheld device | |
CN109634782B (en) | A system robustness detection method, device, storage medium and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |