CN112817844A - Background process residence test method, device, equipment and storage medium - Google Patents

Background process residence test method, device, equipment and storage medium Download PDF

Info

Publication number
CN112817844A
CN112817844A CN202110099246.9A CN202110099246A CN112817844A CN 112817844 A CN112817844 A CN 112817844A CN 202110099246 A CN202110099246 A CN 202110099246A CN 112817844 A CN112817844 A CN 112817844A
Authority
CN
China
Prior art keywords
target component
memory
test
target
priority
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
Application number
CN202110099246.9A
Other languages
Chinese (zh)
Inventor
曾晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110099246.9A priority Critical patent/CN112817844A/en
Publication of CN112817844A publication Critical patent/CN112817844A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a background process residence test method, a device, equipment and a storage medium, wherein the method comprises the following steps: starting a target component and controlling the target component to reside in a background process; allocating a memory with a preset size for the process of the target component; starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component; and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met. The method and the device can realize the test of the residence condition of the background process, and because the memory with the preset size is distributed for the background process, and a fixed number of three-party applications are not required to be installed on the terminal equipment, the test process can be prevented from being influenced by the third-party application program, and the test stability can be improved.

Description

Background process residence test method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of automated testing of mobile terminals, and in particular, to a method, an apparatus, a device, and a storage medium for testing a background process.
Background
With the rise of Android systems, various applications expand their services on the Android systems in large quantities, so that the memory usage of the applications is larger and larger. At present, android system memory dynamic recovery is realized based on lowmemorykillers, and processes with lower priority are killed through lowmemorykillers when the memory is in tension, so that the purpose of memory recovery is achieved. As application memory increases, the background-resident capability of the program is challenged. The general scheme in the related technology is to install a fixed number of three-party applications on the terminal equipment, and then to successively start each big program to realize background program resident simulation. Although the test mode is closer to the actual use scene of the terminal device, the test mode is greatly influenced by the upgrade of the three-party application version, and result fluctuation is easy to occur.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for testing a background process resident, so as to solve the defects in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for background process resident test,
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
In one embodiment, the outputting the test result of the process residence situation of the target component in response to detecting that the test cutoff condition is satisfied includes:
and in response to detecting that the process of the target component is terminated, outputting relevant information of the termination of the process state of the target component, wherein the relevant information comprises at least one of time information of the termination of the process state of the target component, memory usage and a system log.
In an embodiment, the method further comprises:
adjusting a priority of a process of the target component;
the starting of the application program to be tested to execute the setting operation and monitoring the state of the process of the target assembly comprises the following steps:
and starting the application program to be tested to execute the setting operation, and monitoring the state of the process of the target assembly with the adjusted priority.
In an embodiment, the method further comprises:
receiving an input target priority value based on a pre-established information interface;
adjusting a priority of a process of the target component based on the target priority value.
In an embodiment, the allocating a memory with a preset size to the process of the target component includes:
determining the memory with the preset size based on the memory required by the running of at least one preset application program;
and calling a preset function and a memory configuration interface in the system to allocate a memory with a preset size for the process of the target component.
In one embodiment, the target component is started in a preset test program, and the state of the process of the target component is monitored by the preset test program.
According to a second aspect of the embodiments of the present disclosure, there is provided a background process residence testing apparatus, the apparatus including:
the target component starting module is used for starting the target component and controlling the target component to reside in a background process;
the process memory allocation module is used for allocating a memory with a preset size for the process of the target component;
the process state monitoring module is used for starting an application program to be tested to execute a setting operation and monitoring the state of the process of the target assembly;
and the test result output module is used for outputting the process residence condition test result of the target component in response to the detection that the test cutoff condition is met.
In an embodiment, the test result output module is further configured to output, in response to detecting that the process of the target component is terminated, information related to termination of the process state of the target component, where the information related to termination of the process state of the target component includes at least one of time information of termination of the process state of the target component, a memory usage, and a system log.
In one embodiment, the apparatus further comprises:
the priority adjusting module is used for adjusting the priority of the process of the target component;
the process state monitoring module is further configured to start an application program to be tested to perform a setting operation, and monitor the state of the process of the target component with the adjusted priority.
In one embodiment, the priority adjustment module includes:
the priority receiving unit is used for receiving an input target priority numerical value based on a pre-established information interface;
a priority adjustment unit to adjust a priority of a process of the target component based on the target priority value.
In one embodiment, the process memory allocation module includes:
the memory size determining unit is used for determining the memory with the preset size based on the memory required by the running of at least one preset application program;
and the process memory allocation unit is used for calling a preset function and a memory configuration interface in the system to allocate a memory with a preset size for the process of the target component.
In one embodiment, the target component is started in a preset test program, and the state of the process of the target component is monitored by the preset test program.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic apparatus, the apparatus comprising:
a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to:
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the method and the device, the target component is started, the target component is controlled to reside in the background process, the memory with the preset size is distributed for the process of the target component, the application program to be tested is started to execute the setting operation, the state of the process of the target component is monitored, the process residence condition test result of the target component is output in response to the fact that the test ending condition is met, the background process residence condition can be tested, the memory with the preset size is distributed for the background process, the fixed number of three-party applications do not need to be installed on the terminal device, the fact that the test process is affected by the third-party applications can be avoided, and the stability and the consistency of the test can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a flow diagram illustrating a method for background process resident testing in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for background process resident testing in accordance with yet another exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method for background process resident testing in accordance with yet another exemplary embodiment;
FIG. 4 is a flow diagram illustrating how the priority of the process of the target component is adjusted in accordance with an illustrative embodiment;
FIG. 5 is a flowchart illustrating how a process of the target component is allocated a pre-sized memory according to an illustrative embodiment;
FIG. 6 is a block diagram illustrating a background process resident test device in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating a background process resident test device in accordance with yet another exemplary embodiment;
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like 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. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
FIG. 1 is a flow diagram illustrating a method for background process resident testing in accordance with an exemplary embodiment; the method of the embodiment can be applied to the terminal device to be tested (such as a smart phone, a tablet computer, a notebook computer or a wearable device).
As shown in fig. 1, the method comprises the following steps S101-S104:
in step S101, a target component is started and controlled to reside in a background process.
In this embodiment, in order to detect whether the application to be tested affects the resident state of the background running process in the terminal device during the execution of the setting operation, the target component may be started, and the target component may be 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 target component can be used for replacing a process running in the background in the terminal equipment.
In step S102, a memory with a preset size is allocated to the process of the target component.
In order to simulate the memory environment of the terminal device when the application program to be tested executes the setting operation, a memory with a preset size can be allocated to the background process. The memory with the preset size may be set by a tester based on actual business experience, which is not limited in this embodiment.
In another embodiment, the above-mentioned manner of allocating the memory with the preset size for the process of the target component can also be referred to the following embodiment shown in fig. 5, which will not be described in detail herein.
In step S103, the application program to be tested is started to execute the setting operation, and the state of the process of the target component is monitored.
In this embodiment, after allocating a memory with a preset size to the process of the target component, the application program to be tested may be started to execute the setting operation, and the state of the process of the target component may be monitored in this process. For example, whether the process of the target component is terminated is monitored, and the like.
It can be understood that the type of the application to be tested may be set based on actual business needs, for example, the type of the application to be tested may be set as an application that needs to use more memory during the running process, such as a camera application, a game application, and the like, and thus may affect the residence condition of the background process.
In step S104, in response to detecting that the test cutoff condition is satisfied, a process residence situation test result of the target component is output.
In this embodiment, in the process of starting the application program to be tested to execute the setting operation and monitoring the state of the process of the target component, if it is detected that the test cutoff condition is currently satisfied, a test result of the process residence condition of the target component may be generated and output.
The test end condition may 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 to be tested has performed various setting operations, or that the process of the target component is terminated.
The above manner of outputting the process residence situation test result of the target component in response to detecting that the test cutoff condition is satisfied may also be referred to the following embodiment shown in fig. 2, and will not be described in detail herein.
As can be seen from the above description, in the method of this embodiment, by starting the target component, controlling the target component to reside in the background process, allocating a memory of a preset size to the process of the target component, starting the application program to be tested to execute the setting operation, and monitoring the state of the process of the target component, and then outputting the test result of the process residence condition of the target component in response to detecting that the test cutoff condition is met, the residence condition of the background process can be tested.
FIG. 2 is a flow diagram illustrating a method for background process resident testing in accordance with yet another exemplary embodiment; the method of the embodiment can be applied to the terminal device to be tested (such as a smart phone, a tablet computer, a notebook computer or a wearable device).
As shown in fig. 2, the method comprises the following steps S201-S204:
in step S201, the target component is started and controlled to reside in the background process.
In step S202, a memory with a preset size is allocated to the process of the target component.
In step S203, the application program to be tested is started to execute the setting operation, and the state of the process of the target component is monitored.
For the explanation and description of steps S201 to S203, reference may be made to the above embodiments, which are not described herein again.
In step S204, in response to detecting the process termination of the target component, outputting information related to the process state termination of the target component.
In this embodiment, in the process of starting the application to be tested to execute the setting operation and monitoring the state of the process of the target component, if it is detected that the process of the target component is terminated in the background, the information related to the termination of the process state of the target component may be obtained and output.
For example, the related information may include at least one of time information of process state termination of the target device, memory usage, and a system log. It can be understood that obtaining the time information of the process state termination of the target component is beneficial to searching relevant contents from the system log based on the time information and performing problem analysis and research.
In another embodiment, if the process state of the target component is not terminated after the test duration is reached or the application under test has performed various setting operations, a test result including that the process of the target component is not terminated may be output.
As can be seen from the above description, in the method of this embodiment, by starting the application to be tested to execute the setting operation, and monitoring the state of the process of the target component, and then outputting the relevant information of the termination of the process state of the target component in response to detecting that the process of the target component is terminated, the test on the residence condition of the background process can be realized, and the relevant information of the termination time information of the process state of the target component, the memory usage condition, the system log, and the like can be accurately output, a fixed number of three-party applications do not need to be installed on the terminal device, the test process can be prevented from being affected by the third-party application, and the stability and consistency of the test can be further improved.
FIG. 3 is a flow diagram illustrating a method for background process resident testing in accordance with yet another exemplary embodiment; the method of the embodiment can be applied to the terminal device to be tested (such as a smart phone, a tablet computer, a notebook computer or a wearable device).
As shown in fig. 3, the method comprises the following steps S301-S305:
in step S301, a target component is started and controlled to reside in a background process.
In step S302, a memory with a preset size is allocated to the process of the target component.
In step S303, the priority of the process of the target component is adjusted.
In this embodiment, considering that the priorities of the processes of the target component are different, the cases of being killed during the process of starting the application program to be tested to execute the setting operation are also different, and in order to test the residence situations of various background processes with different priorities during the process of executing the setting operation of the application program to be tested, the priorities of the processes of the target component can be adjusted based on actual requirements during the test process.
For example, FIG. 4 is a flow diagram illustrating how the priority of the process of the target component is adjusted according to an example embodiment. As shown in fig. 4, the step S303 may include the following steps S401 to S402:
in step S401, an input target priority value is received based on a pre-created information interface.
For example, an interface for a tester to adjust the priority of the process of the 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.
The target priority value may be set by a tester based on actual needs, such as 800, 900, and the like, which is not limited in this embodiment.
In step S402, the priority of the process of the target component is adjusted based on the target priority value.
After the terminal device receives the target priority value input by the tester based on the information interface, the priority of the process of the target component can be adjusted based on the target priority value, for example, the priority value of the process of the target component is adjusted to the target priority value.
In step S304, the application to be tested is started to perform the setting operation, and the state of the process of the target component with the adjusted priority is monitored.
In step S305, in response to detecting that the test cutoff condition is satisfied, a process resident condition test result of the target component is output.
For the explanation and description of steps S301 to S302 and S304 to S305, reference may be made to the above embodiments, which are not repeated herein.
As can be seen from the above description, in the method of this embodiment, after allocating the memory with the preset size to the process of the target component, the priority of the process of the target component is adjusted, so that the subsequent starting of the application program to be tested to execute the setting operation can be realized, and the state of the process of the target component with the adjusted priority is monitored, so that the priority of the process of the target component can be adjusted in the test process based on the actual requirement, and the flexibility of the test is improved.
FIG. 5 is a flowchart illustrating how a process of the target component is allocated a pre-sized memory according to an illustrative embodiment; in this embodiment, an example of how to allocate a memory with a preset size to a process of the target component is described on the basis of the foregoing embodiments. As shown in fig. 5, the allocating a memory with a preset size to the process of the target component in step S102 may include the following steps S501 to S502:
in step S501, the memory with the preset size is determined based on the memory required for running at least one preset application program.
The at least one preset application program may be a common application program in the terminal device, such as WeChat, QQ, and the like. Background process resident conditions of such applications are easily affected by the running (e.g., starting or performing a setting operation, etc.) of the application to be tested.
Before starting the test, the memory value of the simulation application scene of the setting operation executed by the application program to be tested can be calculated. For example, assuming that the background of the terminal device resides in respective processes of 5 preset applications before the application to be tested performs the setting operation, the sum of the memories required by the processes during running can be calculated and used as the memory with the preset size allocated to the process of the target component.
It can be understood that the memory required for running the preset application program may be obtained based on means in the related art, for example, by counting online usage data of the preset application program, which is not limited in this embodiment.
In step S502, a preset function and a memory configuration interface in the system are called to allocate a memory with a preset size to the process of the target component.
For example, a system malloc (memory allocation) and memset (memory filling) interface may be called to allocate a preset size of memory for the process of the target component from the system of the terminal device.
In an embodiment, the target component may be started in a preset test program, and the preset test program monitors a state of a process of the target component. For example, a pre-programmed preset test program may be started first, and then a target component is started in the preset test program, and the target component is controlled to reside in a background process; on the basis, the operations such as memory allocation and process priority adjustment can be performed in the process of the target component, and then the preset test program can start the application program to be tested to execute the setting operation, monitor the state of the process of the target component, and output the process residence condition test result of the target component in response to the detection that the test cutoff condition is met. Therefore, the automation level of the background process resident test scheme of the embodiment can be improved based on the preset test program, and the test efficiency is further improved.
The embodiment of the disclosure can realize that the construction of the background process residence test environment can be quickly completed in a short time, the construction efficiency of the test environment is improved, and the stability and consistency of the test process can be improved because the construction is not influenced by the version of the third-party application program.
FIG. 6 is a block diagram illustrating a background process resident test device in accordance with an exemplary embodiment; the device of the embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a notebook computer or a wearable device). As shown in fig. 6, the apparatus includes: a target device starting module 110, a process memory allocation module 120, a process state monitoring module 130, and a test result output module 140, wherein:
a target component starting module 110, configured to start a target component and control the target component to reside in a background process;
a process memory allocation module 120, configured to allocate a memory of a preset size to the process of the target component;
a process state monitoring module 130, configured to start an application to be tested to perform a setting operation, and monitor a state of a process of the target component;
and the test result output module 140 is configured to output a process residence situation test result of the target component in response to detecting that the test cutoff condition is satisfied.
As can be seen from the above description, the device of this embodiment starts the target component, controls the target component to reside in the background process, allocates a memory with a preset size to the process of the target component, starts the application program to be tested to execute the setting operation, and monitors the state of the process of the target component, and then outputs the test result of the process residence condition of the target component in response to detecting that the test cutoff condition is met, so as to test the residence condition of the background process.
FIG. 7 is a block diagram illustrating a background process resident test device in accordance with yet another exemplary embodiment; the device of the embodiment can be applied to a terminal device to be tested (such as a smart phone, a tablet computer, a notebook computer or a wearable device). The target device starting module 210, the process memory allocation module 220, the process state monitoring module 230, and the test result output module 240 have the same functions as the target device starting module 110, the process memory allocation module 120, the process state monitoring module 130, and the test result output module 140 in the embodiment shown in fig. 6, and are not described herein again.
In this embodiment, the test result output module 240 may be further configured to output, in response to detecting that the process of the target component is terminated, information related to termination of the process state of the target component, where the information includes at least one of time information of termination of the process state of the target component, a memory usage condition, and a system log.
In an embodiment, the apparatus may further include:
a priority adjustment module 250 for adjusting the priority of the process of the target component;
the process state monitoring module 230 may be further configured to start the application to be tested to perform the setting operation, and monitor the state of the process of the target component with the adjusted priority.
In an embodiment, the priority adjustment module 250 may include:
a priority receiving unit 251 for receiving an input target priority value based on a pre-created information interface;
a priority adjustment unit 252, configured to adjust the priority of the process of the target component based on the target priority value.
In one embodiment, the process memory allocation module 220 may include:
a memory size determining unit 221, configured to determine a memory of a preset size based on a memory required for running at least one preset application;
a process memory allocation unit 222, configured to invoke a preset function and a memory configuration interface in the system to allocate a memory of a preset size to the process of the target component.
In one embodiment, the target component is started in a preset test program, and the state of the process of the target component is monitored by the preset test program.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like. In this embodiment, the electronic device may include a normally open image capturing device for capturing image information.
Referring to fig. 8, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the apparatus 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
Power component 906 provides power to the various components of device 900. The power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a 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 an input signal from a 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 boundary of a 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 facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be 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.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, sensor assembly 914 may detect an open/closed state of device 900, the relative positioning of components, such as a display and keypad of device 900, the change in position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration/deceleration of device 900, and the change in temperature of device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may 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 associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the apparatus 900 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 (14)

1. A background process resident testing method, the method comprising:
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
2. The method of claim 1, wherein outputting the target component's process resident condition test result in response to detecting that a test cutoff condition is met comprises:
and in response to detecting that the process of the target component is terminated, outputting relevant information of the termination of the process state of the target component, wherein the relevant information comprises at least one of time information of the termination of the process state of the target component, memory usage and a system log.
3. The method of claim 1, further comprising:
adjusting a priority of a process of the target component;
the starting of the application program to be tested to execute the setting operation and monitoring the state of the process of the target assembly comprises the following steps:
and starting the application program to be tested to execute the setting operation, and monitoring the state of the process of the target assembly with the adjusted priority.
4. The method of claim 3, further comprising:
receiving an input target priority value based on a pre-established information interface;
adjusting a priority of a process of the target component based on the target priority value.
5. The method of claim 1, wherein allocating a predetermined amount of memory for the process of the target component comprises:
determining the memory with the preset size based on the memory required by the running of at least one preset application program;
and calling a preset function and a memory configuration interface in the system to allocate a memory with a preset size for the process of the target component.
6. The method of claim 1, wherein the target component is initiated in a predetermined test program and the predetermined test program monitors the status of the process of the target component.
7. A background process resident test apparatus, the apparatus comprising:
the target component starting module is used for starting the target component and controlling the target component to reside in a background process;
the process memory allocation module is used for allocating a memory with a preset size for the process of the target component;
the process state monitoring module is used for starting an application program to be tested to execute a setting operation and monitoring the state of the process of the target assembly;
and the test result output module is used for outputting the process residence condition test result of the target component in response to the detection that the test cutoff condition is met.
8. The apparatus of claim 7, wherein the test result output module is further configured to output, in response to detecting that the process of the target component terminates, information related to termination of the process state of the target component, where the information related to termination of the process state of the target component includes at least one of time information, memory usage, and a system log of the process state of the target component.
9. The apparatus of claim 7, further comprising:
the priority adjusting module is used for adjusting the priority of the process of the target component;
the process state monitoring module is further configured to start an application program to be tested to perform a setting operation, and monitor the state of the process of the target component with the adjusted priority.
10. The apparatus of claim 9, wherein the priority adjustment module comprises:
the priority receiving unit is used for receiving an input target priority numerical value based on a pre-established information interface;
a priority adjustment unit to adjust a priority of a process of the target component based on the target priority value.
11. The apparatus of claim 7, wherein the process memory allocation module comprises:
the memory size determining unit is used for determining the memory with the preset size based on the memory required by the running of at least one preset application program;
and the process memory allocation unit is used for calling a preset function and a memory configuration interface in the system to allocate a memory with a preset size for the process of the target component.
12. The apparatus of claim 7, wherein the target component is initiated in a predetermined test program, and wherein the predetermined test program monitors a status of a process of the target component.
13. An electronic device, characterized in that the device comprises:
a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to:
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
14. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing:
starting a target component and controlling the target component to reside in a background process;
allocating a memory with a preset size for the process of the target component;
starting an application program to be tested to execute a setting operation, and monitoring the state of the progress of the target component;
and outputting a process residence condition test result of the target component in response to detecting that the test cutoff condition is met.
CN202110099246.9A 2021-01-25 2021-01-25 Background process residence test method, device, equipment and storage medium Pending CN112817844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110099246.9A CN112817844A (en) 2021-01-25 2021-01-25 Background process residence test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110099246.9A CN112817844A (en) 2021-01-25 2021-01-25 Background process residence test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112817844A true CN112817844A (en) 2021-05-18

Family

ID=75859179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110099246.9A Pending CN112817844A (en) 2021-01-25 2021-01-25 Background process residence test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112817844A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022252248A1 (en) * 2021-06-01 2022-12-08 长鑫存储技术有限公司 Memory test method and apparatus, device, and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140026113A1 (en) * 2012-07-19 2014-01-23 Arshad Farooqi Mobile Application Creation System
CN104317702A (en) * 2014-09-30 2015-01-28 广东欧珀移动通信有限公司 Method and device for automatic testing of memory of intelligent mobile terminal
CN105373479A (en) * 2015-12-14 2016-03-02 厦门美图移动科技有限公司 Automatic test method and device of memory leakage and mobile terminal
CN106055392A (en) * 2016-05-20 2016-10-26 维沃移动通信有限公司 Processing method after application enters background, test method, and terminals
CN106339314A (en) * 2016-08-12 2017-01-18 北京奇虎科技有限公司 Application living testing method and device
CN106933660A (en) * 2017-02-17 2017-07-07 广州启生信息技术有限公司 The implementation method of application process keep-alive under a kind of Android platform
CN107423127A (en) * 2017-07-31 2017-12-01 广东欧珀移动通信有限公司 Management-control method, device, storage medium and the electronic equipment of application program
CN107729125A (en) * 2017-10-31 2018-02-23 努比亚技术有限公司 Application program resides the management method and mobile terminal on backstage
US20180206136A1 (en) * 2017-01-17 2018-07-19 Tutela Technologies Ltd. System and Method for Evaluating Wireless Device and/or Wireless Network Performance
CN109947638A (en) * 2019-01-14 2019-06-28 珠海金山网络游戏科技有限公司 A kind of application program capacity test control method and tool
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
US20190220318A1 (en) * 2016-09-27 2019-07-18 Huawei Technologies Co., Ltd. Memory Reclamation Method and Apparatus
CN110688319A (en) * 2019-09-30 2020-01-14 RealMe重庆移动通信有限公司 Application keep-alive capability test method and related device
CN111143100A (en) * 2019-12-09 2020-05-12 北京小米移动软件有限公司 Memory leak detection method, device, equipment and storage medium
CN112214254A (en) * 2020-09-25 2021-01-12 北京小米移动软件有限公司 Method and device for accelerating starting of application program and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140026113A1 (en) * 2012-07-19 2014-01-23 Arshad Farooqi Mobile Application Creation System
CN104317702A (en) * 2014-09-30 2015-01-28 广东欧珀移动通信有限公司 Method and device for automatic testing of memory of intelligent mobile terminal
CN105373479A (en) * 2015-12-14 2016-03-02 厦门美图移动科技有限公司 Automatic test method and device of memory leakage and mobile terminal
CN106055392A (en) * 2016-05-20 2016-10-26 维沃移动通信有限公司 Processing method after application enters background, test method, and terminals
CN106339314A (en) * 2016-08-12 2017-01-18 北京奇虎科技有限公司 Application living testing method and device
US20190220318A1 (en) * 2016-09-27 2019-07-18 Huawei Technologies Co., Ltd. Memory Reclamation Method and Apparatus
US20180206136A1 (en) * 2017-01-17 2018-07-19 Tutela Technologies Ltd. System and Method for Evaluating Wireless Device and/or Wireless Network Performance
CN106933660A (en) * 2017-02-17 2017-07-07 广州启生信息技术有限公司 The implementation method of application process keep-alive under a kind of Android platform
CN107423127A (en) * 2017-07-31 2017-12-01 广东欧珀移动通信有限公司 Management-control method, device, storage medium and the electronic equipment of application program
CN107729125A (en) * 2017-10-31 2018-02-23 努比亚技术有限公司 Application program resides the management method and mobile terminal on backstage
CN109947638A (en) * 2019-01-14 2019-06-28 珠海金山网络游戏科技有限公司 A kind of application program capacity test control method and tool
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
CN110688319A (en) * 2019-09-30 2020-01-14 RealMe重庆移动通信有限公司 Application keep-alive capability test method and related device
CN111143100A (en) * 2019-12-09 2020-05-12 北京小米移动软件有限公司 Memory leak detection method, device, equipment and storage medium
CN112214254A (en) * 2020-09-25 2021-01-12 北京小米移动软件有限公司 Method and device for accelerating starting of application program and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘海涛;牛健;罗建平;周坤;朱贤宝;: "基于大规模可编程逻辑门阵列的网采交换机驻留时间测试技术研究与装置研制", 电气技术, no. 05, 15 May 2019 (2019-05-15) *
张莹莹;: "分布式测试系统的软件增量更新设计", 计算机测量与控制, no. 11, 25 November 2018 (2018-11-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022252248A1 (en) * 2021-06-01 2022-12-08 长鑫存储技术有限公司 Memory test method and apparatus, device, and storage medium

Similar Documents

Publication Publication Date Title
CN108762839B (en) Interface display method and device of application program
CN109542777B (en) Pressure testing method and device and readable medium
EP3015983A1 (en) Method and device for optimizing memory
CN108702763B (en) Method and device for sending lead code and scheduling request
CN111340808A (en) Screen display monitoring method and device, electronic equipment and storage medium
US9678868B2 (en) Method and device for optimizing memory
CN109076595B (en) Random access control method and random access control device
CN108958911B (en) Process control method and device
CN108446226B (en) Application exception processing method
CN107436782B (en) Application silent installation method and device
CN112817844A (en) Background process residence test method, device, equipment and storage medium
CN106535147B (en) Communication signal processing method and device
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN112256563A (en) Android application stability testing method and device, electronic equipment and storage medium
CN109491655B (en) Input event processing method and device
CN110968523A (en) Memory defragmentation method and device
CN113778687B (en) Memory allocation information processing method and device, electronic equipment and storage medium
CN113467854B (en) Application program starting method and device, electronic equipment and storage medium
CN106060104B (en) Application management method and device
CN114661606A (en) Program debugging method and device, electronic equipment and storage medium
CN110928595B (en) Authority operation method and device
CN112416580A (en) Method, device and medium for determining optimal resource allocation mode in application runtime
CN110968516A (en) Application memory testing method and device and computer storage medium
CN112068975B (en) Information processing method and device
CN110247828B (en) Identification code allocation method and device

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