CN106506766B - Mobile terminal and automated testing method - Google Patents
Mobile terminal and automated testing method Download PDFInfo
- Publication number
- CN106506766B CN106506766B CN201611047263.3A CN201611047263A CN106506766B CN 106506766 B CN106506766 B CN 106506766B CN 201611047263 A CN201611047263 A CN 201611047263A CN 106506766 B CN106506766 B CN 106506766B
- Authority
- CN
- China
- Prior art keywords
- test
- mobile terminal
- item
- starting
- test case
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/24—Arrangements for testing
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of mobile terminals, comprising: the first starting module, for starting the kernel process of the mobile terminal in the enabled instruction for receiving mobile terminal;Module is obtained, for obtaining each test case tested and instructed in corresponding test item when receiving test instruction;Second starting module runs the corresponding test script of the test case for successively starting the process of the corresponding mobile terminal of each test case according to preset order, and based on the process.The invention also discloses a kind of automated testing methods.The present invention is realized when testing mobile terminal, only start the corresponding process of current test case, the quantity of launching process when greatly reducing mobile terminal test improves the starting speed and efficiency of mobile terminal, and then improves the test speed and efficiency of mobile terminal.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of mobile terminals and automated testing method.
Background technique
With the rapid development of mobile communication technology and mobile network's covering it is increasingly wider, mobile terminal is (such as mobile phone, flat
Plate computer etc.) it plays an increasingly important role in people's daily life, the function of mobile terminal is more and more abundant.For
The quality for improving mobile terminal needs to test the various functions of mobile terminal before mobile terminal factory.
Currently, when testing mobile terminal, when starting up's mobile terminal, can start each test item pair simultaneously
The process answered causes the starting speed of mobile terminal slower, influences the test speed and efficiency of mobile terminal.
Summary of the invention
The present invention provides a kind of mobile terminal and automated testing method, it is intended to solve when testing mobile terminal
Starting the corresponding process of each test item simultaneously leads to the technology of the relatively slow starting speed of mobile terminal, test speed and low efficiency
Problem.
To achieve the above object, a kind of mobile terminal provided by the invention, the mobile terminal include:
First starting module, for starting the kernel of the mobile terminal in the enabled instruction for receiving mobile terminal
Process;
Module is obtained, for when receiving test instruction, the acquisition test to instruct each in corresponding test item
Test case;
Second starting module, it is corresponding described mobile whole for successively starting each test case according to preset order
The process at end, and the corresponding test script of the test case is run based on the process.
In one embodiment, second starting module includes:
Acquiring unit, in current test script operational process, the acquisition operation test script to estimate fortune
The starting duration of the process of the corresponding mobile terminal of the test case of next test item in row duration and the test item;
Computing unit, for calculating the time difference estimated between operation duration and the starting duration;
Start unit, for starting in the test item when the operation duration of the test script reaches time difference
The process of the corresponding mobile terminal of the test case of next test item;
Running unit, for being run in the test item based on the process when current test script runs completion
The corresponding test script of the test case of next test item.
In one embodiment, the mobile terminal further include:
First closedown module, for closing the corresponding institute of current test case when current test item tests completion
State the process of mobile terminal;
First sending module, for the current corresponding test result of test case to be sent to testing service device, for
The test result that the testing service device storage receives.
In one embodiment, the mobile terminal further include:
Second sending module, for sending the test crash of current test item in current test item test crash
Information is to testing service device, the test crash information received for the testing service device storage;
Third starting module, for after successively starting test case current in the test item according to preset order
The corresponding process of test case, and the corresponding test script of the test case is run based on the process.
In one embodiment, the mobile terminal further include:
Second closedown module, for closing the shifting when the test instructs corresponding test item successively to test completion
The kernel process of dynamic terminal.
In addition, to achieve the above object, the present invention also provides a kind of automated testing method, the automated testing method
The following steps are included:
In the enabled instruction for receiving mobile terminal, start the kernel process of the mobile terminal;
When receiving test instruction, each test case in the corresponding test item of the test instruction is obtained;
Successively start the process of the corresponding mobile terminal of each test case according to preset order, and is based on institute
It states process and runs the corresponding test script of the test case.
In one embodiment, described successively to start the corresponding movement of each test case according to preset order
The process of terminal, and the step of test script corresponding based on the process operation test case includes:
In current test script operational process, obtain run the test script estimate operation duration and described
The starting duration of the process of the corresponding mobile terminal of the test case of next test item in test item;
The time difference between operation duration and the starting duration is estimated described in calculating;
When the operation duration of the test script reaches time difference, start the survey of next test item in the test item
The process of the corresponding mobile terminal of example on probation;
When current test script runs completion, the survey of next test item in the test item is run based on the process
The corresponding test script of example on probation.
In one embodiment, described successively to start the corresponding movement of each test case according to preset order
The process of terminal, and after the step of test script corresponding based on the process operation test case, the automation
Test method further include:
When current test item tests completion, the process of the corresponding mobile terminal of current test case is closed;
The current corresponding test result of test case is sent to testing service device, for testing service device storage
The test result received.
In one embodiment, described successively to start the corresponding movement of each test case according to preset order
The process of terminal, and after the step of test script corresponding based on the process operation test case, the automation
Test method further include:
In current test item test crash, the test crash information of current test item is sent to testing service device,
The test crash information received for the testing service device storage;
Successively start according to preset order test case after test case current in the test item it is corresponding into
Journey, and the corresponding test script of the test case is run based on the process.
In one embodiment, the described the step of corresponding test script of the test case is run based on the process it
Afterwards, the automated testing method further include:
When the test instructs corresponding test item successively to test completion, the kernel process of the mobile terminal is closed.
The present invention is by the way that in the enabled instruction for receiving mobile terminal, the first starting module starts the mobile terminal
Kernel process, then when receiving test instruction, acquisition module obtains each in the corresponding test item of the test instruction
Test case, then it is corresponding described mobile whole successively to start each test case according to preset order for the second starting module
The process at end, and the corresponding test script of the test case is run based on the process, it realizes and is carried out to mobile terminal
When test, only start the corresponding process of current test case, the number of launching process when greatly reducing mobile terminal test
Amount improves the starting speed and efficiency of mobile terminal, and then improves the test speed and efficiency of mobile terminal.
Detailed description of the invention
One optional hardware structural diagram of Fig. 1 mobile terminal of each embodiment to realize the present invention;
Fig. 2 is the module diagram of mobile terminal first embodiment of the present invention;
Fig. 3 is the refinement module schematic diagram of the second starting module in mobile terminal second embodiment of the present invention;
Fig. 4 is the module diagram of mobile terminal 3rd embodiment of the present invention;
Fig. 5 is the module diagram of mobile terminal fourth embodiment of the present invention;
Fig. 6 is the flow diagram of automated testing method first embodiment of the present invention;
Fig. 7 is successively to start each test according to preset order in automated testing method second embodiment of the present invention
The process of the corresponding mobile terminal of use-case, and the corresponding test script step of the test case is run based on the process
Refinement flow diagram;
Fig. 8 is the flow diagram of automated testing method 3rd embodiment of the present invention;
Fig. 9 is the flow diagram of automated testing method fourth embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use
For indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself
There is no specific meanings.Therefore, " module " can be used mixedly with " component ".
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as moving
Phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP
The mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidated
Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that in addition to being used in particular for moving
Except the element of purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
The optional hardware configuration signal of one of Fig. 1 mobile terminal of each embodiment to realize the present invention.
Mobile terminal 100 may include wireless communication unit 110, A/V (audio/video) input unit 120, user's input
Unit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power supply unit 190
Etc..Fig. 1 shows the mobile terminal with various assemblies, it should be understood that being not required for implementing all groups shown
Part.More or fewer components can alternatively be implemented.The element of mobile terminal will be discussed in more detail below.
Wireless communication unit 110 generally includes one or more components, allows mobile terminal 100 and wireless communication device
Or the radio communication between network.For example, wireless communication unit may include broadcasting reception module 111, mobile communication module
112, at least one of wireless Internet module 113, short range communication module 114 and location information module 115.
Broadcasting reception module 111 receives broadcast singal and/or broadcast from external broadcast management server via broadcast channel
Relevant information.Broadcast channel may include satellite channel and/or terrestrial channel.Broadcast management server, which can be, to be generated and sent
The broadcast singal and/or broadcast related information generated before the server or reception of broadcast singal and/or broadcast related information
And send it to the server of terminal.Broadcast singal may include TV broadcast singal, radio signals, data broadcasting
Signal etc..Moreover, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase
Closing information can also provide via mobile communications network, and in this case, broadcast related information can be by mobile communication mould
Block 112 receives.Broadcast singal can exist in a variety of manners, for example, it can be with the electronics of digital multimedia broadcasting (DMB)
Program guide (EPG), digital video broadcast-handheld (DVB-H) electronic service guidebooks (ESG) etc. form and exist.Broadcast
Receiving module 111 can receive signal broadcast by using various types of broadcasters.Particularly, broadcasting reception module 111
It can be wide by using such as multimedia broadcasting-ground (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video
It broadcasts-holds (DVB-H), forward link media (MediaFLO@) data broadcasting device, received terrestrial digital broadcasting integrated service
(ISDB-T) etc. digital broadcast apparatus receives digital broadcasting.Broadcasting reception module 111, which may be constructed such that, to be adapted to provide for extensively
Broadcast the various broadcasters and above-mentioned digital broadcast apparatus of signal.Via the received broadcast singal of broadcasting reception module 111 and/
Or broadcast related information can store in memory 160 (or other types of storage medium).
Mobile communication module 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminal
And at least one of server and/or receive from it radio signal.Such radio signal may include that voice is logical
Talk about signal, video calling signal or according to text and/or Multimedia Message transmission and/or received various types of data.
The Wi-Fi (Wireless Internet Access) of the support mobile terminal of wireless Internet module 113.The module can be internally or externally
It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro
(WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
Short range communication module 114 is the module for supporting short range communication.Some examples of short-range communication technology include indigo plant
ToothTM, radio frequency identification (RFID), Infrared Data Association (IrDA), ultra wide band (UWB), purple honeybeeTMEtc..
Location information module 115 is the module for checking or obtaining the location information of mobile terminal.Location information module
Typical case be GPS (global pick device).According to current technology, GPS module 115, which calculates, comes from three or more satellites
Range information and correct time information and the Information application triangulation for calculating, thus according to longitude, latitude
Highly accurately calculate three-dimensional current location information.Currently, it is defended for the method for calculating position and temporal information using three
Star and the error that calculated position and temporal information are corrected by using an other satellite.In addition, GPS module 115
It can be by Continuous plus current location information in real time come calculating speed information.
A/V input unit 120 is for receiving audio or video signal.A/V input unit 120 may include 121 He of camera
Microphone 122, camera 121 is to the static images obtained in video acquisition mode or image capture mode by image capture apparatus
Or the image data of video is handled.Treated, and picture frame may be displayed on display unit 151.It is handled through camera 121
Picture frame afterwards can store in memory 160 (or other storage mediums) or be sent out via wireless communication unit 110
It send, two or more cameras 121 can be provided according to the construction of mobile terminal.Microphone 122 can be in telephone calling model, note
Sound (audio data) is received via microphone in record mode, speech recognition mode etc. operational mode, and can will in this way
Acoustic processing be audio data.Audio that treated (voice) data can be converted in the case where telephone calling model can
The format output of mobile communication base station is sent to via mobile communication module 112.Various types of make an uproar can be implemented in microphone 122
Sound eliminates (or inhibition) algorithm to eliminate the noise or do that (or inhibition) generates during sending and receiving audio signal
It disturbs.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminal
Kind operation.User input unit 130 allows user to input various types of information, and may include keyboard, metal dome, touch
Plate (for example, the sensitive component of detection due to the variation of resistance, pressure, capacitor etc. caused by being contacted), idler wheel, rocking bar etc.
Deng.Particularly, when touch tablet is superimposed upon in the form of layer on display unit 151, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shape
State), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal
100 orientation, the acceleration of mobile terminal 100 or by fast movement and direction etc., and generate for controlling mobile terminal 100
The order of operation or signal.For example, sensing unit 140 can sense when mobile terminal 100 is embodied as sliding-type mobile phone
The sliding-type phone is to open or close.In addition, sensing unit 140 be able to detect power supply unit 190 whether provide electric power or
Whether person's interface unit 170 couples with external device (ED).Sensing unit 140 may include that proximity sensor 1410 will combine below
Touch screen is described this.
Interface unit 170 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,
External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Identification module can be storage and use each of mobile terminal 100 for verifying user
It plants information and may include subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM)
Etc..In addition, the device (hereinafter referred to as " identification device ") with identification module can take the form of smart card, therefore, know
Other device can be connect via port or other attachment devices with mobile terminal 100.Interface unit 170, which can be used for receiving, to be come from
The input (for example, data information, electric power etc.) of external device (ED) and the input received is transferred in mobile terminal 100
One or more elements can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connect with external base, interface unit 170 may be used as allowing will be electric by it
Power, which is provided from pedestal to the path or may be used as of mobile terminal 100, allows the various command signals inputted from pedestal to pass through it
It is transferred to the path of mobile terminal.The various command signals or electric power inputted from pedestal, which may be used as mobile terminal for identification, is
The no signal being accurately fitted on pedestal.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeated
Signal (for example, audio signal, vision signal, alarm signal, vibration signal etc.) out.Output unit 150 may include display
Unit 151, audio output module 152, alarm unit 153 etc..
Display unit 151 may be displayed on the information handled in mobile terminal 100.For example, when mobile terminal 100 is in electricity
When talking about call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia file
Downloading etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling mode
Or when image capture mode, display unit 151 can show captured image and/or received image, show video or figure
Picture and the UI or GUI of correlation function etc..
Meanwhile when display unit 151 and touch tablet in the form of layer it is superposed on one another to form touch screen when, display unit
151 may be used as input unit and output device.Display unit 151 may include liquid crystal display (LCD), thin film transistor (TFT)
In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least
It is a kind of.Some in these displays may be constructed such that transparence to allow user to watch from outside, this is properly termed as transparent
Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific
Desired embodiment, mobile terminal 100 may include two or more display units (or other display devices), for example, moving
Dynamic terminal may include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detecting touch
Input pressure and touch input position and touch input area.
Audio output module 152 can mobile terminal be in call signal reception pattern, call mode, logging mode,
It is when under the isotypes such as speech recognition mode, broadcast reception mode, wireless communication unit 110 is received or in memory 160
The audio data transducing audio signal of middle storage and to export be sound.Moreover, audio output module 152 can provide and movement
The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that terminal 100 executes.
Audio output module 152 may include sound pick-up, buzzer etc..
Alarm unit 153 can provide output notifying event to mobile terminal 100.Typical event can be with
Including calling reception, message sink, key signals input, touch input etc..Other than audio or video output, alarm unit
153 can provide output in different ways with the generation of notification event.For example, alarm unit 153 can be in the form of vibration
Output is provided, when receiving calling, message or some other entrance communications (incoming communication), alarm list
Member 153 can provide tactile output (that is, vibration) to notify to user.By providing such tactile output, even if
When the mobile phone of user is in the pocket of user, user also can recognize that the generation of various events.Alarm unit 153
The output of the generation of notification event can be provided via display unit 151 or audio output module 152.
Memory 160 can store the software program etc. of the processing and control operation that are executed by controller 180, Huo Zheke
Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And
And memory 160 can store about the vibrations of various modes and audio signal exported when touching and being applied to touch screen
Data.
Memory 160 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, more
Media card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access storage
Device (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory
(PROM), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connection
The network storage device of 160 store function cooperates.
The overall operation of the usually control mobile terminal of controller 180.For example, controller 180 executes and voice communication, data
Communication, video calling etc. relevant control and processing.In addition, controller 180 may include for reproducing (or playback) more matchmakers
The multi-media module 181 of volume data, multi-media module 181 can construct in controller 180, or can be structured as and control
Device 180 separates.Controller 180 can be with execution pattern identifying processing, by the handwriting input executed on the touchscreen or picture
It draws input and is identified as character or image.
Power supply unit 190 receives external power or internal power under the control of controller 180 and provides operation each member
Electric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereof
Machine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC
(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can
Programming gate array (FPGA), controller, microcontroller, microprocessor, is designed to execute function described herein processor
At least one of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180.
For software implementation, the embodiment of such as process or function can with allow to execute the individual of at least one functions or operations
Software module is implemented.Software code can by the software application (or program) write with any programming language appropriate Lai
Implement, software code can store in memory 160 and be executed by controller 180.
So far, oneself is through describing mobile terminal according to its function.In the following, for the sake of brevity, will description such as folded form,
Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc., which is used as, to be shown
Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Structure based on above-mentioned mobile terminal hardware configuration, communication device, proposes each embodiment of the invention.
The present invention provides a kind of mobile terminal.Referring to Fig. 2, Fig. 2 is that the module of mobile terminal first embodiment of the present invention is shown
It is intended to.
In the present embodiment, which includes:
First starting module 10, for starting the interior of the mobile terminal in the enabled instruction for receiving mobile terminal
Core process;
In the present embodiment, when testing mobile terminal, it is necessary first to so that mobile terminal is booted up operation, specifically
Ground can trigger the enabled instruction of the mobile terminal by the power button of mobile terminal.In the enabled instruction for receiving mobile terminal
When, the first starting module 10 starts the kernel process of the mobile terminal, is Android in the system of mobile terminal specifically
When (Android) system, the first starting module 10 starts the Android kernel process of mobile terminal.
Module 20 is obtained, for when receiving test instruction, the acquisition test to instruct each in corresponding test item
A test case;
It in the present embodiment, can be flat by tests such as testing service devices after the kernel process starting of mobile terminal
Platform sends test instruction to mobile terminal.By taking testing service device as an example, which can be monitored in real time the mobile terminal
Whether start, after mobile terminal starting, which can send test instruction to mobile terminal, receive test
When instruction, obtains each test case that module 20 obtains in the corresponding test item of test instruction and specifically instructed in the test
When comprising the test case, obtain module 20 by parse test instruction obtain test instruct it is each in corresponding test item
Test case, when test instruction does not include the test case, obtaining module 20 can refer to the transmission test of testing service device
The acquisition request for enabling corresponding test case, upon receiving the acquisition request, testing service device is sent in corresponding test item
Each test case to mobile terminal.
Second starting module 30, for successively starting the corresponding movement of each test case according to preset order
The process of terminal, and the corresponding test script of the test case is run based on the process.
Wherein, preset order includes each in the sequence from front to back of each test item or test item in test item
The priority sequence etc. of each test item in the sequence from back to front or test item of test item.
In the present embodiment, it is corresponding successively to start each test case according to preset order for the second starting module 30
The process of the mobile terminal, and the corresponding test script of the test case is run based on the process, i.e., only starting is current
The relevant process of test case, reduce the quantity of process that mobile terminal is played, improve mobile terminal starting efficiency and
The speed and efficiency of test.
Further, in one embodiment, the mobile terminal further include: the second closedown module, for referring in the test
When corresponding test item being enabled successively to test completion, the kernel process of the mobile terminal is closed.
In the present embodiment, when all test items test completion, the kernel process of turning-off mobile terminal, and then make to move
Dynamic terminal closedown.
It is emphasized that in the present embodiment, it is also necessary to starting communicated with testing service device should not process, that is, communicate
The corresponding associated process of module, to guarantee normally to test mobile terminal.
The mobile terminal that the present embodiment proposes, by the enabled instruction for receiving mobile terminal, the first starting module
The kernel process of the 10 starting mobile terminals, then when receiving test instruction, acquisition module 20 obtains the test and refers to
Each test case in corresponding test item is enabled, then the second starting module 30 successively starts each described according to preset order
The process of the corresponding mobile terminal of test case, and the corresponding test foot of the test case is run based on the process
This, realizes when testing mobile terminal, only starts the corresponding process of current test case, greatly reduce shifting
The quantity of launching process when dynamic terminal test improves the starting speed and efficiency of mobile terminal, and then improves mobile terminal
Test speed and efficiency.
The second embodiment that mobile terminal of the present invention is proposed based on first embodiment in the present embodiment, should referring to Fig. 3
Mobile terminal further include: the second starting module 30 includes:
Acquiring unit 31, for obtaining and running estimating for the test script in current test script operational process
In operation duration and the test item when starting of the process of the corresponding mobile terminal of the test case of next test item
It is long;
Wherein, each test case may include the test case corresponding test script operation estimate operation duration with
And the starting duration of the process of the corresponding mobile terminal of the test case.
In the present embodiment, in current test script operational process, acquiring unit 31, which obtains, runs the test script
The corresponding mobile terminal of test case of estimating next test item in operation duration and the test item process
Starting duration.
Computing unit 32, for calculating the time difference estimated between operation duration and the starting duration;
Wherein, which is to estimate operation duration to subtract the starting duration, and the time difference is greater than or equal to zero.
Start unit 33, for starting the test item when the operation duration of the test script reaches time difference
In next test item the corresponding mobile terminal of test case process;
In the present embodiment, when the operation duration of the test script reaches time difference, start unit 33 starts institute
The process of the corresponding mobile terminal of test case of next test item in test item is stated, to realize in current test case institute
During the functional test of corresponding mobile terminal, starts the corresponding process of test case of next test item, can reduce down
Time consumed by the starting of the corresponding process of the test case of one test item, and then improve the test speed and effect of mobile terminal
Rate.
Running unit 34, for running the test item based on the process when current test script runs completion
In next test item the corresponding test script of test case.
In the present embodiment, current test script run complete when, the test case of next test item it is corresponding into
Journey has been turned on, therefore running unit 34 can be directly based upon the test case that the process runs next test item in the test item
Corresponding test script.
It is emphasized that it is long greater than operation duration is estimated on startup, it can be when current test script be run, directly
Start the process of the corresponding mobile terminal of test case of next test item in the test item, to effectively reduce next survey
It tries the time consumed by the starting of the corresponding process of test case of item, and then improves the test speed and efficiency of mobile terminal.
The mobile terminal that the present embodiment proposes, by the way that in current test script operational process, acquiring unit 31 is obtained
The test case for estimating next test item in operation duration and the test item for running the test script is corresponding described
The starting duration of the process of mobile terminal, then computing unit 32 calculates described estimate between operation duration and the starting duration
Time difference, then when the operation duration of the test script reaches time difference, start unit 33 starts the test
The process of the corresponding mobile terminal of test case of next test item in, then runs in current test script and completes
When, running unit 34 based on the corresponding test script of test case that the process runs next test item in the test item,
Realize the test use for starting next test item during the functional test of the mobile terminal corresponding to current test case
The corresponding process of example, reduces and starts the time consumed by the corresponding process of test case of next test item, further increase
The test speed and efficiency of mobile terminal.
The 3rd embodiment that mobile terminal of the present invention is proposed based on first embodiment in the present embodiment, should referring to Fig. 4
Mobile terminal further include:
First closedown module 40, for it is corresponding to close current test case when current test item tests completion
The process of the mobile terminal;
In the present embodiment, in the present embodiment, when current test item tests completion, i.e., current test script fortune
When row is completed, the process of the corresponding mobile terminal of the current test case of the first closedown module 40, to reduce mobile terminal
The process being currently running avoids mobile terminal still corresponding in the current test case of operation when carrying out the test of follow-up test item
The mobile terminal process, cause the waste of system resource, influence the test speed and efficiency of mobile terminal.
First sending module 50, for the current corresponding test result of test case to be sent to testing service device, with
The test result received for the testing service device storage.
In the present embodiment, the current corresponding test result of test case is sent to by survey by the first sending module 50
Server is tried, for the test result that the testing service device storage receives, at the analysis convenient for follow-up test result
Reason.
The mobile terminal that the present embodiment proposes, by the way that when current test item tests completion, the first closedown module 40 is closed
The process of the corresponding mobile terminal of current test case is closed, then the first sending module 50 is by current test case pair
The test result answered is sent to testing service device, for the test result that the testing service device storage receives, realizes
The process of the corresponding mobile terminal of current test case is closed, in time when testing and completing to reduce mobile terminal just
In the process of operation, avoid mobile terminal still corresponding in the current test case of operation when carrying out the test of follow-up test item
The process of the mobile terminal causes the waste of system resource, further improves the test speed and efficiency of mobile terminal.
The fourth embodiment that mobile terminal of the present invention is proposed based on first embodiment in the present embodiment, should referring to Fig. 5
Mobile terminal further include:
Second sending module 60, the test in current test item test crash, sending current test item are lost
Lose information to testing service device, the test crash information received for the testing service device storage;
In the present embodiment, in current test item test crash, the second sending module 60 sends current test item
Test crash information to testing service device, for the test crash information that the testing service device storage receives, just
In the reason of according to test crash information analysis test crash.
Third starting module 70, for after successively starting test case current in the test item according to preset order
The corresponding process of test case, and the corresponding test script of the test case is run based on the process.
In the present embodiment, in current test item test crash, third starting module 70 according to preset order successively
Start the corresponding process of test case after test case current in the test item, and based on described in process operation
The corresponding test script of test case, and then can ensure that subsequent test smoothly completes.
The mobile terminal that the present embodiment proposes, by the way that in current test item test crash, the second sending module 60 is sent out
Send the test crash information of current test item to testing service device, the survey received for the testing service device storage
Try failure information, then third starting module 70 successively start according to preset order test case current in the test item it
The corresponding process of test case afterwards, and the corresponding test script of the test case is run based on the process, it can be ensured that
Subsequent test smoothly completes, and further improves the efficiency of mobile terminal test.
The present invention further provides a kind of automated testing methods.It is automated testing method of the present invention referring to Fig. 6, Fig. 6
The flow diagram of first embodiment.
In the present embodiment, which includes:
Step S10 starts the kernel process of the mobile terminal in the enabled instruction for receiving mobile terminal;
In the present embodiment, when testing mobile terminal, it is necessary first to so that mobile terminal is booted up operation, specifically
Ground can trigger the enabled instruction of the mobile terminal by the power button of mobile terminal.In the enabled instruction for receiving mobile terminal
When, the first starting module 10 starts the kernel process of the mobile terminal, is Android in the system of mobile terminal specifically
When (Android) system, the first starting module 10 starts the Android kernel process of mobile terminal.
Step S20 obtains the test and each test in corresponding test item is instructed to use when receiving test instruction
Example;
It in the present embodiment, can be flat by tests such as testing service devices after the kernel process starting of mobile terminal
Platform sends test instruction to mobile terminal.By taking testing service device as an example, which can be monitored in real time the mobile terminal
Whether start, after mobile terminal starting, which can send test instruction to mobile terminal, receive test
When instruction, obtains each test case that module 20 obtains in the corresponding test item of test instruction and specifically instructed in the test
When comprising the test case, obtain module 20 by parse test instruction obtain test instruct it is each in corresponding test item
Test case, when test instruction does not include the test case, obtaining module 20 can refer to the transmission test of testing service device
The acquisition request for enabling corresponding test case, upon receiving the acquisition request, testing service device is sent in corresponding test item
Each test case to mobile terminal.
Step S30 successively starts the process of the corresponding mobile terminal of each test case according to preset order,
And the corresponding test script of the test case is run based on the process.
Wherein, preset order includes each in the sequence from front to back of each test item or test item in test item
The priority sequence etc. of each test item in the sequence from back to front or test item of test item.
In the present embodiment, it is corresponding successively to start each test case according to preset order for the second starting module 30
The process of the mobile terminal, and the corresponding test script of the test case is run based on the process, i.e., only starting is current
The relevant process of test case, reduce the quantity of process that mobile terminal is played, improve mobile terminal starting efficiency and
The speed and efficiency of test.
Further, in one embodiment, after step S30, the automated testing method further include: in the test
When corresponding test item being instructed successively to test completion, the kernel process of the mobile terminal is closed.
In the present embodiment, when all test items test completion, the kernel process of turning-off mobile terminal, and then make to move
Dynamic terminal closedown.
It is emphasized that in the present embodiment, it is also necessary to starting communicated with testing service device should not process, that is, communicate
The corresponding associated process of module, to guarantee normally to test mobile terminal.
The automated testing method that the present embodiment proposes, by the way that in the enabled instruction for receiving mobile terminal, first is opened
Dynamic model block 10 starts the kernel process of the mobile terminal, and then when receiving test instruction, acquisition module 20 obtains described
Test instructs each test case in corresponding test item, and then the second starting module 30 successively starts respectively according to preset order
The process of the corresponding mobile terminal of a test case, and the corresponding survey of the test case is run based on the process
Training sheet, realizes when testing mobile terminal, only starts the corresponding process of current test case, greatly reduces
The quantity of launching process when mobile terminal test improves the starting speed and efficiency of mobile terminal, so improve it is mobile eventually
The test speed and efficiency at end.
The second embodiment that automated testing method of the present invention is proposed based on first embodiment, referring to Fig. 7, in the present embodiment
In, step S30 includes:
Step S31, in current test script operational process, obtain the operation test script estimates operation duration
And in the test item process of the corresponding mobile terminal of test case of next test item starting duration;
Wherein, each test case may include the test case corresponding test script operation estimate operation duration with
And the starting duration of the process of the corresponding mobile terminal of the test case.
In the present embodiment, in current test script operational process, acquiring unit 31, which obtains, runs the test script
The corresponding mobile terminal of test case of estimating next test item in operation duration and the test item process
Starting duration.
Step S32 estimates the time difference between operation duration and the starting duration described in calculating;
Wherein, which is to estimate operation duration to subtract the starting duration, and the time difference is greater than or equal to zero.
Step S33 starts next survey in the test item when the operation duration of the test script reaches time difference
Try the process of the corresponding mobile terminal of test case of item;
In the present embodiment, when the operation duration of the test script reaches time difference, start unit 33 starts institute
The process of the corresponding mobile terminal of test case of next test item in test item is stated, to realize in current test case institute
During the functional test of corresponding mobile terminal, starts the corresponding process of test case of next test item, can reduce down
Time consumed by the starting of the corresponding process of the test case of one test item, and then improve the test speed and effect of mobile terminal
Rate.
Step S34 runs next survey in the test item based on the process when current test script runs completion
Try the corresponding test script of test case of item.
In the present embodiment, current test script run complete when, the test case of next test item it is corresponding into
Journey has been turned on, therefore running unit 34 can be directly based upon the test case that the process runs next test item in the test item
Corresponding test script.
It is emphasized that it is long greater than operation duration is estimated on startup, it can be when current test script be run, directly
Start the process of the corresponding mobile terminal of test case of next test item in the test item, to effectively reduce next survey
It tries the time consumed by the starting of the corresponding process of test case of item, and then improves the test speed and efficiency of mobile terminal.
The automated testing method that the present embodiment proposes, by current test script operational process, acquiring unit
31 test cases for estimating next test item in operation duration and the test item for obtaining the operation test script correspond to
The mobile terminal process starting duration, then computing unit 32 calculates described when estimating operation duration and the starting
Time difference between length, then when the operation duration of the test script reaches time difference, start unit 33 starts institute
The process of the corresponding mobile terminal of test case of next test item in test item is stated, is then transported in current test script
When row is completed, running unit 34 is based on the corresponding test of test case that the process runs next test item in the test item
Script realizes the survey for starting next test item during the functional test of the mobile terminal corresponding to current test case
The corresponding process of example on probation, reduces and starts the time consumed by the corresponding process of test case of next test item, further
Improve the test speed and efficiency of mobile terminal.
The 3rd embodiment that automated testing method of the present invention is proposed based on first embodiment, referring to Fig. 8, in the present embodiment
In, after step S30, the automated testing method further include:
Step S40 closes the corresponding mobile terminal of current test case when current test item tests completion
Process;
In the present embodiment, in the present embodiment, when current test item tests completion, i.e., current test script fortune
When row is completed, the process of the corresponding mobile terminal of the current test case of the first closedown module 40, to reduce mobile terminal
The process being currently running avoids mobile terminal still corresponding in the current test case of operation when carrying out the test of follow-up test item
The mobile terminal process, cause the waste of system resource, influence the test speed and efficiency of mobile terminal.
The current corresponding test result of test case is sent to testing service device by step S50, for test clothes
The test result that business device storage receives.
In the present embodiment, the current corresponding test result of test case is sent to by survey by the first sending module 50
Server is tried, for the test result that the testing service device storage receives, at the analysis convenient for follow-up test result
Reason.
The automated testing method that the present embodiment proposes, by the way that when current test item tests completion, first closes mould
Block 40 closes the process of the corresponding mobile terminal of current test case, and then the first sending module 50 is by current test
The corresponding test result of use-case is sent to testing service device, the test knot received for the testing service device storage
Fruit realizes the process for closing the corresponding mobile terminal of current test case in time when testing and completing, and is moved with reducing
The process that dynamic terminal is currently running avoids mobile terminal from still running current test use when carrying out the test of follow-up test item
The process of the corresponding mobile terminal of example, causes the waste of system resource, further improves the test speed of mobile terminal
And efficiency.
The fourth embodiment that automated testing method of the present invention is proposed based on first embodiment, referring to Fig. 9, in the present embodiment
In, after step S30, the automated testing method further include:
Step S60, in current test item test crash, the test crash information for sending current test item is extremely tested
Server, the test crash information received for the testing service device storage;
In the present embodiment, in current test item test crash, the second sending module 60 sends current test item
Test crash information to testing service device, for the test crash information that the testing service device storage receives, just
In the reason of according to test crash information analysis test crash.
Step S70 successively starts the test case after test case current in the test item according to preset order
Corresponding process, and the corresponding test script of the test case is run based on the process.
In the present embodiment, in current test item test crash, third starting module 70 according to preset order successively
Start the corresponding process of test case after test case current in the test item, and based on described in process operation
The corresponding test script of test case, and then can ensure that subsequent test smoothly completes.
The automated testing method that the present embodiment proposes, by the way that in current test item test crash, second sends mould
Block 60 sends the test crash information of current test item to testing service device, receives for the testing service device storage
The test crash information, then third starting module 70 successively starts test current in the test item according to preset order
The corresponding process of test case after use-case, and the corresponding test script of the test case, energy are run based on the process
Enough ensure that subsequent test smoothly completes, further improves the efficiency of mobile terminal test.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (8)
1. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
First starting module, for starting the kernel process of the mobile terminal in the enabled instruction for receiving mobile terminal;
Module is obtained, for obtaining each test tested and instructed in corresponding test item when receiving test instruction
Use-case;
Second starting module, for successively starting the corresponding mobile terminal of each test case according to preset order
Process, and the corresponding test script of the test case is run based on the process;
Second starting module includes:
Acquiring unit, for obtaining and running when estimating operation of the test script in current test script operational process
The starting duration of the process of the corresponding mobile terminal of the test case of next test item in the long and described test item;
Computing unit, for calculating the time difference estimated between operation duration and the starting duration;
Start unit, for starting next in the test item when the operation duration of the test script reaches time difference
The process of the corresponding mobile terminal of the test case of test item;
Running unit, for being run based on the process next in the test item when current test script runs completion
The corresponding test script of the test case of test item.
2. mobile terminal as described in claim 1, which is characterized in that the mobile terminal further include:
First closedown module, for closing the corresponding shifting of current test case when current test item tests completion
The process of dynamic terminal;
First sending module, for the current corresponding test result of test case to be sent to testing service device, for described
The test result that testing service device storage receives.
3. mobile terminal as described in claim 1, which is characterized in that the mobile terminal further include:
Second sending module, for sending the test crash information of current test item in current test item test crash
To testing service device, the test crash information received for the testing service device storage;
Third starting module, for successively starting the test after test case current in the test item according to preset order
The corresponding process of use-case, and the corresponding test script of the test case is run based on the process.
4. mobile terminal as described in any one of claims 1 to 3, which is characterized in that the mobile terminal further include:
Second closedown module, for closing the movement eventually when the test instructs corresponding test item successively to test completion
The kernel process at end.
5. a kind of automated testing method, which is characterized in that the automated testing method the following steps are included:
In the enabled instruction for receiving mobile terminal, start the kernel process of the mobile terminal;
When receiving test instruction, each test case in the corresponding test item of the test instruction is obtained;
Successively start the process of the corresponding mobile terminal of each test case according to preset order, and based on it is described into
The corresponding test script of test case described in Cheng Yunhang;
The process for successively starting the corresponding mobile terminal of each test case according to preset order, and it is based on institute
Stating the step of process runs the test case corresponding test script includes:
In current test script operational process, obtain the operation test script estimates operation duration and the test
The starting duration of the process of the corresponding mobile terminal of test case of next test item in;
The time difference between operation duration and the starting duration is estimated described in calculating;
When the operation duration of the test script reaches time difference, the test for starting next test item in the test item is used
The process of the corresponding mobile terminal of example;
When current test script runs completion, the test for running next test item in the test item based on the process is used
The corresponding test script of example.
6. automated testing method as claimed in claim 5, which is characterized in that it is described successively start according to preset order it is each
The process of the corresponding mobile terminal of the test case, and the corresponding test of the test case is run based on the process
After the step of script, the automated testing method further include:
When current test item tests completion, the process of the corresponding mobile terminal of current test case is closed;
The current corresponding test result of test case is sent to testing service device, is received so that the testing service device stores
The test result arrived.
7. automated testing method as claimed in claim 5, which is characterized in that it is described successively start according to preset order it is each
The process of the corresponding mobile terminal of the test case, and the corresponding test of the test case is run based on the process
After the step of script, the automated testing method further include:
In current test item test crash, the test crash information of current test item is sent to testing service device, for
The test crash information that the testing service device storage receives;
Successively start the corresponding process of test case after test case current in the test item according to preset order, and
The corresponding test script of the test case is run based on the process.
8. such as the described in any item automated testing methods of claim 5 to 7, which is characterized in that described to be transported based on the process
After the step of row test case corresponding test script, the automated testing method further include:
When the test instructs corresponding test item successively to test completion, the kernel process of the mobile terminal is closed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611047263.3A CN106506766B (en) | 2016-11-21 | 2016-11-21 | Mobile terminal and automated testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611047263.3A CN106506766B (en) | 2016-11-21 | 2016-11-21 | Mobile terminal and automated testing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106506766A CN106506766A (en) | 2017-03-15 |
CN106506766B true CN106506766B (en) | 2019-09-20 |
Family
ID=58328631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611047263.3A Active CN106506766B (en) | 2016-11-21 | 2016-11-21 | Mobile terminal and automated testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106506766B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107613291A (en) * | 2017-10-23 | 2018-01-19 | 东莞华贝电子科技有限公司 | Method of testing, Camera Test tool and the mobile terminal of camera |
CN112199283A (en) * | 2020-10-10 | 2021-01-08 | 广州华多网络科技有限公司 | Program test control and execution method and corresponding device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092654A (en) * | 2013-01-17 | 2013-05-08 | 深圳市中兴移动通信有限公司 | Web-based operating system (WebOS) implementation method and system based on WebKit |
CN104899090A (en) * | 2015-05-27 | 2015-09-09 | 努比亚技术有限公司 | Method, apparatus and mobile terminal for rapidly scheduling application process |
CN105786667A (en) * | 2016-02-29 | 2016-07-20 | 惠州Tcl移动通信有限公司 | Distributed automated testing method and system |
CN106101836A (en) * | 2016-07-07 | 2016-11-09 | 深圳创维-Rgb电子有限公司 | The player method of intelligent television and device |
CN106126291A (en) * | 2016-06-28 | 2016-11-16 | 北京金山安全软件有限公司 | Method and device for deleting malicious file and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3586443B2 (en) * | 2001-09-11 | 2004-11-10 | 松下電器産業株式会社 | Transmission apparatus, transmission level correction method, and transmission control program |
-
2016
- 2016-11-21 CN CN201611047263.3A patent/CN106506766B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092654A (en) * | 2013-01-17 | 2013-05-08 | 深圳市中兴移动通信有限公司 | Web-based operating system (WebOS) implementation method and system based on WebKit |
CN104899090A (en) * | 2015-05-27 | 2015-09-09 | 努比亚技术有限公司 | Method, apparatus and mobile terminal for rapidly scheduling application process |
CN105786667A (en) * | 2016-02-29 | 2016-07-20 | 惠州Tcl移动通信有限公司 | Distributed automated testing method and system |
CN106126291A (en) * | 2016-06-28 | 2016-11-16 | 北京金山安全软件有限公司 | Method and device for deleting malicious file and electronic equipment |
CN106101836A (en) * | 2016-07-07 | 2016-11-09 | 深圳创维-Rgb电子有限公司 | The player method of intelligent television and device |
Also Published As
Publication number | Publication date |
---|---|
CN106506766A (en) | 2017-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104918208B (en) | Mobile terminal matching method and mobile terminal | |
CN105100603B (en) | A kind of triggering camera arrangement and its method that intelligent terminal is embedded | |
CN105094613B (en) | Terminal control mechanism and method | |
CN104850443B (en) | A kind of method and mobile terminal for closing error starting application program | |
CN104918064B (en) | A kind of method and device that mobile terminal video quickly plays | |
CN105242847B (en) | Mobile terminal and its quickly starting method of application | |
CN104850799B (en) | The method and mobile terminal of a kind of data in hiding mobile terminal | |
CN104850343B (en) | Start the method and apparatus of one-hand operating format | |
CN105263195B (en) | Data transmission device and method | |
CN105357367B (en) | Recognition by pressing keys device and method based on pressure sensor | |
CN105278995B (en) | Management method, system, server and the mobile terminal of application program | |
CN106604375A (en) | Dormancy device and method | |
CN105138400B (en) | Application program self-starting management method and device | |
CN104915063B (en) | The method and apparatus for controlling intelligent terminal | |
CN105100477B (en) | Terminal notifying device and method | |
CN106534552B (en) | Mobile terminal and its photographic method | |
CN105764085A (en) | Abnormal electricity consumption detection method and terminal | |
CN107341013A (en) | One kind start fault handling method, equipment and computer-readable recording medium | |
CN106888317B (en) | A kind of interaction processing method, device and terminal | |
CN105049582B (en) | A kind of save set of calling record, method and display methods | |
CN106993093A (en) | A kind of image processing apparatus and method | |
CN106412328B (en) | A kind of method and apparatus obtaining field feedback | |
CN106506766B (en) | Mobile terminal and automated testing method | |
CN106447595A (en) | Distributed image and graph rendering method and terminal | |
CN104915230B (en) | application control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 |