Summary of the invention
To this end, the present invention provides a kind of automated testing method, device and mobile terminal, to try hard to solve or at least alleviate at least one problem existed above.
According to an aspect of the invention, it is provided a kind of automated testing method, being suitable to perform in the mobile terminal have touch screen, the method includes: the script receiving user makes startup request;In response to this request, create test script;The Action Events that user inputs on the touchscreen is received via mobile terminal;A test command in test script is generated according to the Action Events received;The Action Events inputted subsequent user on the touchscreen repeats the step of above-mentioned reception, generation, until the script receiving user makes ending request;Receiving the test request of user, test request includes the parameter of Run Script, and specifies the test script of operation;In response to this request, read and specify the test script run;Parameter according to Run Script runs this test script;And after end of run, generate test result.
Alternatively, according in the automated testing method of the present invention, wherein generating the step of a test command in test script according to the Action Events received to include: obtain the operation data produced after mobile terminal receives Action Events, operation data include type and the parameter of this Action Events;In test script, write includes the type of Action Events and a test command of parameter.
Alternatively, according in the automated testing method of the present invention, wherein the parameter of Run Script includes running total degree, includes according to the step of the parameter testing results script of Run Script: rerun test script, until the number of times running this test script reaches to run total degree.
Alternatively, according in the automated testing method of the present invention, wherein the parameter of Run Script also includes running total duration, the step of the parameter testing results script according to Run Script includes: rerun test script, until the number of times running this test script reaches to run total degree or runs time of this test script and reach to run total duration.
Alternatively, according in the automated testing method of the present invention, wherein the step of testing results script includes: a test command initial in read test script;Perform this test command;Test command follow-up in test script is repeated the step of above-mentioned reading and execution.
Alternatively, according in the automated testing method of the present invention, the step wherein performing a test command also includes: intercept the screen picture after performing a test command.
Alternatively, according in the automated testing method of the present invention, the step of the Action Events wherein inputted on the touchscreen via mobile terminal reception user also includes: intercept the screen picture after user inputs an Action Events on the touchscreen.
Alternatively, according in the automated testing method of the present invention, wherein the parameter of Run Script also includes labelling and the image comparison similarity threshold indicating whether to carry out image comparison, when labelling instruction carries out image comparison, the step performing a test command also includes: after intercepting the screen picture after performing a test command, calculate the similarity of the screen picture of corresponding intercepting when this screen picture makes with test script;Record image comparison result, wherein, if the similarity calculated reaches image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.
Alternatively, according in the automated testing method of the present invention, the step wherein generating test result includes: according to record at least one image comparison result, determine test result be by or do not pass through.
Alternatively, according in the automated testing method of the present invention, also include: after end of run, generating run report, run the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation that report includes running.
Alternatively, according in the automated testing method of the present invention, the step wherein generating test report also includes: according to running report generation test report, test report includes duration, the number of times of picture contrast and the test result that the script name run and content for script, the number of times of script operation, script run, and wherein the number of times of picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast.
Alternatively, according in the automated testing method of the present invention, the type of Action Events at least include click coordinate event, click keys event, long by event, slip event, open application affairs and wait event.
Alternatively, according in the automated testing method of the present invention, wherein the test command in test script is expressed as the text language with set form.
According to a further aspect in the invention, it is provided that a kind of automatic test device, residing in the mobile terminal with touch screen, this device includes: request receiver module, is suitable to receive the script making startup request of user and script makes stopping and asking;Being further adapted for receiving the test request of user, test request includes the parameter of Run Script, and specifies the test script of operation;Script makes module, is adapted for script and makes startup request, creates test script;It is further adapted for receiving, via mobile terminal, the Action Events that user inputs on the touchscreen;It is further adapted for generating a test command in test script according to the Action Events received;The Action Events being further adapted for inputting subsequent user on the touchscreen repeats the step of above-mentioned reception, generation, until the script that request receiver module receives user makes ending request;Script runs module, is adapted for test request, reads and specifies the test script run;It is further adapted for the parameter testing results script according to Run Script;And report generation module, after being suitable to end of run, generate test result.
Alternatively, according in the automatic test device of the present invention, wherein script makes the operation data produced after module is further adapted for obtaining mobile terminal reception Action Events, and operation data include type and the parameter of this Action Events;It is further adapted in test script write and includes the type of Action Events and a test command of parameter.
Alternatively, according in the automatic test device of the present invention, wherein the parameter of Run Script includes running total degree, and script runs module and is further adapted for the test script that reruns, until the number of times running this test script reaches to run total degree.
Alternatively, according in the automatic test device of the present invention, wherein the parameter of Run Script also includes running total duration, script runs module and is further adapted for the test script that reruns, until the number of times running this test script reaches to run total degree or runs time of this test script and reach to run total duration.
Alternatively, according in the automatic test device of the present invention, wherein script runs module and is further adapted in read test script an initial test command;It is further adapted for performing this test command;It is further adapted for test command follow-up in test script is repeated the step of above-mentioned reading and execution.
Alternatively, according in the automatic test device of the present invention, wherein script runs module and is further adapted for the screen picture after intercepting one test command of execution.
Alternatively, according in the automatic test device of the present invention, wherein script makes module and is further adapted for the screen picture after intercepting user inputs an Action Events on the touchscreen.
Alternatively, according in the automatic test device of the present invention, wherein the parameter of Run Script also includes labelling and the image comparison similarity threshold indicating whether to carry out image comparison, script runs module and also includes image comparison module, image comparison module is suitable to when labelling instruction carries out image comparison, be suitable to, after intercepting the screen picture after performing a test command, calculate the similarity of the screen picture of corresponding intercepting when this screen picture makes with test script;Being further adapted for recording image comparison result, wherein, if the similarity calculated reaches image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.
Alternatively, according in the automatic test device of the present invention, wherein report generation module is further adapted at least one image comparison result according to record, determine test result be by or do not pass through.
Alternatively, according in the automatic test device of the present invention, after report generation module is further adapted for end of run, generating run report, runs the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation that report includes running.
Alternatively, according in the automatic test device of the present invention, report generation module is further adapted for according to running report generation test report, test report includes duration, the number of times of picture contrast and the test result that the script name run and content for script, the number of times of script operation, script run, and wherein the number of times of picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast.
Alternatively, according in the automatic test device of the present invention, the type of Action Events at least include click coordinate event, click keys event, long by event, slip event, open application affairs and wait event.
Alternatively, according in the automatic test device of the present invention, wherein the test command in test script is expressed as the text language with set form.
An also aspect according to the present invention, it is provided that a kind of mobile terminal, has the automatic test device according to the present invention.
Automatic test scheme according to the present invention, carries out automatic test by the way of making, Run Script on mobile terminals, completely disengages from PC end, release PC end resource, it also avoid the problems such as card when PC end makes script pauses.Meanwhile, more convenient to operate simply save the time cost of test, improve testing efficiency and Consumer's Experience.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 is mobile terminal 100 organigram according to an embodiment of the invention.With reference to Fig. 1, mobile terminal 100 includes: memory interface 102, one or more data processor, image processor and/or CPU 104, and peripheral interface 106.Memory interface 102, one or more processor 104 and/or peripheral interface 106 both can be discrete components, it is also possible to be integrated in one or more integrated circuit.In the mobile terminal 100, various elements can be coupled by one or more communication bus or holding wire.Sensor, equipment and subsystem are alternatively coupled to peripheral interface 106, in order to help to realize several functions.Such as, motion sensor 110, optical sensor 112 and range sensor 114 are alternatively coupled to peripheral interface 106, facilitating orientation, illuminate and the function such as range finding.Other sensors 116 are equally connected with peripheral interface 106, such as alignment system (such as GPS), temperature sensor, biometric sensor or other sensor devices, thus can help to implement relevant function.
Camera sub-system 120 and optical pickocff 122 may be used for the realization of the camera function of convenient such as recording photograph and video clipping, and wherein said camera sub-system and optical pickocff can be such as charge-coupled image sensor (CCD) or complementary metal oxide semiconductors (CMOS) (CMOS) optical pickocff.Can help to realize communication function by one or more radio communication subsystem 124, wherein radio communication subsystem can include radio-frequency transmitter and transmitter and/or light (the most infrared) Receiver And Transmitter.The particular design of radio communication subsystem 124 and embodiment can depend on one or more communication networks that mobile terminal 100 is supported.Such as, mobile terminal 100 can include being designed to support GSM network, GPRS network, EDGE network, Wi-Fi or the communication subsystem 124 of WiMax network and BlueboothTM network.Audio subsystem 126 can be coupled with speaker 128 and mike 130, in order to helps the function implementing to enable voice, such as speech recognition, speech reproduction, digital record and telephony feature.
I/O subsystem 140 can include touch screen controller 142 and/or other input controllers 144 one or more.Touch screen controller 142 is alternatively coupled to touch screen 146.For example, any one of the multiple touch-sensing technology that can use this touch screen 146 and touch screen controller 142 detects the contact and movement or time-out carried out therewith, and wherein detection technology is including, but not limited to capacitive character, resistive, infrared and surface acoustic wave technique.Other input controllers 144 one or more are alternatively coupled to other input/control devicess 148, the pointer device of the most one or more buttons, rocker switch, thumb wheel, infrared port, USB port and/or instruction pen etc.The one or more button (not shown) can include for controlling speaker 128 and/or the up/down button of mike 130 volume.
Memory interface 102 can be coupled with memorizer 150.This memorizer 150 can include high-speed random access memory and/or nonvolatile memory, the most one or more disk storage equipment, one or more optical storage apparatus, and/or flash memories (such as NAND, NOR).Memorizer 150 can store the operating system of operating system 152, such as Android, IOS or WindowsPhone etc.This operating system 152 can include for processing basic system services and execution depends on the instruction of task of hardware.Memorizer 150 can also store application 154.These apply when operation, can be loaded into processor 104 from memorizer 150, and run on the operating system run by processor 104, and the interface utilizing operating system and bottom hardware to provide realizes the desired function of various user, such as instant messaging, web page browsing, pictures management etc..Application can be independently of what operating system provided, it is also possible to is that operating system carries.
In above-mentioned application 154, a kind of application therein is the automatic test device 200 according to the present invention.Fig. 2 shows the structured flowchart of automatic test device 200 according to an embodiment of the invention.This automatic test device 200 can include asking receiver module 210, script to make module 220, script runs module 230 and report generation module 240.
Request receiver module 210 is suitable to receive the request of user, and the script of such as user makes startup request, script makes ending request, test request etc., and the graphic user interface that this request can present to user at automatic test device 200 inputs.Specifically, when automatic test device 200 is conducted interviews, user generally can be presented graphic user interface as shown in Figure 3, its beginning and the stop button that can include making script, the beginning of Run Script and stop button, user can select the start button making script to start script making with request, selects the conclusion button making script to terminate script making with request, and selects the start button of Run Script to start test etc. with request.Additionally, make the beginning of script, conclusion button and the beginning of Run Script, conclusion button may be also configured to corresponding physics shortcut, such as, be arranged in volume key and the closing key etc. of mobile terminal side.
Wherein, request receiver module 210 receives the script of user and makes startup request, the script being connected with request receiver module 210 makes module 220 in response to this request, create test script, receive, via mobile terminal, the Action Events that user inputs on the touchscreen simultaneously, generate a test command in test script according to the Action Events received.
The Action Events that subsequent user is inputted by script making module 220 on the touchscreen repeats to receive, generate test command, until the script that request receiver module 220 receives user makes ending request.
Now, according to an embodiment of the invention, request receiver module 210 can receive the test script title of user's input, and the graphic user interface as shown in Figure 4 that this title can present to user at automatic test device 200 inputs.Then, script makes the entitled filename of test script that the test script made can be inputted by module 220 with user, stores to mobile terminal under the installation directory of automatic test device 200.Wherein, the test script of storage can be txt formatted file.
Principle that test script make below be will be described in greater detail.
After user inputs an Action Events on mobile terminal touch screen, mobile terminal can correspondingly produce the operation data that can embody this Action Events, and the operation data of generation include type and the parameter of Action Events.Then, script makes module 220 can obtain the operation data produced after mobile terminal receives Action Events, and in the test script created, write includes the test command of Action Events type and parameter.
Assume that the mobile terminal being populated with automatic test device 200 is Android operation system, based on Android operation system characteristic, the operation data after user's input operation event all can be recorded in system bottom such as/dev/input/event0~X in.Having different hardware devices according to different mobile terminals, X can be different numeral, usually 6.Such as, the operation of mobile terminal touch screen and button can be embodied in event0 and event3.
After user starts script making, script makes module 220 can call the getevent order in the instruction of Android operation system shell, to obtain corresponding event.Especially, getevent-lt/dev/input/event0& can be called for the Action Events of mobile terminal touch screen and button;Getevent-lt/dev/input/event3& order, to obtain event0 and event3.
It should be noted that, the type of Action Events that user inputs on the touchscreen include but not limited to click event, long by event, slip event, open application affairs and wait event.
The object wherein clicking on event can be divided into click screen coordinate, click on physical button, click text object.Such as, when the click event object of user's input is for clicking on screen coordinate, script makes the operation data received after module 220 calls getevent order as it is shown in figure 5, wherein ABS_MT_POSITION_X and ABS_MT_POSITION_Y indicates respectively screen X-axis and Y-axis coordinate.Script makes module 220 can therefrom extract the parameter of this Action Events: the X of coordinate points that user clicks on, Y value, and the test command " click on | coordinate | X-coordinate value | Y-coordinate value " being mapped as in test script.When the click event object of user's input is for clicking on physical button, definition physical button comprises HOME, MENU, BACK, CAMERA, POWER (go out screen/bright screen), seven buttons such as VOLUME_UP, VOLUME_DOWN, and the test command such as clicking on HOME key correspondence mappings is " clicking on | button | HOME ".
Length can be divided into by the object of event: long by screen coordinate and long by text object.Specifically, such as, when the length of user's input presses event object for growing by screen coordinate, script makes the operation data received after module 220 calls getevent order as shown in Figure 6, script makes module 220 can therefrom extract the parameter of this Action Events: the X of coordinate points, Y value and the long time pressed pressed with the head of a household, and the test command " click on | X-coordinate value | Y-coordinate value | long temporally " being mapped as in test script.
When the event of user's input is slip event, script makes module 220 can be from the parameter of operation this Action Events of extracting data obtained: starting point coordinate (x0,y0), click on starting point time time t0, terminal point coordinate (x1,y1), decontrol terminal point coordinate time time t1, and calculate time difference t (t=t1-t0), now slip event can be mapped as test command " slide | x0|y0|x1|y1|t”。
When the event of user's input is for opening application affairs, the parameter of this Action Events can be obtained: the Apply Names opened, be then mapped as test command and " open | application | Apply Names ".
In addition, when user inputs (generally 1000 milliseconds) when the time interval between two Action Events exceedes predetermined time value, it has been generally acknowledged that the event that user inputs is wait event, record the parameter of this Action Events: input the waiting time between two Action Events, be then mapped as test command " wait | waiting time ".
After assuming that script makes startup, the operation that user is carried out successively is " returning to main interface ", " entrance dialing interface ", " click on input 10086 ", " breathe out and wait 10 seconds ", " hanging up ", " exiting dialing ", " returning to main interface ", the test script that automatic test device 200 makes according to aforesaid operations can be such that
" click on | button | HOME
Open | application | dialing
Click on | coordinate | 200 | 1090
Click on | coordinate | 550 | 1580
Click on | coordinate | 550 | 1580
Click on | coordinate | 540 | 1407
Click on | coordinate | 877 | 1226
Click on | coordinate | 550 | 1800
Wait | 10000
Click on | coordinate | 550 | 1800
Click on | button | BACK
Click on | button | HOME ", wherein, the test command of generation arranges according to the input order of the Action Events of its correspondence.
It should be noted that, user can also be on the graphic user interface including amendment script buttons as shown in Figure 3, select the test script to making to modify, so can improve the efficiency of script edit fully by quick and artificial precisely the combining of instrument.Simultaneously, it is thus evident that the test command in test script is expressed as the text language with set form, thus greatly reduces user and understand and the difficulty of amendment test script, brings great advantage to the user.
Script makes after terminating, and request receiver module 210 can receive the test request of user, and test request includes the parameter of Run Script, and specifies the test script of operation.Test request equally inputs at the such as graphic user interface shown in Fig. 3, wherein, after user selects the start button of Run Script, can be presented graphic user interface as shown in Figure 7, prompting user selects specify the test script run and arrange the parameter of Run Script.
Then, the script being connected with request receiver module 210 runs module 230 and specifies the test script run in response to test request, reading, and run this test script according to the parameter of Run Script.
The parameter of Run Script can include running total degree, and script runs module 230 and is suitable to rerun test script, until number of run reaches to run total degree.The parameter of Run Script can also include running total duration, and script runs module 230 and is suitable to rerun test script, until number of run reaches to run total degree or the operation time reaches to run total duration.
Specifically, during testing results script, script runs module 230 and is suitable to a test command initial in read test script one by one, performs this test command.nullWherein,After script runs module 230 read test order,Perform after this test command is converted into corresponding code commands,Such as: test command " clicks on | button | POWER " can be converted into code commands " Uidevice.getInstance () .pressPower () ",Test command " click on | coordinate | x | y " code commands " Uidevice.getInstance () .click (x can be converted into,y)”,Test command " length presses | x | y | t " code commands " Uidevice.getInstance () .swipe (x can be converted into,y,x,y,t)”,Test command " slide | x0 | y0 | x1 | y1 | t " code commands " Uidevice.getInstance () .swipe (x0 can be converted into,y0,x1,y1,t)”.
After test script end of run, the report generation module 240 being connected with script operation module 230 can generate test result, checks for user, as shown in Figure 8.
Specifically, according to an embodiment of the invention, script runs module 230 and also includes image comparison module 231, and the parameter of Run Script also includes labelling and the image comparison similarity threshold indicating whether to carry out image comparison.
Wherein, when making script, script makes module 220 and often receives an Action Events, then intercept the screen picture after user inputs an Action Events on the touchscreen;When Run Script, script runs module 230 and often performs a test command, then intercept the screen picture after performing a test command.When the labelling instruction in the parameter of Run Script carries out image comparison, image comparison module 231 can calculate the similarity of the screen picture of corresponding intercepting, then record image comparison result when the screen picture intercepted after performing test command makes with test script.If the similarity calculated reaches image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.
Report generation module 240 can according to image comparison module 231 record at least one image comparison result, determine test result be by or do not pass through.Such as, when all image comparison results be by time, determine that test result is for passing through.
For the ease of the whole test process of user's accurate perception, according to an embodiment of the invention, report generation module 240 can be after end of run, generating run is reported, this operation report includes the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation run, as shown in Figure 9.Then report generation module 240 can also be according to this operation report generation test report, test report includes number of times, the duration of script operation, the number of times of picture contrast and the above-mentioned test result that the script name run and content for script, script run, the number of times of wherein said picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast, as shown in Figure 10.
In sum, according to the automatic test device 200 of the present invention without the auxiliary of PC end, directly just can easily realize, at mobile terminal, the test that script makes, runs, be greatly saved PC device resource.Script makes, runs simple to operate understandable simultaneously, and user is without spending bigger learning cost, without programming basis.Further, this device 200 also records the relevant information performing each test command, and uses image comparison to carry out validation test result, and reappearing problem for subsequent software developer provides effective information.
Figure 11 shows the flow chart of the automated testing method 300 according to one exemplary embodiment of the present invention, and the method is suitable to perform in the mobile terminal have touch screen.
The method 300 starts from step S310, and in step S310, the script receiving user makes startup request.
In step s 320, in response to this request, create test script, and in step S330, receive, via mobile terminal, the Action Events that user inputs on the touchscreen.The type of Action Events at least can include click coordinate event, click keys event, long by event, slip event, open application affairs and wait event.
Then in step S340, a test command in test script is generated according to the Action Events received, specifically, first obtain the operation data produced after mobile terminal receives this Action Events, operation data include type and the parameter of this Action Events, and then in test script, write includes the type of this Action Events and a test command of parameter.
The Action Events inputted subsequent user on the touchscreen repeats step S330 and S340, until judging that in step S350 the script receiving user makes ending request.Test command in the test script wherein generated arranges according to the input order of the Action Events of its correspondence, and is expressed as the text language with set form.
Script makes after terminating, and in step S360, receives the test request of user, and this test request includes the parameter of Run Script, and specifies the test script of operation.
Then in step S370, in response to this test request, read and specify the test script run, and then parameter testing results script according to Run Script in step S380.
Wherein the parameter of Run Script can include running total degree, and step S380 may include that the test script that reruns, until the number of times running this test script reaches to run total degree;The parameter of Run Script can also include running total duration, and step S380 may include that the test script that reruns, until the number of times running this test script reaches to run total degree or runs time of this test script and reach to run total duration.
Specifically, the step of testing results script may include that a test command initial in read test script, performs a test command, test command follow-up in test script then repeats the step of above-mentioned reading and execution.
According to an embodiment of the invention, the step performing a test command also includes: intercept the screen picture after performing a test command, and the step receiving the Action Events that user inputs on the touchscreen via mobile terminal also includes: intercept the screen picture after user inputs an Action Events on the touchscreen.Simultaneously, the parameter of Run Script can also include labelling and the image comparison similarity threshold indicating whether to carry out image comparison, when the instruction of this labelling carries out image comparison, the step performing a test command can also include: after intercepting the screen picture after performing a test command, calculates the similarity of the screen picture of corresponding intercepting when this screen picture makes with test script;Record image comparison result, wherein, if the similarity calculated reaches image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.
After last end of run, in step S390, generate test result.Specifically, generate test result step include: according to record at least one image comparison result, determine test result be by or do not pass through.
According to another implementation of the invention, method 300 can also include step: after end of run, generating run report, runs the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation that report includes running.Step S390 may include that according to running report generation test report, this test report includes duration, the number of times of picture contrast and the test result that the script name run and content for script, the number of times of script operation, script run, and wherein the number of times of picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast.
Above in the specific descriptions combining Fig. 1~Fig. 9 and describing automatic test device 200 to method in the respective handling of each step be described in detail, the most no longer duplicate contents is repeated.
It is to be understood that, one or more in order to simplify that the disclosure helping understands in each inventive aspect, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should not being construed to reflect an intention that, i.e. the present invention for required protection requires than the feature more features being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself is as the independent embodiment of the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or assembly can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned in one or more equipment different from the equipment in this example.Module in aforementioned exemplary can be combined as a module or be segmented into multiple submodule in addition.
Those skilled in the art are appreciated that and can adaptively change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.In addition at least some in such feature and/or process or unit excludes each other, can use any combination that all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or all processes of equipment or unit are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing identical, equivalent or similar purpose.
Present invention additionally comprises: A6, method as described in A5, the step of wherein said one test command of execution also includes: intercept the screen picture after performing a test command.A7, method as according to any one of A1-6, the wherein said step receiving the Action Events that user inputs on the touchscreen via mobile terminal also includes: intercept the screen picture after user inputs an Action Events on the touchscreen.A8, method as described in A7, the parameter of wherein said Run Script also includes labelling and the image comparison similarity threshold indicating whether to carry out image comparison, when the instruction of described labelling carries out image comparison, the step of described one test command of execution also includes: after intercepting the screen picture after performing a test command, calculate the similarity of the screen picture of corresponding intercepting when this screen picture makes with test script;Record image comparison result, wherein, if the similarity calculated reaches described image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.A9, method as described in A8, the step of wherein said generation test result includes: according at least one image comparison result of record, determine described test result for by or do not pass through.A10, method as described in A9, also include: after end of run, generating run report, described operation reports the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation including running.A11, method as described in A10, the step of wherein said generation test report also includes: according to described operation report generation test report, described test report includes duration, the number of times of picture contrast and the described test result that the script name run and content for script, the number of times of script operation, script run, and the number of times of wherein said picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast.A12, method as according to any one of A1-11, the type of described Action Events at least include click coordinate event, click keys event, long by event, slip event, open application affairs and wait event.A13, method as according to any one of A1-12, the test command in wherein said test script is expressed as the text language with set form.
Also including: B18, device as described in B15 or 16, wherein said script runs module and is further adapted for reading a test command initial in described test script;It is further adapted for performing one test command;It is further adapted for test command follow-up in described test script is repeated the step of above-mentioned reading and execution.B19, device as described in B18, wherein said script runs module and is further adapted for intercepting the screen picture after performing a test command.B20, device as according to any one of B14-19, wherein said script makes module and is further adapted for intercepting the screen picture after user inputs an Action Events on the touchscreen.B21, device as described in B20, the parameter of wherein said Run Script also includes labelling and the image comparison similarity threshold indicating whether to carry out image comparison, described script runs module and also includes image comparison module, described image comparison module is suitable to when the instruction of described labelling carries out image comparison, be suitable to, after intercepting the screen picture after performing a test command, calculate the similarity of the screen picture of corresponding intercepting when this screen picture makes with test script;Being further adapted for recording image comparison result, wherein, if the similarity calculated reaches described image comparison similarity threshold, then image comparison result is for passing through, otherwise for not pass through.B22, device as described in B21, wherein said report generation module is further adapted at least one image comparison result according to record, determine described test result for by or do not pass through.B23, device as described in B22, after described report generation module is further adapted for end of run, generating run report, described operation reports the execution time of each test command, content and image comparison result in script name, the starting and ending time of script operation and the script operation including running.B24, device as described in B23, described report generation module is further adapted for according to described operation report generation test report, described test report includes duration, the number of times of picture contrast and the described test result that the script name run and content for script, the number of times of script operation, script run, and the number of times of wherein said picture contrast includes the number of times that the number of times that contrast is passed through does not passes through with contrast.B25, device as according to any one of B14-24, the type of described Action Events at least include click coordinate event, click keys event, long by event, slip event, open application affairs and wait event.B26, device as according to any one of B14-25, the test command in wherein said test script is expressed as the text language with set form.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and formed different embodiments.Such as, in the following claims, one of arbitrarily can mode the using in any combination of embodiment required for protection.
Additionally, some in described embodiment be described as at this can by the processor of computer system or by perform described function other device implement method or the combination of method element.Therefore, the processor with the necessary instruction for implementing described method or method element is formed for implementing the method or the device of method element.Additionally, the element described herein of device embodiment is the example of following device: this device is for implementing by the function performed by the element of the purpose in order to implement this invention.
As used in this, unless specifically stated so, use ordinal number " first ", " second ", " the 3rd " etc. to describe plain objects and be merely representative of the different instances relating to similar object, and be not intended to imply the object being so described must have the time upper, spatially, sequence aspect or in any other manner to definite sequence.
Although the embodiment according to limited quantity describes the present invention, but benefits from above description, those skilled in the art will appreciate that, in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that the language used in this specification primarily to the readable and purpose of teaching and select rather than select to explain or limit subject of the present invention.Therefore, in the case of without departing from the scope of the appended claims and spirit, many modifications and changes will be apparent from for those skilled in the art.For the scope of the present invention, the disclosure being the present invention is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.