Background process resident test method, device, equipment and storage medium
By starting the target component in the Android system and allocating memory to it, monitoring its status, the problem of being affected by three-party applications in the background process residency test is solved, and stable and consistent test results are achieved, enhancing the flexibility of testing and automation.
Patent Information
- Application Number
- CN202110099246.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-25
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-01-25
AI Technical Summary
In the prior art, background process residency testing is greatly affected by the upgrade of the three-party application version, resulting in fluctuations in the test results and it is difficult to stably simulate the actual usage scenarios.
By starting the target component and controlling it to reside in the background process, allocating preset memory to it, monitoring its status, and outputting reside conditions according to the test cutoff conditions, adjusting the process priority to adapt to different scenarios.
It improves the stability and consistency of the test, avoids the influence of the three-party application version, realizes accurate testing of the residency of the background process, and enhances the flexibility and automation level of testing.
Smart Images

Figure CN112817844B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of mobile terminal automated testing, and in particular to a background process resident testing method, device, equipment and storage medium. Background Art
[0002] With the rise of the Android system, various applications have been expanding their businesses on the Android system, making the memory usage of applications larger and larger. At present, the dynamic memory recovery of the Android system is based on lowmemorykiller. When the memory is tight, lowmemorykiller is used to kill processes with lower priority to achieve the purpose of memory recovery. As the application memory increases, the background resident capability of the program is challenged. The common solution in the related technology is to install a fixed number of third-party applications on the terminal device, and then start each major program one after another to realize the background program resident simulation. Although this test method is closer to the actual use scenario of the terminal device, it is greatly affected by the version upgrade of the third-party application, and the results are prone to fluctuations. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a background process resident test method, device, equipment and storage medium to solve the defects in the related art.
[0004] According to a first aspect of an embodiment of the present disclosure, a background process resident testing method is provided.
[0005] Starting a target component and controlling the target component to reside in a background process;
[0006] Allocating a preset size of memory to the process of the target component;
[0007] Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component;
[0008] In response to detecting that a test cutoff condition is met, a process residency test result of the target component is output.
[0009] In one embodiment, in response to detecting that a test cutoff condition is met, outputting a test result of the process residency of the target component includes:
[0010] In response to detecting that the process of the target component is terminated, relevant information about the process state termination of the target component is output, and the relevant information includes at least one of time information, memory usage and system log of the process state termination of the target component.
[0011] In one embodiment, the method further comprises:
[0012] Adjusting the priority of the process of the target component;
[0013] The step of starting the application to be tested to perform a setting operation and monitoring the state of the process of the target component includes:
[0014] The application program to be tested is started to execute the set operation, and the state of the process of the target component with the adjusted priority is monitored.
[0015] In one embodiment, the method further comprises:
[0016] Receive input target priority values based on a pre-created information interface;
[0017] The priority of the process of the target component is adjusted based on the target priority value.
[0018] In one embodiment, allocating a preset size of memory to the process of the target component includes:
[0019] Determining the preset size of memory based on the memory required for running at least one preset application program;
[0020] Calling a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
[0021] In one embodiment, the target component is started in a preset test program, and the preset test program monitors the status of the process of the target component.
[0022] According to a second aspect of an embodiment of the present disclosure, a background process resident testing device is provided, the device comprising:
[0023] A target component startup module, used for starting the target component and controlling the target component to reside in a background process;
[0024] A process memory allocation module, used to allocate a memory of a preset size to the process of the target component;
[0025] A process status monitoring module, used to start the application to be tested to perform a set operation and monitor the status of the process of the target component;
[0026] The test result output module is used to output the process residency test result of the target component in response to detecting that the test cutoff condition is met.
[0027] In one embodiment, the test result output module is also used to output relevant information about the termination of the process status of the target component in response to detecting the termination of the process of the target component, and the relevant information includes at least one of the time information, memory usage and system log of the termination of the process status of the target component.
[0028] In one embodiment, the device further comprises:
[0029] A priority adjustment module, used to adjust the priority of the process of the target component;
[0030] The process status monitoring module is further used to start the application to be tested to perform a set operation and monitor the status of the process of the target component with the adjusted priority.
[0031] In one embodiment, the priority adjustment module includes:
[0032] A priority receiving unit, used for receiving an input target priority value based on a pre-created information interface;
[0033] A priority adjustment unit is used to adjust the priority of the process of the target component based on the target priority value.
[0034] In one embodiment, the process memory allocation module includes:
[0035] A memory size determining unit, configured to determine the memory of the preset size based on the memory required for running at least one preset application program;
[0036] The process memory allocation unit is used to call a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
[0037] In one embodiment, the target component is started in a preset test program, and the preset test program monitors the status of the process of the target component.
[0038] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the device comprising:
[0039] a processor and a memory for storing instructions executable by the processor;
[0040] Wherein, the processor is configured to:
[0041] Starting a target component and controlling the target component to reside in a background process;
[0042] Allocating a preset size of memory to the process of the target component;
[0043] Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component;
[0044] In response to detecting that a test cutoff condition is met, a process residency test result of the target component is output.
[0045] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the following is implemented:
[0046] Starting a target component and controlling the target component to reside in a background process;
[0047] Allocating a preset size of memory to the process of the target component;
[0048] Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component;
[0049] In response to detecting that a test cutoff condition is met, a process residency test result of the target component is output.
[0050] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0051] The present invention starts a target component and controls the target component to reside in a background process, allocates a preset memory size to the process of the target component, starts the application to be tested to execute set operations, and monitors the status of the process of the target component, and then outputs a test result of the process residency of the target component in response to detecting that a test cutoff condition is met. This can test the residency status of the background process. Since a preset memory size is allocated to the background process, there is no need to install a fixed number of third-party applications on the terminal device, thereby avoiding the test process from being affected by the third-party application and improving the stability and consistency of the test.
[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0054] Figure 1 is a flow chart of a background process resident testing method according to an exemplary embodiment;
[0055] Figure 2 is a flowchart of a background process resident testing method according to another exemplary embodiment;
[0056] Figure 3 is a flowchart of a background process resident testing method according to another exemplary embodiment;
[0057] Figure 4is a flowchart showing how to adjust the priority of the process of the target component according to an exemplary embodiment;
[0058] Figure 5 is a flowchart showing how to allocate a memory of a preset size to a process of the target component according to an exemplary embodiment;
[0059] Figure 6 is a block diagram of a background process resident testing device according to an exemplary embodiment;
[0060] Figure 7 is a block diagram of a background process resident testing device according to another exemplary embodiment;
[0061] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0062] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0063] Figure 1 It is a flowchart of a background process resident testing method according to an exemplary embodiment; the method of this embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a laptop computer or a wearable device, etc.).
[0064] like Figure 1 As shown, the method includes the following steps S101-S104:
[0065] In step S101, a target component is started and controlled to reside in a background process.
[0066] In this embodiment, in order to detect whether the application under test will affect the resident state of the process running in the background of the terminal device during the execution of the setting operation, the above-mentioned target component can be started and controlled to reside in the background process, that is, the process of the target component is run in the background of the terminal device. The process of the above-mentioned target component can be used to replace the process running in the background of the terminal device.
[0067] In step S102, a memory of a preset size is allocated to the process of the target component.
[0068] In order to simulate the memory environment of the terminal device when the application to be tested performs the setting operation, a preset size of memory can be allocated to the background process, wherein the preset size of memory can be set by the tester based on actual business experience, and this embodiment does not limit this.
[0069] In another embodiment, the above method of allocating a preset size of memory to the process of the target component can also refer to the following Figure 5 The illustrated embodiment will not be described in detail here.
[0070] In step S103, the application to be tested is started to perform a setting operation, and the state of the process of the target component is monitored.
[0071] In this embodiment, after allocating a preset memory size to the process of the target component, the application to be tested may be started to perform a set operation, during which the state of the process of the target component may be monitored, for example, to monitor whether the process of the target component is terminated.
[0072] It is understandable that the type of the above-mentioned application to be tested can be set based on actual business needs, such as setting it to a camera application, a game application, etc., which requires more memory during operation and may affect the residency of the background process.
[0073] In step S104, in response to detecting that the test cutoff condition is met, a process residency test result of the target component is output.
[0074] In this embodiment, when starting the application to be tested to perform setting operations and monitoring the status of the process of the target component, if it is detected that the test cutoff condition is currently met, a test result of the process residency of the target component can be generated and output.
[0075] The above test cutoff conditions can be set based on actual needs, such as whether the test duration is reached or whether a set event occurs, where the set event may include that the application under test has completed various set operations, or the process of the target component has terminated.
[0076] The method of outputting the process residency test result of the target component in response to detecting that the test cutoff condition is met can also refer to the following Figure 2 The illustrated embodiment will not be described in detail here.
[0077] From the above description, it can be seen that the method of this embodiment starts the target component and controls the target component to reside in the background process, allocates a preset size of memory to the process of the target component, starts the application to be tested to perform set operations, and monitors the status of the process of the target component, and then outputs the test result of the process residence status of the target component in response to detecting that the test cutoff condition is met. This can realize the test of the background process residence status. Since a preset size of memory is allocated to the background process, there is no need to install a fixed number of third-party applications on the terminal device, thereby avoiding the test process from being affected by third-party applications and improving the stability and consistency of the test.
[0078] Figure 2 It is a flowchart of a background process resident testing method according to another exemplary embodiment; the method of this embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a laptop computer or a wearable device, etc.).
[0079] like Figure 2 As shown, the method includes the following steps S201-S204:
[0080] In step S201, the target component is started and controlled to reside in a background process.
[0081] In step S202, a memory of a preset size is allocated to the process of the target component.
[0082] In step S203, the application to be tested is started to perform a setting operation, and the state of the process of the target component is monitored.
[0083] The relevant explanations and descriptions of steps S201 - S203 may be found in the above embodiments and will not be elaborated here.
[0084] In step S204, in response to detecting that the process of the target component is terminated, information related to the termination of the process state of the target component is output.
[0085] In this embodiment, when starting the application to be tested to perform setting operations and monitoring the status of the process of the target component, if it is detected that the process of the above target component in the background is terminated, relevant information about the termination of the process status of the target component can be obtained and output.
[0086] For example, the above-mentioned relevant information may include at least one of the time information of the process state termination of the target component, memory usage and system log. It is understandable that obtaining the time information of the process state termination of the target component is conducive to subsequent search for relevant content from the system log based on the time information, and to conduct problem analysis and research.
[0087] In another embodiment, if the process status of the target component has not been terminated after the test duration is reached or the application to be tested has completed various setting operations, a test result including that the process of the target component has not been terminated may be output.
[0088] From the above description, it can be seen that the method of this embodiment starts the application to be tested to perform set operations, monitors the status of the process of the target component, and then outputs relevant information about the termination of the process status of the target component in response to detecting that the process of the target component has terminated. This can test the residence of the background process and accurately output relevant information such as the time information, memory usage, and system log of the termination of the process status of the target component. There is no need to install a fixed number of third-party applications on the terminal device, which can avoid the test process being affected by third-party applications, thereby improving the stability and consistency of the test.
[0089] Figure 3 It is a flowchart of a background process resident testing method according to another exemplary embodiment; the method of this embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a laptop computer or a wearable device, etc.).
[0090] like Figure 3 As shown, the method includes the following steps S301-S305:
[0091] In step S301, the target component is started and controlled to reside in a background process.
[0092] In step S302, a memory of a preset size is allocated to the process of the target component.
[0093] In step S303, the priority of the process of the target component is adjusted.
[0094] In this embodiment, taking into account the different priorities of the target component process, the situations in which it is killed during the process of starting the application to be tested to perform the set operation are also different. In order to test the residence of background processes of various priorities in the application to be tested to perform the set operation, the priority of the target component process can be adjusted based on actual needs during the test process.
[0095] For example, Figure 4 FIG. 1 is a flowchart showing how to adjust the priority of the process of the target component according to an exemplary embodiment. Figure 4 As shown, the above step S303 may include the following steps S401-S402:
[0096] In step S401, an input target priority value is received based on a pre-created information interface.
[0097] For example, an interface for a tester to adjust the priority of a process of a target component may be established in advance on the system side of the terminal device, and the terminal device may receive a target priority value input by the tester based on the interface.
[0098] The target priority value may be set by the tester based on actual needs, such as 800, 900, etc., which is not limited in this embodiment.
[0099] In step S402, the priority of the process of the target component is adjusted based on the target priority value.
[0100] When the terminal device receives the target priority value input by the tester based on the above information interface, it can adjust the priority of the process of the target component based on the target priority value, such as adjusting the priority value of the process of the target component to the above target priority value.
[0101] In step S304, the application program to be tested is started to perform a setting operation, and the state of the process of the target component with the adjusted priority is monitored.
[0102] In step S305, in response to detecting that the test cutoff condition is met, a process residency test result of the target component is output.
[0103] Among them, the relevant explanations and descriptions of steps S301-S302 and S304-S305 can be found in the above embodiments, and will not be repeated here.
[0104] From the above description, it can be seen that the method of this embodiment adjusts the priority of the process of the target component after allocating a preset size of memory to the process of the target component, thereby realizing the subsequent startup of the application to be tested to perform the set operation and monitoring the status of the process of the target component with the adjusted priority. It can be realized that the priority of the process of the target component can be adjusted during the test process based on actual needs, thereby improving the flexibility of the test.
[0105] Figure 5 1 is a flowchart showing how to allocate a preset size of memory to the process of the target component according to an exemplary embodiment; based on the above embodiment, this embodiment takes how to allocate a preset size of memory to the process of the target component as an example for exemplary description. Figure 5 As shown, the above step S102 of allocating a preset size of memory to the process of the target component may include the following steps S501-S502:
[0106] In step S501, the preset size of memory is determined based on the memory required for running at least one preset application.
[0107] The at least one preset application may be a commonly used application in the terminal device, such as WeChat, QQ, etc. The background process residence of such applications is easily affected by the operation of the application to be tested (such as starting or executing setting operations, etc.).
[0108] Before starting the test, the memory value of the simulated application scenario in which the application to be tested performs the set operation can be calculated. For example, assuming that before the application to be tested performs the set operation, the processes of 5 preset applications are resident in the background of the terminal device, then the sum of the memory required when these processes are running can be calculated and used as the preset size of memory allocated to the process of the target component.
[0109] It is understandable that the memory required for running the above-mentioned preset application can be obtained based on means in related technologies, such as by collecting statistics on online usage data of the preset application, etc., and this embodiment does not limit this.
[0110] In step S502, a preset function and a memory configuration interface in the system are called to allocate a preset size of memory to the process of the target component.
[0111] For example, the system malloc (memory allocation) and memset (memory filling) interfaces may be called to allocate a preset size of memory to the process of the target component from the system of the terminal device.
[0112] In one embodiment, the above-mentioned target component can be started in a preset test program, and the preset test program monitors the state of the process of the target component. For example, a pre-written preset test program can be started first, and then the target component can be started in the preset test program, and the target component can be controlled to reside in the background process; on this basis, memory allocation can be performed in the process of the target component, and operations such as adjusting the priority of the process can be performed, and then the preset test program can start the application to be tested to perform set operations, and monitor the state of the process of the target component, and in response to detecting that the test cutoff condition is met, output the test result of the process residence of the target component. In this way, the automation level of the background process residence test scheme of this embodiment can be improved based on the preset test program, thereby improving the test efficiency.
[0113] The embodiments of the present disclosure can quickly complete the construction of a background process resident test environment in a short time, thereby improving the efficiency of building the test environment. Moreover, since it is not affected by third-party application versions, it can improve the stability and consistency of the test process. On the other hand, it can realize real-time monitoring of the background process residency status, greatly improving the efficiency of subsequent analysis of the process residency test results.
[0114] Figure 6 1 is a block diagram of a background process resident test device according to an exemplary embodiment; the device of this embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a laptop computer or a wearable device, etc.). Figure 6 As shown, the device includes: a target component startup module 110, a process memory allocation module 120, a process status monitoring module 130 and a test result output module 140, wherein:
[0115] A target component starting module 110 is used to start the target component and control the target component to reside in a background process;
[0116] A process memory allocation module 120, configured to allocate a memory of a preset size to the process of the target component;
[0117] The process status monitoring module 130 is used to start the application to be tested to perform a set operation and monitor the status of the process of the target component;
[0118] The test result output module 140 is used to output the process residency test result of the target component in response to detecting that the test cutoff condition is met.
[0119] From the above description, it can be seen that the device of this embodiment starts the target component and controls the target component to reside in the background process, allocates a preset size of memory to the process of the target component, starts the application to be tested to perform set operations, and monitors the status of the process of the target component, and then outputs the test result of the process residence status of the target component in response to detecting that the test cutoff condition is met. It can realize the test of the background process residence status. Since a preset size of memory is allocated to the background process, there is no need to install a fixed number of third-party applications on the terminal device, thereby avoiding the test process from being affected by the third-party application and improving the stability and consistency of the test.
[0120] Figure 7 2 is a block diagram of a background process resident test device according to another exemplary embodiment; the device of this embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a laptop computer or a wearable device, etc.). Among them, the target component startup module 210, the process memory allocation module 220, the process status monitoring module 230 and the test result output module 240 are the same as the aforementioned Figure 6 The functions of the target component startup module 110, the process memory allocation module 120, the process status monitoring module 130 and the test result output module 140 in the illustrated embodiment are the same and will not be described in detail herein.
[0121] In this embodiment, the above-mentioned test result output module 240 can also be used to output relevant information about the termination of the process status of the target component in response to detecting the termination of the process of the target component, and the relevant information includes at least one of the time information, memory usage and system log of the termination of the process status of the target component.
[0122] In one embodiment, the device may further include:
[0123] A priority adjustment module 250, used to adjust the priority of the process of the target component;
[0124] The process status monitoring module 230 may also be used to start the application to be tested to perform a set operation and monitor the status of the process of the target component with the adjusted priority.
[0125] In one embodiment, the priority adjustment module 250 may include:
[0126] The priority receiving unit 251 is used to receive an input target priority value based on a pre-created information interface;
[0127] The priority adjustment unit 252 is used to adjust the priority of the process of the target component based on the target priority value.
[0128] In one embodiment, the process memory allocation module 220 may include:
[0129] A memory size determining unit 221, configured to determine the memory of the preset size based on the memory required for running at least one preset application program;
[0130] The process memory allocation unit 222 is used to call a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
[0131] In one embodiment, the target component is started in a preset test program, and the preset test program monitors the status of the process of the target component.
[0132] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0133] Figure 8 900 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc. In this embodiment, the electronic device may include a normally open image acquisition device for acquiring image information.
[0134] Reference Figure 8 , the device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0135] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0136] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 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.
[0137] The power component 906 provides power to the various components of the device 900. The power component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0138] The multimedia component 908 includes a screen that provides an output interface between the device 900 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 908 includes a front camera and / or a rear camera. When the device 900 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.
[0139] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0140] I / O interface 912 provides an interface between processing component 902 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.
[0141] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0142] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 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 916 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.
[0143] In an exemplary embodiment, the apparatus 900 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 method.
[0144] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 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.
[0145] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0146] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A background process resident testing method, characterized in that: The method comprises: Starting a target component and controlling the target component to reside in a background process; Allocating a preset size of memory to the process of the target component; Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component; In response to detecting that a test cutoff condition is met, outputting a process residency test result of the target component; The allocating a preset size of memory to the process of the target component includes: Determining the preset size of memory based on the memory required for running at least one preset application program; Calling a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
2. The method according to claim 1, characterized in that In response to detecting that the test cutoff condition is met, outputting the process residency test result of the target component includes: In response to detecting that the process of the target component is terminated, relevant information about the process state termination of the target component is output, and the relevant information includes at least one of time information, memory usage and system log of the process state termination of the target component.
3. The method according to claim 1, characterized in that The method further comprises: Adjusting the priority of the process of the target component; The step of starting the application to be tested to perform a setting operation and monitoring the state of the process of the target component includes: The application program to be tested is started to execute the set operation, and the state of the process of the target component with the adjusted priority is monitored.
4. The method according to claim 3, characterized in that The method further comprises: Receive input target priority values based on a pre-created information interface; The priority of the process of the target component is adjusted based on the target priority value.
5. The method according to claim 1, characterized in that The target component is started in a preset test program, and the preset test program monitors the status of the process of the target component.
6. A background process resident test device, characterized in that: The device comprises: A target component startup module, used to start the target component and control the target component to reside in a background process; A process memory allocation module, used to allocate a memory of a preset size to the process of the target component; A process status monitoring module, used to start the application to be tested to perform a set operation and monitor the status of the process of the target component; A test result output module, configured to output a test result of the process residency of the target component in response to detecting that a test cutoff condition is met; The process memory allocation module includes: A memory size determining unit, configured to determine the memory of the preset size based on the memory required for running at least one preset application program; The process memory allocation unit is used to call a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
7. The device according to claim 6, characterized in that The test result output module is also used to output relevant information about the process status termination of the target component in response to detecting that the process of the target component is terminated, and the relevant information includes at least one of the time information, memory usage and system log of the process status termination of the target component.
8. The device according to claim 6, characterized in that The device also includes: A priority adjustment module, used to adjust the priority of the process of the target component; The process status monitoring module is further used to start the application to be tested to perform a set operation and monitor the status of the process of the target component with the adjusted priority.
9. The device according to claim 8, characterized in that The priority adjustment module comprises: A priority receiving unit, used for receiving an input target priority value based on a pre-created information interface; A priority adjustment unit is used to adjust the priority of the process of the target component based on the target priority value.
10. The device according to claim 6, characterized in that The target component is started in a preset test program, and the preset test program monitors the status of the process of the target component.
11. An electronic device, characterized in that: The device comprises: a processor and a memory for storing instructions executable by the processor; Wherein, the processor is configured to: Starting a target component and controlling the target component to reside in a background process; Allocating a preset size of memory to the process of the target component; Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component; In response to detecting that a test cutoff condition is met, outputting a process residency test result of the target component; The allocating a preset size of memory to the process of the target component includes: Determining the preset size of memory based on the memory required for running at least one preset application program; Calling a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it achieves: Starting a target component and controlling the target component to reside in a background process; Allocating a preset size of memory to the process of the target component; Starting the application to be tested to execute the set operation and monitoring the status of the process of the target component; In response to detecting that a test cutoff condition is met, outputting a process residency test result of the target component; The allocating a preset size of memory to the process of the target component includes: Determining the preset size of memory based on the memory required for running at least one preset application program; Calling a preset function and a memory configuration interface in the system to allocate a preset size of memory to the process of the target component.
