CN112380088A - Test method and device and electronic equipment - Google Patents

Test method and device and electronic equipment Download PDF

Info

Publication number
CN112380088A
CN112380088A CN202011243113.6A CN202011243113A CN112380088A CN 112380088 A CN112380088 A CN 112380088A CN 202011243113 A CN202011243113 A CN 202011243113A CN 112380088 A CN112380088 A CN 112380088A
Authority
CN
China
Prior art keywords
application
information
terminal
process management
state information
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
CN202011243113.6A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202011243113.6A priority Critical patent/CN112380088A/en
Publication of CN112380088A publication Critical patent/CN112380088A/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/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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/3684Test management for test design, e.g. generating new test cases
    • 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/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The embodiment of the disclosure discloses a test method, a test device and electronic equipment. A specific implementation of the method is applied to the terminal device, and the specific implementation of the method includes: running a process management program, wherein the process management program is used for managing the established application process; executing application starting operation, and acquiring first predefined type of state information of the terminal based on the application starting operation, wherein the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal; and acquiring log information of a second predefined type of the terminal, wherein the log information of the second predefined type is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program. Thus, a new test mode is provided.

Description

Test method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a test method and apparatus, and an electronic device.
Background
With the development of the internet, users increasingly use the functions of terminal devices, so that work and life are more convenient. With the increasing enrichment of application functions, a user may install a plurality of applications on a terminal. The running of these applications will occupy various resources on the terminal, such as computing resources, communication resources, etc.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides a testing method applied to a terminal device, where the method includes: running a process management program, wherein the process management program is used for managing the established application process; executing application starting operation, and acquiring first predefined type of state information of a terminal based on the application starting operation, wherein the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal; and acquiring second predefined type log information of the terminal, wherein the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
In a second aspect, an embodiment of the present disclosure provides a testing apparatus, which is applied to a terminal device, and the apparatus includes: the system comprises an operation unit, a processing unit and a processing unit, wherein the operation unit is used for operating a process management program, and the process management program is used for managing an established application process; the terminal comprises a starting unit, a state information acquisition unit and a state information processing unit, wherein the starting unit is used for executing application starting operation and acquiring first predefined type of state information of the terminal based on the application starting operation, the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal; the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring second predefined type log information of the terminal, the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method according to the first aspect or according to the second aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements a method according to the first aspect or according to the second aspect.
According to the test method provided by some embodiments of the present disclosure, a preset number of applications may be sequentially started in a process of running a process management program, and in a process of running the process management program and sequentially starting the applications, state information of a first predefined type of a terminal is collected, and log information of a second predefined type of the terminal is collected; the collected log information and the collected state information may be used to generate test results for the process management program. Therefore, a new test mode can be provided, the application with the preset number can be automatically started, and the state information and the log information of the terminal are recorded for generating the test result, so that the number of the application processes in execution can be changed in the running process of the process management program, the process management program can fully play a role and embody the characteristics, the test accuracy and comprehensiveness can be improved, and the accuracy of the generated test result can be improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of one embodiment of a testing method according to the present disclosure;
FIG. 2 is a schematic diagram of an exemplary application scenario in accordance with the present disclosure;
FIG. 3 is a schematic diagram of another exemplary application scenario in accordance with the present disclosure;
FIG. 4 is a schematic structural diagram of one embodiment of a testing device according to the present disclosure;
FIG. 5 is a system architecture diagram in which one embodiment of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow of one embodiment of a testing method according to the present disclosure is shown. The test method is applied to the terminal equipment. The test method as shown in fig. 1 includes the following steps:
step 101, running a process management program.
In this embodiment, an execution subject (e.g., a terminal device) of the test method may run a process management program.
Here, the process manager is used to manage the established application processes.
Generally, when an application starts, a process may be spawned. A main thread may be created in this process to start execution of tasks within the application. As an example, the android system may retain processes as much as possible. As an example, when an instant messaging application is opened, a process is created (while a main thread is created), followed by various content loads (first active, then various controls, etc.). When the user completes the operation, the back key is generally pressed until the program exits.
It will be appreciated that it is generally desirable for the application to shut down if the user presses back all the time. However, in fact, this is done only by closing the interface (activity), and most of the application processes still remain, occupying memory for background tasks. Processes are spawned as applications are launched, but are often not shut down as a user closes.
In other words, the user has performed a closing operation, and the terminal appears to close the application, but the application is still running in the background. Therefore, a process management program aiming at the application process can be arranged to carry out background task management.
In some application scenarios, the system will classify processes into several classes according to the importance of the application, the least important processes will be shut down preferentially, and the relatively important processes will get resources (e.g., main memory, etc.) to reserve.
Step 102, executing an application starting operation, and collecting a first predefined kind of state information of the terminal based on the application starting operation.
In this embodiment, the execution subject may execute an application start operation, and collect the first predefined type of state information of the terminal based on the application start operation.
Here, the above-described application start operation may be used to sequentially start a preset number of applications.
Here, the sequential starting may mean that the preset number of applications are started in at least two batches. As an example, sequential startup may include startup one by one.
In some application scenarios, there is no restriction on the interval between adjacent application launches.
In some application scenarios, the starting sequence between the preset number of applications is not limited.
Here, the specific numerical value of the preset number may be set according to an actual application scenario, and is not limited herein. As an example, the preset number may be 30 or 50, etc.
Here, the terminal may be previously installed with a preset number of applications. It is to be understood that the name or type of the specific application installed in the terminal may be set according to an actual application scenario, and is not limited herein.
In this embodiment, collecting the first predefined kind of state information of the terminal based on the application starting operation may include collecting the state information during the application starting operation.
Here, the number of times and the time for acquiring the state information may be set according to an actual application scenario, and are not limited herein.
Here, the first predefined type of status information may be used to indicate an operation status of the terminal.
In this embodiment, the specific type of the first predefined type of status information may be set according to an actual application scenario, and is not limited herein.
In some application scenarios, the first predefined category of status information may include, but is not limited to, at least one of: memory usage information, Central Processing Unit (CPU) occupancy, power, motherboard temperature, frame rate, number of processes, number of running state applications, and number of frozen state application processes.
Here, the memory usage information may indicate a remaining capacity of the memory.
Here, the above-mentioned occupancy of the central processing unit may indicate an occupancy of the central processing unit.
Here, the above-mentioned power may indicate a power remaining amount of the terminal.
Here, the above-mentioned board temperature may indicate a temperature of the board on the terminal.
Here, the frame rate may indicate the number of frames refreshed per second on the display screen of the terminal.
Here, the above-mentioned number of processes may indicate the number of processes in operation.
Here, the above-mentioned running-state application number may indicate the number of applications in a live state.
Here, the number of application processes in the frozen state may indicate the number of application processes in the frozen state.
And 103, acquiring the log information of the second predefined type of the terminal.
In this embodiment, the executing entity may obtain log information of a second predefined kind of the terminal.
In this embodiment, the log information of the second predefined type may be used to record historical action information of the terminal based on the process management program and the application start operation. In other words, the terminal may perform several actions based on the process management program and the application start operation, and the second predefined type of log information may record the actions of the terminal in the process of the process management program and the application start operation.
In this embodiment, the specific type of the second predefined type of log information may be set according to an actual application scenario, and is not limited herein.
In some application scenarios, the second predefined category of log information may include, but is not limited to, at least one of the following: system logs (adb log), Kernel logs (Kernel log), read-write logs.
Here, the system log may record actions at a system level.
Here, the kernel log may record kernel-level actions.
Here, the read/write log may also be referred to as read/write state information (IO state information) for recording read/write operations.
In this embodiment, the obtained status information and the obtained log information may be used to generate a test result of the process management program.
Here, the test result may be generated by the execution subject, may be generated by other electronic devices besides the execution subject, and may be given by a worker.
Here, the test results may be used to indicate the effectiveness of the process manager. The test results include various parameter values, which may include, by way of example, duration of high CPU occupancy, temperature slope, CPU usage variance, and the like.
As an example, a high CPU occupancy may refer to a case where the CPU occupancy is greater than eighty percent. The duration of the high CPU occupancy may refer to a duration in which the high CPU occupancy condition occurs continuously.
It should be noted that the parameters used for characterizing the effect of the process management program in the test result may be set according to an actual application scenario, which is not limited herein.
It should be noted that, in the test mode provided in this embodiment, a preset number of applications may be sequentially started in the process of running the process management program, and in the process of running the process management program and sequentially starting the applications, the state information of the first predefined type of the terminal is collected, and the log information of the second predefined type of the terminal is collected; the collected log information and the collected state information may be used to generate test results for the process management program. Therefore, a new test mode can be provided, the application with the preset number can be automatically started, and the state information and the log information of the terminal are recorded for generating the test result, so that the number of the application processes in execution can be changed in the running process of the process management program, the process management program can fully play a role and embody the characteristics, the test accuracy and comprehensiveness can be improved, and the accuracy of the generated test result can be improved.
In some embodiments, the test results may be used to adjust the process manager.
Here, an analysis program for analyzing the test result may be set in advance, and a correspondence between each index and a management manner in the process management program may also be set. The analysis program may analyze the test results for indicators that perform poorly. Then, the management mode corresponding to the poor index can be adjusted.
As an example, the test result includes a duration of high CPU occupancy, and the number of application closures in the process management program may be increased if the duration of high CPU occupancy is greater than a preset duration threshold. In other words, the duration of the high CPU occupancy is long, and some applications may be closed more, so that the CPU occupancy may decrease quickly after being too high, and the duration of the high CPU occupancy is short.
The electronic device that executes the adjustment management program based on the test result may be the same as or different from the execution subject.
It should be noted that, by adjusting the process management program according to the test result, the rationality of the process management policy can be evaluated as a whole to improve, thereby improving the effectiveness of process management.
In some embodiments, the starting sequence of the preset number of applications may be determined according to the sequence indicated by the preset application identification sequence.
Here, the application identification sequence is determined based on the history open application information.
Here, the history open application information may include the kind and number of applications opened by the user. The users may be mass users.
As an example, the application indicated by the application identifier in the application identifier sequence may be a high-frequency application whose turn-on frequency is located in the top 50 bits, which is extracted by statistics of big data statistics (derived from information reported by user consent) and combining with user feedback.
Here, the sequence in the application identification sequence may be determined by counting the sequence in which each application is turned on by the user.
It should be noted that, by determining the starting sequence of the preset number of applications according to the sequence indicated by the preset application identification sequence, the application type and the starting sequence may be as consistent as possible with the actual use process of the user in the test process, so as to improve the consistency between the test process and the actual use process, thereby improving the accuracy of the test.
In some embodiments, the first predefined category of status information comprises at least one of: the method comprises the following steps of (1) using information of a memory, the occupancy rate of a central processing unit, electric quantity, temperature of a mainboard, frame rate, process quantity, running state application quantity and freezing state application process quantity;
in some embodiments, the predefined log information comprises at least one of: system log, kernel log, read-write log.
It should be noted that the rationality of the mobile phone management strategy is judged through the multidimensional data trend, the single-point test is upgraded into the three-dimensional test, all information is acquired through one-time operation, and the efficiency is improved in multiples.
In some embodiments, the step 102 may include: and after each application is started, acquiring the state information of the first predefined type after a first preset time length.
As an example, the application start operation may include starting the application a, the application b, and the application c in sequence. After the application A is started, the state of the predefined category can be recorded after a first preset time (for example, 3 seconds); after the application b is started, the state of the predefined category may be recorded for a first preset time period (e.g., 3 seconds); after the application c is started, a first preset time period (e.g., 3 seconds) may elapse, and the status of the predefined category may be recorded.
It should be noted that, by recording the state information of the terminal after each application is started, the state information of the terminal can be collected in time by using the started application as a reference point, and the state change process of the terminal can be determined by the timely collected state information along with the increase of the started application processes, so that the accuracy of the test result is improved.
In some embodiments, the method further comprises: emptying second predefined kinds of log information before executing the application starting operation; and after the application starting operation is executed, acquiring the log information of the second predefined type after a second preset time length.
As an example, the terminal may clear the log information of the second predefined type, and then perform an application start operation, after the application start operation is completed, the terminal may turn off the screen to wait for a second preset time (for example, 30 minutes), and then obtain the log information of the second predefined type again. Therefore, the interference of the left log information before the application starting operation can be eliminated, and the speed and the accuracy of generating the test result according to the log information are improved.
In some embodiments, the method further comprises: and running a preset operation process, wherein the operation process is used for simulating a user to operate.
The operation process for simulating the operation of the user is operated, so that the test process is more similar to the actual use process of the user, and the test accuracy is improved.
Referring to fig. 2, an application scenario of some embodiments of the present disclosure is shown. In fig. 2, the terminal can install 50 applications, execute a test script, and start a test. The test script can execute test preprocessing, for example, automatically read the read-write state information of the terminal, and empty the system log and the kernel log. Then, the test script may open the 50 applications in sequence, and each time the application is opened, the state information of the terminal may be recorded accordingly. After the last application is opened, the screen may be turned off for 30 minutes and then the status information may be obtained again. Finally, the system log, the kernel log and the read-write state information can be collected, so that the test can be completed.
Here, each time the test application was started during the test, data was acquired, plus information from the test application and the application was left for 30 minutes after completion of the start-up, for a total of 52 sets of status information.
In some application scenarios, the same terminal may be used to run different process management programs. Then, the state information and log information of each run process manager are recorded.
In some embodiments, the method further comprises: acquiring state information and log information corresponding to each process management program in at least two process management programs, and generating first comparison information.
Here, the first comparison information is used to indicate a difference between the at least two process managers.
As an example, the state information and the log information may be made as charts. Differences between different process managers can be determined through terminal key state information trends. For example, without modifying the management policy, a significant reduction in available main memory space (FreeRAM) indicates that a memory leak may have occurred during testing; for another example, when the frame rate is significantly decreased, it indicates that a karton performance problem occurs in the test.
It should be noted that, by comparing different process management programs of the terminal with different process management programs, differences between different process management programs can be effectively compared, and a basis is provided for optimizing the process management programs.
In some application scenarios, different terminals may be employed to run different management policies. It should be noted that the test resources on different terminals are the same.
In some embodiments, the method further comprises: acquiring state information and log information of at least two terminals; and generating second comparison information according to the state information and the log information of each terminal.
Here, the at least two terminals install the same test resource, and each of the at least two terminals installs a different process management program.
Here, the second comparison information is used to indicate a difference between the process managers running on the at least two terminals.
As an example, a statistical curve is drawn with the CPU occupancy rate changing with time for different process managers, and the difference of the process managers can be determined according to the smoothness degree of the curve.
By way of example, differences in the process manager may include, but are not limited to, at least one of: a CPU occupancy threshold for trigger management, an application process threshold for trigger management, etc.
It should be noted that, by executing the process management programs by different terminals, not only the differences between different process management programs can be determined by comparison, but also the testing speed can be increased. In addition, if one process management program is taken as the process to be optimized, the optimization direction of the process to be optimized can be determined by referring to other process management programs.
By way of example, please refer to fig. 3, which shows the test results of the process managers run by the three terminals.
It should be noted that the terminal a, the terminal B, and the terminal C have the same size of memory and the same CPU chip model. An exemplary scenario in which main memory space (in M) is available as a parameter value is mainly shown in fig. 3. Fig. 3 shows the available main memory space of different terminals in these cases after power-on, after 30 applications are started, after 50 applications are started, and after 30 minutes of screen saving and standing.
As can be seen from fig. 3, the overall management of the terminal C is stronger, and the management policy of the terminal C can be determined in an auxiliary manner through the temperature, the number of surviving processes, and the CPU utilization rate. A more detailed background process is obtained through log information, for example, the temperature rises to 50 degrees in the test, and a management mechanism is triggered; the CPU occupation exceeds 200, the CPU occupation exceeds 10 minutes, and a management mechanism is triggered; CPU usage exceeds the single core 60, priority is below the highest priority level, CPU usage exceeds 10 minutes, a management mechanism is triggered, and so on. In addition, it can be seen that the performance of the terminal a and the terminal B is not very different in the test process, but when the mobile phone finishes starting all the applications, after standing for half an hour, the available main memory space (FreeRAM) of the terminal a is larger, and the number of the corresponding keep-alive applications is smaller, which relates to a user experience problem in the management strategy. Through the comparison information, the method has very high guiding value for evaluating the rationality of the overall management strategy of the testing machine.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a testing apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which may be applied in various electronic devices.
As shown in fig. 4, the test apparatus of the present embodiment includes: an execution unit 401, a start unit 402 and an acquisition unit 403. The system comprises an operation unit, a process management unit and a processing unit, wherein the operation unit is used for operating a process management program, and the process management program is used for managing an established application process; the terminal comprises a starting unit, a state information acquisition unit and a state information processing unit, wherein the starting unit is used for executing application starting operation and acquiring first predefined type of state information of the terminal based on the application starting operation, the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal; the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring second predefined type log information of the terminal, the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
In this embodiment, specific processes of the operation unit 401, the starting unit 402, and the obtaining unit 403 of the testing apparatus and technical effects thereof may refer to related descriptions of step 101, step 102, and step 103 in the corresponding embodiment of fig. 1, which are not described herein again.
In some embodiments, the collecting the first predefined kind of state information of the terminal based on the application start operation includes: and after each application is started, acquiring the state information of the first predefined type after a first preset time length.
In some embodiments, the apparatus is further configured to: emptying second predefined kinds of log information before executing the application starting operation; and after the application starting operation is executed, acquiring the log information of the second predefined type after a second preset time length.
In some embodiments, the apparatus is further configured to: and running a preset operation process, wherein the operation process is used for simulating a user to operate.
In some embodiments, the starting sequence of the preset number of applications is determined according to a sequence indicated by a preset application identification sequence; wherein the application identification sequence is determined according to historical opening application information.
In some embodiments, wherein the first predefined category of status information comprises at least one of: the method comprises the following steps of (1) using information of a memory, the occupancy rate of a central processing unit, electric quantity, temperature of a mainboard, frame rate, process quantity, running state application quantity and freezing state application process quantity; the predefined log information includes at least one of: system log, kernel log, read-write log.
In some embodiments, the apparatus is further configured to: the method comprises the steps of obtaining state information and log information corresponding to each process management program in at least two process management programs, and generating first comparison information, wherein the first comparison information is used for indicating differences between the at least two process management programs.
In some embodiments, wherein the apparatus is further configured to: acquiring state information and log information of at least two terminals, wherein the at least two terminals are provided with the same test resource, and each terminal of the at least two terminals is provided with different process management programs; and generating second comparison information according to the state information and the log information of each terminal, wherein the second comparison information is used for indicating the difference between the process management programs running on the at least two terminals.
Referring to fig. 5, fig. 5 illustrates an exemplary system architecture to which the testing method of one embodiment of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 501, 502, 503 may interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various client applications installed thereon, such as a web browser application, a search-type application, and a news-information-type application. The client application in the terminal device 501, 502, 503 may receive the instruction of the user, and complete the corresponding function according to the instruction of the user, for example, add the corresponding information in the information according to the instruction of the user.
The terminal devices 501, 502, 503 may be hardware or software. When the terminal devices 501, 502, 503 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal devices 501, 502, and 503 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 505 may be a server that provides various services, for example, sending test scripts and test resources to the terminal devices, and receiving status information and log information of the terminal devices 501, 502, 503 to generate test results.
It should be noted that the test method provided by the embodiment of the present disclosure may be executed by a terminal device, and accordingly, the test apparatus may be disposed in the terminal device 501, 502, 503. In addition, the step of generating the test result in the test method provided by the embodiment of the present disclosure may be executed by the server 505, and accordingly, the test apparatus may be disposed in the server 505. The server 505 may also be a terminal device, as an example.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., a terminal device or a server of fig. 5) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: running a process management program, wherein the process management program is used for managing the established application process; executing application starting operation, and acquiring first predefined type of state information of a terminal based on the application starting operation, wherein the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal; and acquiring second predefined type log information of the terminal, wherein the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Here, the name of the unit does not constitute a limitation to the unit itself in some cases, and for example, the acquisition unit may also be described as "a unit that acquires log information".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A testing method is characterized by being applied to terminal equipment and comprising the following steps:
running a process management program, wherein the process management program is used for managing the established application process;
executing application starting operation, and acquiring first predefined type of state information of a terminal based on the application starting operation, wherein the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal;
and acquiring second predefined type log information of the terminal, wherein the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
2. The method according to claim 1, wherein collecting a first predefined category of state information of a terminal based on the application launching operation comprises:
and after each application is started, acquiring the state information of the first predefined type after a first preset time length.
3. The method of claim 1, further comprising:
emptying second predefined kinds of log information before executing the application starting operation;
and after the application starting operation is executed, acquiring the log information of the second predefined type after a second preset time length.
4. The method of claim 1, further comprising:
and running a preset operation process, wherein the operation process is used for simulating a user to operate.
5. The method according to claim 1, wherein the starting sequence of the preset number of applications is determined according to the sequence indicated by a preset application identification sequence; wherein the application identification sequence is determined according to historical opening application information.
6. The method of claim 1, wherein,
the first predefined category of status information comprises at least one of: the method comprises the following steps of (1) using information of a memory, the occupancy rate of a central processing unit, electric quantity, temperature of a mainboard, frame rate, process quantity, running state application quantity and freezing state application process quantity;
the predefined log information includes at least one of: system log, kernel log, read-write log.
7. The method according to any one of claims 1-6, further comprising:
and generating first comparison information according to the state information and the log information corresponding to each process management program in at least two process management programs, wherein the first comparison information is used for indicating the difference between the at least two process management programs.
8. The method according to any one of claims 1-6, further comprising:
acquiring state information and log information of at least two terminals, wherein the at least two terminals are provided with the same test resource and run different process management programs;
and generating second comparison information according to the state information and the log information of each terminal, wherein the second comparison information is used for indicating the difference between the process management programs running on the at least two terminals.
9. The method of claim 1, wherein the test results are used to adjust a process manager.
10. A testing device, applied to a terminal device, the device comprising:
the system comprises an operation unit, a processing unit and a processing unit, wherein the operation unit is used for operating a process management program, and the process management program is used for managing an established application process;
the terminal comprises a starting unit, a state information acquisition unit and a state information processing unit, wherein the starting unit is used for executing application starting operation and acquiring first predefined type of state information of the terminal based on the application starting operation, the application starting operation can be used for sequentially starting a preset number of applications, and the first predefined type of state information is used for indicating the running state of the terminal;
the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring second predefined type log information of the terminal, the second predefined type log information is used for recording historical action information of the terminal based on the process management program and the application starting operation, and the acquired state information and the acquired log information are used for generating a test result of the process management program.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202011243113.6A 2020-11-09 2020-11-09 Test method and device and electronic equipment Pending CN112380088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011243113.6A CN112380088A (en) 2020-11-09 2020-11-09 Test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011243113.6A CN112380088A (en) 2020-11-09 2020-11-09 Test method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112380088A true CN112380088A (en) 2021-02-19

Family

ID=74578452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011243113.6A Pending CN112380088A (en) 2020-11-09 2020-11-09 Test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112380088A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641544A (en) * 2021-08-23 2021-11-12 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for detecting application status
CN114690988A (en) * 2022-03-08 2022-07-01 北京字跳网络技术有限公司 Test method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186739A (en) * 2010-03-08 2011-09-22 Panasonic Electric Works Co Ltd Program and apparatus for managing process
US20120081754A1 (en) * 2010-10-05 2012-04-05 Seiko Epson Corporation Electronic device, printer, status management method for an electronic device, and recording medium
CN105045714A (en) * 2015-07-25 2015-11-11 北京金山安全软件有限公司 Method and device for testing starting duration of application software and terminal
CN107943650A (en) * 2017-11-21 2018-04-20 广东欧珀移动通信有限公司 Control method, device, storage medium and the terminal of application program
CN109144842A (en) * 2017-06-16 2019-01-04 百度在线网络技术(北京)有限公司 Method and apparatus for test application
CN110825713A (en) * 2019-10-30 2020-02-21 Oppo广东移动通信有限公司 Information processing method and related product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186739A (en) * 2010-03-08 2011-09-22 Panasonic Electric Works Co Ltd Program and apparatus for managing process
US20120081754A1 (en) * 2010-10-05 2012-04-05 Seiko Epson Corporation Electronic device, printer, status management method for an electronic device, and recording medium
CN105045714A (en) * 2015-07-25 2015-11-11 北京金山安全软件有限公司 Method and device for testing starting duration of application software and terminal
CN109144842A (en) * 2017-06-16 2019-01-04 百度在线网络技术(北京)有限公司 Method and apparatus for test application
CN107943650A (en) * 2017-11-21 2018-04-20 广东欧珀移动通信有限公司 Control method, device, storage medium and the terminal of application program
CN110825713A (en) * 2019-10-30 2020-02-21 Oppo广东移动通信有限公司 Information processing method and related product

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641544A (en) * 2021-08-23 2021-11-12 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for detecting application status
CN113641544B (en) * 2021-08-23 2024-04-26 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for detecting application state
CN114690988A (en) * 2022-03-08 2022-07-01 北京字跳网络技术有限公司 Test method and device and electronic equipment
CN114690988B (en) * 2022-03-08 2024-01-23 北京字跳网络技术有限公司 Test method and device and electronic equipment

Similar Documents

Publication Publication Date Title
EP3502881B1 (en) Method for preloading application, storage medium, and terminal device
US8397087B1 (en) Systems and methods for individually managing the power usage of software applications
CN112257135B (en) Model loading method and device based on multithreading, storage medium and terminal
US11765754B2 (en) Resource scheduling method and terminal device
US11240290B2 (en) Application download method and apparatus, application sending method and apparatus, and system
CN112380088A (en) Test method and device and electronic equipment
US9210203B2 (en) Resource based mobile device application streaming
CN111258800A (en) Page processing method and device and electronic equipment
US20220237044A1 (en) Dynamic client/server selection for machine learning execution
CN111913759A (en) Method, apparatus, computing device, and medium for controlling execution of application program
US20220011843A1 (en) Software entity power consumption estimation and monitoring
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN113407344A (en) Method and device for processing stuck
US9244939B2 (en) Managing I/O operations in a shared file system
CN113010279A (en) Application program process processing method and device for mobile terminal and electronic equipment
CN112241372A (en) Terminal testing method and device and electronic equipment
CN111192063A (en) Online customer service queuing processing method and device and electronic equipment
Lewerentz et al. Performance and energy optimization for the android platform
CN114690988B (en) Test method and device and electronic equipment
Kumar et al. A Study on User Interaction with Multi-Window Screen Support Framework for Multitasking Operations on Smartphones
Dorai Energy profiling of ios apps to detect causes of energy drain
CN112799933B (en) Automatic test method and device
CN115794353B (en) Cloud network service quality optimization processing method, device, equipment and storage medium
EP2896185B1 (en) Reducing network usage of computing device
US20230393891A1 (en) Application performance enhancement system and method based on a user's mode of operation

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