CN106776330A - Application testing method and device and electronic equipment - Google Patents
Application testing method and device and electronic equipment Download PDFInfo
- Publication number
- CN106776330A CN106776330A CN201611220491.6A CN201611220491A CN106776330A CN 106776330 A CN106776330 A CN 106776330A CN 201611220491 A CN201611220491 A CN 201611220491A CN 106776330 A CN106776330 A CN 106776330A
- Authority
- CN
- China
- Prior art keywords
- application
- terminal
- test
- intended application
- charge value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
Abstract
The application provides an application testing method, an application testing device and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of firstly obtaining a configuration file, then recording a first electric quantity value and a first CPU occupation amount of a terminal at the current moment, recording a second electric quantity value and a second CPU occupation amount of the terminal after a target application is controlled to execute a test instruction, and then determining the performance of a function corresponding to the test instruction in the target application according to the first electric quantity value, the first CPU occupation amount, the second electric quantity value and the second CPU occupation amount. By the application testing method and device and the electronic equipment, the testing of the performance of the target application is completed by the terminal with the target application actually installed, the testing process is consistent with the using environment of the target application, additional definition of a program file of the target application is not needed, the testing process is simple and easy to achieve, and the testing result is accurate and reliable.
Description
Technical field
The application is related to communication technical field, more particularly to a kind of application method for testing, device and electronic equipment.
Background technology
With the fast development of the communication technology, the renewal speed of various application APP is also more and more faster.At present, respectively
APP operators, mainly supplement new function, improve the performance of APP by APP, such as reduce power consumption, reduction internal memory and account for
With etc. update APP.
Generally, before new APP reaches the standard grade, operator needs to carry out various performance tests to it, to ensure that meeting user makes
Use demand.Performance test to APP at present, mainly by various test frames, such as UIAutomator, Robotium, Appium
Etc. completing.
But, existing test frame is all based on program control to realize, application controls to be tested must pass through
System is defined, and in test, the working environment of various terminals is simulated in test equipment so that test process is complicated, no
Easily realize.
The content of the invention
The application is intended at least solve to a certain extent one of technical problem in correlation technique.
Therefore, first purpose of the application is to propose a kind of application testing method, the method utilizes actual installation
The terminal of intended application completes the test to intended application performance, and test process is consistent with the use environment of intended application, and
Additional definitions are carried out without the program file to intended application, test process is simple, easily realizes, and test result is accurately and reliably.
Second purpose of the application is to propose one kind application test device.
3rd purpose of the application is to propose a kind of electronic equipment.
It is that, up to above-mentioned purpose, the application first aspect embodiment proposes a kind of application testing method, including:It is determined that with
After terminal sets up wireless connection, configuration file is obtained, the configuration file includes the mark of intended application and test instruction;Note
Record first charge value and a CPU occupancies at the terminal current time;Control is corresponding with the mark of the intended application
Intended application performs the test instruction;Record the second charge value and the 2nd CPU after the terminal performs the test instruction
Occupancy;According to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, the mesh is determined
With the performance of the test corresponding function of instruction in mark application.
In a kind of possible way of realization of first aspect, the configuration file includes at least two test instructions;
It is described to control intended application corresponding with the mark of the intended application to perform the test instruction, including:In a predetermined sequence,
The intended application is controlled to perform at least two tests instruction successively.
Also include performing times N, wherein N in the alternatively possible way of realization of first aspect, in the configuration file
It is the natural number more than or equal to 1;It is described to control the intended application execution test corresponding with the mark of the intended application to refer to
Order, including:Control the intended application to perform and instruction is tested described in n times.
In the alternatively possible way of realization of first aspect, storage location information is also included in the configuration file;
First charge value and a CPU occupancies for recording the terminal current time, including:By first charge value and
One CPU occupancies, index is designated with the intended application, is stored in position corresponding with the storage location information.
In another possible way of realization of first aspect, first electricity for recording the terminal current time
Before value and CPU occupancies test instruction, also include:Judge whether have in addition to the intended application in the terminal
Other application is in running status;If so, then the process of the other application is closed in control.
In another possible way of realization of first aspect, the system of the terminal is Android system, the acquisition
Before configuration file, also include:
Based on the wireless connection, Android debugging bridge joint is set up with the terminal.
In another possible way of realization of first aspect, also include:
At predetermined intervals, whether wireless connection described in cycle criterion disconnects;
If so, then sending radio connection request to the terminal;
After it is determined that setting up new wireless connection with the terminal, return re-executes the behaviour of the acquisition configuration file
Make.
The application testing method of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration text first
Part, then records first charge value and a CPU occupancies at terminal current time, and test instruction is performed in control targe application
Afterwards, second charge value and the 2nd CPU occupancies of terminal are re-recorded, then further according to the first charge value, a CPU occupancies,
Second charge value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.By
This, using actual installation, the terminal of intended application completes the test to intended application performance, test process and intended application
Use environment it is consistent, and carry out Additional definitions without the program file to intended application, test process is simple, easily realizes, and
Test result is accurately and reliably.
It is that, up to above-mentioned purpose, the application second aspect embodiment proposes one kind application test device, including:Obtain mould
Block, for after it is determined that setting up wireless connection with terminal, obtaining configuration file, the configuration file includes the mark of intended application
Know and test instruction;Logging modle, the first charge value and a CPU occupancies for recording the terminal current time;Control
Molding block, for controlling intended application corresponding with the mark of the intended application to perform the test instruction;The record mould
Block, is additionally operable to record the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction;Determining module,
For according to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, determining that the target should
With the performance of the test corresponding function of instruction in.
In a kind of possible way of realization of second aspect, the configuration file includes at least two test instructions;
The control module, specifically for:In a predetermined sequence, control the intended application to perform at least two test successively to refer to
Order.
Also include performing times N in the alternatively possible way of realization of second aspect, in the configuration file, wherein
N is the natural number more than or equal to 1;The control module, specifically for:Control to be tested described in the intended application execution n times and refer to
Order.
In the alternatively possible way of realization of second aspect, storage location information is also included in the configuration file;
The logging modle, specifically for:By first charge value and a CPU occupancies, rope is designated with the intended application
Draw, be stored in position corresponding with the storage location information.
In the alternatively possible way of realization of second aspect, this applies test device, also includes:First judges mould
Whether block, judges have the other application in addition to the intended application to be in running status in the terminal;The control module,
If there is other application to be in running status in being additionally operable to terminal, the process of the other application is closed in control.
In the alternatively possible way of realization of second aspect, the system of the terminal is Android system, and the device is also
Including:Module is set up, for based on the wireless connection, Android debugging bridge joint being set up with the terminal.
In another possible way of realization of second aspect, this applies test device, also includes:
Second judge module, at predetermined intervals, whether wireless connection described in cycle criterion to disconnect;
Sending module, if having been disconnected for the wireless connection, radio connection request is sent to the terminal;
Performing module, for after it is determined that setting up new wireless connection with the terminal, return to re-execute the acquisition
The operation of configuration file.
The application test device of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration text first
Part, then records first charge value and a CPU occupancies at terminal current time, and test instruction is performed in control targe application
Afterwards, second charge value and the 2nd CPU occupancies of terminal are re-recorded, then further according to the first charge value, a CPU occupancies,
Second charge value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.By
This, using actual installation, the terminal of intended application completes the test to intended application performance, test process and intended application
Use environment it is consistent, and carry out Additional definitions without the program file to intended application, test process is simple, easily realizes, and
Test result is accurately and reliably.
It is that, up to above-mentioned purpose, the application third aspect embodiment proposes a kind of electronic equipment, including with next or many
Individual component:Circuit board, housing, processor, memory, power circuit, display screen, audio-frequency assembly, input/output (I/O's) connects
Mouthful, and communication component;Wherein, the circuit board is placed in the interior volume that the housing is surrounded, the processor and described
Memory is arranged on the circuit board;The power circuit, powers for each circuit or device for the electronic equipment;
The memory is used to store executable program code;The processor is by reading the executable journey stored in the memory
Sequence code runs program corresponding with the executable program code, for performing following steps:
After it is determined that setting up wireless connection with terminal, configuration file is obtained, the configuration file includes intended application
Mark and test instruction;
Record first charge value and a CPU occupancies at the terminal current time;
Control intended application corresponding with the mark of the intended application performs the test instruction;
Record the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction;
According to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, the mesh is determined
With the performance of the test corresponding function of instruction in mark application.
The electronic equipment of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration file, so first
First charge value and a CPU occupancies at terminal current time are recorded afterwards, after control targe application performs test instruction, then
Second charge value and the 2nd CPU occupancies of terminal are recorded, then further according to the first charge value, a CPU occupancies, the second electricity
Value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.Thus, profit
With actual installation, the terminal of intended application completes the test to intended application performance, the use of test process and intended application
Environment is consistent, and carries out Additional definitions without the program file to intended application, and test process is simple, easily realizes, and test knot
Fruit is accurately and reliably.
Brief description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the schematic flow sheet of the application testing method of the application one embodiment;
Fig. 2 is the schematic flow sheet of the application testing method of the application another embodiment;
Fig. 3 is the structural representation of the application test device of the application one embodiment;
Fig. 4 is the structural representation of the application test device of the application another embodiment;
Fig. 5 is the structural representation of the electronic equipment of the application one embodiment.
Specific embodiment
Embodiments herein is described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
It is exemplary to scheme the embodiment of description, it is intended to for explaining the application, and it is not intended that limitation to the application.
In each embodiment of the application, in the prior art, before application is reached the standard grade, when testing application performance, need
Define application controls, and the working environment of pseudo-terminal in a test device so that test process is complicated, be difficult asking for realization
Topic, proposes a kind of application performance test method, will be mounted with that application terminal to be measured passes through wireless connection with test equipment first, so
Corresponding operation is performed to application to be measured by control terminal afterwards, to test the performance applied, due to being directly at end
Application is tested in end so that test result is more accurate, and without carrying out system definition, test process to the control applied
Simply, easily realize.
Below with reference to the accompanying drawings the application performance test method and device of the embodiment of the present application is described.
Fig. 1 is the schematic flow sheet of the application testing method of the application one embodiment.
As shown in figure 1, the application testing method includes:
S101, after it is determined that setting up wireless connection with terminal, obtains configuration file, and the configuration file includes that target should
Mark and test instruction.
Specifically, the application testing method that the embodiment of the present application is provided, executive agent provide for the embodiment of the present application
Using test device, the device can be configured in it is any connect wireless network, and the end of wireless connection can be set up with terminal
In end equipment, such as computer etc..
Wherein, the mark of intended application, can be the icon of application, title or other any can characterize the application area
Not in the mark of other application.Test instruction, tests for characterizing pair intended application corresponding with the mark of intended application
Content, test mode or test process etc..For example, test instruction can be that control targe application performs what is received and sent messages
Operation or control targe application carry out photographing operation etc..
Specifically, using the preset configuration file for testing can be shifted to an earlier date in test device, afterwards it is determined that and terminal
After setting up wireless connection, you can call the configuration file.
Needs say that, because terminal with application test device by wired modes such as USB when being connected, terminal can lead to
Cross USB connecting lines and obtain electricity from application test device, so that cannot effectively be surveyed to the power consumption of intended application
Examination, therefore, in order to accurately determine the performance of intended application, the terminal for being provided with intended application is necessary with application test device
By wireless connection.
The wireless connection procedures of terminal and application test device, the OS Type with application test device and terminal has
Close, specific implementation can realize that the present embodiment is not limited this according to prior art.
S102, records first charge value and a CPU occupancies at the terminal current time.
S103, controls intended application corresponding with the mark of the intended application to perform the test instruction.
S104, records the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction.
S105, according to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, it is determined that
With the performance of the test corresponding function of instruction in the intended application.
Specifically, because the performance to intended application is tested, the power consumption and CPU for typically testing application take
Amount, therefore in order to accurately determine the performance of intended application, it is necessary to before control targe application performs test instruction, first record terminal
The first charge value and a CPU occupancies, then again control targe application perform test instruction, such as send a message,
And after test instruction has been performed, second charge value and the 2nd CPU occupancies of terminal are re-recorded, so that can be according to first
Charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, determine corresponding with test instruction in intended application
Function performance.
For example, if test instruction is built in terminal for the transmitting-receiving performance of test target application with application test device
During vertical wireless connection, the first charge value in terminal is 85%, and a CPU occupancies are 10%, and control targe application is disappeared
After the sending and receiving operation of breath, the second charge value in the terminal for measuring is 82%, and the 2nd CPU occupancies are 11%, you can it is determined that should
Power consumption when intended application carries out information receiving and transmitting is 3%, CPU occupancies are 1%, so as to can determine that disappearing for the intended application
Cease the performance of transmission-receiving function.
Specifically, using test device, can according in intended application with the power consumption of the test corresponding function of instruction and
CPU occupancies, determine whether the performance of the intended application function meets professional standard, or by the current version of comparison object application
The performance of the function under the functional performance and legacy version under this, determines whether current goal application current version has improvement
Deng the present embodiment is not limited this.
Need to say, other application, and other application may be also equipped with the terminal of intended application due to being provided with
Be likely to be at opening, and because the operation of other application can also consume certain electricity, therefore, in order to more it is accurate really
Set the goal the performance of application, before testing intended application, can also first carry out following steps:
Judge whether there is the other application in addition to the intended application to be in running status in the terminal;
If so, then the process of the other application is closed in control.
For example, if intended application is designated " wechat ", " wechat " using test device in control terminal hold
Before row test instruction, opening is in by " QQ " application judged to determine in terminal, then first can apply " QQ "
Process is closed, and then re-records first charge value and a CPU occupancies of terminal.
It is understood that in test process, terminal and need to be constantly in using the wireless connection between test device
Connected state, therefore in said process implementation procedure, also need to real-time judge using test device and connect with the wireless of terminal room
Connect and whether disconnect, i.e., the method also includes:
At predetermined intervals, whether wireless connection described in cycle criterion disconnects;
If so, then sending radio connection request to the terminal;
After it is determined that setting up new wireless connection with the terminal, return re-executes the behaviour of the acquisition configuration file
Make.
Wherein, default time interval, can determine according to the content of test instruction and duration, for example, if
Test instruction only indicates to test the One function of intended application, and duration when testing the function is very
It is short, such as be 30 seconds (s), 40s, 100s etc., then default time interval can be 10s, 15s etc., and if to the function
Test time is 5 minutes (min), 6min, 10min etc., then default time interval can be 1min, 2min etc..
Further it will be understood that after setting up wireless connection using test device and terminal, you can by wireless connection to
Terminal sends corresponding test instruction, and the application in control terminal performs corresponding operating;Or, can also build on the radio connection
Vertical TCH test channel, test instruction is sent by TCH test channel, for example, if terminal and being Android system using test device
Equipment, then terminal and using can be set up between test device Android debugging bridge joint (Android Debug Bridge,
Abbreviation ADB) so as to application test device can be connected by the ADB, send test instruction to terminal to make terminal control target
Using execution corresponding operating.It is understood that now, the test instruction obtained using test device is needed using ADB forms
Generation, so as to accurate delivery in being connected in ADB.
The application testing method of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration text first
Part, then records first charge value and a CPU occupancies at terminal current time, and test instruction is performed in control targe application
Afterwards, second charge value and the 2nd CPU occupancies of terminal are re-recorded, then further according to the first charge value, a CPU occupancies,
Second charge value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.By
This, using actual installation, the terminal of intended application completes the test to intended application performance, test process and intended application
Use environment it is consistent, and carry out Additional definitions without the program file to intended application, test process is simple, easily realizes, and
Test result is accurately and reliably.
By above-mentioned analysis, using test device be mounted with that the terminal of intended application sets up wireless connection after,
Can be by wireless connection, the test of the intended application performance in complete paired terminal.In specific test process, test instruction can
It is only used for indicating testing the One function of intended application, or multiple functions of intended application is tested,
Or, test instruction can also be indicate to terminal in an intended application tested, or to terminal in it is many
Individual intended application is tested, and with reference to Fig. 2, the application testing method that the application is provided is further described.
Fig. 2 is the schematic flow sheet of the application testing method of the application another embodiment.
As shown in Fig. 2 the application testing method, including:
S201, after it is determined that setting up wireless connection with terminal, obtains configuration file, and the configuration file includes that target should
Mark, at least two test instructions, storage location information.
Wherein, at least two test instruction, can be test instruction corresponding from different intended applications mark, it is also possible to
It is test instruction corresponding with same intended application mark, the present embodiment is not limited this.
Whether S202, judges have the other application in addition to the intended application to be in running status in the terminal, if
It is then to perform S203, otherwise, performs S204.
The process of the other application is closed in S203, control.
S204, records first charge value and a CPU occupancies at the terminal current time.
S205, by first charge value and a CPU occupancies, index is designated with the intended application, be stored in
The corresponding position of the storage location information.
Specifically, storage location information that can be in configuration file using test device, the different conditions that will be recorded
Lower terminal power value and CPU occupancies are stored in the position specified, so as to after test terminates, all charge values according to record and
CPU occupancies, the performance to intended application is analyzed.
When implementing, index can be designated with intended application, by the terminal in different target application test process
Charge value and CPU occupancies are stored in different positions.
S206, in a predetermined sequence, controls the intended application to perform at least two tests instruction successively, and every
After individual test instruction is finished, second charge value and the 2nd CPU occupancies of terminal are recorded.
S207, by second charge value and the 2nd CPU occupancies, index is designated with the intended application, be stored in
The corresponding position of the storage location information.
Wherein, default order, can be instruction generation pre-setting, or according to user, this implementation
Example is not limited this.For example, if test instruction includes two test instructions:Transmission-receiving function to intended application is carried out
Test, the start-up course in intended application is tested, default order is, first the start-up course of test target application,
Then the transmission-receiving function of test target application, then before intended application is started, can first record the first charge value of terminal
80% and CPU occupancies 8%, then after control targe application startup, re-record the He of the second charge value 79% of terminal
2nd CPU occupancies 9%, the 3rd charge value 75% and the 3rd of then control targe application messaging again, then shortcut terminal
The electricity of the start-up course consumption of CPU occupancies 11%, i.e. intended application is 1% for 1%, CPU occupancies, intended application transmitting-receiving
The process of information, the electricity of consumption is that 4%, CPU occupancies are 2%.
It should be noted that the intended application mark that test instruction includes may be one, be likely to be multiple, i.e., should
The multiple applications in terminal are tested with test device, now, using test device, can first start a target should
With, an intended application is tested, after then turning off the process of the intended application tested, restart another target
Using, then another intended application is tested, the like, until completing the test to all intended applications.
Further, in a kind of possible way of realization of the present embodiment, test may also be included in above-mentioned test instruction
Times N, wherein N are the natural number more than or equal to 1, then when being tested intended application using test device, you can control
Intended application performs n times test instruction.
For example, if being indicated in test instruction, the start-up course of " wechat " application is tested, and testing time is 5, that
" wechat " by application test device in control terminal carries out 5 times and starts, exits operation.It should be noted that using survey
Trial assembly is put, and can record the charge value and CPU occupancies of terminal, it is also possible in N after test instruction is finished every time
After secondary test instruction is carried out finishing, the charge value and CPU occupancies of terminal are re-recorded, the present embodiment is not limited this.
The application testing method of the embodiment of the present application, after it is determined that establishing wireless connection with terminal, obtains configuration first
File, wherein, whether configuration file includes at least two test instructions, then judges to have in terminal its beyond intended application
Its application is in running status, if so, after being then first shut off the process of other application, re-records first charge value and the of terminal
One CPU occupancies, then further according to default order, successively perform at least two test instruction, and record has performed test refer to
Second charge value and the 2nd CPU occupancies of terminal after order, so as to according to record test instruction perform before and after charge value and
CPU occupancies, determine the performance of intended application.Thus, using actual installation the terminal of intended application complete should to target
With the test of performance, test process is consistent with the use environment of intended application, and is carried out without the program file to intended application
Additional definitions, test process is simple, easily realizes, and test result is accurately and reliably.
In order to realize above-described embodiment, the application also proposes one kind application test device.
Fig. 3 is the structural representation of the application test device of the application one embodiment.
As shown in figure 3, this includes using test device:
Acquisition module 31, for after it is determined that setting up wireless connection with terminal, configuration file being obtained, in the configuration file
Mark and test instruction including intended application;
Logging modle 32, the first charge value and a CPU occupancies for recording the terminal current time;
Control module 33, refers to for controlling intended application corresponding with the mark of the intended application to perform the test
Order;
The logging modle 32, is additionally operable to record the second charge value and second after the terminal performs the test instruction
CPU occupancies;
Determining module 34, for being accounted for according to first charge value, a CPU occupancies, the second charge value and the 2nd CPU
Consumption, determines the performance with the test corresponding function of instruction in the intended application.
Specifically, the application test device that the present embodiment is provided, the application test side for performing above-described embodiment offer
Method.This can be configured in any terminal device for carrying out wireless connection using test device.
In a kind of possible way of realization of the present embodiment, above-mentioned configuration file includes at least two test instructions;
Accordingly, the control module 33, specifically for:
In a predetermined sequence, the intended application is controlled to perform at least two tests instruction successively.
Also include performing times N, wherein N in the alternatively possible way of realization of the present embodiment, in the configuration file
It is the natural number more than or equal to 1;Accordingly, the control module, specifically for:The intended application is controlled to perform described in n times
Test instruction.
In another possible way of realization of the present embodiment, storage location information is also included in the configuration file;
The logging modle 32, specifically for:
By first charge value and a CPU occupancies, index is designated with the intended application, is stored in and is deposited with described
The corresponding position of storage positional information.
It should be noted that the foregoing explanation to application testing method embodiment is also applied for the application of the embodiment
Test device, here is omitted.
The application test device of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration text first
Part, then records first charge value and a CPU occupancies at terminal current time, and test instruction is performed in control targe application
Afterwards, second charge value and the 2nd CPU occupancies of terminal are re-recorded, then further according to the first charge value, a CPU occupancies,
Second charge value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.By
This, using actual installation, the terminal of intended application completes the test to intended application performance, test process and intended application
Use environment it is consistent, and carry out Additional definitions without the program file to intended application, test process is simple, easily realizes, and
Test result is accurately and reliably.
Fig. 4 is the structural representation of the application test device of the application another embodiment, as shown in figure 4, being based on Fig. 3 institutes
Show embodiment, this applies test device, also includes:
Whether first judge module 41, judges have the other application in addition to the intended application to be in fortune in the terminal
Row state;
The control module 33, if there is other application to be in running status in being additionally operable to terminal, control close it is described its
The process that it is applied.
In a kind of possible way of realization of the present embodiment, the system of the terminal is Android system, then the application test
Device, also includes:
Module 42 is set up, for based on the wireless connection, Android debugging bridge joint being set up with the terminal.
In a kind of possible way of realization of the present embodiment, this applies test device, also includes:
Second judge module 43, at predetermined intervals, whether wireless connection described in cycle criterion to disconnect;
Sending module 44, if having been disconnected for the wireless connection, radio connection request is sent to the terminal;
Performing module 45, for after it is determined that setting up new wireless connection with the terminal, return to re-execute described obtaining
Take the operation of configuration file.
It should be noted that the foregoing explanation to application testing method embodiment is also applied for the application of the embodiment
Test device, here is omitted.
The application test device of the embodiment of the present application, after it is determined that establishing wireless connection with terminal, obtains configuration first
File, wherein, whether configuration file includes at least two test instructions, then judges to have in terminal its beyond intended application
Its application is in running status, if so, after being then first shut off the process of other application, re-records first charge value and the of terminal
One CPU occupancies, then further according to default order, successively perform at least two test instruction, and record has performed test refer to
Second charge value and the 2nd CPU occupancies of terminal after order, so as to according to record test instruction perform before and after charge value and
CPU occupancies, determine the performance of intended application.Thus, using actual installation the terminal of intended application complete should to target
With the test of performance, test process is consistent with the use environment of intended application, and is carried out without the program file to intended application
Additional definitions, test process is simple, easily realizes, and test result is accurately and reliably.
Fig. 5 is the structural representation of the electronic equipment of the application one embodiment.Wherein, the type of electronic equipment is a lot,
Can be such as mobile phone, palm PC, notebook computer and wearable device etc., the present embodiment is not construed as limiting to this.
As shown in figure 5, the electronic equipment, including:Including following one or more assemblies:Circuit board 501, housing 502, place
Reason device 503, memory 504, power circuit 505, display screen 506, audio-frequency assembly 507, the interface 508 of input/output (I/O),
And communication component 509;Wherein, the circuit board 501 is placed in the interior volume that the housing 502 is surrounded, the processor
503 and the memory 504 be arranged on the circuit board 501;The power circuit 505, for being the electronic equipment
Each circuit or device are powered;The memory 504 is used to store executable program code;The processor 503 is by reading
The executable program code stored in the memory 504 runs program corresponding with the executable program code, with
In execution following steps:
After it is determined that setting up wireless connection with terminal, configuration file is obtained, the configuration file includes intended application
Mark and test instruction;
Record first charge value and a CPU occupancies at the terminal current time;
Control intended application corresponding with the mark of the intended application performs the test instruction;
Record the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction;
According to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, the mesh is determined
With the performance of the test corresponding function of instruction in mark application.
It should be noted that the foregoing explanation to application testing method embodiment is also applied for the electronics of the embodiment
Equipment, its realization principle is similar to, and here is omitted.
The electronic equipment of the embodiment of the present application, after it is determined that setting up wireless connection with terminal, obtains configuration file, so first
First charge value and a CPU occupancies at terminal current time are recorded afterwards, after control targe application performs test instruction, then
Second charge value and the 2nd CPU occupancies of terminal are recorded, then further according to the first charge value, a CPU occupancies, the second electricity
Value and the 2nd CPU occupancies, determine the performance with the test corresponding function of instruction in the intended application.Thus, profit
With actual installation, the terminal of intended application completes the test to intended application performance, the use of test process and intended application
Environment is consistent, and carries out Additional definitions without the program file to intended application, and test process is simple, easily realizes, and test knot
Fruit is accurately and reliably.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or spy that the embodiment or example are described
Point is contained at least one embodiment of the application or example.
Any process described otherwise above or method description in flow chart or herein is construed as, and expression includes
It is one or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion
Point, and the scope of the preferred embodiment of the application includes other realization, wherein can not press shown or discussion suitable
Sequence, including function involved by basis by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be by the application
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In implementation method, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.If for example, realized with hardware, and in another embodiment, can be with well known in the art
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
The rapid hardware that can be by program to instruct correlation is completed, and described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown above and retouching
Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the application
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of application
Type.
Claims (10)
1. a kind of application testing method, it is characterised in that comprise the following steps:
After it is determined that setting up wireless connection with terminal, configuration file is obtained, the configuration file includes the mark of intended application
And test instruction;
Record first charge value and a CPU occupancies at the terminal current time;
Control intended application corresponding with the mark of the intended application performs the test instruction;
Record the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction;
According to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, determine that the target should
With the performance of the test corresponding function of instruction in.
2. the method for claim 1, it is characterised in that the configuration file includes at least two test instructions;
It is described to control intended application corresponding with the mark of the intended application to perform the test instruction, including:
In a predetermined sequence, the intended application is controlled to perform at least two tests instruction successively.
3. the method for claim 1, it is characterised in that also include performing times N in the configuration file, wherein N is
Natural number more than or equal to 1;
It is described to control intended application corresponding with the mark of the intended application to perform the test instruction, including:
Control the intended application to perform and instruction is tested described in n times.
4. the method for claim 1, it is characterised in that also include storage location information in the configuration file;
First charge value and a CPU occupancies for recording the terminal current time, including:
By first charge value and a CPU occupancies, index is designated with the intended application, be stored in and the storage position
Confidence ceases corresponding position.
5. the method as described in claim 1-4 is any, it is characterised in that first electricity for recording the terminal current time
Before value and CPU occupancies test instruction, also include:
Judge whether there is the other application in addition to the intended application to be in running status in the terminal;
If so, then the process of the other application is closed in control.
6. the method as described in claim 1-4 is any, it is characterised in that the system of the terminal is Android system, described to obtain
Before taking configuration file, also include:
Based on the wireless connection, Android debugging bridge joint is set up with the terminal.
7. the method as described in claim 1-4 is any, it is characterised in that also include:
At predetermined intervals, whether wireless connection described in cycle criterion disconnects;
If so, then sending radio connection request to the terminal;
After it is determined that setting up new wireless connection with the terminal, return re-executes the operation of the acquisition configuration file.
8. one kind application test device, it is characterised in that including:
Acquisition module, for after it is determined that setting up wireless connection with terminal, obtaining configuration file, the configuration file includes mesh
Mark mark and the test instruction of application;
Logging modle, the first charge value and a CPU occupancies for recording the terminal current time;
Control module, for controlling intended application corresponding with the mark of the intended application to perform the test instruction;
The logging modle, is additionally operable to record the second charge value and the 2nd CPU after the terminal execution test instruction and accounts for
Consumption;
Determining module, for according to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies,
Determine the performance with the test corresponding function of instruction in the intended application.
9. device as claimed in claim 8, it is characterised in that the configuration file includes at least two test instructions;
The control module, specifically for:
In a predetermined sequence, the intended application is controlled to perform at least two tests instruction successively.
10. a kind of electronic equipment, it is characterised in that including following one or more assemblies:Circuit board, housing, processor, storage
Device, power circuit, display screen, audio-frequency assembly, the interface of input/output (I/O), and communication component;Wherein, the circuit board
The interior volume that the housing is surrounded is placed in, the processor and the memory are arranged on the circuit board;The electricity
Source circuit, powers for each circuit or device for the electronic equipment;The memory is used to store executable program generation
Code;The processor is run and the executable program generation by reading the executable program code stored in the memory
The corresponding program of code, for performing following steps:
After it is determined that setting up wireless connection with terminal, configuration file is obtained, the configuration file includes the mark of intended application
And test instruction;
Record first charge value and a CPU occupancies at the terminal current time;
Control intended application corresponding with the mark of the intended application performs the test instruction;
Record the second charge value and the 2nd CPU occupancies after the terminal performs the test instruction;
According to first charge value, a CPU occupancies, the second charge value and the 2nd CPU occupancies, determine that the target should
With the performance of the test corresponding function of instruction in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611220491.6A CN106776330A (en) | 2016-12-26 | 2016-12-26 | Application testing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611220491.6A CN106776330A (en) | 2016-12-26 | 2016-12-26 | Application testing method and device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106776330A true CN106776330A (en) | 2017-05-31 |
Family
ID=58926246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611220491.6A Pending CN106776330A (en) | 2016-12-26 | 2016-12-26 | Application testing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106776330A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107608685A (en) * | 2017-10-18 | 2018-01-19 | 湖南警察学院 | The automatic execution method of Android application |
CN109979444A (en) * | 2017-12-27 | 2019-07-05 | 深圳市优必选科技有限公司 | A kind of phonetic order automated testing method, terminal and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425577A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Test method and device |
CN105204981A (en) * | 2014-05-28 | 2015-12-30 | 北京奇虎科技有限公司 | Application performance test method and device |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
US20160252944A1 (en) * | 2015-02-26 | 2016-09-01 | Samsung Electronics Co., Ltd. | Electronic device and method for managing power in electronic device |
-
2016
- 2016-12-26 CN CN201611220491.6A patent/CN106776330A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425577A (en) * | 2012-05-25 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Test method and device |
CN105204981A (en) * | 2014-05-28 | 2015-12-30 | 北京奇虎科技有限公司 | Application performance test method and device |
US20160252944A1 (en) * | 2015-02-26 | 2016-09-01 | Samsung Electronics Co., Ltd. | Electronic device and method for managing power in electronic device |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107608685A (en) * | 2017-10-18 | 2018-01-19 | 湖南警察学院 | The automatic execution method of Android application |
CN109979444A (en) * | 2017-12-27 | 2019-07-05 | 深圳市优必选科技有限公司 | A kind of phonetic order automated testing method, terminal and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111459794A (en) | Communication network testing method, device, computer equipment and storage medium | |
CN105025141B (en) | Terminal electricity consumption weight testing method and its device | |
CN102023922B (en) | System and method for testing automotive electronic diagnostic software | |
CN113407393B (en) | Chip verification method, terminal device, verification platform and storage medium | |
BRPI0610776A2 (en) | Methods and Equipment for Determining Multimedia Performance Aspects of a Wireless Device | |
CN105785113A (en) | System and method for automatically testing power consumption | |
CN103631248A (en) | Testing apparatus for air conditioner unit, testing method and testing system | |
CN105791497A (en) | Automatic testing system of power consumption of mobile terminal and working method of automatic testing system | |
CN103268286A (en) | Method, system and testing machine for testing flow of application program in mobile terminal | |
CN113672441B (en) | Method and device for testing intelligent equipment | |
CN106776330A (en) | Application testing method and device and electronic equipment | |
CN108228465A (en) | A kind of Software function test method and device | |
CN105577879A (en) | Address book management method and mobile terminal | |
CN112148559A (en) | Mobile APP power consumption test method, device and system, acquisition end and test end | |
CN111858364A (en) | Parameter configuration method, device and system of test terminal | |
CN106093635A (en) | Mobile terminal ageing testing method, Apparatus and system | |
CN108006925A (en) | Air-conditioning stress test method, computer installation, computer-readable recording medium | |
CN106708688A (en) | Module testing method and terminal | |
CN103220715A (en) | Method and device for reporting network performance testing result | |
US10073762B2 (en) | Debug device, debug method, and debug program | |
CN112788640A (en) | Communication equipment testing method and device, storage medium and terminal | |
CN112261683A (en) | Method, device, equipment and storage medium for testing power consumption energy-saving effect of base station | |
CN105764086A (en) | Terminal endurance performance detecting method and system | |
CN216956769U (en) | Detection system based on 5G TCU | |
CN111026652A (en) | Automatic testing method for awakening rate of voice artificial intelligence system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |