Summary of the invention
For this purpose, the present invention provides a kind of automated testing method, device and mobile terminal, to try hard to solve or at least slow
Solution at least one existing problem above.
According to an aspect of the invention, there is provided a kind of automated testing method, suitable in the movement with touch screen
It is executed in terminal, this method comprises: receiving the script production starting request of user;In response to the request, test script is created;Through
The action event that user inputs on the touchscreen is received by mobile terminal;Action event generates test script based on the received
In a test command;The step of is repeated by above-mentioned reception, is generated for the action event that subsequent user inputs on the touchscreen, until
The script for receiving user makes ending request;The test request of user is received, test request includes the parameter of Run Script, and refers to
Surely the test script run;In response to the request, the test script of specified operation is read;It should according to the operation of the parameter of Run Script
Test script;And after end of run, test result is generated.
Optionally, in automated testing method according to the present invention, wherein action event generates test based on the received
The step of test command, includes: and obtains mobile terminal to receive the operation data generated after action event, operand in script
According to type and parameter including the action event;Write-in includes a survey of the type and parameter of action event in test script
Examination order.
Optionally, in automated testing method according to the present invention, wherein the parameter of Run Script includes operation total time
Number includes: the test script that reruns according to the step of parameter of Run Script operation test script, until running the test foot
This number reaches operation total degree.
Optionally, in automated testing method according to the present invention, wherein the parameter of Run Script further includes that operation is total
Duration includes: the test script that reruns according to the step of parameter of Run Script operation test script, until running the test
The number of script, which reaches operation total degree or runs time of the test script, reaches operation total duration.
Optionally, in automated testing method according to the present invention, wherein the step of operation test script includes: to read
The test command originated in test script;Execute a test command;To test command weight subsequent in test script
Multiple above-mentioned the step of reading and executing.
Optionally, in automated testing method according to the present invention, wherein the step of executing a test command is also wrapped
Include: interception executes the screen picture after a test command.
Optionally, it in automated testing method according to the present invention, is being touched wherein receiving user via mobile terminal
The step of action event inputted on screen further include: interception user inputs the screen after an action event on the touchscreen
Image.
Optionally, in automated testing method according to the present invention, wherein the parameter of Run Script further includes that instruction is
The no label and image comparison similarity threshold for carrying out image comparison executes a survey when label indicates to carry out image comparison
The step of examination order further include: after interception executes the screen picture after a test command, calculate the screen picture and survey
The similarity of the screen picture of corresponding interception when this production of training;Record image comparison result, wherein if the similarity calculated reaches
To image comparison similarity threshold, then image comparison result is to pass through, otherwise not pass through.
Optionally, in automated testing method according to the present invention, wherein the step of generating test result includes: basis
At least one image comparison of record is as a result, determine that test result is to pass through or do not pass through.
Optionally, in automated testing method according to the present invention, further includes: after end of run, operation report is generated,
Each test command in the starting and ending time that script name, script including operation are run and script operation is reported in operation
Execution time, content and image comparison result.
Optionally, in automated testing method according to the present invention, wherein the step of generating test report further include: root
According to operation report generation test report, test report includes the script name of operation and number, the foot of content for script, script operation
The number and test result that the duration of this operation, picture compare, wherein the number of picture comparison includes the number that comparison passes through
With the unacceptable number of comparison.
Optionally, in automated testing method according to the present invention, the type of action event includes at least click coordinate
Event, long-pressing event, slip event, opens application affairs and waits event click keys event.
Optionally, in automated testing method according to the present invention, wherein the test command in test script is expressed as
Text language with fixed format.
According to another aspect of the present invention, a kind of automatic test device is provided, the movement with touch screen is resided in
In terminal, which includes: request receiving module, and the script production starting request and script production suitable for receiving user stop asking
It asks;It is further adapted for receiving the test request of user, test request includes the parameter of Run Script, and the test script of specified operation;
Script makes module, is adapted for script production starting request, creates test script;It is further adapted for receiving via mobile terminal and uses
The action event that family inputs on the touchscreen;It is further adapted for action event based on the received and generates a test in test script
Order;It is further adapted for the step of action event inputted on the touchscreen to subsequent user repeats above-mentioned reception, generates, until request
The script that receiving module receives user makes ending request;Script running module is adapted for test request, reads specified fortune
Capable test script;It is further adapted for running test script according to the parameter of Run Script;And report generation module, it is suitable for operation knot
Shu Hou generates test result.
Optionally, in automatic test device according to the present invention, wherein script production module is further adapted for obtaining movement
Terminal receives the operation data generated after action event, and operation data includes the type and parameter of the action event;It is further adapted for
Write-in includes the type of action event and a test command of parameter in test script.
Optionally, in automatic test device according to the present invention, wherein the parameter of Run Script includes operation total time
Number, script running module are further adapted for the test script that reruns, until the number for running the test script reaches operation total degree.
Optionally, in automatic test device according to the present invention, wherein the parameter of Run Script further includes that operation is total
Duration, script running module are further adapted for the test script that reruns, until the number for running the test script reaches operation total time
Number or the time for running the test script reach operation total duration.
Optionally, in automatic test device according to the present invention, wherein script running module is further adapted for read test
The test command originated in script;It is further adapted for executing a test command;It is further adapted for survey subsequent in test script
Examination order repeats above-mentioned the step of reading and executing.
Optionally, in automatic test device according to the present invention, wherein script running module is further adapted for interception execution
Screen picture after one test command.
Optionally, in automatic test device according to the present invention, wherein script production module is further adapted for intercepting user
The screen picture after an action event is inputted on the touchscreen.
Optionally, in automatic test device according to the present invention, wherein the parameter of Run Script further includes that instruction is
The no label and image comparison similarity threshold for carrying out image comparison, script running module further includes image comparison module, image
Contrast module be suitable for when label indicate carry out image comparison when, suitable for interception execute a test command after screen picture it
Afterwards, the similarity of the screen picture of corresponding interception when the screen picture makes with test script is calculated;It is further adapted for recording image pair
Compare result, wherein if the similarity calculated reaches image comparison similarity threshold, image comparison result is to pass through, otherwise for
Do not pass through.
Optionally, in automatic test device according to the present invention, wherein report generation module is further adapted for according to record
At least one image comparison as a result, determine test result be pass through or do not pass through.
Optionally, raw after report generation module is further adapted for end of run in automatic test device according to the present invention
It is reported at operation, operation report includes in the script name of operation, the starting and ending time of script operation and script operation
Execution time, content and the image comparison result of each test command.
Optionally, in automatic test device according to the present invention, report generation module is further adapted for being reported according to operation
Generate test report, test report include operation script name and content for script, script operation number, script operation when
Long, picture comparison number and test result, wherein the number of picture comparison includes the number and compare obstructed that comparison passes through
The number crossed.
Optionally, in automatic test device according to the present invention, the type of action event includes at least click coordinate
Event, long-pressing event, slip event, opens application affairs and waits event click keys event.
Optionally, in automatic test device according to the present invention, wherein the test command in test script is expressed as
Text language with fixed format.
According to the present invention there are one aspects, provide a kind of mobile terminal, and there is automation according to the present invention to survey
Trial assembly is set.
Automatic test scheme according to the present invention is carried out making on mobile terminals, by way of Run Script
Automatic test completely disengages the end PC, releases the end PC resource, also avoid the end PC production script when Caton the problems such as.Together
When, operation is more convenient simple, saves the time cost of test, improves testing efficiency and user experience.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 is 100 organigram of mobile terminal according to an embodiment of the invention.Referring to Fig.1, mobile terminal
100 include: memory interface 102, one or more data processor, image processor and/or central processing unit 104, with
And peripheral interface 106.Memory interface 102, one or more processors 104 and/or peripheral interface 106 are either discrete member
Part also can integrate in one or more integrated circuits.In the mobile terminal 100, various elements can pass through one or more
Communication bus or signal wire couple.Sensor, equipment and subsystem may be coupled to peripheral interface 106, to help reality
Existing multiple functions.For example, motion sensor 110, optical sensor 112 and range sensor 114 may be coupled to peripheral interface
106, to facilitate the functions such as orientation, illumination and ranging.Other sensors 116 can equally be connected with peripheral interface 106, such as fixed
Position system (such as GPS receiver), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help reality
Apply relevant function.
Camera sub-system 120 and optical sensor 122 can be used for the camera of convenient such as record photos and video clips
The realization of function, wherein the camera sub-system and optical sensor for example can be charge-coupled device (CCD) or complementary gold
Belong to oxide semiconductor (CMOS) optical sensor.It can help to realize by one or more radio communication subsystems 124
Communication function, wherein radio communication subsystem may include radio-frequency transmitter and transmitter and/or light (such as infrared) receiver
And transmitter.The particular design and embodiment of radio communication subsystem 124 can depend on mobile terminal 100 is supported one
A or multiple communication networks.For example, mobile terminal 100 may include being designed to support GSM network, GPRS network, EDGE net
The communication subsystem 124 of network, Wi-Fi or WiMax network and BlueboothTM network.Audio subsystem 126 can be with loudspeaking
Device 128 and microphone 130 are coupled, to help the function of implementing to enable voice, such as speech recognition, speech reproduction, number
Word record and telephony feature.
I/O subsystem 140 may include touch screen controller 142 and/or other one or more input controllers 144.
Touch screen controller 142 may be coupled to touch screen 146.For example, the touch screen 146 and touch screen controller 142 can be with
The contact carried out therewith and movement or pause are detected using any one of a variety of touch-sensing technologies, wherein sensing skill
Art includes but is not limited to capacitive character, resistive, infrared and surface acoustic wave technique.Other one or more input controllers 144
May be coupled to other input/control devicess 148, for example, one or more buttons, rocker switch, thumb wheel, infrared port,
The pointer device of USB port, and/or stylus etc.One or more of button (not shown)s may include for controlling
The up/down button of 130 volume of loudspeaker 128 and/or microphone.
Memory interface 102 can be coupled with memory 150.The memory 150 may include that high random access is deposited
Reservoir and/or nonvolatile memory, such as one or more disk storage equipments, one or more optical storage apparatus, and/
Or flash memories (such as NAND, NOR).Memory 150 can store an operating system 152, for example, Android, IOS or
The operating system of Windows Phone etc.The operating system 152 may include for handling basic system services and execution
The instruction of task dependent on hardware.Memory 150 can also be stored using 154.These applications in operation, can be from memory
150 are loaded on processor 104, and run on the operating system run via processor 104, and utilize operating system
And the interface that bottom hardware provides realizes the various desired functions of user, such as instant messaging, web page browsing, pictures management.
Using can be independently of operating system offer, it is also possible to what operating system carried.
In above-mentioned application 154, one such application is automatic test device 200 according to the present invention.Fig. 2 shows
The structural block diagram of automatic test device 200 according to an embodiment of the invention.The automatic test device 200 may include
Request receiving module 210, script production module 220, script running module 230 and report generation module 240.
Request receiving module 210 is suitable for receiving the request of user, such as script production starting request, the script production of user
Ending request, test request etc., the request can at automatic test device 200 to user present graphic user interface into
Row input.Specifically, when accessing to automatic test device 200, user can usually be presented figure as shown in Figure 3
Shape user interface may include beginning and stop button, the beginning of Run Script and the stop button for making script, Yong Huke
Starting script production is requested to select the start button of production script, the conclusion button of selection production script is to request to terminate foot
This production, and the start button of selection Run Script is to request starting test etc..In addition, the beginning of production script, end are pressed
The beginning of button and Run Script, conclusion button may be also configured to corresponding physics shortcut key, such as be arranged in mobile whole
The volume key and closing key on end side side etc..
Wherein, request receiving module 210 receives the script production starting request of user, is connected with request receiving module 210
Script production module 220 create test script in response to the request, while receiving user on the touchscreen via mobile terminal
One action event of input, action event generates a test command in test script based on the received.
Script makes module 220 and repeats to receive to the action event that subsequent user inputs on the touchscreen, generates test life
It enables, until the script that request receiving module 220 receives user makes ending request.
At this point, according to embodiment of the present invention, request receiving module 210 can receive the test foot of user's input
This title, the graphic user interface as shown in Figure 4 which can be presented at automatic test device 200 to user carry out
Input.Then, the entitled file of test script that script production module 220 can be inputted the test script of production with user
, under the installation directory for storing into mobile terminal automatic test device 200.Wherein, the test script of storage can be txt
Formatted file.
The principle of test script production will be described in greater detail below.
After user inputs an action event on mobile terminal touch screen, mobile terminal, which can be generated correspondingly, to be embodied
The operation data of the action event, the operation data of generation include the type and parameter of action event.Then, script makes module
220 available mobile terminals receive the operation data generated after action event, and write-in includes behaviour in the test script of creation
Make the test command of event type and parameter.
Assuming that the mobile terminal for being populated with automatic test device 200 is Android operation system, grasped based on Android
Make system performance, the operation data after user's input action event can be recorded in such as/dev/input/ of system bottom
In event0~X.There is different hardware devices according to different mobile terminals, X can be different number, and usually 6.Example
Such as, the operation of mobile terminal touch screen and key can be embodied in event0 and event3.
After user starts script production, script production module 220 can be called in Android operation system shell instruction
Getevent order, to obtain corresponding event.Particularly, the operation thing of mobile terminal touch screen and key can be directed to
Part calls getevent-lt/dev/input/event0&;Getevent-lt/dev/input/event3& order, to obtain
Event0 and event3.
It should be noted that the type for the action event that user inputs on the touchscreen include but is not limited to click event,
Long-pressing event, slip event open application affairs and wait event.
The object for wherein clicking event, which can be divided into, to be clicked screen coordinate, clicks physical button, clicks text object.Example
Such as, when the click event object of user's input is to click screen coordinate, after script makes the calling getevent order of module 220
Received operation data is as shown in figure 5, wherein ABS_MT_POSITION_X and ABS_MT_POSITION_Y indicates respectively screen X
Axis and Y axis coordinate.Script production module 220 can therefrom extract the parameter of the action event: the coordinate points that user clicks
X, Y value, and be mapped as the test command in test script " click | coordinate | X-coordinate value | Y-coordinate value ".When user inputs
Click event object be click physical button when, define physical button include HOME, MENU, BACK, CAMERA, POWER (go out
Screen/bright screen), seven keys such as VOLUME_UP, VOLUME_DOWN, such as click the test commands of HOME key correspondence mappings and be
" click | key | HOME ".
The object of long-pressing event can be divided into: long-pressing screen coordinate and long-pressing text object.Specifically, for example, working as user
When the long-pressing event object of input is long-pressing screen coordinate, script makes module 220 and calls received behaviour after getevent order
Make data as shown in fig. 6, script production module 220 can therefrom extract the parameter of the action event: the coordinate of user's long-pressing
Point X, Y value and the time of long-pressing, and be mapped as the test command in test script " click | X-coordinate value | Y-coordinate
Value | length is temporally ".
When the event of user's input is slip event, script production module 220 can be mentioned from the operation data of acquisition
Take the parameter of the action event: starting point coordinate (x0,y0), click starting point when time t0, terminal point coordinate (x1,y1), decontrol terminal
Time t when coordinate1, and calculate time difference t (t=t1-t0), at this time slip event can be mapped as test command " sliding |
x0|y0|x1|y1|t”。
When the event of user's input is to open application affairs, the parameter of the available action event: the application of opening
Title is then mapped as test command " open | application | Apply Names ".
In addition, when the time interval that user inputs between two action events is more than predetermined time value (generally 1000
Millisecond), it is generally recognized that the event of user's input is waiting event, records the parameter of the action event: two action events of input
Between waiting time, be then mapped as test command " wait | waiting time ".
Assuming that after script production starting, operation that user successively carries out is " returning to main interface ", " entering dialing interface ",
" clicking input 10086 ", " breathe out and wait 10 seconds ", " hanging up ", " exiting dialing ", " returning to main interface ", automatic test dress
Set 200 can be such that according to the test script of aforesaid operations production
" click | key | HOME
Open | application | dialing
Click | coordinate | 200 | 1090
Click | coordinate | 550 | 1580
Click | coordinate | 550 | 1580
Click | coordinate | 540 | 1407
Click | coordinate | 877 | 1226
Click | coordinate | 550 | 1800
Wait | 10000
Click | coordinate | 550 | 1800
Click | key | BACK
Click | key | HOME ", wherein the test command of generation is arranged according to the input order of its corresponding action event
Column.
It should be noted that user can also on the as shown in Figure 3 graphic user interface for including modification script buttons,
Selection modifies to the test script of production, fully can precisely combine the quick of tool and artificial in this way,
Improve the efficiency of script edit.Simultaneously, it is thus evident that the test command in test script is expressed as the text with fixed format
Language, thus the difficulty that user understands and modifies test script is greatly reduced, it brings great advantage to the user.
After script makes, request receiving module 210 can receive the test request of user, and test request includes operation
The parameter of script, and the test script of specified operation.Test request equally can graphic user interface for example shown in Fig. 3 into
Row input, wherein after user selects the start button of Run Script, graphic user interface as shown in Figure 7 can be presented, mentioned
Show the test script of the specified operation of user's selection and the parameter of Run Script is set.
Then, the script running module 230 being connected with request receiving module 210 reads specified fortune in response to test request
Capable test script, and the test script is run according to the parameter of Run Script.
The parameter of Run Script may include operation total degree, and script running module 230 is suitable for repeating to transport by test script
Row, until number of run reaches operation total degree.The parameter of Run Script can also include operation total duration, script running module
230 are suitable for reruning test script, until number of run reaches operation total degree or runing time reaches operation total duration.
Specifically, when running test script, be suitable for originating in read test script one by one one of script running module 230
Test command executes the test command.Wherein, after 230 read test order of script running module, which is converted
To be executed after corresponding code commands, such as: test command " click | key | POWER " code commands can be converted into
" Uidevice.getInstance () .pressPower () ", and test command " click | coordinate | x | y " code can be converted into
It orders " Uidevice.getInstance () .click (x, y) ", and test command " long-pressing | x | y | t " code life can be converted into
It enables " Uidevice.getInstance () .swipe (x, y, x, y, t) ", and test command " sliding | x0 | y0 | x1 | y1 | t " it can be with
It is converted into code commands " Uidevice.getInstance () .swipe (x0, y0, x1, y1, t) ".
After test script end of run, test is can be generated in the report generation module 240 being connected with script running module 230
As a result, being checked for user, as shown in Figure 8.
Specifically, according to embodiment of the present invention, script running module 230 further includes image comparison module 231,
The parameter of Run Script further includes the label and image comparison similarity threshold for indicating whether to carry out image comparison.
Wherein, when making script, script makes one action event of the every reception of module 220, then intercepts user in touch screen
Screen picture after one action event of upper input;In Run Script, script running module 230 is every to execute a test life
It enables, then intercepts the screen picture after executing a test command.When the label instruction in the parameter of Run Script carries out image pair
Than when, image comparison module 231 can calculate execute test command after the screen picture that intercepts with test script production when it is corresponding
The similarity of the screen picture of interception then records image comparison result.If the similarity calculated reaches image comparison similarity
Threshold value, then image comparison result is to pass through, otherwise not pass through.
Report generation module 240 can be according at least one image comparison that image comparison module 231 records as a result, determining
Test result is to pass through or do not pass through.For example, when all image comparison results be by when, determine test result be pass through.
For the ease of the entire test process of user's accurate perception, according to embodiment of the present invention, report generation mould
Block 240 can generate operation and report after end of run, and operation report includes of the script name of operation, script operation
Begin with execution time, content and the image comparison of each test command in end time and script operation as a result, as shown in Figure 9.
Then report generation module 240 can also include the script name of operation according to the operation report generation test report, test report
Claim the number run with content for script, script, the duration of script operation, the number of picture comparison and above-mentioned test result,
Described in the number of picture comparison include the number that passes through of comparison and compare unacceptable number, as shown in Figure 10.
In conclusion automatic test device 200 according to the present invention be not necessarily to the end PC auxiliary, directly mobile terminal just
The test that can easily realize script production, operation, greatlys save PC device resource.Simultaneously script production, run it is easy to operate
Understandable, user is without spending biggish learning cost, without programming basis.Further, it is every also to record execution for the present apparatus 200
The relevant information of a test command, and carry out validation test using image comparison and mentioned as a result, reappearing problem for subsequent software developer
For effective information.
Figure 11 shows the flow chart of the automated testing method 300 of an exemplary embodiment according to the present invention, should
Method is suitable for executing in the mobile terminal with touch screen.
This method 300 starts from step S310, in step s310, receives the script production starting request of user.
In step s 320, in response to the request, test script is created, and in step S330, is connect via mobile terminal
Receive the action event that user inputs on the touchscreen.The type of action event at least may include click coordinate event, point
Key-press event is hit, long-pressing event, slip event, application affairs is opened and waits event.
Then in step S340, action event generates a test command in test script based on the received, specifically,
It first obtains mobile terminal and receives the operation data generated after the action event, operation data includes the type and ginseng of the action event
Number, then write-in includes the type of the action event and a test command of parameter in test script.
Step S330 and S340 are repeated to the action event that subsequent user inputs on the touchscreen, until in step S350
The script that judgement receives user makes ending request.The test command in test script wherein generated is according to its corresponding operation
The input order of event arranges, and is expressed as the text language with fixed format.
After script makes, in step S360, the test request of user is received, which includes Run Script
Parameter, and the test script of specified operation.
Then in step S370, in response to the test request, the test script of specified operation is read, and then in step
Test script is run according to the parameter of Run Script in S380.
Wherein the parameter of Run Script may include operation total degree, and step S380 may include: to rerun to test foot
This, until the number for running the test script reaches operation total degree;The parameter of Run Script can also include operation total duration,
Step S380 may include: the test script that reruns, until the number for running the test script reaches operation total degree or fortune
The time of the row test script reaches operation total duration.
Specifically, the step of running test script may include: the test command originated in read test script, hold
One test command of row then repeats above-mentioned the step of reading and executing to test command subsequent in test script.
According to embodiment of the present invention, the step of executing a test command further include: interception executes a survey
The step of screen picture after examination order, the action event inputted on the touchscreen via mobile terminal reception user, also wraps
Include: interception user inputs the screen picture after an action event on the touchscreen.Meanwhile the parameter of Run Script can also wrap
The label and image comparison similarity threshold for indicating whether to carry out image comparison are included, when the label indicates to carry out image comparison,
The step of executing a test command can also include: to calculate after interception executes the screen picture after a test command
The similarity of screen picture screen picture of corresponding interception when being made with test script;Record image comparison result, wherein if
The similarity of calculating reaches image comparison similarity threshold, then image comparison result is to pass through, otherwise not pass through.
After last end of run, in step S390, test result is generated.Specifically, the step of generating test result is wrapped
It includes: according at least one image comparison of record as a result, determining that test result is to pass through or do not pass through.
According to another implementation of the invention, method 300 can generate operation with comprising steps of after end of run
Report, operation report include respectively testing in the script name of operation, the starting and ending time of script operation and script operation
Execution time, content and the image comparison result of order.Step S390 may include: according to operation report generation test report,
The test report includes script name and content for script, the number of script operation, the duration of script operation, the picture comparison of operation
Number and test result, wherein the number of picture comparison includes the number that passes through of comparison and compares unacceptable number.
Above to step each in method in the specific descriptions for describing automatic test device 200 in conjunction with FIG. 1 to FIG. 9
Respective handling be described in detail, no longer duplicate contents are repeated here.
It should be appreciated that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, it is right above
In the description of exemplary embodiment of the present invention, each feature of the invention be grouped together into sometimes single embodiment, figure or
In person's descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. claimed hair
Bright requirement is than feature more features expressly recited in each claim.More precisely, as the following claims
As book reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows specific real
Thus the claims for applying mode are expressly incorporated in the specific embodiment, wherein each claim itself is used as this hair
Bright separate embodiments.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple
Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
The invention also includes: A6, method as described in a5, wherein the step of one test command of the execution further include:
Interception executes the screen picture after a test command.A7, the method as described in any one of A1-6, wherein described via movement
Terminal receives the step of action event that user inputs on the touchscreen further include: interception user inputs one on the touchscreen
Screen picture after a action event.A8, the method as described in A7, wherein the parameter of the Run Script further includes indicating whether
The label and image comparison similarity threshold for carrying out image comparison, when the label indicates to carry out image comparison, the execution
The step of one test command further include: after interception executes the screen picture after a test command, calculate the screen map
The similarity of the screen picture of corresponding interception when as being made with test script;Record image comparison result, wherein if the phase calculated
Reach described image comparison similarity threshold like degree, then image comparison result is to pass through, otherwise not pass through.A9, as described in A8
Method, wherein described the step of generating test result include: at least one image comparison according to record as a result, determining described in
Test result is to pass through or do not pass through.A10, the method as described in A9, further includes: after end of run, operation report is generated, it is described
Each test command in the starting and ending time that script name, script including operation are run and script operation is reported in operation
Execution time, content and image comparison result.A11, the method as described in A10, wherein the step of generation test report
Further include: according to the operation report generation test report, the test report include operation script name and content for script,
The number of script operation, the duration of script operation, the number of picture comparison and the test result, wherein the picture pair
The number of ratio includes the number that comparison passes through and the unacceptable number of comparison.A12, the method as described in any one of A1-11, institute
The type for stating action event includes at least click coordinate event, click keys event, long-pressing event, slip event, opens application
Event and waiting event.A13, the method as described in any one of A1-12, wherein the test command in the test script indicates
For the text language with fixed format.
Further include: B18, the device as described in B15 or 16, wherein the script running module is further adapted for reading the test
The test command originated in script;It is further adapted for executing one test command;It is further adapted for after in the test script
Continuous test command repeats above-mentioned the step of reading and executing.B19, the device as described in B18, wherein the script running module
It is further adapted for interception and executes the screen picture after a test command.B20, the device as described in any one of B14-19, wherein institute
State script production module be further adapted for intercept user input the screen picture after an action event on the touchscreen.B21, such as B20
The device, wherein the parameter of the Run Script further includes the label and image comparison for indicating whether to carry out image comparison
Similarity threshold, the script running module further include image comparison module, and described image contrast module is suitable for working as the label
When instruction carries out image comparison, suitable for calculating the screen picture after interception executes the screen picture after a test command
The similarity of the screen picture of corresponding interception when being made with test script;It is further adapted for recording image comparison result, wherein if calculating
Similarity reach described image comparison similarity threshold, then image comparison result is to pass through, otherwise not pass through.B22, such as
Device described in B21, wherein the report generation module is further adapted at least one image comparison according to record as a result, determining institute
Stating test result is to pass through or do not pass through.B23, the device as described in B22, the report generation module are further adapted for end of run
Afterwards, generate operation report, it is described operation report include operation script name, script operation the starting and ending time and
Execution time, content and the image comparison result of each test command in script operation.B24, the device as described in B23, the report
Accuse generation module be further adapted for according to the operation report generation test report, the test report include operation script name with
Content for script, the number of script operation, the duration of script operation, the number of picture comparison and the test result, wherein institute
The number for stating picture comparison includes comparing the number passed through and the unacceptable number of comparison.B25, as described in any one of B14-24
Device, the type of the action event include at least click coordinate event, click keys event, long-pressing event, slip event,
It opens application affairs and waits event.B26, the device as described in any one of B14-25, wherein the survey in the test script
Examination order is expressed as the text language with fixed format.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment
The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method
The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice
Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by
Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc.
Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must
Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from
It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that
Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit
Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this
Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this
Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.