Summary of the invention
For this, the present invention provides the scheme of a kind of card detection, to try hard to solve or at least alleviate Problems existing above.
According to an aspect of the present invention, it is provided that an a kind of method for card detection, being suitable to perform in computing equipment, computing equipment is suitable to be connected with as the mobile terminal being devices under and carry out the card of mobile terminal performance and pauses detection, and the method comprises the steps. First, testing results script, this test script is suitable to perform multiple event-action in running; Obtain the first event-action and can perform time point and second event action can perform time point; Obtaining event-action and perform time difference, it is that second event action can perform time point and deducts the first event-action and can perform time point that event-action performs time difference; Judge that whether event-action performs time difference more than first threshold; If event-action performs time difference more than first threshold, then judge that card occurs, perform card and process.
Alternatively, pausing in detection method according to the card of the present invention, multiple event-action include at least one in the incoming event action being devices under, click event action, acquisition event control action and slip event action.
Alternatively, pausing in detection method according to the card of the present invention, execution card processes and includes preserving at least one in system journal, standby system information, preservation test run daily record and screenshotss.
Alternatively, pausing in detection method according to the card of the present invention, before testing results script, also including the operation cycle-index that test script is set.
Alternatively, pausing in detection method according to the card of the present invention, first event-action is the first click event action, second event action is the second click event-action, it is the time point that the first click event action can click the first object that first event-action can perform time point, and it is the time point that the second click event-action can click the second object that second event action can perform time point.
Alternatively, pausing in detection method according to the card of the present invention, the step of testing results script includes: obtain currently running number of times, and testing results foot is originally; After test script has run, currently running number of times is added and preserves in the lump.
According to a further aspect of the invention, it is provided that an a kind of card detecting device, being suitable to reside in computing equipment, computing equipment is suitable to be connected with as the mobile terminal being devices under and carry out the card of mobile terminal performance and pauses detection. This device includes test script module, the first acquisition module, the second acquisition module, judge module and Ka Dun processing module. Wherein, test script module is suitable to storage test script, and test script is suitable to perform multiple event-action in running; First acquisition module is suitable to obtain the first event-action can perform time point and second event action can perform time point; Second acquisition module is suitable to obtain event-action and performs time difference, and it is that second event action can perform time point and deducts the first event-action and can perform time point that event-action performs time difference; Judge module is suitable to judge that whether event-action performs time difference more than first threshold; Card processing module is suitable to, when event-action performs time difference more than first threshold, perform card and process.
Alternatively, pausing in detecting device according to the card of the present invention, multiple event-action include at least one in the incoming event action being devices under, click event action, acquisition event control action and slip event action.
Alternatively, pausing in detecting device according to the card of the present invention, execution card processes and includes preserving at least one in system journal, standby system information, preservation test run daily record and screenshotss.
Alternatively, pausing in detecting device according to the card of the present invention, also including arranging module, be suitable to arrange the operation cycle-index of described test script.
Alternatively, pausing in detecting device according to the card of the present invention, first event-action is the first click event action, second event action is the second click event-action, it is the time point that the first click event action can click the first object that first event-action can perform time point, and it is the time point that the second click event-action can click the second object that second event action can perform time point.
Alternatively, pausing in detecting device according to the card of the present invention, test script module is further adapted for: obtain currently running number of times, and testing results foot is originally; After test script has run, currently running number of times is added and preserves in the lump.
According to a further aspect of the invention, also provide for a kind of computing equipment, pause detecting device including according to the card of the present invention.
The technical scheme of card the detection according to the present invention, first testing results script, and the first event in running that obtains can perform time point and second event can perform time point, obtain second event action to perform time point and deduct the first event-action can to perform the difference that time point obtains be that event-action performs time difference, if this time difference is more than first threshold, then judge card occurs and performs card processing. In technique scheme, test process calculates event-action automatically and performs time difference, real-time automatic decision card pauses, once Caton phenomenon occurs, preserve system journal, standby system information by performing card process, preserve test run daily record and screenshotss etc., it is easy to maintenance and the reparation of auxiliary down-stream, saves the resource input of monitoring instrument, it is to avoid the waste of human resources.
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 do 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 the block diagram of Example Computing Device 100. In basic configuration 102, computing equipment 100 typically comprises system storage 106 and one or more processor 104. Memory bus 108 may be used for the communication between processor 104 and system storage 106.
Depend on desired configuration, processor 104 can be any kind of process, includes but not limited to: microprocessor ((μ P), microcontroller (μ C), digital information processor (DSP) or their any combination. Processor 104 can include the such as high-speed cache of one or more rank of on-chip cache 110 and second level cache 112 etc, processor core 114 and depositor 116. The processor core 114 of example can include arithmetic and logical unit (ALU), floating-point unit (FPU), digital signal processing core (DSP core) or their any combination. The Memory Controller 118 of example can use together with processor 104, or in some implementations, Memory Controller 118 can be an interior section of processor 104.
Depending on desired configuration, system storage 106 can be any type of memorizer, includes but not limited to: volatile memory (such as RAM), nonvolatile memory (such as ROM, flash memory etc.) or their any combination. System storage 106 can include operating system 120, one or more application 122 and routine data 124. In some embodiments, application 122 may be arranged to utilize routine data 124 to be operated on an operating system.
Computing equipment 100 can also include contributing to the interface bus 140 communicated from various interface equipments (such as, outut device 142, Peripheral Interface 144 and communication equipment 146) to basic configuration 102 via bus/interface controller 130. The outut device 142 of example includes Graphics Processing Unit 148 and audio treatment unit 150. They can be configured to contribute to communicating via the various external equipments of one or more A/V port 152 with such as display or speaker etc. Example Peripheral Interface 144 can include serial interface controller 154 and parallel interface controller 156, they can be configured to contribute to via one or more I/O port 158 and such as input equipment (such as, keyboard, mouse, pen, voice-input device, touch input device) or the external equipment of other peripheral hardwares (such as printer, scanner etc.) etc communicate. The communication equipment 146 of example can include network controller 160, and it can be arranged to is easy to via one or more COM1 164 and one or more other computing equipment 162 communications by network communication link.
Network communication link can be an example of communication media. Communication media generally can be presented as the computer-readable instruction in the modulated data signal of such as carrier wave or other transmission mechanisms etc, data structure, program module, and can include any information delivery media. " modulated data signal " can such signal, the change of one or more or it in its data set can encode the mode of information in the signal and carry out. As nonrestrictive example, communication media can include the wire medium of such as cable network or private line network etc, and such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless medium are at interior various wireless mediums. Term computer-readable medium used herein can include both storage medium and communication media.
Computing equipment 100 can be implemented as a part for small size portable (or mobile) electronic equipment, and these electronic equipments can be such as cell phone, personal digital assistant (PDA), personal media player equipment, wireless network browsing apparatus, individual's helmet, application specific equipment or the mixing apparatus that can include any of the above function. Computing equipment 100 is also implemented as including the personal computer of desktop computer and notebook computer configuration. In certain embodiments, computing equipment 100 is configured to perform pause detection method according to the card of the present invention. Application 122 cards included according to the present invention pause detecting device 300.
Fig. 2 illustrates the flow chart of card detection method 200 according to an embodiment of the invention. Card detection method 200 is suitable to perform in computing equipment (such as the computing equipment 100 shown in Fig. 1).
Mobile terminal is smart mobile phone, panel computer etc. such as, the fluency of its operation can be tested before dispatching from the factory, such as send several SMS or MMS verifying its transmitting-receiving success rate and stability, continuously perform repeatedly calling, repeatedly file system be added or conflict test in deletion action, multitask multi-process situation and limit test, it is connected with tested mobile terminal by computing equipment, carries out performance card and pause detection.
At present, being most widely used of android system, all kinds of softwares based on android system exploitation are also too numerous to enumerate. For android system, technical scheme is described below. First, based on android system, design corresponding test case, based on Uiautomator test frame, write the test script for card detection by Auto instrument. By testing results script in computing equipment, test is the operation fluency of the mobile terminal that such as PC end is connected with computing equipment.
As in figure 2 it is shown, method 200 starts from step S210. Before step S210 starts, the operation cycle-index of test script is set. In step S210, first currently running number of times is obtained, and testing results script, this test script performs multiple event-action in running, and plurality of event-action includes at least one in the incoming event action being devices under, click event action, acquisition event control action and slip event action. Such as, test the operation adding contact person at telephone directory, automatically enter the title of the contact person to add, and click interpolation contact person's button, preserve contact person, the content checking in contact person's text box of sliding. After test script has run, currently running number of times is added and preserves in the lump.
Subsequently, in step S220, obtain the first event-action and can perform time point and second event action can perform time point. Wherein, first event-action is the first click event action, second event action is the second click event-action, it is the time point that the first click event action can click the first object that first event-action can perform time point, and it is the time point that the second click event-action can click the second object that second event action can perform time point. In the present embodiment, first object is " setting " icon, second object is " about mobile phone " option, first event-action is click the action of " setting " icon, second event action is the action clicking " about mobile phone " option, then the first event-action can perform time point for clicking the time point of " setting " icon, and second event action can perform time point for clicking the time point of " about mobile phone " option. Here, can clicking and represent once be devices under on interface occurring the object specified, namely showing to click, current time is this event-action can perform time point.
First event-action can perform time point and second event action can perform time point and utilize Auto class to obtain and record. Auto class is a UiautomatorAPI tool-class through secondary encapsulation, and wherein the method for each operation UI control obtains and record the current system moment. Auto class record can be clicked the current system moment of " setting " icon and can perform time point as the first event-action, and record can be clicked the current system moment of " about mobile phone " option and can perform time point as second event action. Key code is as follows:
In step S230, obtaining event-action and perform time difference, wherein event-action performs time difference is that second event action can perform time point and deducts the first event-action and can perform time point. In the present embodiment, event-action performs time difference is can click the time point of " about mobile phone " option to deduct the difference of the time point that can click " setting " icon. In step S220, the first previously recorded event-action can performing time point and second event action can perform time point and pass to LogTimeGetter class, LogTimeGetter class preserves above-mentioned time point and carries out the calculating of time difference. At LogTimeGetter apoplexy due to endogenous wind, first event-action can perform time point and the action of the second time can perform time point form and be represented by " yyyy-MM-ddHH:mm:ss.sss ", wherein yyyy represents the time, MM represents month, dd represents the date, HH representative hour, mm representative minute, ss represents the second, and sss represents millisecond. Event-action performs time difference form and is represented by " xx divides xx second xxx millisecond ". Then the first event-action can perform time point for " 2016-01-1610:12:33.127 ", second event action can perform time point for " 2016-01-1610:12:35.289 ", then event-action performs time difference is " 0 point and 2 seconds 162 milliseconds ", namely 2162 milliseconds.
Key code is as follows:
In step S240, it is judged that whether event-action performs time difference more than first threshold. In the present embodiment, it be can click the time point of " about mobile phone " option to deduct the difference of the time point that can click " settings " icon that event-action performs time difference, then setting needs setting in Case script of first threshold, and key code is as follows:
Wherein " 2*1000 " is the first threshold preset, namely 2000 milliseconds. And event-action execution time difference is 2162 milliseconds, more than first threshold 2000 milliseconds, therefore judge that event-action performs the time more than first threshold.
In step s 250, if event-action performs time difference more than first threshold, then judge that card occurs, perform card and process. Wherein, card processes and includes preserving at least one in system journal, standby system information, preservation test run daily record and screenshotss. In the present embodiment, when event-action performs the time more than first threshold, time namely more than 2000 milliseconds, then illustrate to occur in that Caton phenomenon, LogManager class extract the on-the-spot useful information of card, perform card and process.
Fig. 3 illustrates the schematic diagram of card detecting device 300 according to an embodiment of the invention. This device includes: test script module the 310, first acquisition module the 320, second acquisition module 330, judge module 340 and Ka Dun processing module 350. This device also includes arranging module (not shown), before being positioned at test script module 310. Module is set and is suitable to arrange the operation cycle-index of test script.
Test script module 310 is suitable to storage test script, obtain currently running number of times, and testing results script, wherein test script performs multiple event-action in running, and plurality of event-action includes at least one in the incoming event action being devices under, click event action, acquisition event control action and slip event action. Test script module 310 is suitable to after test script has run, and is added by currently running number of times and preserves in the lump.
First acquisition module 320 is suitable to obtain the first event-action can perform time point and second event action can perform time point. Wherein, first event-action is the first click event action, second event action is the second click event-action, it is the time point that the first click event action can click the first object that first event-action can perform time point, and it is the time point that the second click event-action can click the second object that second event action can perform time point. In the present embodiment, first object is " setting " icon, second object is " about mobile phone " option, first event-action is click the action of " setting " icon, second event action is the action clicking " about mobile phone " option, then the first event-action can perform time point for clicking the time point of " setting " icon, and second event action can perform time point for clicking the time point of " about mobile phone " option. Here, can clicking and represent once be devices under on interface occurring the object specified, namely showing to click, current time is this event-action can perform time point.
Second acquisition module 330 is suitable to obtain event-action and performs time difference, and wherein event-action performs time difference is that second event action can perform time point and deducts the first event-action and can perform time point. In the present embodiment, it is can click the time point of " about mobile phone " option to deduct the difference of the time point that can click " setting " icon that event-action performs time difference, and its value is 2162 milliseconds.
Judge module 340 is suitable to judge that whether event-action performs time difference more than first threshold. In the present embodiment, first threshold is 2000 milliseconds, then event-action performs time difference more than first threshold.
Card processing module 350 is suitable to work as event-action and performs time difference more than first threshold, then judge card occur, perform card and process. Wherein, card processes and includes preserving at least one in system journal, standby system information, preservation test run daily record and screenshotss. In the present embodiment, event-action performs the time more than first threshold, illustrates to occur in that Caton phenomenon, carries out card and processes.
About concrete steps and the embodiment of card detection, detailed disclosure in based on the description of Fig. 2, repeat no more herein.
Pause in detection method at existing card, often can only after a test disposal data time could embody result, inconvenience retains and reproduction Caton phenomenon, it is also possible to occurs that testing efficiency is low, causes too much problem of resource waste. Card according to embodiments of the present invention pauses detection technique scheme, first testing results script, and the first event in running that obtains can perform time point and second event can perform time point, obtain second event action to perform time point and deduct the first event-action can to perform the difference that time point obtains be that event-action performs time difference, if this time difference is more than first threshold, then judge card occurs and performs card processing. In technique scheme, test process calculates event-action automatically and performs time difference, real-time automatic decision card pauses, once Caton phenomenon occurs, preserve system journal, standby system information by performing card process, preserve test run daily record and screenshotss etc., it is easy to maintenance and the reparation of auxiliary down-stream, saves the resource input of monitoring instrument, it is to avoid the waste of human resources.
B10. the device as described in B7, also includes arranging module, is suitable to arrange the operation cycle-index of described test script.
B11. the device as described in B8, wherein said first event-action is the first click event action, second event action is the second click event-action, it is the time point that the first click event action can click the first object that first event-action can perform time point, and it is the time point that the second click event-action can click the second object that second event action can perform time point.
B12. the device as described in B10, described test script module is further adapted for:
Obtain currently running number of times, and run described test script;
After described test script has run, currently running number of times is added and preserves in the lump.
In description mentioned herein, describe a large amount of detail. It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details. In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify that the disclosure helping understands in each inventive aspect, herein 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 be construed to and reflect an intention that namely 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 in that 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, wherein each claim itself as the independent embodiment of the present invention.
The module of the equipment that those skilled in the art are to be understood that 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, it is possible to carry out the module in the equipment in embodiment adaptively changing and they being 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. Except at least some in such feature and/or process or unit excludes each other, it is possible to adopt any combination that all processes or the unit of all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment 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 purpose identical, equivalent or similar.
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 form different embodiments. Such as, in the following claims, the one of any of embodiment required for protection can mode use in any combination.
Additionally, some in described embodiment be described as at this can by the processor of computer system or the method implemented by other device performing described function 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 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 understand, 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 is primarily to purpose that is readable and that instruct and selects, rather than select to explain or limit the theme of the present invention. Therefore, when not necessarily 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, disclosing that the present invention is done is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.