CN106021101A - Method and device for testing mobile terminal - Google Patents

Method and device for testing mobile terminal Download PDF

Info

Publication number
CN106021101A
CN106021101A CN201610322264.8A CN201610322264A CN106021101A CN 106021101 A CN106021101 A CN 106021101A CN 201610322264 A CN201610322264 A CN 201610322264A CN 106021101 A CN106021101 A CN 106021101A
Authority
CN
China
Prior art keywords
test
test instruction
mark
instruction
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610322264.8A
Other languages
Chinese (zh)
Other versions
CN106021101B (en
Inventor
孙健
黄威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610322264.8A priority Critical patent/CN106021101B/en
Publication of CN106021101A publication Critical patent/CN106021101A/en
Application granted granted Critical
Publication of CN106021101B publication Critical patent/CN106021101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a device for testing a mobile terminal, and at least can solve the technical problem of a traditional test way that a test can be finished again necessarily through a complex operation once the traditional test way fails. The method comprises the following steps: receiving and installing a test package, wherein the test package comprises multiple pieces of operation type identification, operation logic for executing various types of operations and/ or multiple pieces of operation object identification and operation logic for positioning each operation object; through an ADB (Android Debug Bridge) command entry, receiving a test instruction, wherein the test instruction comprises operation type identification and/ or operation object identification; and according to the operation logic corresponding to the operation type identification and/ or operation object identification in the test package, carrying out a test.

Description

The method and device that mobile terminal is tested
Technical field
The present invention relates to network communication technology field, be specifically related to a kind of side that mobile terminal is tested Method and device.
Background technology
A large amount of along with mobile terminal popularize, and the testing requirement of mobile terminal increases the most day by day, it is often necessary to Multi-section mobile terminal is tested simultaneously, therefore, in order to improve efficiency, generally use automatic test Mode is tested.
In order to realize the automatic test effect of mobile terminal, the test mode of current main flow is: first, PC end utilize increase income automated test frame structure test needed for APK (Android Package, Android installation kit) file, then, after above-mentioned APK file packing, it is sent to mobile terminal, by moving Dynamic terminal performs automatic test according to this APK file.Specifically, predefine in APK file Complete testing process, therefore, mobile terminal can be automatically according to survey after receiving and install this APK file In examination flow process, the order of regulation realizes complete test process.
But, above-mentioned test mode at least has following defects that owing to predefining in APK file complete Testing process, this testing process comprises complete test code, this code must link up execution and not Detachable, therefore, certain step the most therein occurs in that mistake, and tester must at PC end again It is sent to mobile terminal, mobile terminal after revising APK file and amended APK file being beaten again bag After receiving amended APK file, test will be re-executed according to the testing process in file.Thus Visible, in aforesaid way, on the one hand, to repack and transmit whole APK file and will certainly expend greatly The time of amount;On the other hand, it is assumed that testing process comprises 10 testing procedures, though the only the 9th step Occur in that mistake, it is also necessary to the institute before re-executing is in steps.In a word, existing test mode is once The operation being subjected to complexity after makeing mistakes could complete test again.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or at least partly Ground solves the method and device testing mobile terminal of the problems referred to above.
According to one aspect of the present invention, it is provided that a kind of method that mobile terminal is tested, including: Receive and install test installation kit;Wherein, described test installation kit includes: multiple action types identify The operation logic operated with execution all kinds, and/or, multiple operated object mark and each operation of location The operation logic of object;Test instruction is received by ADB order entrance;Wherein, in described test instruction Comprise action type mark and/or operated object mark;According in described test installation kit with described operation class The operation logic that type identifies and/or operated object mark is corresponding is tested.
Alternatively, the quantity of described test instruction is a plurality of, and a plurality of test instruction depends on according to reception order Secondary execution.
Alternatively, when the test result that test instruction is corresponding is mistake, the method farther includes: logical Cross ADB order entrance and receive amended test instruction, and instruct again according to described amended test Test.
Alternatively, when the test result that test instruction is corresponding is correct, the method farther includes: will The command content of described test instruction correspondence is saved in default test file, wherein, and described test literary composition Part is for preserving command content corresponding to each bar test instruction again to perform according to reception order.
Alternatively, described action type includes: double-clicks type, click type, sliding type, length by class Type and for the action type of analog hardware button, wherein, described hardware button include following in one Individual or multiple: return key, Menu key, volume key and power key, and described operated object mark is for operating Object coordinate range on screen, and/or the ID value that described operated object mark is operation object;
Further, operation logic of each operation object of described location includes: right by the described operation that prestores As coordinate ratio on a user interface carries out the operation logic that positions;And/or, the behaviour prestored by identification Make the operation logic that the characteristic of object carries out positioning.
According to another aspect of the present invention, it is provided that a kind of device that mobile terminal is tested, including: Module is installed, is suitable to receive and test installation kit is installed;Wherein, described test installation kit includes: many Individual action type mark and the operation logic of execution all kinds operation, and/or, multiple operated object mark Operation logic with each operation object of location;Receiver module, is suitable to be received by ADB order entrance survey Examination instruction;Wherein, described test instruction comprises action type mark and/or operated object mark;Test Module, is suitable to identify and/or operated object mark pair with described action type according in described test installation kit The operation logic answered is tested.
Alternatively, the quantity of described test instruction is a plurality of, and a plurality of test instruction depends on according to reception order Secondary execution.
Alternatively, this device farther includes: die trial block of resurveying, and is suitable to the test in test instruction correspondence When result is mistake, receive amended test instruction by ADB order entrance, and according to described amendment After test instruction re-start test.
Alternatively, this device farther includes: memory module, is suitable to the test test instruction is corresponding and ties When fruit is correct, command content corresponding for described test instruction is saved in default test file, its In, described test file for preserving command content corresponding to each bar test instruction according to reception order so that Again perform.
Alternatively, described action type includes: double-clicks type, click type, sliding type, length by class Type and for the action type of analog hardware button, wherein, described hardware button include following in one Individual or multiple: return key, Menu key, volume key and power key, and described operated object mark is for operating Object coordinate range on screen, and/or the ID value that described operated object mark is operation object;
Further, operation logic of each operation object of described location includes: right by the described operation that prestores As coordinate ratio on a user interface carries out the operation logic that positions;And/or, the behaviour prestored by identification Make the operation logic that the characteristic of object carries out positioning.
In the method and device that mobile terminal is tested that the present invention provides, by traditional APK literary composition Part replaces with the test installation kit in the present invention, and, in test installation kit, the most directly definition is a series of The coherent testing process performing and can not be split, but define perform needed for test process various individually Operation logic, such as, define multiple action type mark and perform all kinds operation operation patrol Volume, and/or, multiple operated object mark and the operation logic of each operation object of location.On this basis, ADB test instruction according to receiving completes each operation logic, to realize complete test process.By This is visible, in the present invention, is separated with concrete operating procedure by operation logic, therefore, when a certain step When mistake occurs, it is not necessary to amendment test installation kit, only need to again receive and perform the ADB that this step is corresponding Test instructs, and can accomplish that single step makes mistakes the effect of single-step debug, thus enormously simplify debugging process.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the skill of the present invention Art means, and can being practiced according to the content of description, and in order to allow, the present invention's is above and other Objects, features and advantages can become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit for this Field those of ordinary skill will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, And it is not considered as limitation of the present invention.And in whole accompanying drawing, be denoted by the same reference numerals Identical parts.In the accompanying drawings:
Fig. 1 shows the flow process of the method testing mobile terminal that one embodiment of the invention provides Figure;
Fig. 2 shows the method testing mobile terminal that another specific embodiment of the present invention provides Flow chart;
Fig. 3 shows the structure of the device testing mobile terminal that one embodiment of the invention provides Figure.
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 shows The exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and not Should be limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to more thoroughly Understand the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Embodiments provide a kind of method and device that mobile terminal is tested, at least can Solve after traditional test mode is once made mistakes, to be subjected to complicated operation and could again complete the skill of test Art problem.
Fig. 1 shows the flow process of the method testing mobile terminal that one embodiment of the invention provides Figure.As it is shown in figure 1, the method specifically includes following steps:
Step S110: receive and install test installation kit;Wherein, described test installation kit includes: many Individual action type mark and the operation logic of execution all kinds operation, and/or, multiple operated object mark Operation logic with each operation object of location.
Such as, action type includes: double-click type, click type, sliding type, long by type and For the action type etc. of analog hardware button, wherein, described hardware button include following in one or Multiple: return key, Menu key, volume key and power key etc..Perform the operation logic of all kinds operation Generally realized by software code or interface function, for being automatically performed the operating process of respective type.Behaviour It is usually concrete control as object, can be represented by the coordinate of control or title, certainly, except control Outward, operation object can also is that button or input frame etc..The operation logic of positioning action object the most also leads to Cross software code or interface function realizes, for determining the particular location of this operation object on screen.
Step S120: receive test instruction by ADB order entrance;Wherein, in described test instruction Comprise action type mark and/or operated object mark.
Wherein, test instruction may also be referred to as ADB order, and every ADB order is used for indicating moves eventually End is concrete performs, including type and/or the mark of operation for which kind of operation.For example, it is possible to control A is performed Single-click operation etc..
Step S130: according to corresponding with action type mark and/or operated object mark in test installation kit Operation logic is tested.
Such as, when needs carry out single-click operation to control A, need to obtain from test installation kit to perform Operation logic corresponding to single-click operation and the operation logic of orient control A, and test accordingly.
As can be seen here, in the present invention, operation logic is separated with concrete operating procedure, therefore, when A certain when walking out of existing mistake, it is not necessary to amendment test installation kit, only need to again receive and perform this step corresponding ADB test instruct, can accomplish that single step makes mistakes the effect of single-step debug, thus enormously simplify tune Examination process.
Fig. 2 shows the stream of the method testing mobile terminal that another embodiment of the present invention provides Cheng Tu.The present embodiment can realize based on multiple automated test frame, for example, it is possible to based on Uiautomator and/or Robotium test frame and Monkey Runner test frame etc., this Concrete test environment is not limited by invention.It addition, in the present embodiment as a example by based on Android platform Illustrate, but it will be appreciated to those of skill in the art that the scheme in the embodiment of the present invention can also It is flexibly applied in the mobile terminal of other various platforms.As in figure 2 it is shown, the method specifically includes following Step:
Step S210: generate test installation kit at PC end, and this test installation kit is sent to mobile whole End.
Wherein, test installation kit can be realized by APK form, it is also possible to real by other various forms Existing.Testing defined in installation kit the various operation logics needed for test.Such as, multiple action types Mark and perform all kinds operation operation logic, and/or, multiple operated object mark and location each The operation logic of operation object.Wherein, operation logic can pass through software code, function interface, hardware All kinds of mode such as chip realizes.
Step S220: mobile terminal receives and install above-mentioned test installation kit.
Wherein, mobile terminal can receive above-mentioned test installation kit in several ways, for example, it is possible to After being connected with PC by data wire, test installation kit is copied on the hard disk of mobile terminal.Or, it is possible to Test installation kit is transferred to mobile terminal by the various wireless transmission method such as wifi, bluetooth.Or, This test installation kit can also be transmitted by ADB order entrance.The present invention is to concrete transmission means not Limit.
Various behaviour by installing above-mentioned test installation kit, needed for the test that made mobile terminal locally stored Make logic, including multiple action types mark and the operation logic of execution all kinds operation, and/or, many Individual operated object mark and the operation logic etc. of each operation object of location.
Step S230: generate test instruction at PC end, and by ADB order entrance, test instruction is sent out Give mobile terminal.
Specifically, generation test instruction command content depend on this step corresponding specifically test content. Test instruction can be realized by the ADB order of following form: " adb shell am broadcast a ADB_INTENT e OPER [value1] e WIDGET [value2] ... " wherein, pass through value1 Transmit action type mark (as clicked on, sliding, grow and press), by the tool of value2 transmission operation Body parameter, the attribute such as the type of the control object such as clicked on, text, index.For example, it is assumed that this reality The method in example of executing needs click on " set " button at mobile terminal side and arrange in input frame eject Click on " brightness regulation " button and be adjusted.Correspondingly, in order to realize above-mentioned steps, at least need Generate two test instructions.Article 1, test instruction is for realizing clicking on the operating procedure of " set " button, In this test instructs, comprise the action type corresponding to single-click operation identify (by above-mentioned value1 table Show), in order to indicate this operation to be the operation clicking type;It addition, also comprise in this test instructs Operated object mark (is represented by above-mentioned value2), i.e. the button ID of " set " button or button Titles etc., in order to indicate this object operated to be " set " button.Article 2 test instruction is for real Now click on the operating procedure of " brightness regulation " button, comprise corresponding to single-click operation in this test instructs Action type mark, in order to indicate this operation to be to click the operation of type;It addition, refer in this test Order also comprises button ID or the button name etc. of operated object mark, i.e. " brightness regulation " button, uses To indicate this object operated for " brightness regulation " button.When implementing, two above-mentioned tests Instruction can be sent simultaneously to mobile terminal, and comprises execution sequence number in the test instruction of each bar, so that Mobile terminal determines the execution sequence of each bar test instruction according to execution sequence number;Can also be suitable according to performing Two above-mentioned test instructions are successively sent to mobile terminal by sequence, for example, it is possible to Article 1 test by the time Instruction retransmits Article 2 test instruction after being finished and returning the test result being successfully tested.
When implementing, the quantity of test instruction is not limited to two, can be more a plurality of test instruction. It addition, the action type that comprises is also not necessarily limited to single-click operation in test instruction, it is also possible to be double-click, slide, Long the various possible operations such as press, moreover, it is also possible to be the operation for analog hardware button, wherein, Hardware button include following in one or more: return key, Menu key, Home key, volume key and electricity Source key.The operation object comprised in test instruction is it is also possible that other button, input frame etc..It addition, Test instruction can also only comprise action type or only comprise operation object, when test instruction only comprises behaviour When making type, such as, can be to judge whether the current state of mobile terminal networks, whether can produce flow Deng;When test instruction only comprises operation object, a predetermined kind can only be performed for this operation object The operation of type, such as, when some button only carries out single-click operation, when not supporting the operations such as double-click, permissible Action type mark is omitted in test instruction.
Step S240: mobile terminal receive above-mentioned test instruction after, according to test installation kit in operation Type identification and/or operation logic corresponding to operated object mark are tested.
Specifically, the test in order to enable mobile terminal automatically to capture from PC end instructs and automatically locates Reason, can be provided for capturing catching of the test instruction from PC end in test installation kit mentioned above Obtaining module, and the processing module processing the test instruction captured, each module can be by presetting Function realize, it would however also be possible to employ other various software/hardware modes realize.
In the present embodiment, above-mentioned trapping module can be realized by following function code section:
This function be equivalent to one be able to receive that, the radio receiver of filter message, can by this function Realize the purpose of the test instruction of capture PC end automatically.
It addition, above-mentioned processing module can be realized by following function code section:
public void oper(String oper,Intentintent){
IOperationoper;
if(oper.equals(“click”)){
Oper=new Clicker (intent);
}else if(oper.equals(“drag”)){
……
Can the information such as the action type that comprises in the test instruction that captures of automatic decision by above-mentioned function And perform corresponding process.Such as, when test instruction comprises the parameter that value is " click ", show Its action type is for clicking on;When test instruction comprises the parameter that value is " drag ", show that it operates class Type is for pulling.
Specifically, in upper example, for the Article 1 test instruction for realizing click " set " button, Firstly, it is necessary to according to clicking the action type identifier lookup of type operations and obtaining list from test installation kit Hitting the operation logic corresponding to the operation of type, this operation logic can be realized by predetermined function, should Function can perform to click the operation of type automatically.Then, need from test installation kit according to " setting " The button identifier lookup of button also obtains the operation logic positioning this button, and this operation logic can also pass through Predetermined function realizes, and this function can make cursor positioning arrive at the button of correspondence automatically.Specifically, exist In the present embodiment, can position button according to button coordinate on screen, which realizes letter Single convenient;Furthermore it is also possible to according to the attribute of button or feature button be identified and position, the party Formula is not changed by screen resolution to be affected, and applicable scene is more flexible.Introduce above-mentioned separately below Two kinds location modes:
In the first implementation, entered by the operation object coordinate ratio on a user interface prestored Row location.For example, it is assumed that set up coordinate system with the lower left corner of user interface for zero, and set The coordinate in the upper right corner of whole user interface is (1,1), correspondingly, and each position in user interface Can be indicated by corresponding coordinate ratio, such as, coordinate points is that the position of (1/3,2/3) is in The position on the upper side, left side of whole user interface.Operation object can be utilized in whole use by this kind of mode Coordinate ratio residing in interface, family determines the position of operation object, specifically sits with traditional simple passing through It is higher that scale value determines that the mode of position compares accuracy, and not changed by screen resolution is affected, and fixed Bit rate is fast.Such as, even if the screen resolution size of terminal unit there occurs change, user circle is caused The size in face changes, but, the relativeness between a certain operation object and whole user interface is Fix, therefore, still can navigate to this operation object exactly.
In the second implementation, the characteristic operating object prestored by identification is positioned. Wherein, the characteristic of the operation object prestored operates object accordingly for uniquely identifying, and specifically wraps Include: the exterior contour data of operation object and/or color data etc..Such as, as a example by " set " button For, corresponding characteristic includes the shape of this button, size, color, text and font etc..Always It, the characteristic of the operation object by prestoring can uniquely identify and positional operand on a user interface Make object.When implementing, can realize in conjunction with related algorithms such as image recognitions.Can by this kind of mode Search with the resemblance according to operation object and determine the position of operation object, leading to merely with traditional Cross concrete coordinate figure compare in the mode determining position be likewise supplied with not by screen resolution change affected excellent Gesture.And, when the layout change of user interface (after product renewing), though the position of operation object Put and there occurs change, still can precise positioning operation object by which.
Wherein, above-mentioned step S230 and step S240 can perform repeatedly, and the concrete number of times that performs depends on Bar number in the test instruction received.Such as, three surveys sequentially performed are needed when a test process When examination instruction could realize, above-mentioned step S230 and step S240 will perform three times, use respectively for each time In processing a corresponding test instruction.
Owing to test process is likely to occur mistake, need when an error occurs to debug, therefore, the party Method can further include following step S250.Wherein, step S250 is an optional step.
Step S250: when the test result that test instruction is corresponding is mistake, ordered by ADB further Make entrance receive amended test instruction, and re-start test according to amended test instruction.
Test result is that the concrete condition of mistake includes multiple, for example, it may be possible to be the parameter in test instruction The a variety of causes such as the hardware not support on mistake, test environment errors or mobile terminal.Either because of why Plant reason and mistake occurs, be required for debugging at PC end, in order to test instruction is modified, and will Revised test instruction resends to mobile terminal, in order to mobile terminal re-executes corresponding test Process.
Specifically, when above-mentioned step S230 and step S240 perform repeatedly, this step is likely to meeting Perform repeatedly, whenever having a test instruction to make mistakes in step S240, all can trigger step S250. By step S240 can realize single step make mistakes, the purpose of single-step debug.Such as, when whole test process When comprising 10 test instructions, if the corresponding result of the 9th article of test instruction is mistake, the most only need again Receiving amended 9th article of test instruction and perform, front 8 tests being the most successfully tested refer to Order need not retest, and it is possible to be greatly reduced the workload of debugging link, improves testing efficiency.Separately Outward, in the present embodiment, owing to test installation kit only comprising the operation logic being separated from each other, specifically grasp Making step to be represented by follow-up test instruction, therefore, test installation kit only need to transmit and install once, i.e. Make follow-up to occur in that mistake, also need not regenerate and install test installation kit, thereby further simplify Operating process.
Further, since test process may need to be performed a plurality of times, such as, when this test process is successfully held After row, the possible later stage causes needing again to test due to reasons such as updating mobile terminals.Therefore, for Facilitating the later stage to repeat completed test process, the method can further include following step Rapid S260.Wherein, step S260 is also an optional step.
Step S260: when the test result that test instruction is corresponding is correct, by finger corresponding for test instruction Content is made to be saved in default test file.
When implementing, this step can be realized by following two ways.In first kind of way, often When one test instruction by step S240 successful execution, just trigger step S260, in order to by this The command content of test instruction correspondence is saved in test file.In the second way, when passing through step S240, by after all of test instruction successful execution, just triggers step S260, in order to by all tests The command content of instruction correspondence is saved in test file.
Wherein, above-mentioned test file in preserving the instruction that the test instruction of each bar is corresponding according to reception order Hold again to perform.Such as, when test instruction is for ADB order, corresponding command content is this The action type comprised in order and operation object, the concrete form of command content depends on concrete test Environment, as long as the form of test can be triggered automatically.As can be seen here, permissible by step S260 Instruction to being successfully tested preserves, in order to the later stage repeats, therefore, the most for needs For the application scenarios of secondary test, can significantly simplify by the way of in the present embodiment the later stage test time Workload, improves testing efficiency.
Fig. 3 shows the knot of the device testing mobile terminal that another embodiment of the present invention provides Composition.As it is shown on figure 3, this device includes: install module 31, receiver module 32 and test module 33.
Module 31 is installed be suitable to receive and test installation kit is installed.Wherein, described test installation kit includes: Multiple action types mark and the operation logic of execution all kinds operation, and/or, multiple operation object marks Know and position the operation logic of each operation object.
Receiver module 32 is suitable to receive test instruction by ADB order entrance.Wherein, described test refers to Order comprises action type mark and/or operated object mark.
Test module 33 is suitable to identify with described action type and/or operation according in described test installation kit The operation logic that object identity is corresponding is tested.
Wherein, when the quantity of test instruction is a plurality of, a plurality of test instruction is held successively according to reception order OK.Alternatively, this device farther includes: die trial block 34 of resurveying, and is suitable to the survey in test instruction correspondence When test result is mistake, receives amended test instruction by ADB order entrance, and repair according to described Test instruction after changing re-starts test.
Alternatively, this device farther includes: memory module 35, is suitable to the test in test instruction correspondence When result is correct, command content corresponding for described test instruction is saved in default test file, Wherein, described test file for according to reception order preserve command content corresponding to each bar test instruction with The most again perform.
Wherein, aforesaid operations type includes: double-clicks type, click type, sliding type, length by type And for the action type of analog hardware button, wherein, described hardware button include following in one Or multiple: return key, Menu key, volume key and power key;Further, described operated object mark is behaviour Make object coordinate range on screen, and/or the ID value that described operated object mark is operation object.
Further, operation logic of each operation object of described location includes: right by the described operation that prestores As coordinate ratio on a user interface carries out the operation logic that positions;And/or, the behaviour prestored by identification Make the operation logic that the characteristic of object carries out positioning.
The concrete structure of above-mentioned modules and operation principle can refer to retouching of corresponding steps in embodiment of the method Stating, here is omitted.
In sum, in the method and device that mobile terminal is tested that the present invention provides, will pass The APK file of system replaces with the test installation kit in the present invention, and, the most direct in test installation kit Define a series of coherent execution and the testing process that can not be split, but needed for defining execution test process Various single operation logic, such as, define multiple action type mark and perform all kinds behaviour The operation logic made, and/or, multiple operated object mark and the operation logic of each operation object of location. On this basis, each operation logic is completed, with realized according to the ADB test instruction received Test process.As can be seen here, in the present invention, operation logic is separated with concrete operating procedure, because of This, when a certain walk out of existing mistake time, it is not necessary to amendment test installation kit, only need to again receive and perform this step Rapid corresponding ADB test instructs, and can accomplish that single step makes mistakes the effect of single-step debug, thus significantly simple Change debugging process.
Algorithm and display be not solid with any certain computer, virtual system or miscellaneous equipment provided herein Have relevant.Various general-purpose systems can also be used together with based on teaching in this.As described above, Construct the structure required by this kind of system to be apparent from.Additionally, the present invention is also not for any specific Programming language.It is understood that, it is possible to use various programming languages realize the content of invention described herein, And the description done language-specific above is the preferred forms in order to disclose the present invention.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that this Inventive embodiment can be put into practice in the case of not having these details.In some instances, not It is shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand in each inventive aspect one Or multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes It is grouped together in single embodiment, figure or descriptions thereof.But, should be by the disclosure Method be construed to reflect an intention that i.e. the present invention for required protection require ratio in each claim The middle more feature of feature be expressly recited.More precisely, as the following claims reflect As, 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 right Requirement itself is all as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment certainly Change adaptively and they are arranged in one or more equipment different from this embodiment.Permissible Module in embodiment or unit or assembly are combined into a module or unit or assembly, and in addition may be used To put them into multiple submodule or subelement or sub-component.Except such feature and/or process or Outside at least some in unit excludes each other, can use any combination that (this specification is included companion With claim, summary and accompanying drawing) disclosed in all features and so disclosed any method or All processes of person's equipment or unit are combined.Unless expressly stated otherwise, this specification (includes companion With claim, summary and accompanying drawing) disclosed in each feature can by provide identical, equivalent or phase Replace like the alternative features of purpose.
Although additionally, it will be appreciated by those of skill in the art that embodiments more in this include that other is real Execute some feature included in example rather than further feature, but the combination of the feature of different embodiment is anticipated Taste and is within the scope of the present invention and is formed different embodiments.Such as, want in following right Ask in book, one of arbitrarily can mode using in any combination of embodiment required for protection.
The all parts embodiment of the present invention can realize with hardware, or to process at one or more The software module run on device realizes, or realizes with combinations thereof.Those skilled in the art should Understand, microprocessor or digital signal processor (DSP) can be used in practice to realize according to this The some or all functions of the some or all parts in the device of inventive embodiments.The present invention also may be used To be embodied as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can be deposited Store up on a computer-readable medium, or can be to have the form of one or more signal.Such letter Number can download from internet website and to obtain, or provide on carrier signal, or with any other Form provides.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and And those skilled in the art can design replacement enforcement without departing from the scope of the appended claims Example.In the claims, any reference marks that should not will be located between bracket is configured to claim Restriction.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.Be positioned at element it Front word "a" or "an" does not excludes the presence of multiple such element.The present invention can be by means of including The hardware of some different elements and realizing by means of properly programmed computer.Listing some dresses In the unit claim put, several in these devices can be to be come specifically by same hardware branch Embody.Word first, second and third use do not indicate that any order.Can be by these words It is construed to title.

Claims (10)

1. method mobile terminal tested, including:
Receive and install test installation kit;Wherein, described test installation kit includes: multiple action types Mark and perform all kinds operation operation logic, and/or, multiple operated object mark and location each The operation logic of operation object;
Test instruction is received by ADB order entrance;Wherein, described test instruction comprises action type Mark and/or operated object mark;
According to behaviour corresponding with described action type mark and/or operated object mark in described test installation kit Test as logic.
Method the most according to claim 1, wherein, the quantity of described test instruction is a plurality of, and A plurality of test instruction performs successively according to reception order.
Method the most according to claim 1 and 2, wherein, when the test result that test instruction is corresponding During for mistake, the method farther includes:
Receive amended test instruction by ADB order entrance, and refer to according to described amended test Order re-starts test.
4. according to the arbitrary described method of claim 1-3, wherein, when the test knot that test instruction is corresponding When fruit is correct, the method farther includes:
Command content corresponding for described test instruction is saved in default test file, wherein, described Test file is for preserving command content corresponding to each bar test instruction again to hold according to reception order OK.
5., according to the arbitrary described method of claim 1-4, wherein, described action type includes: double-click Type, click type, sliding type, long by type and for the action type of analog hardware button, Wherein, described hardware button include following in one or more: return key, Menu key, volume key and Power key, and described operated object mark is operation object coordinate range on screen, and/or described behaviour The ID value of operation object it is designated as object;
Further, operation logic of each operation object of described location includes: right by the described operation that prestores As coordinate ratio on a user interface carries out the operation logic that positions;And/or, the behaviour prestored by identification Make the operation logic that the characteristic of object carries out positioning.
6. device mobile terminal tested, including:
Module is installed, is suitable to receive and test installation kit is installed;Wherein, described test installation kit includes: Multiple action types mark and the operation logic of execution all kinds operation, and/or, multiple operation object marks Know and position the operation logic of each operation object;
Receiver module, is suitable to receive test instruction by ADB order entrance;Wherein, described test instruction In comprise action type mark and/or operated object mark;
Test module, it is right to be suitable to according to identifying with described action type in described test installation kit and/or operating The operation logic corresponding as mark is tested.
Device the most according to claim 6, wherein, the quantity of described test instruction is a plurality of, and A plurality of test instruction performs successively according to reception order.
8. according to the device described in claim 6 or 7, wherein, this device farther includes: examination of resurveying Module, is suitable to, when the test result that test instruction is corresponding is mistake, be received by ADB order entrance and repair Test instruction after changing, and re-start test according to described amended test instruction.
9., according to the arbitrary described device of claim 6-8, wherein, this device farther includes: storage Module, is suitable to when the test result that test instruction is corresponding is correct, by finger corresponding for described test instruction Making content be saved in default test file, wherein, described test file is for protecting according to reception order Deposit command content corresponding to each bar test instruction again to perform.
10., according to the arbitrary described device of claim 6-9, wherein, described action type includes: double-click Type, click type, sliding type, long by type and for the action type of analog hardware button, Wherein, described hardware button include following in one or more: return key, Menu key, volume key and Power key, and described operated object mark is operation object coordinate range on screen, and/or described behaviour The ID value of operation object it is designated as object;
Further, operation logic of each operation object of described location includes: right by the described operation that prestores As coordinate ratio on a user interface carries out the operation logic that positions;And/or, the behaviour prestored by identification Make the operation logic that the characteristic of object carries out positioning.
CN201610322264.8A 2016-05-16 2016-05-16 The method and device that mobile terminal is tested Active CN106021101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610322264.8A CN106021101B (en) 2016-05-16 2016-05-16 The method and device that mobile terminal is tested

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610322264.8A CN106021101B (en) 2016-05-16 2016-05-16 The method and device that mobile terminal is tested

Publications (2)

Publication Number Publication Date
CN106021101A true CN106021101A (en) 2016-10-12
CN106021101B CN106021101B (en) 2019-05-28

Family

ID=57097001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610322264.8A Active CN106021101B (en) 2016-05-16 2016-05-16 The method and device that mobile terminal is tested

Country Status (1)

Country Link
CN (1) CN106021101B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649128A (en) * 2016-12-30 2017-05-10 上海二三四五网络科技有限公司 Method for automatically controlling running of terminal
CN106648697A (en) * 2016-12-30 2017-05-10 上海二三四五网络科技有限公司 Method for illuminating terminal and method for automatically controlling terminal
CN108614755A (en) * 2016-12-09 2018-10-02 北京京存技术有限公司 The test system of NANDflash storage devices
CN109062579A (en) * 2018-06-21 2018-12-21 上海二三四五网络科技有限公司 A kind of control method and control device of fast discharging application program
CN110377476A (en) * 2019-07-05 2019-10-25 无锡睿勤科技有限公司 Terminal test method, terminal and readable storage medium storing program for executing
CN111049912A (en) * 2019-12-17 2020-04-21 用友网络科技股份有限公司 Debugging method, test development device, and computer-readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103164300A (en) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 Mobile terminal touch screen automatic testing method and device
US20130305222A1 (en) * 2012-05-11 2013-11-14 Microsoft Corporation Development System
KR20140002815A (en) * 2012-06-24 2014-01-09 김현수 Automating gui test of android applications
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface
CN104407980A (en) * 2014-12-17 2015-03-11 用友软件股份有限公司 Mobile application automated testing device and method
CN104980552A (en) * 2015-06-18 2015-10-14 惠州Tcl移动通信有限公司 Method and system for realizing automatic test of Android mobile terminal
CN105487966A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Program testing method, device and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103164300A (en) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 Mobile terminal touch screen automatic testing method and device
US20130305222A1 (en) * 2012-05-11 2013-11-14 Microsoft Corporation Development System
KR20140002815A (en) * 2012-06-24 2014-01-09 김현수 Automating gui test of android applications
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface
CN105487966A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Program testing method, device and system
CN104407980A (en) * 2014-12-17 2015-03-11 用友软件股份有限公司 Mobile application automated testing device and method
CN104980552A (en) * 2015-06-18 2015-10-14 惠州Tcl移动通信有限公司 Method and system for realizing automatic test of Android mobile terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614755A (en) * 2016-12-09 2018-10-02 北京京存技术有限公司 The test system of NANDflash storage devices
CN106649128A (en) * 2016-12-30 2017-05-10 上海二三四五网络科技有限公司 Method for automatically controlling running of terminal
CN106648697A (en) * 2016-12-30 2017-05-10 上海二三四五网络科技有限公司 Method for illuminating terminal and method for automatically controlling terminal
CN106648697B (en) * 2016-12-30 2020-11-10 上海二三四五网络科技有限公司 Method for lighting terminal and method for automatically controlling terminal
CN109062579A (en) * 2018-06-21 2018-12-21 上海二三四五网络科技有限公司 A kind of control method and control device of fast discharging application program
CN110377476A (en) * 2019-07-05 2019-10-25 无锡睿勤科技有限公司 Terminal test method, terminal and readable storage medium storing program for executing
CN110377476B (en) * 2019-07-05 2023-07-28 无锡睿勤科技有限公司 Terminal testing method, terminal and readable storage medium
CN111049912A (en) * 2019-12-17 2020-04-21 用友网络科技股份有限公司 Debugging method, test development device, and computer-readable storage medium

Also Published As

Publication number Publication date
CN106021101B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN106021101A (en) Method and device for testing mobile terminal
CN106021102B (en) The generation method and device of automatic test file
CN103970659B (en) Android application software automation testing method based on pile pitching technology
WO2016196701A1 (en) Natural language engine for coding and debugging
CN104407973A (en) Automatic unit test realizing method and device
CN104063325A (en) Automatic generation device and method for test cases of embedded software
CN105094783A (en) Method and device for testing Android application stability
US10354031B2 (en) Information processing by interpenetrating signal transmission channel in design for testability of chip
CN105677561B (en) The multi-platform test method of mobile product and system
CN102375778A (en) Method and system for automatically testing digital signal processor (DSP)
CN104461625A (en) Hot patch realization method and system
CN110046088A (en) A kind of interface test method, device and equipment
CN102567565B (en) Cable parameter processing method and system utilizing same
CN104268083A (en) Software automatic testing method and device
CN104536874A (en) Client collapse locating method and device
CN103914379A (en) Automatic fault injection and fault detecting method and system
CN105760300B (en) A kind of automated testing method and test macro of STK/UTK business
Spichkova et al. Towards a human-centred approach in modelling and testing of cyber-physical systems
CN104199770A (en) Automated mobile phone music APK testing method
CN107220258A (en) For method, device and the terminal of the data for capturing five application page
CN104536880A (en) GUI program testing case augmentation method based on symbolic execution
CN110413515A (en) A kind of bios code walks checking method, system and code walkthrough tool automatically
CN106302011A (en) Method of testings based on multiterminal and terminal
US20150370689A1 (en) Automated defect positioning based on historical data
CN106776265A (en) Test case update method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220726

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right