CN110688319B - Application keep-alive capability test method and related device - Google Patents

Application keep-alive capability test method and related device Download PDF

Info

Publication number
CN110688319B
CN110688319B CN201910934099.5A CN201910934099A CN110688319B CN 110688319 B CN110688319 B CN 110688319B CN 201910934099 A CN201910934099 A CN 201910934099A CN 110688319 B CN110688319 B CN 110688319B
Authority
CN
China
Prior art keywords
application
keep
information
test
alive
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.)
Active
Application number
CN201910934099.5A
Other languages
Chinese (zh)
Other versions
CN110688319A (en
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.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications 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 Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to CN201910934099.5A priority Critical patent/CN110688319B/en
Publication of CN110688319A publication Critical patent/CN110688319A/en
Application granted granted Critical
Publication of CN110688319B publication Critical patent/CN110688319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses an application keep-alive capability test method and a related device, which are applied to electronic equipment in an application keep-alive capability test system, wherein the application keep-alive capability test system comprises the electronic equipment and test equipment, the test equipment is in communication connection with the electronic equipment, and the method comprises the following steps: when an application test notification from the test equipment is detected, a first application is run according to the first script file; when an application call notification from the test device is detected, call the first application; collecting running state information of a first application; transmitting running state information to the test equipment, wherein the running state information is used for indicating the test equipment to determine the keep-alive capability information of the electronic equipment according to the running state information, and transmitting the keep-alive capability information to the electronic equipment, and the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application; keep-alive information is received. The embodiment of the application is beneficial to improving the accuracy of the test result and shortening the test duration.

Description

Application keep-alive capability test method and related device
Technical Field
The application relates to the technical field of electronic equipment, in particular to an application keep-alive capability test method and a related device.
Background
With the continuous development of technology, when the electronic device runs a plurality of applications at the same time, the stability of the operation of the electronic device is ensured by applying a keep-alive strategy, but the establishment of the keep-alive strategy is difficult to be performed at a stroke. At present, the test of the application keep-alive capability of the electronic equipment is performed by manually operating the application and recording processes, and deviation exists.
Disclosure of Invention
The embodiment of the application keep-alive capability test method and related device are provided for improving the accuracy of test results and shortening the test duration.
In a first aspect, an embodiment of the present application provides an application keep-alive capability test method, which is applied to an electronic device in an application keep-alive capability test system, where the application keep-alive capability test system includes the electronic device and a test device, and the test device is communicatively connected with the electronic device, and the method includes:
when an application test notification from the test equipment is detected, running a first application according to a first script file;
When an application call notification from the test device is detected, call the first application;
acquiring running state information of the first application, wherein the running state information is used for indicating the testing equipment to determine keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, and the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application;
transmitting the running state information to the test equipment;
and receiving the keep-alive information.
In a second aspect, an embodiment of the present application provides an application keep-alive capability test method, which is applied to a test device in an application keep-alive capability test system, where the application keep-alive capability test system includes the test device and an electronic device, and the test device is communicatively connected with the electronic device, and the method includes:
sending an application test notification to the electronic device, wherein the notification comprises the first script file and an application identifier of a first application, and the running state information acquisition notification is used for indicating the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment;
When an application call notification is sent to the electronic equipment, the application call notification is used for indicating the point-to-equipment to call the first application;
acquiring the running state information from the electronic equipment;
generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application;
and sending the keep-alive information to the electronic equipment.
In a third aspect, an embodiment of the present application provides an application keep-alive capability test apparatus, which is applied to an electronic device in an application keep-alive capability test system, where the application keep-alive capability test system includes the electronic device and a test device, and the test device is communicatively connected with the electronic device, where the apparatus includes: a processing unit and a communication unit, wherein,
the processing unit is used for running a first application according to a first script file when the application test notification from the test equipment is detected; and for invoking the first application upon detecting an application invocation notification from the test device; the running state information is used for indicating the testing equipment to determine the keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application; and for sending the operating status information to the test device via the communication unit; and for receiving the keep-alive information via the communication unit.
In a fourth aspect, an embodiment of the present application provides an application keep-alive capability test apparatus, which is applied to a test device in an application keep-alive capability test system, where the application keep-alive capability test system includes the test device and an electronic device, and the test device is communicatively connected with the electronic device, where the apparatus includes: a processing unit and a communication unit, wherein,
the processing unit acquires a first script file; and sending an application test notification to the electronic device through the communication unit, wherein the notification comprises the first script file and an application identifier of the first application, and the running state information acquisition notification is used for indicating the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment; and for obtaining, by the communication unit, the operational status information from the electronic device; and generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application; and transmitting the keep-alive information to the electronic device through the communication unit.
In a fifth aspect, an embodiment of the present application provides an application keep-alive capability test system, including an electronic device and a test device, where the test device is communicatively connected to the electronic device;
the electronic device being adapted to perform the steps of any of the methods as in the first aspect;
the test apparatus is for performing the steps as in any of the methods of the second aspect.
In a sixth aspect, embodiments of the present application provide an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by the processor, the programs comprising instructions for performing the steps of any of the methods of the first aspect of embodiments of the present application.
In a seventh aspect, embodiments of the present application provide a test device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by the processor, the programs comprising instructions for performing steps in any of the methods of the second aspect of embodiments of the present application.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps as described in any of the methods of the first or second aspects of embodiments of the present application, the computer comprising an electronic device.
In a ninth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps as described in any of the methods of the first or second aspects of embodiments of the present application. The computer program product may be a software installation package.
It can be seen that in this embodiment of the present application, when an application test notification from the test device is detected, the electronic device first runs a first application according to a first script file, then, when an application call notification from the test device is detected, calls the first application, then, collects running state information of the first application, then, sends the running state information to the test device, where the running state information is used to instruct the test device to determine keep-alive capability information of the electronic device according to the running state information, and sends the keep-alive capability information to the electronic device, where the keep-alive capability information is used to characterize keep-alive capability of the electronic device to the application, and finally, receives the keep-alive capability information. Therefore, the electronic equipment can collect the running state information of the application in the process of executing the application keep-alive test operation on the application, which is favorable for improving the accuracy of the application keep-alive capability test result.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system for testing the keep-alive application according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for applying keep-alive capability test disclosed in an embodiment of the present application;
FIG. 3 is a flow chart of another method for testing application keep-alive capabilities disclosed in an embodiment of the application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a test apparatus according to an embodiment of the present application;
FIG. 6 is a functional unit block diagram of an application keep-alive capability test apparatus disclosed in an embodiment of the present application;
FIG. 7 is a block diagram of functional units of another apparatus for testing the keep-alive application according to an embodiment of the present application.
Detailed Description
The embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a schematic diagram of an application keep-alive capability test system, and as shown in fig. 1, an application keep-alive capability test system 10 includes an electronic device 101 and a test device 102, wherein the electronic device 101 and the test device 102 are connected through a universal serial bus USB, and in the process of performing an application keep-alive capability test, data interaction is performed between the electronic device 101 and the test device 102 through the universal serial bus USB. The test equipment related to the embodiment of the application is an android version mobile phone.
It should be noted that, in the actual testing process, the application keep-alive capability test system may be that the test device performs a test on an electronic device, specifically, one test device is connected to one electronic device, where there are multiple applications in the electronic device, the test device sends an application keep-alive capability test notification for a first application to the electronic device, after the electronic device completes the application keep-alive test for the first application according to the application test notification, sends an application keep-alive capability test notification for a second application to the electronic device, after the electronic device completes the application keep-alive test for the second application according to the application test notification, sends an application keep-alive capability test notification for a third application to the electronic device, after the electronic device completes the application keep-alive test for the third application according to the application test notification, finally sequentially sends the multiple tested applications from a new call to the electronic device until the tested applications are started, and obtains the application state information about the multiple applications according to a certain time interval from the application start to the process of being restarted, and the multiple applications are of course, and the multiple application state information is obtained from the electronic device to the test device.
In addition, in the process of actually performing the test, the application keep-alive capability test system may be that the test device is connected to a plurality of identical electronic devices, and each electronic device has the same plurality of applications, and the test device may simultaneously control each electronic device in the plurality of electronic devices to obtain respective application test information, obtain test information from the plurality of electronic devices to obtain keep-alive capability information of the electronic device, and obtain keep-alive capability information of the electronic device according to the keep-alive capability information of the plurality of electronic devices.
In addition, the application keep-alive capability test system can also comprise monitoring equipment, monitor the video of the electronic equipment executing the test operation process, identify the test process and help to locate the electronic equipment with the problem.
Referring to fig. 2, fig. 2 is a schematic flow chart of an application keep-alive capability test method applied to an electronic device, where the electronic device is connected with a test device, and as shown in the drawing, the application keep-alive capability test method includes:
and S201, when the electronic equipment detects the application test notification from the test equipment, the electronic equipment runs a first application according to a first script file.
Wherein the application test notification includes the first script and an application identification of the first application.
The first script file may be an oil Monkey script, and is run in the electronic device, and send a pseudo-random user event stream (such as key input, touch screen input, gesture input, etc.) to a system of the electronic device, and perform a user-imitated operation on the electronic device.
The first application may be a system-level application, such as a calculator, a mirror, a recorder, etc., and may also be a social application in a third party application, such as a microblog, a strange, a Facebook, etc., and may also be a shopping application in a third party application, such as a reddish book, su Ningyi purchase, a unique meeting, tao Ji set, etc., and the first APP may also be any other application, without being limited specifically.
In this example, the electronic device runs the application according to the script file by acquiring the application test notification of the test device, which is beneficial to improving the validity of the application test.
S202, when the electronic equipment detects an application calling notification from the test equipment, calling the first application.
Wherein invoking the first application refers to reusing the application.
S203, the electronic equipment collects running state information of the first application, the running state information is used for indicating the testing equipment to determine keep-alive capability information of the electronic equipment according to the running state information, and the keep-alive capability information is sent to the electronic equipment and used for representing the keep-alive capability of the electronic equipment to the application.
The running state information is information which is generated in the running process of the first application and can reflect the first application process, and comprises at least one of the following steps: the method comprises the steps of first application process information (such as a process number PID), recording a log of the first application operation process, current operation interface screenshot, operation occupied memory size and data storage space size.
In this embodiment, the electronic device may collect the running state information of the first application at a certain time interval.
The keep-alive information comprises the overall keep-alive capacity of the electronic device for all the test applications and the keep-alive capacity of the electronic device for each application in all the test applications.
In this example, the electronic device may improve the validity of the original data by collecting the running state information of the application.
S204, the electronic equipment sends the running state information to the test equipment.
In this example, the electronic device may send the acquired running state information to the test device, so as to improve the authenticity of the test result.
S205, the electronic device receives the keep-alive capability information.
It can be seen that, in this example, the electronic device receives the keep-alive capability information of the test device, and improves the intelligence of the test process.
It can be seen that in this embodiment of the present application, when an application test notification from the test device is detected, the electronic device first runs a first application according to a first script file, then, when an application call notification from the test device is detected, calls the first application, then, collects running state information of the first application, then, sends the running state information to the test device, where the running state information is used to instruct the test device to determine keep-alive capability information of the electronic device according to the running state information, and sends the keep-alive capability information to the electronic device, where the keep-alive capability information is used to characterize keep-alive capability of the electronic device to the application, and finally, receives the keep-alive capability information. Therefore, the electronic equipment can collect the running state information of the application in the process of executing the application keep-alive test operation on the application, which is favorable for improving the accuracy of the application keep-alive capability test result.
In one possible example, the electronic device running the first application according to the first script file includes: the electronic equipment runs a foreground starting instruction aiming at the first application, responds to the foreground starting instruction and starts the first application; the electronic equipment runs an operation instruction aiming at the started first application, responds to the operation instruction, executes the function which is instructed to be started by the operation instruction, and the operation instruction is used for simulating the function triggering operation of a user aiming at the first application; and the electronic equipment runs a return instruction aiming at the first application, responds to the return instruction and returns to the desktop.
The electronic device running operation instructions for the started first application comprises: classifying the first application according to a classification mode to obtain the type of the first application; and querying a corresponding relation list of the application type and the operation instruction by taking the type of the first application as a query identifier to obtain the operation instruction corresponding to the application identifier. The application type comprises social type, shopping type, payment type and system type; the social application corresponds to a first operation instruction, the functions corresponding to the first operation instruction are a chat function, a dynamic sharing function and a payment function, and the paths of the execution functions corresponding to the first operation instruction are the chat function, the dynamic sharing function and the payment function in sequence; the shopping application corresponds to a second operation instruction, the functions corresponding to the second operation instruction are a commodity searching function, a commodity recommending function and a commodity comparing function, and the paths of the execution functions corresponding to the first operation instruction are the commodity searching function, the commodity recommending function and the commodity comparing function in sequence; the payment application corresponds to a third operation instruction, the functions corresponding to the first operation instruction are a payment function, a dynamic sharing function and a chat function, and the paths of the execution functions corresponding to the first operation instruction are the payment function, the dynamic sharing function and the chat function in sequence; the system class application corresponds to a third operating instruction, which executes common functions of the system application according to the system application.
For example, if the first application is a micro-letter, the electronic device runs an operation instruction for the started first application, and in response to the operation instruction, the function instructed to be enabled by executing the operation instruction may be a chat function, a dynamic sharing function, a payment function, which simulate that the user uses the micro-letter in sequence, for a total of 5 minutes.
For example, if the first application is panning, the electronic device runs an operation instruction for the started first application, and in response to the operation instruction, the function instructed to be enabled by executing the operation instruction may be a commodity searching function, a commodity recommending function, a commodity comparing function, which are sequentially used by the electronic device for simulating the user to use panning, for a total of 3 minutes.
In this example, the electronic device simulates the use process of the user for the application in the foreground according to the script file, so as to improve the feasibility of the keep-alive capability test.
In one possible example, the electronic device running the first application according to the first script file includes: the electronic equipment runs a background starting instruction aiming at the first application, responds to the clicking instruction and starts the first application in the background; the electronic equipment runs an operation instruction aiming at the started first application, responds to the operation instruction, executes the function instructed to be started by the operation instruction, and is used for simulating the operation of a system of the electronic equipment aiming at the first application; and the electronic equipment runs a return instruction aiming at the first application, responds to the return instruction and returns to the desktop.
The operation of the system for simulating the electronic equipment aiming at the first application is essentially to simulate the using operation of the simulation user aiming at the first application in the background of the electronic equipment.
It can be seen that in this example, the electronic device simulates, in the background, the use operation of the system of the electronic device for the application according to the script file, thereby improving the feasibility of the keep-alive capability test.
In one possible example, the electronic device collects running state information of the first application, including: when the electronic equipment detects that the first application is started, acquiring a plurality of process numbers PID of the first application; the electronic equipment generates a first log file according to the multiple PIDs; the electronic equipment marks the first log file with an identity of the home terminal and an application identity of the first application to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
The process number PID is the code number of the process, each process has a unique PID, when the first application is started, the system allocates a PID, the PID will not change during the running process of the first application, but the first application is stopped, the PID will be recovered by the system, when the first application is started again, another PID will be allocated, the PID of the first application is obtained from the electronic device when the first application is detected to be started, the PID of the first application can be obtained according to a certain time interval, the PID can be obtained every 15 seconds, the PID can be obtained every 20 seconds, and the PID can be obtained every 25 seconds, and the time interval is not particularly limited.
It can be seen that, in this example, the electronic device collects multiple PIDs of the application to generate a first log file, and marks the first log file with corresponding identifiers to obtain the running state information.
In one possible example, the keep-alive information of the electronic device is obtained for the test device by: the test equipment identifies the electronic equipment according to the identity of the electronic equipment to obtain an identification result; the test equipment classifies the first application according to the application identifier of the first application to obtain a classification result; the test equipment acquires process killing number information of the electronic equipment, wherein the process killing number information comprises total process killing numbers of the electronic equipment for all test applications and process killing numbers of each type of application in all the test applications; the test equipment updates the process killing information according to the identification result, the classification result and the first log file; and the testing equipment obtains the keep-alive capability information of the electronic equipment according to the updated process killing information.
Taking the process killing number information of the electronic equipment as table information as an example, describing a process of obtaining the keep-alive capability information of the electronic equipment by using test equipment, when the test equipment receives the keep-alive capability information from the electronic equipment, acquiring a code identifier of the electronic equipment and a currently used system identifier, determining the electronic equipment according to the code identifier and the system identifier, if the code identifier of the electronic equipment is A and the system identifier is B, determining the electronic equipment as first electronic equipment, searching to obtain current table information of first electronic equipment, if table 1, then, if the test equipment identifies the first application as a class A, judging that the first application is a killed application according to a first log file, updating corresponding data of a class A killing number and a total process killing number column in a statistics remark column, and obtaining updated table information, and obtaining the keep-alive capability information of the electronic equipment according to the updated table information, as shown in table 2.
Figure BDA0002219762710000081
TABLE 1
Figure BDA0002219762710000082
TABLE 2
The test device obtaining the keep-alive capability information of the electronic device according to the updated process killing information comprises the following steps: extracting a target value from the updated process killing information; calculating the target value through a formula to obtain a keep-alive capacity score; and determining the keep-alive capacity of the electronic equipment according to the keep-alive capacity score.
Wherein the formula may be:
z=10-10 (x/y), where z is the keep-alive score, x is the average number of process kills, and y is the number of applications to be tested, and it should be noted that the average number of process kills is obtained by testing the same batch of applications multiple times.
The correspondence of the keep-alive score to the keep-alive can be shown in table 3.
Figure BDA0002219762710000083
TABLE 3 Table 3
In this example, the test device can obtain the keep-alive capability information of the electronic device according to the running state information of the electronic device, so as to improve the intelligence of the application keep-alive capability test.
In one possible example, the test device updating the process killing information according to the identification result, the classification result, and the first log file includes: the test equipment determines the change condition of the PIDs in the first log file; and the test equipment updates the process killing information according to the change condition.
If the application is killed by the system in the background operation process, the application is different from the PID corresponding to the application in the execution of the application keep-alive capability test operation in the process of being restarted, if the application is not killed by the system in the background operation process, i.e. the application is not terminated by the system, the PID corresponding to the application is not changed in the process of being restarted, and at the moment, the PID of the application process is the same as the PID corresponding to the execution of the application keep-alive capability test operation.
The implementation manner of the test equipment for updating the process killing information according to the change condition can be as follows: if the PIDs in the first log file are different, determining that the process of the first application is killed in the process of entering background operation, increasing the values of a first parameter, a second parameter and a third parameter corresponding to the process killing number information by 1, wherein the first parameter corresponds to the total number of the test applications, the second parameter corresponds to the process killing number of the first application currently tested, and the third parameter corresponds to the process killing number of all the tested applications; if the PIDs in the first log file are all the same, determining that the process of the first application is not killed in the process of entering the background operation, and increasing the value of the first parameter corresponding to the process killing number information by 1.
In this example, the test device can update the process killing information by using the PID corresponding to the keep-alive capability test operation, so as to eliminate the possible error caused by manually judging the application process and improve the accuracy of the application keep-alive capability test result.
In one possible example, the keep-alive capability information includes keep-alive capability comparison information including at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
The application keep-alive ratio comparison information of the same electronic equipment with different software versions can be an application keep-alive sequence obtained by the test equipment according to the sequence of keep-alive scores of the same electronic equipment with different software versions from high to low.
The application keep-alive ratio comparison information of the electronic equipment and the different types of electronic equipment can be an application keep-alive sequence obtained by the test equipment according to the sequence of the keep-alive scores of the electronic equipment and the different types of electronic equipment from high to low.
It can be seen that in this example, the test device can obtain the application keep-alive ratio comparison information of the same electronic device of different software versions and the application keep-alive ratio comparison information of different electronic devices by applying the keep-alive test.
In one possible example, the keep-alive information includes user experience rating information, and the test device obtains the keep-alive information of the electronic device according to the updated process killing information: extracting a target value from the updated process killing information; the test equipment calculates a weighting formula through which the target value passes to obtain a user experience score; and the testing equipment obtains evaluation information aiming at the user experience degree according to the user experience degree score.
For example, if the applications can be classified into three types of applications, the first type of application is a social type application, the second type of application is a payment type application, and the third type of application can be a system type application), the weighting formula can be: w=10-10 [ (ax) 2 +by 2 +cz 2 )/(ax 1 +by 1 +cz 1 )]Wherein w is the user experience score and x1 is the first of all test applicationsThe value corresponding to one type of application (social application), y1 is the value corresponding to the second type of application (payment application) in all test applications, and z1 is the value corresponding to the third type of application (system application) in all test applications; x2 is the corresponding process killing number value of the first class of application in all the test applications, y2 is the corresponding process killing number value of the second class of application in all the test applications, z2 is the corresponding process killing number value of the second class of application in all the test applications, a, b and c are coefficients, a is 5, b is 3 and c is 2, when the score falls into the interval [8,10 ] ]In this case, the obtained user experience evaluation information may be "user experience is high"; when the score falls into the interval [6,8 ], the obtained user experience evaluation information can be 'high user experience'; when the score falls into the interval [4,6 ], the obtained user experience degree evaluation information can be "low user experience degree", and when the score falls into the interval [0,4 "), the obtained user experience degree evaluation information can be" low user experience degree ", wherein the experience condition of the user under different keep-alive strategies is evaluated by introducing weighted scores.
It can be seen that in this example, the test apparatus is able to derive user experience rating information from passing the application keep-alive capability test.
Referring to fig. 3, fig. 3 is a flow chart of another method for testing application keep-alive capability, which is provided in an embodiment of the present application, and is applied to a testing device, where the testing device is connected to an electronic device, as shown in the drawing, and the method for testing application keep-alive capability includes:
s301, the test equipment sends an application test notification to the electronic equipment, wherein the notification comprises the first script file and an application identifier of a first application, and the running state information acquisition notification is used for indicating the electronic equipment to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment;
S302, the test equipment sends an application call notification to the electronic equipment, wherein the application call notification is used for indicating the point-to-equipment to call the first application;
s303, the test equipment acquires the running state information from the electronic equipment;
s304, the test equipment generates keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application;
s305, the test equipment sends the keep-alive information to the electronic equipment.
It can be seen that in the embodiment of the present application, the test device first sends an application test notification to the electronic device, where the notification includes the first script file and an application identifier of the first application, and the running state information obtaining notification is used to instruct the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, sending the running state information to the test equipment, sending an application call notification to the electronic equipment, wherein the application call notification is used for indicating the point-to-equipment call of the first application, acquiring the running state information from the electronic equipment, generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application, and finally sending the keep-alive capability information to the electronic equipment. Therefore, the test equipment collects running state information of the application in the process of executing the application keep-alive test operation by the electronic equipment, which is beneficial to improving the accuracy of the application keep-alive test result.
In one possible example, the electronic device running the first application according to the first script file includes: the electronic equipment runs a foreground starting instruction aiming at the first application, responds to the foreground starting instruction and starts the first application; the electronic equipment runs an operation instruction aiming at the started first application, responds to the operation instruction, executes the function which is instructed to be started by the operation instruction, and the operation instruction is used for simulating the function triggering operation of a user aiming at the first application; and the electronic equipment runs a return instruction aiming at the first application, responds to the return instruction and returns to the desktop.
In one possible example, the electronic device running the first application according to the first script file includes: the electronic equipment runs a background starting instruction aiming at the first application, responds to the clicking instruction and starts the first application in the background; the electronic equipment runs an operation instruction aiming at the started first application, responds to the operation instruction, executes the function instructed to be started by the operation instruction, and is used for simulating the operation of a system of the electronic equipment aiming at the first application; and the electronic equipment runs a return instruction aiming at the first application, responds to the return instruction and returns to the desktop.
In one possible example, the electronic device collects running state information of the first application, including: when the electronic equipment detects that the first application is started, acquiring a plurality of process numbers PID of the first application; the electronic equipment generates a first log file according to the multiple PIDs; the electronic equipment marks the first log file with an identity of the home terminal and an application identity of the first application to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
In one possible example, the test device generates keep-alive information for the electronic device from the operational status information: identifying the electronic equipment according to the identity of the electronic equipment to obtain an electronic equipment identification result; classifying the first application according to the application identifier of the first application to obtain a classification result; acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application; updating the process killing information according to the identification result, the classification result and the first log file; and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
In one possible example, the test device updating the process killing information according to the identification result, the classification result, and the first log file includes: determining a change in the plurality of PIDs in the first log file; and updating the process killing information according to the change condition.
In one possible example, the keep-alive capability information includes keep-alive capability comparison information including at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
In one possible example, the keep-alive information includes user experience rating information, and the test device obtains the keep-alive information of the electronic device according to the updated process killing information: the test equipment extracts a target value from the updated process killing information; the test equipment calculates a weighting formula through which the target value passes to obtain a user experience score; and the testing equipment obtains evaluation information aiming at the user experience degree according to the user experience degree score.
Referring to fig. 4, in accordance with the embodiment shown in fig. 2, fig. 4 is a schematic structural diagram of an electronic device 400 provided in the embodiment of the present application, as shown in fig. 4, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, where the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for performing the following steps;
when an application test notification from the test equipment is detected, running a first application according to a first script file;
when an application call notification from the test device is detected, call the first application;
acquiring running state information of the first application, wherein the running state information is used for indicating the testing equipment to determine keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, and the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application;
transmitting the running state information to the test equipment;
And receiving the keep-alive information.
It can be seen that in this embodiment of the present application, when an application test notification from the test device is detected, the electronic device first runs a first application according to a first script file, then, when an application call notification from the test device is detected, calls the first application, then, collects running state information of the first application, then, sends the running state information to the test device, where the running state information is used to instruct the test device to determine keep-alive capability information of the electronic device according to the running state information, and sends the keep-alive capability information to the electronic device, where the keep-alive capability information is used to characterize keep-alive capability of the electronic device to the application, and finally, receives the keep-alive capability information. Therefore, the electronic equipment can collect the running state information of the application in the process of executing the application keep-alive test operation on the application, which is favorable for improving the accuracy of the application keep-alive capability test result.
In one possible example, in the aspect of running the first application according to the first script file, the instructions of the one or more programs 421 are specifically configured to perform the steps of: running a foreground starting instruction aiming at the first application, responding to the foreground starting instruction, and starting the first application by the foreground; operating an operation instruction aiming at the started first application, responding to the operation instruction, and executing a function which is instructed to be started by the operation instruction, wherein the operation instruction is used for simulating a function triggering operation aiming at the first application by a user; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, in the aspect of running the first application according to the first script file, the instructions of the one or more programs 421 are specifically configured to perform the steps of: running a background starting instruction aiming at the first application, responding to the clicking instruction, and starting the first application in the background; operating an operation instruction aiming at the started first application, and responding to the operation instruction, and executing the function which is started by the operation instruction, wherein the operation instruction is used for simulating the operation of a system of the electronic equipment aiming at the first application; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, in terms of the collecting the running state information of the first application, the instructions of the one or more programs 421 are specifically configured to perform the following steps: when the first application is detected to be started, acquiring a plurality of process number PID of the first application; generating a first log file according to the multiple PIDs; and marking the identity of the home terminal and the application identity of the first application on the first log file to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
In one possible example, the keep-alive information of the electronic device is obtained for the test device by: identifying the electronic equipment according to the identity of the electronic equipment to obtain an electronic equipment identification result; classifying the first application according to the application identifier of the first application to obtain a classification result; acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application; updating the process killing information according to the identification result, the classification result and the first log file; and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
In one possible example, the test device updating the process killing information according to the identification result, the classification result, and the first log file includes: determining a change in the plurality of PIDs in the first log file; and updating the process killing information according to the change condition.
In one possible example, the test device updating the process killing information according to the identification result, the classification result, and the first log file includes: determining a change in the plurality of PIDs in the first log file; and updating the process killing information according to the change condition.
In one possible example, the keep-alive information includes user experience rating information, and the test device obtains the keep-alive information of the electronic device according to the updated process killing information: extracting a target value from the updated process killing information; calculating the target value through a weighted formula to obtain a user experience score; and obtaining evaluation information aiming at the user experience degree according to the user experience degree score.
Referring to fig. 5, in accordance with the embodiment shown in fig. 3, fig. 5 is a schematic structural diagram of a test apparatus 500 provided in the embodiment of the present application, as shown in fig. 5, the test apparatus 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for performing the following steps;
sending an application test notification to the electronic device, wherein the notification comprises the first script file and an application identifier of a first application, and the running state information acquisition notification is used for indicating the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment;
Sending an application call notification to the electronic device, wherein the application call notification is used for indicating the point-to-device call of the first application;
acquiring the running state information from the electronic equipment;
generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application;
and sending the keep-alive information to the electronic equipment.
It can be seen that in the embodiment of the present application, the test device first sends an application test notification to the electronic device, where the notification includes the first script file and an application identifier of the first application, and the running state information obtaining notification is used to instruct the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, sending the running state information to the test equipment, sending an application call notification to the electronic equipment, wherein the application call notification is used for indicating the point-to-equipment call of the first application, acquiring the running state information from the electronic equipment, generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application, and finally sending the keep-alive capability information to the electronic equipment. Therefore, the test equipment collects running state information of the application in the process of executing the application keep-alive test operation by the electronic equipment, which is beneficial to improving the accuracy of the application keep-alive test result.
In one possible example, the electronic device running the first application according to the first script file includes: running a foreground starting instruction aiming at the first application, responding to the foreground starting instruction, and starting the first application by the foreground; operating an operation instruction aiming at the started first application, responding to the operation instruction, and executing a function which is instructed to be started by the operation instruction, wherein the operation instruction is used for simulating a function triggering operation aiming at the first application by a user; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, the electronic device running the first application according to the first script file includes: running a background starting instruction aiming at the first application, responding to the clicking instruction, and starting the first application in the background; operating an operation instruction aiming at the started first application, and responding to the operation instruction, and executing the function which is started by the operation instruction, wherein the operation instruction is used for simulating the operation of a system of the electronic equipment aiming at the first application; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, the collecting the running state information of the first application includes: when the first application is detected to be started, acquiring a plurality of process number PID of the first application; generating a first log file according to the multiple PIDs; and marking the identity of the home terminal and the application identity of the first application on the first log file to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
In one possible example, in the generating the keep-alive capability information of the electronic device according to the running state information, the keep-alive capability information is used to characterize the keep-alive capability of the electronic device for an application, the instructions in the one or more programs 521 are specifically configured to perform: identifying the electronic equipment according to the identity of the electronic equipment to obtain an identification result; classifying the first application according to the application identifier of the first application to obtain a classification result; acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application; updating the process killing information according to the identification result, the classification result and the first log file; and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
In one possible example, the instructions in the one or more programs 521 are specifically configured to perform: before the notification from the electronic device is received, a data clearing request from the electronic device is received through the communication unit 702, cache data of the first APP is cleared, a data clearing response is sent to the electronic device, and the data clearing request is sent by the electronic device after the first APP to be tested is determined.
In one possible example, the keep-alive capability information includes keep-alive capability comparison information including at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
In one possible example, the keep-alive information includes user experience rating information, and the instructions in the one or more programs 521 are specifically for performing: extracting a target value from the updated process killing information; calculating the target value through a weighted formula to obtain a user experience score; and obtaining evaluation information aiming at the user experience degree according to the user experience degree score.
In accordance with the above-mentioned embodiment 2, referring to fig. 6, fig. 6 is a block diagram illustrating functional units of an application keep-alive capability test apparatus provided in the embodiment of the present application, and as shown in fig. 6, the application keep-alive capability test apparatus 600 tests a device, which is connected to an electronic device, including a processing unit 601 and a communication unit 602, wherein,
the processing unit 601 is configured to run a first application according to a first script file when an application test notification from the test device is detected; and for invoking the first application upon detecting an application invocation notification from the test device; the running state information is used for indicating the testing equipment to determine the keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application; and for sending the operating status information to the test device via the communication unit; and for receiving the keep-alive information via the communication unit.
The apparatus 600 may further comprise a storage unit 603 for storing program code and data of the electronic device. The processing unit 601 may be a processor, the communication unit 602 may be an internal communication interface, and the storage unit 603 may be a memory.
It can be seen that in this embodiment of the present application, when an application test notification from the test device is detected, the electronic device first runs a first application according to a first script file, then, when an application call notification from the test device is detected, calls the first application, then, collects running state information of the first application, then, sends the running state information to the test device, where the running state information is used to instruct the test device to determine keep-alive capability information of the electronic device according to the running state information, and sends the keep-alive capability information to the electronic device, where the keep-alive capability information is used to characterize keep-alive capability of the electronic device to the application, and finally, receives the keep-alive capability information. Therefore, the electronic equipment can collect the running state information of the application in the process of executing the application keep-alive test operation on the application, which is favorable for improving the accuracy of the application keep-alive capability test result.
In one possible example, in the aspect of running the first application according to the first script file, the processing unit 601 is specifically configured to: running a foreground starting instruction aiming at the first application, responding to the foreground starting instruction, and starting the first application by the foreground; operating an operation instruction aiming at the started first application, responding to the operation instruction, and executing a function which is instructed to be started by the operation instruction, wherein the operation instruction is used for simulating a function triggering operation aiming at the first application by a user; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, in the aspect of running the first application according to the first script file, the processing unit 601 is specifically configured to run a background start instruction for the first application, and respond to the click instruction to start the first application in the background; operating an operation instruction aiming at the started first application, and responding to the operation instruction, and executing the function which is started by the operation instruction, wherein the operation instruction is used for simulating the operation of a system of the electronic equipment aiming at the first application; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, in collecting the running state information of the first application, the processing unit 601 is specifically configured to obtain a plurality of process numbers PIDs of the first application when the first application is detected to be started; generating a first log file according to the multiple PIDs; and marking the identity of the home terminal and the application identity of the first application on the first log file to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
In one possible example, the keep-alive information of the electronic device is obtained for the test device by: identifying the electronic equipment according to the identity of the electronic equipment to obtain an electronic equipment identification result; classifying the first application according to the application identifier of the first application to obtain a classification result; acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application; updating the process killing information according to the identification result, the classification result and the first log file; and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
In one possible example, the test device updating the process killing information according to the identification result, the classification result, and the first log file includes: determining a change in the plurality of PIDs in the first log file; and updating the process killing information according to the change condition.
In one possible example, the keep-alive capability information includes keep-alive capability comparison information including at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
In one possible example, the keep-alive information includes user experience rating information, and the test device obtains the keep-alive information of the electronic device according to the updated process killing information: extracting a target value from the updated process killing information; calculating the target value through a weighted formula to obtain a user experience score; and obtaining evaluation information aiming at the user experience degree according to the user experience degree score.
In accordance with the above embodiment 3, referring to fig. 7, fig. 7 is a block diagram illustrating functional units of an application keep-alive capability test apparatus according to an embodiment of the present application, and as shown in fig. 7, the application keep-alive capability test apparatus 700 is applied to a test device, where the test device is connected to an electronic device; comprising a processing unit 701 and a communication unit 702, wherein,
the processing unit 701 is configured to send, through the communication unit, an application test notification to the electronic device, where the notification includes the first script file and an application identifier of the first application, and the running state information obtaining notification is configured to instruct the electronic device to perform the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment; and sending an application invocation notification to the electronic device, the application invocation notification being for instructing the point-to-device to invoke the first application; and for obtaining, by the communication unit, the operational status information from the electronic device; and generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application; and transmitting the keep-alive information to the electronic device through the communication unit.
The apparatus 700 may further comprise a storage unit 703 for storing program code and data of the electronic device. The processing unit 701 may be a processor, the communication unit 702 may be an internal communication interface, and the storage unit 703 may be a memory.
It can be seen that in the embodiment of the present application, the test device first sends an application test notification to the electronic device, where the notification includes the first script file and an application identifier of the first application, and the running state information obtaining notification is used to instruct the electronic device to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, sending the running state information to the test equipment, sending an application call notification to the electronic equipment, wherein the application call notification is used for indicating the point-to-equipment call of the first application, acquiring the running state information from the electronic equipment, generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application, and finally sending the keep-alive capability information to the electronic equipment. Therefore, the test equipment collects running state information of the application in the process of executing the application keep-alive test operation by the electronic equipment, which is beneficial to improving the accuracy of the application keep-alive test result.
In one possible example, the electronic device running the first application according to the first script file includes: running a foreground starting instruction aiming at the first application, responding to the foreground starting instruction, and starting the first application by the foreground; operating an operation instruction aiming at the started first application, responding to the operation instruction, and executing a function which is instructed to be started by the operation instruction, wherein the operation instruction is used for simulating a function triggering operation aiming at the first application by a user; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, the electronic device running the first application according to the first script file includes: running a background starting instruction aiming at the first application, responding to the clicking instruction, and starting the first application in the background; operating an operation instruction aiming at the started first application, and responding to the operation instruction, and executing the function which is started by the operation instruction, wherein the operation instruction is used for simulating the operation of a system of the electronic equipment aiming at the first application; and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
In one possible example, the electronic device collects running state information of the first application, including: when the first application is detected to be started, acquiring a plurality of process number PID of the first application; generating a first log file according to the multiple PIDs; and marking the identity of the home terminal and the application identity of the first application on the first log file to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
In one possible example, in the generating the keep-alive capability information of the electronic device according to the operation state information, the keep-alive capability information is used to characterize the keep-alive capability of the electronic device for an application, and the processing unit 701 is specifically configured to: identifying the electronic equipment according to the identity of the electronic equipment to obtain an identification result; classifying the first application according to the application identifier of the first application to obtain a classification result; acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application; updating the process killing information according to the identification result, the classification result and the first log file; and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
In one possible example, the processing unit 701 is specifically configured to: before the notification from the electronic device is received, a data clearing request from the electronic device is received through the communication unit 702, cache data of the first APP is cleared, a data clearing response is sent to the electronic device, and the data clearing request is sent by the electronic device after the first APP to be tested is determined.
In one possible example, the keep-alive capability information includes keep-alive capability comparison information including at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
In one possible example, the keep-alive information includes user experience evaluation information, where the processing unit 701 is specifically configured to: extracting a target value from the updated process killing information; calculating the target value through a weighted formula to obtain a user experience score; and obtaining evaluation information aiming at the user experience degree according to the user experience degree score.
The present application also provides a computer storage medium storing a computer program for electronic data exchange, the computer program causing a computer to execute part or all of the steps of any one of the methods described in the method embodiments, the computer including an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps of any one of the methods as recited in the method embodiments. The computer program product may be a software installation package, the computer comprising the electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the embodiments, the descriptions of the various embodiments are emphasized, and for a part, which is not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-only memory (ROM), a random access memory (RAM, randomAccessMemory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-only memory (ROM), random Access Memory (RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Electronic devices to which embodiments of the present application relate may include various handheld devices, vehicle mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, as well as various forms of user devices (UserEquipment, UE), mobile stations (MobileStation, MS), terminals (terminaldices), and the like.

Claims (15)

1. An application keep-alive capability test method, applied to an electronic device in an application keep-alive capability test system, the application keep-alive capability test system including the electronic device and a test device, the test device and the electronic device being communicatively connected, the method comprising:
When an application test notification from the test equipment is detected, running a first application according to a first script file;
when an application call notification from the test device is detected, call the first application;
acquiring running state information of the first application, wherein the running state information is used for indicating the testing equipment to determine keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, and the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application;
transmitting the running state information to the test equipment;
and receiving the keep-alive information.
2. The method of claim 1, wherein the running the first application according to the first script file comprises:
running a foreground starting instruction aiming at the first application, responding to the foreground starting instruction, and starting the first application by the foreground;
operating an operation instruction aiming at a started first application, responding to the operation instruction, and executing a function which is instructed to be started by the operation instruction, wherein the operation instruction is used for simulating a function triggering operation aiming at the first application by a user;
And running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
3. The method of claim 1, wherein the running the first application according to the first script file comprises:
running a background starting instruction aiming at the first application, responding to the background starting instruction, and starting the first application in the background;
running an operation instruction aiming at a started first application, and responding to the operation instruction, and executing a function which is started by the operation instruction, wherein the operation instruction is used for simulating the operation of a system of the electronic equipment aiming at the first application;
and running a return instruction aiming at the first application, and responding to the return instruction and returning to the desktop.
4. A method according to claim 2 or 3, wherein said collecting operational status information of said first application comprises:
when the first application is detected to be started, acquiring a plurality of process number PID of the first application;
generating a first log file according to the process numbers PID;
and marking the identity of the home terminal and the application identity of the first application on the first log file to obtain the running state information, wherein the identity comprises a code identity and a currently used system identity.
5. The method of claim 4, wherein the keep-alive information for the electronic device is obtained for the test device by:
identifying the electronic equipment according to the identity of the electronic equipment to obtain an identification result;
classifying the first application according to the application identifier of the first application to obtain a classification result;
acquiring process killing number information of the electronic equipment, wherein the current process killing number information comprises the total process killing number of the electronic equipment for all applications and the process killing number of the electronic equipment for the first application;
updating the process killing information according to the identification result, the classification result and the first log file;
and obtaining the keep-alive capability information of the electronic equipment according to the updated process killing information.
6. The method of claim 5, wherein the test device updating the process kill information based on the identification result, the classification result, and the first log file comprises:
determining a change in the plurality of PIDs in the first log file;
and updating the process killing information according to the change condition.
7. The method of claim 6, wherein the keep-alive capability information comprises keep-alive capability comparison information comprising at least one of: the application keep-alive capability ratio of the electronic equipment and the same electronic equipment with different software versions is compared with the comparison information of the application keep-alive capability ratio of the electronic equipment and the different electronic equipment.
8. The method of claim 6, wherein the keep-alive information comprises user experience rating information, and wherein the test device obtains the keep-alive information for the electronic device based on the updated process kill information:
extracting a target value from the updated process killing information;
calculating the target value through a weighted formula to obtain a user experience score;
and obtaining evaluation information aiming at the user experience degree according to the user experience degree score.
9. An application keep-alive capability test method, characterized by being applied to a test device in an application keep-alive capability test system, wherein the application keep-alive capability test system comprises the test device and an electronic device, and the test device and the electronic device are in communication connection, and the method comprises the following steps:
Sending an application test notification to the electronic equipment, wherein the notification comprises a first script file and an application identifier of a first application, and the running state information acquisition notification is used for indicating the electronic equipment to execute the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment;
sending an application call notification to the electronic device, wherein the application call notification is used for indicating the electronic device to call the first application;
acquiring the running state information from the electronic equipment;
generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application;
and sending the keep-alive information to the electronic equipment.
10. An application keep-alive capability test apparatus, characterized in that it is applied to an electronic device in an application keep-alive capability test system, the application keep-alive capability test system including the electronic device and a test device, the test device and the electronic device being communicatively connected, the apparatus comprising: a processing unit and a communication unit, wherein,
The processing unit is used for running a first application according to a first script file when the application test notification from the test equipment is detected; and for invoking the first application upon detecting an application invocation notification from the test device; the running state information is used for indicating the testing equipment to determine the keep-alive capability information of the electronic equipment according to the running state information, and sending the keep-alive capability information to the electronic equipment, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to the application; and for sending the operating status information to the test device via the communication unit; and for receiving the keep-alive information via the communication unit.
11. An application keep-alive capability test apparatus, characterized by being applied to a test device in an application keep-alive capability test system, the application keep-alive capability test system including the test device and an electronic device, the test device and the electronic device being communicatively connected, the apparatus comprising: a processing unit and a communication unit, wherein,
The processing unit is configured to send an application test notification to the electronic device through the communication unit, where the notification includes a first script file and an application identifier of a first application, and the running state information obtaining notification is configured to instruct the electronic device to perform the following operations: running the first application according to the first script file, collecting running state information of the first application, and sending the running state information to the test equipment; and sending an application invocation notification to the electronic device, the application invocation notification being configured to instruct the electronic device to invoke the first application; and for obtaining, by the communication unit, the operational status information from the electronic device; and generating keep-alive capability information of the electronic equipment according to the running state information, wherein the keep-alive capability information is used for representing the keep-alive capability of the electronic equipment to an application; and transmitting the keep-alive information to the electronic device through the communication unit.
12. An application keep-alive capability test system is characterized by comprising an electronic device and a test device, wherein the test device is in communication connection with the electronic device;
The electronic device being adapted to perform the steps of the method according to any one of claims 1 to 8;
the test apparatus being adapted to perform the steps in the method of claim 9.
13. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-8.
14. A test device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of claim 9.
15. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-9.
CN201910934099.5A 2019-09-30 2019-09-30 Application keep-alive capability test method and related device Active CN110688319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910934099.5A CN110688319B (en) 2019-09-30 2019-09-30 Application keep-alive capability test method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910934099.5A CN110688319B (en) 2019-09-30 2019-09-30 Application keep-alive capability test method and related device

Publications (2)

Publication Number Publication Date
CN110688319A CN110688319A (en) 2020-01-14
CN110688319B true CN110688319B (en) 2023-05-02

Family

ID=69110917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910934099.5A Active CN110688319B (en) 2019-09-30 2019-09-30 Application keep-alive capability test method and related device

Country Status (1)

Country Link
CN (1) CN110688319B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115220648A (en) * 2022-01-26 2022-10-21 广州汽车集团股份有限公司 Data writing flow statistical method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6981048B1 (en) * 2000-11-22 2005-12-27 Toshiba America Information Systems, Inc. Keep-alive messaging when two applications are running
WO2015196967A1 (en) * 2014-06-24 2015-12-30 北京奇虎科技有限公司 Method and apparatus for application to permanently reside in background of operating system
CN109669730A (en) * 2018-12-26 2019-04-23 北京达佳互联信息技术有限公司 A kind of process keepalive method, device, electronic equipment and medium
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7460556B2 (en) * 2005-02-17 2008-12-02 International Business Machines Corporation Autonomic adjustment of connection keep-alives
CN104581785B (en) * 2014-12-29 2018-11-06 大唐移动通信设备有限公司 wireless network test method, test device and mobile terminal
WO2017210208A1 (en) * 2016-05-31 2017-12-07 Brocade Communications Systems, Inc. Keepalive technique in a network device
CN106648861B (en) * 2016-12-05 2020-07-14 阿里巴巴(中国)有限公司 Keep-alive method and device for background service process
CN106933660B (en) * 2017-02-17 2020-12-08 广州启生信息技术有限公司 Method for realizing application process keep-alive under android platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6981048B1 (en) * 2000-11-22 2005-12-27 Toshiba America Information Systems, Inc. Keep-alive messaging when two applications are running
WO2015196967A1 (en) * 2014-06-24 2015-12-30 北京奇虎科技有限公司 Method and apparatus for application to permanently reside in background of operating system
CN109669730A (en) * 2018-12-26 2019-04-23 北京达佳互联信息技术有限公司 A kind of process keepalive method, device, electronic equipment and medium
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110688319A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN109117250B (en) Simulator identification method, simulator identification equipment and computer readable medium
CN109729131B (en) Application request processing method and device and router
CN109062667B (en) Simulator identification method, simulator identification equipment and computer readable medium
CN109194689B (en) Abnormal behavior recognition method, device, server and storage medium
CN105487966A (en) Program testing method, device and system
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN111949702B (en) Abnormal transaction data identification method, device and equipment
WO2020258102A1 (en) Content pushing method and apparatus, mobile terminal and storage medium
CN106998336B (en) Method and device for detecting user in channel
CN105515887A (en) Application test method, server and system
CN108512682B (en) Method and device for determining false terminal identification
CN110688319B (en) Application keep-alive capability test method and related device
CN108874673B (en) Application program testing method and device
CN110415044A (en) Cheat detection method, device, equipment and storage medium
CN111030974A (en) APT attack event detection method, device and storage medium
CN110474899B (en) Service data processing method, device, equipment and medium
CN111047332B (en) Model training and risk identification method, device and equipment
CN112269937A (en) Method, system and device for calculating user similarity
CN108647139B (en) System test method, device, storage medium and electronic device
CN109344052B (en) Interface automation test method and device and electronic equipment
CN110611675A (en) Vector magnitude detection rule generation method and device, electronic equipment and storage medium
CN105162799A (en) Method for checking whether client is legal mobile terminal or not and server
CN115470399A (en) ID (identity) communication method, device, equipment and storage medium based on big data
CN108875363B (en) Method and device for accelerating virtual execution, electronic equipment and storage medium
CN108810230B (en) Method, device and equipment for acquiring incoming call prompt information

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
GR01 Patent grant
GR01 Patent grant