CN106294123B - The matched method, device and mobile terminal in path in a kind of test of traversal - Google Patents

The matched method, device and mobile terminal in path in a kind of test of traversal Download PDF

Info

Publication number
CN106294123B
CN106294123B CN201610580913.4A CN201610580913A CN106294123B CN 106294123 B CN106294123 B CN 106294123B CN 201610580913 A CN201610580913 A CN 201610580913A CN 106294123 B CN106294123 B CN 106294123B
Authority
CN
China
Prior art keywords
path
array
current path
destination
length
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
CN201610580913.4A
Other languages
Chinese (zh)
Other versions
CN106294123A (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.)
Xiamen Meitu Mobile Technology Co Ltd
Original Assignee
Xiamen Meitu Mobile Technology 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 Xiamen Meitu Mobile Technology Co Ltd filed Critical Xiamen Meitu Mobile Technology Co Ltd
Priority to CN201610580913.4A priority Critical patent/CN106294123B/en
Publication of CN106294123A publication Critical patent/CN106294123A/en
Application granted granted Critical
Publication of CN106294123B publication Critical patent/CN106294123B/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/3676Test management for coverage analysis
    • 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)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses the matched method, device and mobile terminal in path in a kind of test of traversal, the method is suitable for executing in the terminal, it include: the major key information cache by the currently control of action event to be responded into current path array, each destination path array is obtained from destination path set, successively execution route matches with the destination path in each destination path array to the current path in current path array;The destination path of successful match if it exists, then corresponding path operations in performance objective path;The destination path of successful match if it does not exist, then current control responds action event, wherein, matching to the current path in current path array with the destination path execution route in a destination path array includes: the length scale for judging the current path Yu the destination path;If the length of the current path is not less than the length of the destination path, the destination path is begun looking for for lower target element to be matched with location index from current path array.

Description

The matched method, device and mobile terminal in path in a kind of test of traversal
Technical field
The present invention relates to automatic test field, in particular in a kind of traversal test the matched method, apparatus in path and Mobile terminal.
Background technique
In automatic test field, traversal test method has been widely used in all kinds of testing schemes, is played important Effect.However, but do not include the pre-processing of traverse path information in current traversal test method, and the path traversed Usually also influence whether the effect of traversal test.For example, test " photograph album " this in application, paths in ergodic process For " full choosing --- deletion --- determines ", after executing the traversal test in the path, whole photos in photograph album are deleted, and are tested Resource is sky, and the traversal validity in later period is caused to be greatly lowered.If but only simple by " deletion " operation shield, it is clear that meeting The validity of traversal is directly affected, because the deletion for an independent photo can be also shielded, need exist to traversal Path in test is matched in advance.
It is, therefore, desirable to provide the matched technical solution in path in a kind of traversal test, specific aim solve asking for traverse path The detection of destination path is added in ergodic process, further promotes the validity and reliability of traversal test for topic.
Summary of the invention
For this purpose, the present invention provides the matched scheme in path in a kind of test of traversal, with try hard to solve or at least alleviate on Face there are the problem of.
According to an aspect of the present invention, the matched method in path in a kind of test of traversal is provided, is suitable in mobile terminal Middle execution, this method comprises the following steps: firstly, the major key information of the currently control of action event to be responded is obtained, major key letter Breath includes control ID and control text;It caches major key information as new routing information into current path array, current road The routing information of current path is stored in each element of diameter array, the length of current path is that current path array has stored road The element number of diameter information;Each destination path array is obtained from destination path set, is deposited in each element of destination path array The routing information of destination path is contained, the length of destination path is the length of destination path array;To in current path array Successively execution route matches current path with the destination path in each destination path array;The target road of successful match if it exists Diameter, then corresponding path operations in performance objective path;The destination path of successful match if it does not exist, then current control response operation Event, wherein to the destination path execution route in the current path and a destination path array in current path array With including: the length scale for judging the current path Yu the destination path;If the length of the current path is not less than the target road The length of diameter is then arranged the location index of current path array and is initialized as 0, is with location index from current path array Lower target element begins looking for the destination path to be matched.
Optionally, current in current path array in traversal according to the present invention test in the matched method in path Path is matched with the destination path execution route in a destination path array further include: is somebody's turn to do if the length of the current path is less than The length of destination path then judges to search failure, no longer execution route matching.
Optionally, in traversal according to the present invention test in the matched method in path, action event include click event, It is any in slip event, long-pressing event and incoming event.
Optionally, in traversal according to the present invention test in the matched method in path, the length of current path array with The length of longest destination path is consistent.
Optionally, in traversal according to the present invention test in the matched method in path, using major key information as new road If diameter information cache includes: current path array into current path array to be empty, believe major key information as new path Breath is stored into the last one element of current path array;If current path array is not sky, by current path array The routing information stored in each element moves forward one, and using major key information as new path information storage to current path In the last one element of array.
Optionally, in traversal according to the present invention test in the matched method in path, with position from current path array Setting index and beginning looking for the destination path in destination path array for lower target element to carry out matching includes: from current path number Started in group with location index for lower target element, successively searches the path letter stored in first element in destination path array Breath;If starting in current path array with location index for lower target element, first member of destination path array is found The routing information stored in element then obtains the subscript of the element of store path information in current path array and is assigned to position rope Draw;If the sum of subscript and the length of destination path are not more than current path length, with location index from current path array Start for lower target element, successively matches current path and destination path;It is mismatched when existing in current path with destination path Routing information when, obtain current path array in store the routing information element subscript and be assigned to location index, weight Newly from current path array with location index be lower target element begin looking for the destination path in destination path array with into Row matching.
Optionally, in traversal according to the present invention test in the matched method in path, if further including in current path number Started in group with location index for lower target element, does not find the path letter stored in first element of destination path array Breath then judges to search failure, no longer execution route matching.
Optionally, in traversal according to the present invention test in the matched method in path, if further including subscript and target road The sum of length of diameter is greater than current path length, then judges to search failure, no longer execution route matches.
According to a further aspect of the invention, the matched device in path in a kind of test of traversal is provided, is moved suitable for residing in In dynamic terminal, which includes the first acquisition module, cache module, the second acquisition module, matching module, execution module and response Module.Wherein, first module is obtained, suitable for obtaining the major key information of the currently control of action event to be responded, major key packet Include control ID and control text;Cache module, suitable for caching major key information as new routing information to current path array In, the routing information of current path is stored in each element of current path array, the length of current path is current path number Organize the element number of store path information;Second obtains module, suitable for obtaining each destination path number from destination path set Group, the routing information of destination path is stored in each element of destination path array, and the length of destination path is destination path number The length of group;Matching module, suitable for the current path in current path array and the destination path in each destination path array Successively execution route matches, wherein to the destination path in the current path and a destination path array in current path array Execution route matching is suitable for judging the length scale of the current path Yu the destination path, when the length of the current path is not less than When the length of the destination path, the location index of current path array is set and is initialized as 0, with position from current path array Setting index is that lower target element begins looking for the destination path to be matched;Execution module, suitable for when there are successful match When destination path, the corresponding path operations in performance objective path;Respond module, suitable for when there is no the destination paths of successful match When, current control responds action event.
Optionally, in traversal according to the present invention test in the matched device in path, matching module is further adapted for, when deserving When the length in preceding path is less than the length of the destination path, judge to search failure, no longer execution route matches.
Optionally, in traversal according to the present invention test in the matched device in path, action event include click event, It is any in slip event, long-pressing event and incoming event.
Optionally, in traversal according to the present invention test in the matched device in path, the length of current path array with The length of longest destination path is consistent.
Optionally, in traversal according to the present invention test in the matched device in path, cache module is further adapted for: when When current path array is empty, using major key information as the last one element of new path information storage to current path array In;When current path array is not sky, the routing information stored in each element of current path array is moved forward one, And using major key information as in the last one element of new path information storage to current path array.
Optionally, in traversal according to the present invention test in the matched device in path, matching module is further adapted for: from Started in current path array with location index for lower target element, successively searches in destination path array and deposited in first element The routing information of storage;When in current path array with location index be lower target element start, find destination path array First element in store routing information when, obtain current path array in store path information element subscript and tax It is worth to location index;When the sum of subscript and the length of destination path are not more than current path length, from current path array It is that lower target element starts with location index, successively matches current path and destination path;When existing in current path and target When the unmatched routing information in path, obtains the subscript for storing the element of the routing information in current path array and be assigned to position Index is set, the target in destination path array is begun looking for for lower target element with location index from current path array again Path is to be matched.
Optionally, in traversal according to the present invention test in the matched device in path, matching module is further adapted for: when Started in current path array with location index for lower target element, is not found in first element of destination path array When the routing information of storage, judge to search failure, no longer execution route matches.
Optionally, in traversal according to the present invention test in the matched device in path, matching module is further adapted for: when When the sum of subscript and the length of destination path are greater than current path length, judge to search failure, no longer execution route matches.
According to a further aspect of the invention, it also provides in a kind of mobile terminal, including traversal according to the present invention test The device of route matching.
The matched technical solution in path in traversal test according to the present invention, obtains currently action event to be responded first Control major key information and be stored in current path array, to the current path and each destination path in current path array The destination path of array is successively matched, if it exists the destination path of successful match, then executes the corresponding road of the destination path Diameter operation, if it does not exist, then current control responds action event.In the above-mentioned technical solutions, by traversal test process The matching that destination path is added is taken corresponding with destination path when being matched to destination path in the current path in test Treatment measures especially can reach positive effect in terms of shielding certain particular paths, greatly improve traversal test Validity.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical Component or element.
Fig. 1 shows the schematic diagram of mobile terminal 100 according to an embodiment of the invention;
Fig. 2 shows the flow charts of the matched method 200 in path in traversal test according to an embodiment of the invention;
Fig. 3 shows the current path according to an embodiment of the invention in current path array and destination path number The flow chart of destination path execution route matching 240 in group;And
Fig. 4 shows the schematic diagram of the matched device 300 in path in traversal test according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 is the structural block diagram of mobile terminal 100.Mobile terminal 100 may include memory interface 102, one or more A data processor, image processor and/or central processing unit 104 and peripheral interface 106.
Memory interface 102, one or more processors 104 and/or peripheral interface 106 either discrete component, It can integrate in one or more integrated circuits.In the mobile terminal 100, various elements can pass through one or more communication Bus or signal wire couple.Sensor, equipment and subsystem may be coupled to peripheral interface 106, a variety of to help to realize Function.
For example, motion sensor 110, light sensor 112 and range sensor 114 may be coupled to peripheral interface 106, To facilitate the functions such as orientation, illumination and ranging.Other sensors 116 can equally be connected with peripheral interface 106, such as positioning system System (such as GPS receiver), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help to implement phase The function of pass.
Camera sub-system 120 and optical sensor 122 can be used for the camera of convenient such as record photos and video clips The realization of function, wherein the camera sub-system and optical sensor for example can be charge-coupled device (CCD) or complementary gold Belong to oxide semiconductor (centimetre OS) optical sensor.Reality can be helped by one or more radio communication subsystems 124 Existing communication function, wherein radio communication subsystem may include that radio-frequency transmitter and transmitter and/or light (such as infrared) receive Machine and transmitter.The particular design and embodiment of radio communication subsystem 124 can depend on what mobile terminal 100 was supported One or more communication networks.For example, mobile terminal 100 may include being designed to support LTE, 3G, GSM network, GPRS net Network, EDGE network, Wi-Fi or WiMax network and BlueboothTMThe communication subsystem 124 of network.
Audio subsystem 126 can be coupled with loudspeaker 128 and microphone 130, to help to implement to enable voice Function, such as speech recognition, speech reproduction, digital record and telephony feature.I/O subsystem 140 may include touch screen control Device 142 processed and/or other one or more input controllers 144.Touch screen controller 142 may be coupled to touch screen 146.It lifts For example, any one of a variety of touch-sensing technologies are can be used to detect in the touch screen 146 and touch screen controller 142 The contact and movement or pause carried out therewith, wherein detection technology includes but is not limited to capacitive character, resistive, infrared and table Face technology of acoustic wave.Other one or more input controllers 144 may be coupled to other input/control devicess 148, such as one Or the pointer device of multiple buttons, rocker switch, thumb wheel, infrared port, USB port, and/or stylus etc.It is described One or more button (not shown)s may include the up/down for controlling 130 volume of loudspeaker 128 and/or microphone Button.
Memory interface 102 can be coupled with memory 150.The memory 150 may include that high random access is deposited Reservoir and/or nonvolatile memory, such as one or more disk storage equipments, one or more optical storage apparatus, and/ Or flash memories (such as NAND, NOR).Memory 150 can store an operating system 172, for example, Android, iOS or The operating system of Windows Phone etc.The operating system 172 may include for handling basic system services and execution The instruction of task dependent on hardware.Memory 150 can also be stored using 174.It, can be from memory in mobile device operation Load operating system 172 in 150, and executed by processor 104.At runtime using 174, can also add from memory 150 It carries, and is executed by processor 104.It operates on operating system using 174, is provided using operating system and bottom hardware Interface realizes the various desired functions of user, such as instant messaging, web page browsing, pictures management.Using 174 can be independently of What operating system provided, it is also possible to what operating system carried.In addition, when being mounted in mobile terminal 100 using 174, Drive module can be added to operating system.In above-mentioned various applications 174, one such application is according to the present invention time Go through the matched device 300 in path in test.
Fig. 2 shows the flow charts of the matched method 200 in path in traversal test according to an embodiment of the invention.Time The matched method 200 in path in test is gone through to be suitable for executing in mobile terminal (such as mobile terminal 100 shown in FIG. 1).
As shown in Fig. 2, method 200 starts from step S210.In step S210, currently action event to be responded is obtained first Control major key information, major key information includes control ID and control text.Wherein, action event includes click event, sliding It is any in event, long-pressing event and incoming event.In the present embodiment, action event is click event, currently to response point The control of event is hit as " full choosing " button in " photograph album " this application.The control ID of this control of " full choosing " button is Com.mlab.photos:id/button1, control text are full choosing.
Then, S220 is entered step.In step S220, cache major key information as new routing information to current road In diameter array, the routing information of current path is stored in each element of current path array, the length of current path is current The element number of path array store path information.If current path array is sky, using major key information as new path Information is stored into the last one element of current path array;If current path array is not sky, by current path array Each element in the routing information that stores move forward one, and using major key information as new path information storage to current road In the last one element of diameter array.In the present embodiment, current path array is path, including 4 elements, in each element 1 routing information can be stored, the routing information stored is combined into current path.Make in the major key information of " full choosing " this control It is first to store in variable newNode, then newNode is stored in path before caching for new routing information into path. And this variable of newNode is the object of Node class, Node class indicates are as follows: class Node { String text;String id;}.At this point, path=[a, b, c, d], before wherein this 4 routing informations of a, b, c and d respectively correspond traversal " full choosing " control The major key information of control in path, current path a --- b --- c --- d.It, below will be with " full choosing " two for convenient for indicating Word replaces the major key information of " full choosing " control to be described.Element totally 4 of store path information in current path, then currently The length in path is 4.Due to path be not it is empty, then successively forward by routing information a, b, c and d for being stored in each element of path Mobile one, and will select storage to a last element entirely, i.e. in path [3], the path finally obtained be path=[b, c, d, Full choosing], --- c --- d --- is selected current path b entirely.
In step S230, each destination path array, each element of destination path array are obtained from destination path set In be stored with the routing information of destination path, the length of destination path is the length of destination path array.In the present embodiment, mesh Mark set of paths is list, can store multiple destination path arrays in list, store 2 destination path arrays, respectively Target_1 and target_2, target_1=[full choosing, is deleted, and is determined], target_2=[b, Quan Xuan, d, e].Wherein, entirely The routing information of the destination path stored in target_1 is selected, deletes and is determined as, the destination path of target_1 is complete --- deletion --- is selected to determine, the length of target_1 and its destination path is 3, and b, Quan Xuan, d and e are to deposit in target_2 The routing information of the destination path of storage, the destination path of target_2 are b --- full choosing --- d --- e, target_2 and its mesh The length for marking path is 4.Destination path of the longest destination path for target_2, length 4, and the length of path is also 4, Meet length this condition consistent with the length of longest destination path of current path array.For convenient for statement, Quan Xuan, deletion, Determination, a, b, c, d and e are used to refer to its corresponding control.
Enter step S240, in step S240, in current path array current path and each destination path array In destination path successively execution route match.Fig. 3 shows according to an embodiment of the invention in current path array Current path matched with the destination path execution route in destination path array 240 flow chart.In the present embodiment, first right Current path in path is matched with the destination path in target_1.As shown in figure 3, judgement should in step S241 The length scale of current path and the destination path.The length of current path is that the length of destination path in 4, target_1 is 3, Then the length of current path is greater than the length of destination path in target_1.
In step S242, if the length of the current path is not less than the length of the destination path, current path is set The location index of array is simultaneously initialized as 0, begins looking for the mesh with location index from current path array for lower target element Path is marked to be matched.If the length of the current path is less than the length of the destination path, judges to search failure, no longer hold Row route matching.At this point, the location index of setting path is index, and 0 is initialized with to be directed toward path [0].Firstly, Being lower target element with location index since current path array, successively search in destination path array in first element The routing information of storage.Since path [0], first path [0] and target_1 [0] is compared, path [0]=b, Target_1 [0]=full choosing, thus path [0] ≠ target_1 [0], then by path [1], path [2] and path [3] successively with Target_1 [0] is compared, and is found path [3]=target_1 [0].If under being with location index in current path array Target element starts, and finds the routing information stored in first element of destination path array, then obtains current path number The subscript of the element of store path information and location index is assigned in group;If under being with location index in current path array Target element starts, and does not find the routing information stored in first element of destination path array, then judges to search failure, No longer execution route matches.At this point, finding path [3] in path since path [0] and being matched with target_1 [0], obtained It takes and is designated as 3 under path [3], and be assigned to index, then index=3.If the sum of subscript and the length of destination path are not more than Current path length, then since current path array with location index be lower target element, successively match current path and Destination path;If the sum of subscript and the length of destination path are greater than current path length, judge to search failure, no longer execution road Diameter matching.Due to being designated as 3 under this, destination path length is 3, and 3+3 > 4, therefore judges to search failure, for working as in path Destination path no longer execution route in preceding path and target_1 matches.
After it fails to match for the destination path in target_1, to the target in the current path and target_2 in path The matching of path execution route.In step S241, the length of current path is that the length of destination path in 4, target_2 is 4, Then the length of current path is equal to the length of destination path in target_2.In step S242, index is initialized as 0, from Path [0] starts, and first compares path [0] and target_2 [0], path [0]=b, target_2 [0]=b, thus Path [0]=target_2 [0].It obtains and is designated as 0 under path [0], and be assigned to index, then index=0.Due to the subscript It is 0, destination path length is 4, and 0+4=4, therefore since path [0], target road in target_2 is searched in path Diameter, however, path [1]=c, target_2 [0]=full choosing, path [1] ≠ target_2 [0].When in current path exist with When the unmatched routing information of destination path, the subscript and assignment that the element of the routing information is stored in current path array are obtained To location index, begun looking in destination path array with location index for lower target element from current path array again Destination path is to be matched.At this point, the subscript of path [1] is assigned to index, and then index=1, again from path [1] Start to search destination path in target_2 in path.And target_2 due to path [1], path [2] and path [3] [0] mismatch, in path with path [1] beginning, do not find with target_2 [0] matched element, then judge search lose It loses, no longer execution route matches.Current path in current path array is held with the destination path in each destination path array The matched key code of walking along the street diameter is as follows:
In step s 250, the destination path of successful match if it exists, then corresponding path operations in performance objective path.It is right Destination path " full choosing --- deletions --- determine " in target_1, corresponding path operations for never call " determination " this The response method of one control, to evade the operation of the destination path.And in target_2 destination path " b --- it is complete --- d --- e " is selected, corresponding path operations are the response method for never calling " e " this control.At this point, not deposited in path In the destination path of successful match.
In step S260, the destination path of successful match if it does not exist, then current control responds action event.Due to The destination path of successful match, therefore current control " full choosing " response click event are not present in path.In " full choosing " response point After hitting event, corresponding change occurs for the interface in the screen of mobile terminal, and it is matched to continue to execute path in traversal test at this time Method 200 obtains the major key information of the control of new current action event to be responded.Key code is as follows:
Fig. 4 shows the schematic diagram of the matched device 600 in path in traversal test according to an embodiment of the invention.It should Device includes: the first acquisition module 310, cache module 320, second acquisition module 330, matching module 340, execution module 350 With respond module 360.
First obtains the major key information that module 310 is suitable for obtaining the currently control of action event to be responded, major key packet Include control ID and control text.Wherein, action event includes appointing in click event, slip event, long-pressing event and incoming event It is a kind of
Cache module 320 is suitable for caching major key information as new routing information into current path array, current road The routing information of current path is stored in each element of diameter array, the length of current path is that current path array has stored road The element number of diameter information.Wherein, the length of current path array is consistent with the length of longest destination path.
Cache module 320 is further adapted for when current path array is empty, using major key information as new routing information It stores into the last one element of current path array;When current path array is not sky, by each of current path array The routing information stored in element moves forward one, and using major key information as new path information storage to current path number In the last one element of group.
Second acquisition module 330 is suitable for obtaining each destination path array, the destination path number from destination path set The routing information of destination path is stored in each element of group, the length of the destination path is the length of destination path array.
Matching module 340 is suitable for the current path in current path array and the destination path in each destination path array Successively execution route matches, wherein to the destination path in the current path and a destination path array in current path array Execution route matching is suitable for judging the length scale of the current path Yu the destination path, when the length of the current path is not less than When the length of the destination path, the location index of current path array is set and is initialized as 0, with position from current path array Setting index is that lower target element begins looking for the destination path to be matched;When the length of the current path is less than the target road When the length of diameter, judge to search failure, no longer execution route matches.
Matching module 340 be further adapted for since current path array with location index be lower target element, successively Search the routing information stored in first element in destination path array;Under being with location index in current path array Target element starts, and when finding the routing information stored in first element of destination path array, obtains current path number The subscript of the element of store path information and location index is assigned in group;When the sum of subscript and the length of destination path are not more than When current path length, since current path array with location index be lower target element, successively match current path and Destination path;When there is routing information unmatched with destination path in current path, obtaining and being stored in current path array The subscript of the element of the routing information is simultaneously assigned to location index, again from current path array with location index be lower target Element begins looking for the destination path in destination path array to be matched;When the sum of subscript and the length of destination path are greater than When current path length, judge to search failure, no longer execution route matches;Under being with location index in current path array Target element starts, and when not finding the routing information stored in first element of destination path array, judges to search failure, No longer execution route matches.
Execution module 350 is suitable for the corresponding path operations in performance objective path when there are the destination path of successful match.
Respond module 360 is suitable for when the destination path of successful match is not present, and current control responds action event.
About the matched specific steps in path and embodiment in traversal test, in the description based on Fig. 2 in detail Open, details are not described herein again.
It does not include the pre-processing of traverse path information in existing traversal test method, and the path traversed is usually Also the effect of traversal test is influenced whether.The matched technical solution in path in traversal test according to an embodiment of the present invention, first It obtains the currently major key information of the control of action event to be responded and is stored in current path array, in current path array Current path and the destination path of each destination path array successively matched, the destination path of successful match if it exists, then The corresponding path operations of the destination path are executed, if it does not exist, then current control responds action event.In above-mentioned technical proposal In, by the way that detection and matching to destination path are added in traversal test process, it is matched to when in the current path in test When destination path, treatment measures corresponding with destination path are taken, specific aim solves the problems, such as traverse path, especially can be Reach positive effect in terms of shielding certain particular paths, greatly improves the validity and reliability of traversal test.
B10. the device as described in B9, wherein the matching module is further adapted for, when the length of the current path is less than the mesh When marking the length in path, judge to search failure, no longer execution route matches.
B11. the device as described in B9 or 10, wherein the action event includes click event, slip event, long-pressing event With it is any in incoming event.
B12. the device as described in B9 or 10, wherein the length of the length of the current path array and longest destination path Unanimously.
B13. the device as described in B9 or 10, wherein the cache module is further adapted for:
When the current path array is empty, using the major key information as new path information storage to current path In the last one element of array;
When the current path array is not sky, forward by the routing information stored in each element of current path array It is one mobile, and using the major key information as in the last one element of new path information storage to current path array.
B14. the device as described in B9 or 10, wherein the matching module is further adapted for:
Being lower target element with location index since current path array, successively search first in destination path array The routing information stored in a element;
When in current path array with location index be lower target element start, find the first of destination path array When the routing information stored in a element, the subscript and assignment that the element of the routing information is stored in current path array are obtained To location index;
When the sum of the subscript and the length of the destination path are not more than current path length, from current path number Started in group with location index for lower target element, successively matches the current path and the destination path;
When there is routing information unmatched with the destination path in the current path, current path array is obtained The subscript of the middle element for storing the routing information is simultaneously assigned to location index, is with location index from current path array again Lower target element begins looking for the destination path in destination path array to be matched.
B15. the device as described in B14, wherein the matching module is further adapted for:
When with location index being that lower target element starts in current path array, the of destination path array is not found When the routing information stored in one element, judge to search failure, no longer execution route matches.
B16. the device as described in B14, wherein the matching module is further adapted for:
When the sum of the subscript and the length of the destination path are greater than current path length, judge to search failure, no Execution route matches again.
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, knot is not been shown in detail Structure 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 than feature more features expressly recited in each claim.More precisely, as following As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it abides by Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself As a separate embodiment of the present invention.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.Can in embodiment module or Unit or assembly is combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelements Or sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use and appoint What combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of any method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint The claims, abstract and drawings) disclosed in each feature can with an alternative feature that provides the same, equivalent, or similar purpose come Instead of.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc. Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (17)

1. a kind of matched method in path in traversal test, suitable for executing in the terminal, which comprises
The major key information of the currently control of action event to be responded is obtained, the major key information includes control ID and control text;
It caches using the major key information as new routing information into current path array, each member of the current path array The routing information of current path is stored in element, the length of the current path is current path array store path information Element number;
Each destination path array is obtained from destination path set, is stored with target road in each element of the destination path array The routing information of diameter, the length of the destination path are the length of destination path array;
To the current path in current path array, successively execution route is matched with the destination path in each destination path array;
The destination path of successful match if it exists then executes the corresponding path operations of the destination path;
The destination path of successful match if it does not exist, then current control responds the action event,
Wherein, the current path in current path array is matched with the destination path execution route in a destination path array Include:
Judge the length scale of the current path Yu the destination path;
If the length of the current path is not less than the length of the destination path, the location index that current path array is arranged is simultaneously first Beginning turns to 0, begins looking for the destination path for lower target element with location index from current path array to be matched.
2. the method as described in claim 1, wherein to current path and a destination path array in current path array In destination path execution route matching further include:
If the length of the current path is less than the length of the destination path, judge to search failure, no longer execution route matches.
3. it is method according to claim 1 or 2, wherein the action event includes click event, slip event, long-pressing event With it is any in incoming event.
4. it is method according to claim 1 or 2, wherein the length of the length of the current path array and longest destination path Unanimously.
5. it is method according to claim 1 or 2, wherein caching the major key information as new routing information to current road Include: in diameter array
If the current path array is sky, using the major key information as new path information storage to current path array The last one element in;
If the current path array is not sky, the routing information stored in each element of current path array is moved forward One, and using the major key information as in the last one element of new path information storage to current path array.
6. it is method according to claim 1 or 2, wherein being lower target element with location index since current path array The destination path in destination path array, which is searched, to carry out matching includes:
Being lower target element with location index since current path array, first member in destination path array is successively searched The routing information stored in element;
If starting in current path array with location index for lower target element, first member of destination path array is found The routing information stored in element then obtains the subscript for storing the element of the routing information in current path array and is assigned to position Set index;
If the sum of length of the subscript and the destination path is not more than current path length, from current path array with Location index is that lower target element starts, and successively matches the current path and the destination path;
When there is routing information unmatched with the destination path in the current path, obtaining and being deposited in current path array It stores up the subscript of the element of the routing information and is assigned to location index, again using location index as subscript from current path array Element begin looking for the destination path in destination path array to be matched.
7. method as claimed in claim 6, further includes:
If starting in current path array with location index for lower target element, first of destination path array is not found The routing information stored in element then judges to search failure, no longer execution route matching.
8. method as claimed in claim 6, further includes:
If the sum of the subscript and the length of the destination path are greater than current path length, judge to search failure, no longer hold Row route matching.
9. the matched device in path in a kind of traversal test, is suitable for being resident in the terminal, described device includes:
First obtains module, and suitable for obtaining the major key information of the currently control of action event to be responded, the major key information includes Control ID and control text;
Cache module, it is described current suitable for caching using the major key information as new routing information into current path array Be stored with the routing information of current path in each element of path array, the length of the current path be current path array The element number of store path information;
Second obtains module, suitable for obtaining each destination path array from destination path set, the destination path array it is each The routing information of destination path is stored in element, the length of the destination path is the length of destination path array;
Matching module, suitable for successively being held to the current path in current path array with the destination path in each destination path array Row route matching, wherein executing road to the destination path in the current path and a destination path array in current path array Diameter matching is suitable for judging the length scale of the current path Yu the destination path, when the length of the current path is not less than the target When the length in path, the location index of current path array is set and is initialized as 0, with location index from current path array The destination path is begun looking for for lower target element to be matched;
Execution module, suitable for when there are the destination path of successful match, executing the corresponding path operations of the destination path;
Respond module, suitable for when the destination path of successful match is not present, current control responds the action event.
10. device as claimed in claim 9 is somebody's turn to do wherein the matching module is further adapted for when the length of the current path is less than When the length of destination path, judge to search failure, no longer execution route matches.
11. the device as described in claim 9 or 10, wherein the action event includes click event, slip event, long-pressing thing It is any in part and incoming event.
12. the device as described in claim 9 or 10, wherein the length of the length of the current path array and longest destination path Degree is consistent.
13. the device as described in claim 9 or 10, wherein the cache module is further adapted for:
When the current path array is empty, using the major key information as new path information storage to current path array The last one element in;
When the current path array is not sky, the routing information stored in each element of current path array is moved forward One, and using the major key information as in the last one element of new path information storage to current path array.
14. the device as described in claim 9 or 10, wherein the matching module is further adapted for:
Being lower target element with location index since current path array, first member in destination path array is successively searched The routing information stored in element;
When in current path array with location index be lower target element start, find first member of destination path array When the routing information stored in element, obtains the subscript for storing the element of the routing information in current path array and be assigned to position Set index;
When the sum of length of the subscript and the destination path is not more than current path length, from current path array with Location index is that lower target element starts, and successively matches the current path and the destination path;
When there is routing information unmatched with the destination path in the current path, obtaining and being deposited in current path array It stores up the subscript of the element of the routing information and is assigned to location index, again using location index as subscript from current path array Element begin looking for the destination path in destination path array to be matched.
15. device as claimed in claim 14, wherein the matching module is further adapted for:
When in current path array with location index be lower target element start, do not find first of destination path array When the routing information stored in element, judge to search failure, no longer execution route matches.
16. device as claimed in claim 14, wherein the matching module is further adapted for:
When the sum of the subscript and the length of the destination path are greater than current path length, judge to search failure, no longer hold Row route matching.
17. a kind of mobile terminal, including the matched device in path in the traversal test as described in any one of claim 9-16.
CN201610580913.4A 2016-07-22 2016-07-22 The matched method, device and mobile terminal in path in a kind of test of traversal Active CN106294123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610580913.4A CN106294123B (en) 2016-07-22 2016-07-22 The matched method, device and mobile terminal in path in a kind of test of traversal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610580913.4A CN106294123B (en) 2016-07-22 2016-07-22 The matched method, device and mobile terminal in path in a kind of test of traversal

Publications (2)

Publication Number Publication Date
CN106294123A CN106294123A (en) 2017-01-04
CN106294123B true CN106294123B (en) 2018-12-18

Family

ID=57651982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610580913.4A Active CN106294123B (en) 2016-07-22 2016-07-22 The matched method, device and mobile terminal in path in a kind of test of traversal

Country Status (1)

Country Link
CN (1) CN106294123B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018130135A1 (en) * 2017-01-13 2018-07-19 腾讯科技(深圳)有限公司 Method and device for controlling way-finding of simulation object, and server
CN112328843B (en) * 2020-10-30 2023-09-05 深圳市元征科技股份有限公司 Method and related device for searching communication parameters rewritten in ODX
CN114490395A (en) * 2022-01-27 2022-05-13 北京飞书科技有限公司 Test processing method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124273A (en) * 2011-11-17 2013-05-29 阿里巴巴集团控股有限公司 Method and system for building and matching path inverted list based on user behavior analysis
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5324638B2 (en) * 2011-11-24 2013-10-23 株式会社エヌ・ティ・ティ・ドコモ Test apparatus and test method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124273A (en) * 2011-11-17 2013-05-29 阿里巴巴集团控股有限公司 Method and system for building and matching path inverted list based on user behavior analysis
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface

Also Published As

Publication number Publication date
CN106294123A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
KR102613774B1 (en) Systems and methods for extracting and sharing application-related user data
CN105630686B (en) A kind of application traversal test method, equipment and mobile terminal
CN105868105B (en) A kind of application traversal test method, equipment and mobile terminal
CN106934376B (en) A kind of image-recognizing method, device and mobile terminal
CN107247805B (en) Path searching method, device and computing terminal based on A-x algorithm
CN107329750B (en) Identification method and skip method of advertisement page in application program and mobile terminal
CN105512033B (en) A kind of automated testing method of mobile terminal, device and mobile terminal
CN104902479B (en) A kind of network security management equipment, method and mobile terminal
CN104991847B (en) A kind of RAM leakage automated detection method, device and mobile terminal
CN106294123B (en) The matched method, device and mobile terminal in path in a kind of test of traversal
CN105373479A (en) Automatic test method and device of memory leakage and mobile terminal
CN105975391B (en) One kind restarting test method, equipment and mobile terminal
CN110366100B (en) Terminal positioning method, positioning device, readable storage medium and terminal equipment
CN109669697A (en) A kind of the modularization methods of exhibiting and mobile terminal of contents list
US20120221969A1 (en) Scrollable list navigation using persistent headings
CN109672908A (en) A kind of method for protecting privacy, device and mobile terminal
CN105516321A (en) Data acquisition method and device
CN110516187A (en) A kind of page processing method, mobile terminal, readable storage medium storing program for executing
CN104516643A (en) Method and device for start application, and computing terminal
KR101777035B1 (en) Method and device for filtering address, program and recording medium
CN110515814A (en) Full dose log collecting method, device and the mobile terminal of iOS client
RU2643439C2 (en) Method and device for presenting tasks
CN104407774A (en) Screen switching equipment and method as well as mobile terminal
US20140258347A1 (en) Grouping files for optimized file operations
CN104484513B (en) A kind of ground drawing generating method and computing 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