CN106021101B - The method and device that mobile terminal is tested - Google Patents

The method and device that mobile terminal is tested Download PDF

Info

Publication number
CN106021101B
CN106021101B CN201610322264.8A CN201610322264A CN106021101B CN 106021101 B CN106021101 B CN 106021101B CN 201610322264 A CN201610322264 A CN 201610322264A CN 106021101 B CN106021101 B CN 106021101B
Authority
CN
China
Prior art keywords
test
instruction
action type
operation object
logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610322264.8A
Other languages
Chinese (zh)
Other versions
CN106021101A (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 the method and devices that a kind of pair of mobile terminal is tested, and are at least able to solve traditional test mode and are subjected to the technical issues of complicated operation could complete test again after error.This method comprises: receiving and installing test installation kit;It wherein, include: the operation logic of multiple action type marks and execution various types operation in the test installation kit, and/or, multiple operated object marks and the operation logic for positioning each operation object;Test instruction is received by ADB order entrance;Wherein, include action type mark and/or operated object mark in the test instruction;It is tested according to operation logic corresponding with action type mark and/or operated object mark in the test installation kit.

Description

The method and device that mobile terminal is tested
Technical field
The present invention relates to network communication technology fields, and in particular to the method and dress that a kind of pair of mobile terminal is tested It sets.
Background technique
A large amount of with mobile terminal popularize, and the testing requirement of mobile terminal also increasingly increases, it is often necessary to while to more Portion's mobile terminal is tested, and therefore, in order to improve efficiency, is generallyd use automatic test mode and is tested.
In order to realize the automatic test effect of mobile terminal, the test mode of mainstream is at present: firstly, utilizing at the end PC APK (Android Package, Android installation kit) file needed for the automated test frame construction test of open source then will Above-mentioned APK file is sent to mobile terminal after being packaged, and executes automatic test according to the APK file by mobile terminal.Specifically Ground predefines complete testing process in APK file, and therefore, mobile terminal receives and can oneself after installing the APK file It is dynamic according to sequentially realizing complete test process specified in testing process.
But above-mentioned test mode at least has following defects that due to predefining complete test stream in APK file Journey, comprising complete test code in the testing process, which, which must link up, execution and be can not be split, therefore, once wherein Some step there is mistake, tester must remodify APK file at the end PC and beat again modified APK file Mobile terminal is sent to after packet, after mobile terminal receives modified APK file, by according to the testing process in file again Execute test.It can be seen that in the above method, on the one hand, repacking and transmitting entire APK file will certainly expend largely Time;On the other hand, it is assumed that include 10 testing procedures in testing process, even if only mistake occurs in step 9, it is also necessary to All steps before re-executing.In short, existing test mode is subjected to complicated operation after error to be weighed It is new to complete test.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State the method and device of problem tested mobile terminal.
According to one aspect of the present invention, the method that a kind of pair of mobile terminal is tested is provided, comprising: receive and pacify Dress test installation kit;It wherein, include: multiple action type marks and the behaviour for executing various types operation in the test installation kit Make logic, and/or, multiple operated object marks and the operation logic for positioning each operation object;It is received by ADB order entrance Test instruction;Wherein, include action type mark and/or operated object mark in the test instruction;Pacified according to the test Operation logic corresponding with action type mark and/or operated object mark is tested in dress packet.
Optionally, the quantity of the test instruction is a plurality of, and a plurality of test instruction is successively executed according to reception sequence.
Optionally, when it is mistake that test, which instructs corresponding test result, this method further comprises: passing through ADB order Entrance receives modified test instruction, and re-starts test according to the modified test instruction.
Optionally, when it is correct that test, which instructs corresponding test result, this method further comprises: the test is referred to Corresponding command content is enabled to be saved in preset test file, wherein the test file is used to save according to reception sequence Each item test instructs corresponding command content to execute again.
Optionally, the action type includes: to double-click type, click type, sliding type, length by type and for mould The action type of quasi- hardware button, wherein the hardware button includes one of the following or multiple: return key, Menu key, sound Measure key and power key, and the operated object mark is operation object coordinate range on the screen and/or the operation object It is identified as the ID value of operation object;
Also, the operation logic of each operation object of the positioning includes: the operation object by prestoring in user The operation logic that coordinate ratio on interface is positioned;And/or the characteristic by identifying the operation object prestored carries out The operation logic of positioning.
Another aspect according to the present invention provides the device that a kind of pair of mobile terminal is tested, comprising: installation mould Block, suitable for receiving and installing test installation kit;It wherein, include: multiple action type marks and execution in the test installation kit The operation logic of various types operation, and/or, multiple operated object marks and the operation logic for positioning each operation object;It connects Module is received, is suitable for receiving test instruction by ADB order entrance;Wherein, in test instruction comprising action type mark and/ Or operated object mark;Test module, be suitable for according in the test installation kit with the action type mark and/or operation pair It is tested as identifying corresponding operation logic.
Optionally, the quantity of the test instruction is a plurality of, and a plurality of test instruction is successively executed according to reception sequence.
Optionally, which further comprises: weight test module, and being suitable for instructing corresponding test result in test is mistake When, modified test is received by ADB order entrance and is instructed, and survey is re-started according to the modified test instruction Examination.
Optionally, which further comprises: memory module, and it is correct for being suitable for instructing corresponding test result in test When, instruct corresponding command content to be saved in preset test file the test, wherein the test file is for pressing The corresponding command content of each item test instruction is saved according to reception sequence to execute again.
Optionally, the action type includes: to double-click type, click type, sliding type, length by type and for mould The action type of quasi- hardware button, wherein the hardware button includes one of the following or multiple: return key, Menu key, sound Measure key and power key, and the operated object mark is operation object coordinate range on the screen and/or the operation object It is identified as the ID value of operation object;
Also, the operation logic of each operation object of the positioning includes: the operation object by prestoring in user The operation logic that coordinate ratio on interface is positioned;And/or the characteristic by identifying the operation object prestored carries out The operation logic of positioning.
In the method and device provided by the invention tested mobile terminal, traditional APK file is replaced with Test installation kit in the present invention, also, test in installation kit and do not define a series of coherent execution directly and can not be split Testing process, but various individual operation logics needed for defining execution test process, for example, defining multiple operation classes Type mark and the operation logic for executing various types operation, and/or, multiple operated object marks and each operation object of positioning Operation logic.On this basis, each operation logic is completed according to the ADB test instruction received, to realize complete test Process.It can be seen that in the present invention, operation logic and specific operating procedure being separated, therefore, walk out of existing mistake when a certain When, it is not necessary to modify test installation kit, the corresponding ADB test instruction of the step need to be only received and executed again, can accomplish list The effect of wrong single-step debug is walked out of, thus enormously simplifies debugging process.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the flow chart of the method provided by one embodiment of the present invention tested mobile terminal;
Fig. 2 shows the processes for the method tested mobile terminal that another specific embodiment of the invention provides Figure;
Fig. 3 shows the structure chart of the device provided by one embodiment of the present invention tested mobile terminal.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
The embodiment of the invention provides the method and devices that a kind of pair of mobile terminal is tested, and are at least able to solve tradition Test mode the technical issues of complicated operation could complete test again is subjected to after error.
Fig. 1 shows the flow chart of the method provided by one embodiment of the present invention tested mobile terminal.Such as Fig. 1 It is shown, this method specifically includes the following steps:
Step S110: receiving and installs test installation kit;It wherein, include: multiple action types in the test installation kit Mark and the operation logic for executing various types operation, and/or, multiple operated object marks and the behaviour for positioning each operation object Make logic.
For example, action type includes: to double-click type, click type, sliding type, length by type and for analog hardware The action type etc. of button, wherein the hardware button includes one of the following or multiple: return key, Menu key, volume key With power key etc..The operation logic for executing various types operation usually passes through software code or interface function is realized, for automatic Complete the operating process of respective type.Operation object is usually specific control, can be indicated by the coordinate or title of control, Certainly, in addition to control, operation object can also be button or input frame etc..The operation logic of positioning operation object generally also by Software code or interface function are realized, for determining the specific location of the operation object on the screen.
Step S120: test instruction is received by ADB order entrance;It wherein, include action type in the test instruction Mark and/or operated object mark.
Wherein, test instruction may also be referred to as ADB order, and every ADB order is used to indicate what mobile terminal specifically executes Kind operation, type and/or mark including operation.For example, single-click operation etc. can be executed to control A.
Step S130: it is patrolled according to operation corresponding with action type mark and/or operated object mark in test installation kit It collects and is tested.
For example, needing to obtain execution single-click operation institute from test installation kit when needing to carry out single-click operation to control A The operation logic of corresponding operation logic and orient control A, and tested accordingly.
It can be seen that in the present invention, operation logic and specific operating procedure are separated, therefore, walked out of now when a certain When mistake, it is not necessary to modify test installation kit, the corresponding ADB test instruction of the step need to be only received and executed again, can be done To the effect of single step error single-step debug, thus enormously simplify debugging process.
Fig. 2 shows the flow charts for the method tested mobile terminal that another embodiment of the present invention provides.This Embodiment can be realized based on a variety of automated test frames, for example, can be surveyed based on Uiautomator and/or Robotium Frame and Monkey Runner test frame etc. are tried, the present invention tests environment without limitation to specific.In addition, in this reality It applies in example and is illustrated for based on Android platform, but it will be appreciated to those of skill in the art that in the embodiment of the present invention Scheme can also be flexibly applied in the mobile terminal of other various platforms.As shown in Fig. 2, this method specifically includes following step It is rapid:
Step S210: test installation kit is generated at the end PC, and the test installation kit is sent to mobile terminal.
Wherein, test installation kit can be realized by APK form, can also be realized by other various forms.It is testing Various operation logics needed for defining test in installation kit.For example, multiple action type marks and execution various types operation Operation logic, and/or, multiple operated object marks and the operation logic for positioning each operation object.Wherein, operation logic can By by software code, function interface, hardware chip etc. it is all kinds of in a manner of realize.
Step S220: mobile terminal receives and installs above-mentioned test installation kit.
Wherein, mobile terminal can receive above-mentioned test installation kit in several ways, for example, can pass through data line Test installation kit is copied on the hard disk of mobile terminal after being connect with PC.Alternatively, the various nothings such as wifi, bluetooth can also be passed through Line transmission mode is transferred to mobile terminal for installation kit is tested.Alternatively, test peace can also be transmitted by ADB order entrance Dress packet.The present invention to specific transmission mode without limitation.
By installing above-mentioned test installation kit, various operation logics needed for making mobile terminal that test be locally stored, The operation logic of various types operation is identified and executed including multiple action types, and/or, multiple operated object marks and positioning The operation logic etc. of each operation object.
Step S230: generating at the end PC and test instruction, and test instruction is sent to movement eventually by ADB order entrance End.
Specifically, the command content of the test instruction of generation depends on the corresponding specific test content of this step.Test refers to Order can be realized by the ADB order of following form: " adb shell am broadcast-a ADB_INTENT-e OPER [value1]-e WIDGET [value2] ... " wherein, action type mark is transmitted by value1 (such as click, sliding, length By etc.), the design parameter of operation is transmitted by value2, such as the attributes such as type, text, index of control object clicked. For example, it is assumed that the method in the present embodiment needs to click " set " button in mobile terminal side and in the setting input frame of pop-up It clicks " brightness regulation " button and is adjusted.Correspondingly, it in order to realize above-mentioned steps, at least needs to generate two tests and refers to It enables.First test instruction includes single-click operation in test instruction for realizing the operating procedure for clicking " set " button Corresponding action type mark (being indicated by above-mentioned value1), to indicate that this operation is to click the operation of type; In addition, also comprising operated object mark (pass through above-mentioned value2 indicate) in test instruction, i.e. " set " button is pressed Button ID or button name etc., to indicate that the object of this operation is " set " button.Article 2 test instruction is for realizing point The operating procedure for hitting " brightness regulation " button is used comprising the mark of action type corresponding to single-click operation in test instruction To indicate that this operation is to click the operation of type;In addition, also including operated object mark, i.e. " brightness in test instruction Button ID or button name of adjusting " button etc., to indicate that the object of this operation is " brightness regulation " button.Specific implementation When, above-mentioned two tests instruction can be sent to mobile terminal simultaneously, and comprising executing serial number in the test instruction of each item, So that mobile terminal executes sequence according to execute that serial number determines the test instruction of each item;It can also will be above-mentioned according to execution sequence Two tests instruction be successively sent to mobile terminal, for example, can wait until first test instruction execution finish and return to survey Article 2 test instruction is retransmited after trying successful test result.
In specific implementation, the quantity for testing instruction is not limited to two, can be more a plurality of test instruction.In addition, test The action type for including in instruction is also not necessarily limited to single-click operation, can also be the various possible operations such as double-click, sliding, long-pressing, Moreover, it is also possible to be the operation for analog hardware button, wherein hardware button includes one of the following or multiple: returning Key, Menu key, Home key, volume key and power key.It is other buttons that the operation object for including in test instruction, which is also possible to, defeated Enter frame etc..In addition, test instruction can also only comprising action type or only include operation object, when test instruction is only comprising behaviour When making type, such as it can be and judge whether the current state of mobile terminal networks, whether can generate flow etc.;When test instructs When only including operation object, scheduled a type of operation can only be executed for the operation object, for example, when certain buttons Single-click operation is executed, when not supporting the operation such as double-click, action type can be omitted in test instruction and identified.
Step S240: it after mobile terminal receives above-mentioned test instruction, is identified according in test installation kit with action type And/or the corresponding operation logic of operated object mark is tested.
It specifically, can be in order to enable mobile terminal automatic capture to instruct and automatically process to from the test at the end PC The trapping module that setting is instructed for capture the test from the end PC in test installation kit mentioned above, and to capturing The processing module that is handled of test instruction, each module can be realized by preset function, can also using other it is various it is soft/ Hardware mode is realized.
In the present embodiment, above-mentioned trapping module can be realized by following function code sections:
The function be equivalent to one can receive, the radio receiver of filter message, can be realized automatically by the function Capture the purpose of the test instruction at the end PC.
In addition, above-mentioned processing module can be realized by following function code sections:
public void oper(String oper,Intentintent){
IOperationoper;
if(oper.equals(“click”)){
Oper=new Clicker (intent);
}else if(oper.equals(“drag”)){
……
The information such as the action type for including in the test instruction captured can be judged automatically by above-mentioned function and are executed Corresponding processing.For example, showing its action type when in test instruction comprising being worth the parameter for " click " to click;Work as survey When in examination instruction comprising being worth the parameter for " drag ", show its action type to pull.
Specifically, it in upper example, is instructed for for realizing first test for clicking " set " button, firstly, it is necessary to It is clicked corresponding to the operation of type from test installation kit according to the action type identifier lookup and acquisition of clicking type operations Operation logic, the operation logic can realize that the function can execute the operation for clicking type automatically by scheduled function.So Afterwards, need to position the operation logic of the button according to the button identifier lookup of " set " button and obtaining from test installation kit, The operation logic can also realize that the function can be such that automatically cursor navigates at corresponding button by scheduled function.Tool Body, it in the present embodiment, can be positioned according to the coordinate pair button of button on the screen, which is realized simply just It is prompt;Furthermore it is also possible to which button is identified and positioned according to the attribute of button or feature, which is not changed by screen resolution It is more flexible to be applicable in scene for the influence of change.Two kinds of above-mentioned positioning methods are introduced separately below:
In the first implementation, it is positioned by the coordinate ratio of the operation object that prestores on a user interface. For example, it is assumed that establishing coordinate system by coordinate origin of the lower left corner of user interface, and set the upper right corner of complete user interface Coordinate be (1,1), correspondingly, each position in user interface can be indicated by corresponding coordinate ratio, example Such as, coordinate points are that the position of (1/3,2/3) is at the left side position on the upper side of entire user interface.It can benefit by this kind of mode The position that operation object is determined with operation object coordinate ratio locating in entire user interface passes through merely with traditional Specific coordinate value is higher compared to accuracy come the mode for determining position, is not influenced by screen resolution variation, and locating speed Fastly.For example, cause the size of user interface to change even if the screen resolution size of terminal device is changed, but Be, the relativeness between a certain operation object and entire user interface be it is fixed, therefore, can still be accurately located The operation object.
In the second implementation, by identifying that the characteristic of the operation object prestored is positioned.Wherein, it prestores Operation object characteristic for uniquely identifying corresponding operation object, specifically include: the exterior contour of operation object Data and/or color data etc..For example, for by taking " set " button as an example, corresponding characteristic include the button shape, Size, color, text and font etc..In short, the characteristic by the operation object prestored can be unique on a user interface Ground identification and positioning operation object.When specific implementation, it can be realized in conjunction with related algorithms such as image recognitions.It can by this kind of mode The position of operation object is searched and determined according to the resemblance of operation object, pass through specific coordinate value merely with traditional The advantage not influenced by screen resolution variation is likewise supplied with to determine that the mode of position is compared.Moreover, working as the cloth of user interface When office's variation (such as after product renewing), even if the position of operation object is changed, still can accurately it determine by this way Bit manipulation object.
Wherein, above-mentioned step S230 and step S240 can be executed repeatedly, specific to execute what number depended on receiving Test the item number of instruction.For example, when a test process needs three test sequentially executed instructions to be just able to achieve, it is above-mentioned Step S230 and step S240 will be executed three times, be respectively used to for each time to handle corresponding test instruction.
It since test process is likely to occur mistake, is debugged when an error occurs, therefore, this method can also be into One step includes the steps that following S250.Wherein, step S250 is an optional step.
Step S250: it when it is mistake that test, which instructs corresponding test result, is further repaired by the reception of ADB order entrance Test instruction after changing, and test is re-started according to modified test instruction.
Test result is that the concrete condition of mistake includes a variety of, for example, it may be possible to be the parameter error tested in instruction, test Hardware on environment error or mobile terminal such as does not support at a variety of causes.Either because mistake occurs in which kind of reason, require It is debugged at the end PC, to be modified to test instruction, and revised test instruction is retransmitted to mobile terminal, So that mobile terminal re-executes corresponding test process.
Specifically, when above-mentioned step S230 and step S240 execution is multiple, this step may also can be executed repeatedly, often When there is a test instruction error in step S240, step S250 can be all triggered.Single step may be implemented by step S240 The purpose of error, single-step debug.For example, when entire test process includes 10 test instructions, if what the 9th article of test instructed Corresponding result is mistake, then need to only receive modified 9th article of test again and instruct and execute, be successfully tested before Preceding 8 tests instruction need not retest, and thus, it is possible to which the workload of debugging link is greatly reduced, improve testing efficiency.In addition, In the present embodiment, since, only comprising the operation logic being separated from each other, concrete operation step is by subsequent survey in test installation kit Examination instruction indicates that therefore, test installation kit need to only be transmitted and be installed once, even if followed by mistake, need not also give birth to again At and test installation kit is installed, thereby further simplify operating process.
In addition, since test process may need to be performed a plurality of times, for example, after this test process successful execution, The possible later period results in the need for testing again due to updating mobile terminal etc..Therefore, it is repeated in order to facilitate the later period complete At test process, this method can further include following step S260.Wherein, step S260 is also one optional Step.
Step S260: when it is correct that test, which instructs corresponding test result, corresponding command content is instructed to protect test It is stored in preset test file.
When specific implementation, this step can be realized by following two ways.In the first way, whenever passing through step As soon as step S260 is triggered when S240 successful execution test instruction, so as to by the corresponding command content of this test instruction It is saved in test file.In the second way, after all tests are instructed successful execution by step S240, Step S260 is triggered, just to instruct corresponding command content to be saved in test file all tests.
Wherein, above-mentioned test file is used to save the corresponding command content of each item test instruction according to reception sequence so as to again Secondary execution.For example, when test instruction be ADB order when, corresponding command content be this order in include action type with Operation object, the concrete form of command content depend on specific test environment, as long as capableing of the form of automatic trigger test ?.It can be seen that the instruction being successfully tested can be saved by step S260, so that the later period repeats, because This, for needing the application scenarios of repeated multiple times test, through this embodiment in mode can significantly simplify later period survey Workload when examination improves testing efficiency.
Fig. 3 shows the structure chart for the device of another embodiment of the present invention offer tested mobile terminal.Such as Shown in Fig. 3, which includes: installation module 31, receiving module 32 and test module 33.
Installation module 31 is suitable for receiving and installs test installation kit.It wherein, include: multiple operations in the test installation kit Type identification and the operation logic for executing various types operation, and/or, multiple operated object marks and each operation object of positioning Operation logic.
Receiving module 32 is suitable for receiving test instruction by ADB order entrance.Wherein, include operation in the test instruction Type identification and/or operated object mark.
Test module 33 be suitable for according in the test installation kit with the action type identify and/or operated object mark Corresponding operation logic is tested.
Wherein, when the quantity of test instruction is a plurality of, a plurality of test instruction is successively executed according to reception sequence.It is optional Ground, which further comprises: weight test module 34, is suitable for passing through ADB when it is mistake that test, which instructs corresponding test result, Order entrance receives modified test instruction, and re-starts test according to the modified test instruction.
Optionally, which further comprises: memory module 35, and it is correct for being suitable for instructing corresponding test result in test When, instruct corresponding command content to be saved in preset test file the test, wherein the test file is for pressing The corresponding command content of each item test instruction is saved according to reception sequence to execute again.
Wherein, aforesaid operations type includes: to double-click type, click type, sliding type, length by type and for simulating The action type of hardware button, wherein the hardware button includes one of the following or multiple: return key, Menu key, volume Key and power key;Also, the operated object mark is operation object coordinate range on the screen and/or the operation pair ID value as being identified as operation object.
Also, the operation logic of each operation object of the positioning includes: the operation object by prestoring in user The operation logic that coordinate ratio on interface is positioned;And/or the characteristic by identifying the operation object prestored carries out The operation logic of positioning.
The specific structure and working principle of above-mentioned modules can refer to the description of corresponding steps in embodiment of the method, herein It repeats no more.
In conclusion in the method and device provided by the invention tested mobile terminal, by traditional APK text Part replaces with the test installation kit in the present invention, also, tests in installation kit and do not define a series of coherent execution and not directly Detachable testing process, but various individual operation logics needed for defining execution test process, for example, defining more A action type mark and the operation logic for executing various types operation, and/or, multiple operated object marks and each behaviour of positioning Make the operation logic of object.On this basis, each operation logic is completed according to the ADB test instruction received, to have realized At test process.It can be seen that in the present invention, operation logic and specific operating procedure are separated, therefore, when a certain step When the error occurs, it is not necessary to modify test installation kit, the corresponding ADB test instruction of the step need to be only received and executed again, It can accomplish the effect of single step error single-step debug, thus enormously simplify debugging process.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments in this include institute in other embodiments Including certain features rather than other feature, but the combination of the feature of different embodiment means in the scope of the present invention Within and form different embodiments.For example, in the following claims, embodiment claimed it is any it One can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize some or all portions in device according to an embodiment of the present invention The some or all functions of part.The present invention is also implemented as a part or complete for executing method as described herein The device or device program (for example, computer program and computer program product) in portion.It is such to realize program of the invention It can store on a computer-readable medium, or may be in the form of one or more signals.Such signal can be with It downloads from internet website, is perhaps provided on the carrier signal or is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1. the method that a kind of pair of mobile terminal is tested, comprising:
Test installation kit is received and installs, the test installation kit generates at the end PC;Wherein, include: in the test installation kit Multiple action type marks and the operation logic for executing various types operation, and/or, multiple operated object marks and positioning are each The operation logic of operation object;Wherein, the operation logic for executing various types operation passes through software code or interface function is realized, And the action type includes: the action type for analog hardware button;And the operation logic of each operation object of positioning is logical It crosses software code or interface function is realized, for determining the specific location of the operation object on the screen;Wherein, the positioning is each The operation logic of a operation object includes: the operation logic positioned by identifying the characteristic of the operation object prestored, And the characteristic of the operation object prestored includes the exterior contour data and color data of operation object;
Test instruction is received by ADB order entrance, the test instruction generates at the end PC;Wherein, it is wrapped in the test instruction Containing action type mark and/or operated object mark;
It is carried out according to operation logic corresponding with action type mark and/or operated object mark in the test installation kit Test;
Wherein, when it is mistake that test, which instructs corresponding test result, this method further comprises: being connect by ADB order entrance Modified test instruction is received, and test is re-started according to the modified test instruction.
2. according to the method described in claim 1, wherein, the quantity of the test instruction is a plurality of, and a plurality of test instruction is pressed It is successively executed according to reception sequence.
3. according to the method described in claim 1, wherein, when it is correct that test, which instructs corresponding test result, this method into One step includes:
Corresponding command content is instructed to be saved in preset test file the test, wherein the test file is used for The corresponding command content of each item test instruction is saved according to reception sequence to execute again.
4. method according to claim 1 to 3, wherein the action type include: double-click type, click type, Sliding type and it is long by type, wherein the hardware button includes one of the following or multiple: return key, Menu key, Volume key and power key, and the operated object mark is operation object coordinate range on the screen and/or the operation pair ID value as being identified as operation object;
Also, the operation logic of each operation object of the positioning includes: the operation object by prestoring in user interface On the operation logic that is positioned of coordinate ratio.
5. the device that a kind of pair of mobile terminal is tested, comprising:
Module is installed, suitable for receiving and installing test installation kit, the test installation kit generates at the end PC;Wherein, the test It include: the operation logic of multiple action type marks and execution various types operation in installation kit, and/or, multiple operation objects Identify and position the operation logic of each operation object;Wherein, the operation logic for executing various types operation passes through software code Or interface function is realized, and the action type includes: the action type for analog hardware button;And each operation pair of positioning The operation logic of elephant is realized by software code or interface function, for determining the specific location of the operation object on the screen; Wherein, the operation logic of each operation object of positioning includes: by identifying that the characteristic of the operation object prestored carries out The operation logic of positioning, and the characteristic of the operation object prestored includes the exterior contour data and color of operation object Data;
Receiving module, is suitable for receiving test instruction by ADB order entrance, and the test instruction generates at the end PC;Wherein, described Include action type mark and/or operated object mark in test instruction;
Test module is suitable for according to corresponding with action type mark and/or operated object mark in the test installation kit Operation logic tested;
Wherein, which further comprises: weight test module, is suitable for leading to when it is mistake that test, which instructs corresponding test result, It crosses ADB order entrance and receives modified test instruction, and test is re-started according to the modified test instruction.
6. device according to claim 5, wherein the quantity of the test instruction is a plurality of, and a plurality of test instruction is pressed It is successively executed according to reception sequence.
7. according to any device of claim 5, wherein the device further comprises: memory module, suitable for referring in test When to enable corresponding test result be correct, the corresponding command content of test instruction is saved in preset test file, Wherein, the test file is used to save each item test according to reception sequence and instructs corresponding command content to execute again.
8. according to any device of claim 5-7, wherein the action type include: double-click type, click type, Sliding type and it is long by type, wherein the hardware button includes one of the following or multiple: return key, Menu key, Volume key and power key, and the operated object mark is operation object coordinate range on the screen and/or the operation pair ID value as being identified as operation object;
Also, the operation logic of each operation object of the positioning includes: the operation object by prestoring in user interface On the operation logic that is positioned of coordinate ratio.
9. a kind of electronic equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction Ask the corresponding operation of method tested described in any one of 1-4 mobile terminal.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium Processor is set to execute such as the method corresponding operation of any of claims 1-4 tested mobile terminal.
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 CN106021101A (en) 2016-10-12
CN106021101B true 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)

Families Citing this family (7)

* 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
CN106648697B (en) * 2016-12-30 2020-11-10 上海二三四五网络科技有限公司 Method for lighting terminal and method for automatically controlling terminal
CN109062579B (en) * 2018-06-21 2021-07-20 上海二三四五网络科技有限公司 Control method and control device for quickly uninstalling application program
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
CN113806206A (en) * 2020-06-12 2021-12-17 北京奇虎科技有限公司 Shell process-based compatibility testing method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface
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

Family Cites Families (5)

* 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
CN104407980B (en) * 2014-12-17 2017-07-11 用友网络科技股份有限公司 Mobile solution automatic test device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN104980552A (en) * 2015-06-18 2015-10-14 惠州Tcl移动通信有限公司 Method and system for realizing automatic test of Android mobile terminal

Also Published As

Publication number Publication date
CN106021101A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN106021101B (en) The method and device that mobile terminal is tested
CN106021102B (en) The generation method and device of automatic test file
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
US7266809B2 (en) Software debugger and software development support system for microcomputer operable to execute conditional execution instruction
US8826240B1 (en) Application validation through object level hierarchy analysis
US7178135B2 (en) Scope-based breakpoint selection and operation
US7895575B2 (en) Apparatus and method for generating test driver
CN104407973A (en) Method and device for realizing automatic unit test
WO2011133030A1 (en) Improved embedded system performance
WO2021036697A1 (en) Commissioning method and apparatus, device and storage medium
CN105224456A (en) A kind of test script generates methods, devices and systems
CN107797004B (en) Digital verification system and method for spacecraft electrical performance test case
CN111563032A (en) APP debugging method and device, computer equipment and storage medium
CN107665167B (en) Program debugging method and device and program development equipment
CN113157508A (en) Test method, system, device, equipment and storage medium of embedded system
KR102013657B1 (en) Apparatus for statically analyzing assembly code including assoxiated multi files
US9823996B2 (en) Debugging code for controlling intelligent devices using log data from executed object code
US9442826B2 (en) Kernel functionality checker
CN105339974B (en) Analog sensor
CN105095093A (en) Intelligent terminal performance test method and system
CN115994086A (en) Image processing method and device, storage medium and terminal
US9798649B1 (en) Debugging code controlling resource-constrained intelligent devices contemporaneously with executing object code
CN114281709A (en) Unit testing method, system, electronic equipment and storage medium
CN111427795A (en) Code test control method and device, storage medium and electronic equipment
Molnar Live visualization of GUI application code coverage with GUITracer

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
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.