CN106294123A - A kind of travel through the method for route matching, device and mobile terminal in test - Google Patents

A kind of travel through the method for route matching, device and mobile terminal in test Download PDF

Info

Publication number
CN106294123A
CN106294123A CN201610580913.4A CN201610580913A CN106294123A CN 106294123 A CN106294123 A CN 106294123A CN 201610580913 A CN201610580913 A CN 201610580913A CN 106294123 A CN106294123 A CN 106294123A
Authority
CN
China
Prior art keywords
path
array
current path
destination
destination path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610580913.4A
Other languages
Chinese (zh)
Other versions
CN106294123B (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)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses and a kind of travel through the method for route matching, device and mobile terminal in test, described method is suitable to perform in the terminal, including: by the major key information cache of the control of Action Events to be responded to current path array, from destination path set, obtain each destination path array, the current path in current path array is mated with the destination path execution route successively in each destination path array;If there is the destination path that the match is successful, the then path operations that performance objective path is corresponding;If there is not the destination path that the match is successful, then current control response Action Events, wherein, the destination path execution route coupling in the current path in current path array and a destination path array is included: judge the length scale of this current path and this destination path;If the length of this current path is not less than the length of this destination path, then it is that lower target element begins look for this destination path to mate with location index from current path array.

Description

A kind of travel through the method for route matching, device and mobile terminal in test
Technical field
The present invention relates to automatic test field, particularly to a kind of travel through the method for route matching in test, device and Mobile terminal.
Background technology
In automatic test field, traversal method of testing has been widely used in all kinds of testing scheme, plays important Effect.But, in current traversal method of testing, but do not comprise anticipating of traverse path information, and the path traveled through The most also the effect of traversal test is influenced whether.Such as, when testing " photograph album " this application, the paths in ergodic process For " entirely selecting deletion to determine ", after the traversal performing this path is tested, the whole photos in photograph album are deleted, tested Resource is empty, causes the traversal effectiveness in later stage to be greatly lowered.If but the most simple by " deletion " operation shield, it is clear that meeting Directly affect the effectiveness of traversal, because the deletion for an independent photo also can be shielded, need exist to traversal Path in test is mated in advance.
Traveling through the technical scheme of route matching in test it is, therefore, desirable to provide a kind of, specific aim solves asking of traverse path Topic, adds the detection of destination path in ergodic process, promotes the validity and reliability of traversal test further.
Summary of the invention
To this end, the present invention provides a kind of travels through the scheme of route matching in test, with try hard to solve or at least alleviate on The problem that face exists.
According to an aspect of the present invention, it is provided that a kind of travel through the method for route matching in test, be suitable at mobile terminal Middle execution, first the method comprises the steps:, obtains the major key information of the control of Action Events to be responded, and major key is believed Breath includes control ID and control text;Major key information is cached to current path array as new routing information, current road In each element of footpath array, storage has the routing information of current path, and a length of current path array of current path has stored road The element number of footpath information;From destination path set, obtain each destination path array, each element of destination path array is deposited Contain the routing information of destination path, the length of a length of destination path array of destination path;To in current path array Current path mates with the destination path execution route successively in each destination path array;If there is the target road that the match is successful Footpath, then the path operations that performance objective path is corresponding;If there is not the destination path that the match is successful, then current control response operation Event, wherein, to the destination path execution route in the current path in current path array and a destination path array Join and include: judge the length scale of this current path and this destination path;If the length of this current path is not less than this target road The length in footpath, then arrange the location index of current path array and be initialized as 0, from current path array with location index is Lower target element begins look for this destination path to mate.
Alternatively, in the traversal test according to the present invention in the method for route matching, current in current path array Path is mated with the destination path execution route in a destination path array and is also included: if the length of this current path is less than being somebody's turn to do The length of destination path, then judge to search unsuccessfully, no longer execution route coupling.
Alternatively, according to the present invention traversal test in route matching method in, Action Events include click event, Slip event, length press any one in event and incoming event.
Alternatively, according to the present invention traversal test in route matching method in, the length of current path array with The length of the longest destination path is consistent.
Alternatively, in the traversal test according to the present invention in the method for route matching, using major key information as new road Footpath information cache includes to current path array: if current path array is sky, then using major key information as new path letter Breath stores to last element of current path array;If current path array is not empty, then by current path array In each element, the routing information of storage moves forward one, and using major key information as new path information storage to current path In last element of array.
Alternatively, in the traversal test according to the present invention in the method for route matching, with position from current path array Putting index is that the destination path that lower target element begins look in destination path array includes to carry out coupling: from current path number Group is that lower target element starts with location index, searches the path letter of storage in first element in destination path array successively Breath;If being that lower target element starts with location index in current path array, find first unit of destination path array The routing information of storage in element, then obtain the subscript of the element of store path information in current path array and be assigned to position rope Draw;If subscript is not more than current path length, then with location index from current path array with the length sum of destination path Start for lower target element, successively coupling current path and destination path;Do not mate with destination path when current path exists Routing information time, obtain in current path array the subscript of the element storing this routing information and be assigned to location index, weight New from current path array with location index be lower target element begin look in destination path array destination path to enter Row coupling.
Alternatively, in the traversal test according to the present invention in the method for route matching, if also including at current path number Group is that lower target element starts with location index, does not finds the path letter of storage in first element of destination path array Breath, then judge to search unsuccessfully, no longer execution route coupling.
Alternatively, in the traversal test according to the present invention in the method for route matching, if also including subscript and target road The length sum in footpath is more than current path length, then judge to search unsuccessfully, no longer execution route coupling.
According to a further aspect of the invention, it is provided that a kind of travel through the device of route matching in test, be suitable to reside in shifting In dynamic terminal, this equipment includes the first acquisition module, cache module, the second acquisition module, matching module, execution module and response Module.Wherein, the first acquisition module, be suitable to obtain the major key information of the control of Action Events to be responded, major key information bag Include control ID and control text;Cache module, is suitable to cache to current path array major key information as new routing information In, in each element of current path array, storage has the routing information of current path, a length of current path number of current path Organize the element number of store path information;Second acquisition module, is suitable to obtain each destination path number from destination path set Group, in each element of destination path array, storage has the routing information of destination path, a length of destination path number of destination path The length of group;Matching module, is suitable to the current path in current path array and the destination path in each destination path array Execution route coupling successively, wherein to the destination path in the current path in current path array and a destination path array Execution route coupling is suitable to the length scale judging this current path with this destination path, when the length of this current path is not less than During the length of this destination path, the location index of current path array is set and is initialized as 0, with position from current path array Put index and begin look for this destination path to mate for lower target element;Perform module, be suitable to when existing that the match is successful During destination path, the path operations that performance objective path is corresponding;Respond module, is suitable to there is the destination path that the match is successful Time, current control response Action Events.
Alternatively, in the traversal test according to the present invention in the device of route matching, matching module is further adapted for, when deserving When the length in front path is less than the length of this destination path, it is judged that search unsuccessfully, no longer execution route coupling.
Alternatively, according to the present invention traversal test in route matching device in, Action Events include click event, Slip event, length press any one in event and incoming event.
Alternatively, according to the present invention traversal test in route matching device in, the length of current path array with The length of the longest destination path is consistent.
Alternatively, in the traversal test according to the present invention in the device of route matching, cache module is further adapted for: when When current path array is empty, using major key information as new path information storage to last element of current path array In;When current path array is not empty, the routing information of storage in each element of current path array is moved forward one, And using major key information as new path information storage to last element of current path array in.
Alternatively, in the traversal test according to the present invention in the device of route matching, matching module is further adapted for: from Current path array is that lower target element starts with location index, searches in destination path array successively and first element is deposited The routing information of storage;When being that lower target element starts with location index in current path array, find destination path array First element in the routing information of storage time, obtain the subscript of the element of store path information in current path array and compose Value is to location index;When the length sum of subscript Yu destination path is not more than current path length, from current path array It is that lower target element starts with location index, coupling current path and destination path successively;When current path exists and target During the unmatched routing information in path, obtain the subscript of the element storing this routing information in current path array and be assigned to position Put index, be the target that lower target element begins look in destination path array with location index from current path array again Path is to mate.
Alternatively, in the traversal test according to the present invention in the device of route matching, matching module is further adapted for: when Current path array is that lower target element starts with location index, does not finds in first element of destination path array During the routing information stored, it is judged that search unsuccessfully, no longer execution route coupling.
Alternatively, in the traversal test according to the present invention in the device of route matching, matching module is further adapted for: when When the length sum of subscript and destination path is more than current path length, it is judged that search unsuccessfully, no longer execution route coupling.
According to a further aspect of the invention, a kind of mobile terminal is also provided for, in testing including the traversal according to the present invention The device of route matching.
In traversal test according to the present invention, the technical scheme of route matching, first obtains Action Events to be responded The major key information of control and be stored in current path array, to the current path in current path array and each destination path The destination path of array mates successively, if there is the destination path that the match is successful, then performs the road that this destination path is corresponding Footpath operates, if not existing, then and current control response Action Events.In technique scheme, by traversal test process Add the coupling of destination path, when the current path in test matches destination path, take corresponding with destination path Treatment measures, especially can reach positive effect in terms of shielding some particular path, greatly improve traversal test Effectiveness.
Accompanying drawing explanation
In order to realize above-mentioned and relevant purpose, herein in conjunction with explained below and accompanying drawing, some illustrative side is described Face, these aspects indicate can to put into practice the various modes of principles disclosed herein, and all aspects and equivalence aspect It is intended to fall under in the range of theme required for protection.By reading in conjunction with the accompanying detailed description below, the disclosure above-mentioned And other purpose, feature and advantage will be apparent from.Throughout the disclosure, identical reference generally refers to identical Parts or element.
Fig. 1 shows the schematic diagram of mobile terminal 100 according to an embodiment of the invention;
Fig. 2 shows the flow chart of the method 200 of route matching in traversal test according to an embodiment of the invention;
Fig. 3 shows according to an embodiment of the invention to the current path in current path array and destination path number The flow chart of the destination path execution route coupling 240 in group;And
Fig. 4 shows the schematic diagram of the device 300 of route matching in traversal test according to an embodiment of the invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 1 is the structured flowchart of mobile terminal 100.Mobile terminal 100 can include memory interface 102, or many Individual data processor, image processor and/or CPU 104, and peripheral interface 106.
Memory interface 102, one or more processor 104 and/or peripheral interface 106 both can be discrete components, also Can be integrated in one or more integrated circuit.In the mobile terminal 100, various elements can be by one or more communication Bus or holding wire couple.Sensor, equipment and subsystem are alternatively coupled to peripheral interface 106, in order to help realizes multiple Function.
Such as, motion sensor 110, light sensor 112 and range sensor 114 are alternatively coupled to peripheral interface 106, Facilitating orientation, illuminate and the function such as range finding.Other sensors 116 are equally connected with peripheral interface 106, such as, position system System (such as GPS), temperature sensor, biometric sensor or other sensor devices, thus can help to implement phase The function closed.
Camera sub-system 120 and optical pickocff 122 may be used for the camera of convenient such as recording photograph and video clipping The realization of function, wherein said camera sub-system and optical pickocff can be such as charge-coupled image sensor (CCD) or complementary gold Belong to oxide semiconductor (centimetre OS) optical pickocff.Reality can be helped by one or more radio communication subsystem 124 Existing communication function, wherein radio communication subsystem can include that radio-frequency transmitter and transmitter and/or light (the most infrared) receive Machine and transmitter.The particular design of radio communication subsystem 124 and embodiment can depend on what mobile terminal 100 was supported One or more communication networks.Such as, mobile terminal 100 can 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 speaker 128 and mike 130, in order to helps enforcement to enable voice Function, such as speech recognition, speech reproduction, digital record and telephony feature.I/O subsystem 140 can include touch screen control Device 142 processed and/or other input controllers 144 one or more.Touch screen controller 142 is alternatively coupled to touch screen 146.Lift For example, this touch screen 146 and touch screen controller 142 can use any one of multiple touch-sensing technology to detect The contact carried out therewith and movement or time-out, wherein detection technology is including, but not limited to capacitive character, resistive, infrared and table Face technology of acoustic wave.Other input controllers 144 one or more are alternatively coupled to other input/control devicess 148, such as one Or the pointer device of multiple button, rocker switch, thumb wheel, infrared port, USB port and/or instruction pen etc.Described One or more button (not shown)s can include for controlling speaker 128 and/or the up/down of mike 130 volume Button.
Memory interface 102 can be coupled with memorizer 150.This memorizer 150 can include that high random access is deposited Reservoir and/or nonvolatile memory, the most one or more disk storage equipment, one or more optical storage apparatus, and/ Or flash memories (such as NAND, NOR).Memorizer 150 can store operating system 172, such as Android, iOS or The operating system of Windows Phone etc.This operating system 172 can include for processing basic system services and execution Depend on the instruction of the task of hardware.Memorizer 150 can also store application 174.When mobile device is run, can be from memorizer Load operating system 172 in 150, and performed by processor 104.Application 174 operationally, also can add from memorizer 150 Carry, and performed by processor 104.Application 174 operates on operating system, utilizes operating system and bottom hardware to provide Interface realizes the desired function of various user, such as instant messaging, web page browsing, pictures management etc..Application 174 can be independently of Operating system provides, it is also possible to be that operating system carries.During it addition, application 174 is installed in mobile terminal 100, also Can add to operating system and drive module.In above-mentioned various application 174, a kind of application therein be according to the present invention time Go through the device 300 of route matching in test.
Fig. 2 shows the flow chart of the method 200 of route matching in traversal test according to an embodiment of the invention.Time The method 200 going through route matching in test is suitable to perform in mobile terminal (the such as mobile terminal 100 shown in Fig. 1).
As in figure 2 it is shown, method 200 starts from step S210.In step S210, first obtain Action Events to be responded The major key information of control, major key information includes control ID and control text.Wherein, Action Events includes click event, slip Event, length press any one in event and incoming event.In the present embodiment, Action Events is click event, currently treats response point The control hitting event is " choosing entirely " button in " photograph album " this application.The control ID of " choosing entirely " this control of button is Com.mlab.photos:id/button1, control text is full choosing.
Subsequently, step S220 is entered.In step S220, major key information is cached to current road as new routing information In the array of footpath, in each element of current path array, storage has the routing information of current path, current path a length of currently The element number of path array store path information.If current path array is empty, then using major key information as new path Information stores to last element of current path array;If current path array is not empty, then by current path array Each element in the routing information of storage move forward one, and using major key information as new path information storage to current road In last element of footpath array.In the present embodiment, current path array is path, including 4 elements, in each element Can store 1 routing information, the routing information stored is combined into current path.Major key information at " choosing entirely " this control is made Before in new routing information caching to path, it is first to store in variable newNode, then newNode is stored in path. And the object that this variable of newNode is Node class, Node class is expressed as: class Node{String text;String id;}.Now, path=[a, b, c, d], wherein before the most corresponding traversal of these 4 routing informations of a, b, c and d " choosing entirely " control The major key information of the control in path, current path is a b c d.For ease of representing, below will be with " choosing entirely " two Word replaces the major key information of " choosing entirely " control to be described.The element totally 4 of store path information in current path, the most currently A length of the 4 of path.It is not empty due to path, then by routing information a, b, c and d of storage in each element of path the most forward Mobile one, and will entirely select storage to last element, i.e. in path [3], the path finally obtained be path=[b, c, d, Full choosing], current path is that b c d selects entirely.
In step S230, from destination path set, obtain each destination path array, each element of destination path array Middle storage has the routing information of destination path, the length of a length of destination path array of destination path.In the present embodiment, mesh Mark set of paths is list, can deposit multiple destination path array in list, has deposited 2 destination path arrays, is respectively Target_1 and target_2, target_1=[select, delete, determine] entirely, target_2=[b, Quan Xuan, d, e].Wherein, entirely Selecting, delete and be defined as in target_1 the routing information of the destination path of storage, the destination path of target_1 is complete Selecting deletion to determine, target_1 is 3 with the length of its destination path, 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 is that b selects d e, target_2 and its mesh entirely The length in mark path is 4.The longest destination path is the destination path of target_2, a length of 4, and the length of path is also 4, Meet length this condition consistent with the length of the longest destination path of current path array.For ease of statement, Quan Xuan, deletion, Determine, a, b, c, d and e are used to refer to its each self-corresponding control.
Enter step S240, in step S240, to the current path in current path array and each destination path array In destination path execution route successively coupling.Fig. 3 shows according to an embodiment of the invention in current path array Current path mate with the destination path execution route in destination path array 240 flow chart.In the present embodiment, the most right Current path in path mates with the destination path in target_1.As it is shown on figure 3, in step S241, it is judged that should Current path and the length scale of this destination path.A length of the 4 of current path, in target_1 a length of the 3 of destination path, Then the length of current path is more than the length of destination path in target_1.
In step S242, if the length of this current path is not less than the length of this destination path, then current path is set The location index of array is also initialized as 0, is that lower target element begins look for this mesh with location index from current path array Mark path is to mate.If the length of this current path is less than the length of this destination path, then judges to search unsuccessfully, no longer hold Row route matching.Now, the location index arranging path is index, and is initialized with 0 to point to path [0].First, From the beginning of being lower target element with location index from current path array, successively in lookup destination path array in first element The routing information of storage.From the beginning of path [0], first path [0] and target_1 [0] is contrasted, path [0]=b, Target_1 [0]=entirely select, thus path [0] ≠ target_1 [0], then by path [1], path [2] and path [3] successively with Target_1 [0] contrasts, and finds path [3]=target_1 [0].If under in current path array with location index being Target element starts, and finds the routing information of storage in first element of destination path array, then obtains current path number The subscript of the element of store path information be assigned to location index in group;If under in current path array with location index being Target element starts, and does not finds the routing information of storage in first element of destination path array, then judge to search unsuccessfully, No longer execution route coupling.Now, from the beginning of path [0], path finds path [3] and target_1 [0] and mates, obtain Take and be designated as 3 under path [3], and be assigned to index, then index=3.If subscript is not more than with the length sum of destination path Current path length, then from the beginning of being lower target element with location index from current path array, successively coupling current path and Destination path;If subscript is more than current path length with the length sum of destination path, then judges to search unsuccessfully, no longer perform road Footpath is mated.Owing to being designated as 3 under this, destination path a length of 3, and 3+3 > 4, therefore judge to search unsuccessfully, for working as in path Destination path in front path and target_1 no longer execution route mates.
After when the destination path in target_1, it fails to match, to the current path in path and the target in target_2 Path execution route coupling.In step S241, a length of the 4 of current path, in target_2 a length of the 4 of destination path, 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 is first contrasted by path [0] and target_2 [0], path [0]=b, target_2 [0]=b, thus Path [0]=target_2 [0].Obtain and be designated as 0 under path [0], and be assigned to index, then index=0.Due to this subscript It is 0, destination path a length of 4, and 0+4=4, therefore from the beginning of path [0], path searches target road in target_2 Footpath, but, path [1]=c, target_2 [0]=entirely select, path [1] ≠ target_2 [0].When in current path exist with During the unmatched routing information of destination path, obtain subscript the assignment of the element storing this routing information in current path array To location index, it is that lower target element begins look in destination path array with location index from current path array again Destination path is to mate.Now, 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.Owing to path [1], path [2] and path [3] are equal and target_2 [0] do not mate, start with path [1] in path, do not find the element mated with target_2 [0], then judge to search to lose Lose, no longer execution route coupling.Current path in current path array is held with the destination path in each destination path array The key code of row route matching is as follows:
In step s 250, if there is the destination path that the match is successful, the then path operations that performance objective path is corresponding.Right Destination path in target_1 " selects deletion to determine " entirely, the path operations of its correspondence for never call " determination " this The response method of one control, thus evade the operation of this destination path.And for the destination path in target_2, " b is complete Select d e ", the path operations of its correspondence is the response method never calling " e " this control.Now, do not deposit in path At the destination path that the match is successful.
In step S260, if there is not the destination path that the match is successful, then current control response Action Events.Due to Path does not exist the destination path that the match is successful, therefore current control " choosing entirely " response click event.In " choosing entirely " response point After hitting event, there is respective change in the interface in the screen of mobile terminal, now continues executing with route matching in traversal test Method 200, obtains the major key information of the control of new Action Events to be responded.Key code is as follows:
Fig. 4 shows the schematic diagram of the device 600 of route matching in traversal test according to an embodiment of the invention.Should Device includes: the first acquisition module 310, cache module the 320, second acquisition module 330, matching module 340, execution module 350 With respond module 360.
First acquisition module 310 is suitable to obtain the major key information of the control of Action Events to be responded, major key information bag Include control ID and control text.Wherein, Action Events includes that click event, slip event, length are appointed as in event and incoming event A kind of
Cache module 320 is suitable to cache to current path array major key information as new routing information, current road In each element of footpath array, storage has the routing information of current path, and a length of current path array of current path has stored road The element number of footpath information.Wherein, the length of current path array is consistent with the length of the longest destination path.
Cache module 320 is further adapted for when current path array is for sky, using major key information as new routing information Store to last element of current path array;When current path array is not empty, each by current path array In element, the routing information of storage moves forward one, and using major key information as new path information storage to current path number In last element of group.
Second acquisition module 330 is suitable to obtain each destination path array from destination path set, described destination path number In each element of group, storage has the routing information of destination path, the length of a length of destination path array of described destination path.
Matching module 340 is suitable to the current path in current path array and the destination path in each destination path array Execution route coupling successively, wherein to the destination path in the current path in current path array and a destination path array Execution route coupling is suitable to the length scale judging this current path with this destination path, when the length of this current path is not less than During the length of this destination path, the location index of current path array is set and is initialized as 0, with position from current path array Put index and begin look for this destination path to mate for lower target element;When the length of this current path is less than this target road During the length in footpath, it is judged that search unsuccessfully, no longer execution route coupling.
From the beginning of matching module 340 is further adapted for being lower target element with location index from current path array, successively Search the routing information stored in first element in destination path array;Under in current path array with location index being Target element starts, and when finding the routing information of storage in first element of destination path array, obtains current path number The subscript of the element of store path information be assigned to location index in group;When the length sum of subscript with destination path is not more than During current path length, from the beginning of being lower target element with location index from current path array, successively coupling current path and Destination path;When current path exists with the unmatched routing information of destination path, obtain in current path array and store The subscript of the element of this routing information is also assigned to location index, is lower target with location index again from current path array Element begins look for the destination path in destination path array to mate;When the length sum of subscript with destination path is more than During current path length, it is judged that search unsuccessfully, no longer execution route coupling;Under in current path array with location index being Target element starts, when not finding the routing information of storage in first element of destination path array, it is judged that search unsuccessfully, No longer execution route coupling.
Perform module 350 and be suitable to when there is the destination path that the match is successful, the path operations that performance objective path is corresponding.
Respond module 360 is suitable to when there is not the destination path that the match is successful, current control response Action Events.
About the concrete steps of route matching and embodiment in traversal test, the most detailed in description based on Fig. 2 Open, here is omitted.
In existing traversal method of testing, do not comprise anticipating of traverse path information, and the path traveled through is usually Also the effect of traversal test is influenced whether.The technical scheme of route matching in traversal test according to embodiments of the present invention, first Obtain the major key information of the control of Action Events to be responded and be stored in current path array, in current path array Current path and the destination path of each destination path array mate successively, if there is the destination path that the match is successful, then Perform the path operations that this destination path is corresponding, if not existing, then current control response Action Events.In technique scheme In, by adding the detection to destination path and coupling in traversal test process, when the current path in test matches During destination path, taking the treatment measures corresponding with destination path, specific aim solves the problem of traverse path, especially can be Shield some particular path aspect and reach positive effect, greatly improve the validity and reliability of traversal test.
B10. the device as described in B9, wherein said matching module is further adapted for, when the length of this current path is less than this mesh When marking the length in path, it is judged that search unsuccessfully, no longer execution route coupling.
B11. the device as described in B9 or 10, wherein said Action Events includes that click event, slip event, length are by event With in incoming event any one.
B12. the device as described in B9 or 10, the length of wherein said current path array and the length of the longest destination path Unanimously.
B13. the device as described in B9 or 10, wherein said cache module is further adapted for:
When described current path array is empty, using described major key information as new path information storage to current path In last element of array;
When described current path array is not empty, by the routing information of storage in each element of current path array forward Mobile one, and using described major key information as new path information storage to last element of current path array in.
B14. the device as described in B9 or 10, wherein said matching module is further adapted for:
From the beginning of being lower target element with location index from current path array, search in destination path array first successively The routing information of storage in individual element;
When being that lower target element starts with location index in current path array, find the first of destination path array During the routing information stored in individual element, obtain subscript the assignment of the element storing described routing information in current path array To location index;
When the length sum of described subscript Yu described destination path is not more than current path length, from current path number Group is that lower target element starts with location index, mates described current path and described destination path successively;
When described current path exists with the unmatched routing information of described destination path, obtain current path array The subscript of the element of middle this routing information of storage is also assigned to location index, again from current path array with location index is Lower target element begins look for the destination path in destination path array to mate.
B15. the device as described in B14, wherein said matching module is further adapted for:
When being that lower target element starts with location index in current path array, do not find the of destination path array During the routing information stored in one element, it is judged that search unsuccessfully, no longer execution route coupling.
B16. the device as described in B14, wherein said matching module is further adapted for:
When the length sum of described subscript with described destination path is more than current path length, it is judged that search unsuccessfully, no Execution route coupling again.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, knot Structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor The application claims protected is than the feature more features being expressly recited in each claim.More precisely, as following As claims are reflected, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself Independent embodiment as the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or group Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in this example In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into multiple in addition Submodule.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively Change and they are arranged in one or more equipment different from this embodiment.Can the module in embodiment or Unit or assembly are combined into a module or unit or assembly, and can put them into multiple submodule or subelement in addition Or sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use and appoint What combination is to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed Any method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint Claim, summary and accompanying drawing) disclosed in each feature can by provide identical, equivalent or similar purpose alternative features come Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint One of meaning can mode use in any combination.
Additionally, some in described embodiment be described as at this can be by the processor of computer system or by performing The method of other device enforcement of described function or the combination of method element.Therefore, have for implementing described method or method The processor of the necessary instruction of element is formed for implementing the method or the device of method element.Additionally, device embodiment This described element is the example of following device: this device is for implementing by performed by the element of the purpose in order to implement this invention Function.
As used in this, unless specifically stated so, ordinal number " first ", " second ", " the 3rd " etc. is used Describe plain objects and be merely representative of the different instances relating to similar object, and be not intended to imply that the object being so described must Must have the time upper, spatially, sequence aspect or in any other manner to definite sequence.
Although the embodiment according to limited quantity describes the present invention, but benefits from above description, the art In 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 The language that uses in this specification primarily to the readable and purpose of teaching and select rather than in order to explain or limit Determine subject of the present invention and select.Therefore, in the case of without departing from the scope of the appended claims and spirit, for this For the those of ordinary skill of technical field, many modifications and changes will be apparent from.For the scope of the present invention, to this The disclosure that invention is done is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. traveling through a method for route matching in test, be suitable to perform in the terminal, described method includes:
Obtaining the major key information of the control of Action Events to be responded, described major key information includes control ID and control text;
Described major key information is cached to current path array as new routing information, each unit of described current path array In element, storage has the routing information of current path, a length of current path array store path information of described current path Element number;
Obtaining each destination path array from destination path set, in each element of described destination path array, storage has target road The routing information in footpath, the length of a length of destination path array of described destination path;
Current path in current path array is mated with the destination path execution route successively in each destination path array;
If there is the destination path that the match is successful, then perform the path operations that described destination path is corresponding;
If there is not the destination path that the match is successful, then current control responds described Action Events,
Wherein, the destination path execution route in the current path in current path array and a destination path array is mated Including:
Judge the length scale of this current path and this destination path;
If the length of this current path not less than the length of this destination path, then arrange current path array location index and at the beginning of Begin to turn to 0, be that lower target element begins look for this destination path to mate with location index from current path array.
2. the method for claim 1, wherein to the current path in current path array and a destination path array In destination path execution route coupling also include:
If the length of this current path is less than the length of this destination path, then judge to search unsuccessfully, no longer execution route coupling.
3. method as claimed in claim 1 or 2, wherein said Action Events includes that click event, slip event, length are by event With in incoming event any one.
4. method as claimed in claim 1 or 2, the length of wherein said current path array and the length of the longest destination path Unanimously.
5. method as claimed in claim 1 or 2, wherein caches described major key information to current road as new routing information Footpath array includes:
If described current path array is empty, then using described major key information as new path information storage to current path array Last element in;
If described current path array is not empty, then the routing information of storage in each element of current path array is moved forward One, and using described major key information as new path information storage to last element of current path array in.
6. method as claimed in claim 1 or 2, from the beginning of being wherein lower target element with location index from current path array The destination path searched in destination path array includes to carry out coupling:
From the beginning of being lower target element with location index from current path array, search first unit in destination path array successively The routing information of storage in element;
If being that lower target element starts with location index in current path array, find first unit of destination path array The routing information of storage in element, then obtain the subscript of the element storing described routing information in current path array and be assigned to position Put index;
If the length sum of described subscript and described destination path is not more than current path length, then from current path array with Location index is that lower target element starts, and mates described current path and described destination path successively;
When described current path exists with the unmatched routing information of described destination path, obtain in current path array and deposit Store up the subscript of the element of this routing information and be assigned to location index, again with location index as subscript from current path array Element begin look for the destination path in destination path array to mate.
7. method as claimed in claim 6, also includes:
If being that lower target element starts with location index in current path array, do not find first of destination path array The routing information of storage in element, then judge to search unsuccessfully, no longer execution route coupling.
8. method as claimed in claim 6, also includes:
If described subscript is more than current path length with the length sum of described destination path, then judges to search unsuccessfully, no longer hold Row route matching.
9. travel through a device for route matching in test, be suitable to resident in the terminal, described device includes:
First acquisition module, is suitable to obtain the major key information of the control of Action Events to be responded, and described major key information includes Control ID and control text;
Cache module, be suitable to using described major key information as new routing information caching to current path array in, described currently In each element of path array, storage has the routing information of current path, and a length of current path array of described current path is The element number of store path information;
Second acquisition module, is suitable to obtain each destination path array from destination path set, described destination path array each In element, storage has the routing information of destination path, the length of a length of destination path array of described destination path;
Matching module, is suitable to hold the current path in current path array successively with the destination path in each destination path array Row route matching, wherein performs road to the destination path in the current path in current path array and a destination path array Footpath coupling is suitable to the length scale judging this current path with this destination path, when the length of this current path is not less than this target During 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 This destination path is begun look for mate for lower target element;
Performing module, being suitable to, when there is the destination path that the match is successful, perform the path operations that described destination path is corresponding;
Respond module, is suitable to when there is not the destination path that the match is successful, and current control responds described Action Events.
10. a mobile terminal, including traveling through the device of route matching in test as claimed in claim 9.
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 true CN106294123A (en) 2017-01-04
CN106294123B 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)

Cited By (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
CN112328843A (en) * 2020-10-30 2021-02-05 深圳市元征科技股份有限公司 Method and related device for searching rewritten communication parameters in ODX (optical Density reduction)
CN114490395A (en) * 2022-01-27 2022-05-13 北京飞书科技有限公司 Test processing method, device, equipment and medium

Citations (3)

* 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
US20140325281A1 (en) * 2011-11-24 2014-10-30 Ntt Docomo, Inc. Testing apparatus and testing method
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface

Patent Citations (3)

* 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
US20140325281A1 (en) * 2011-11-24 2014-10-30 Ntt Docomo, Inc. Testing apparatus and testing method
CN104572430A (en) * 2013-10-24 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for testing terminal application interface

Cited By (5)

* 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
TWI664836B (en) * 2017-01-13 2019-07-01 大陸商騰訊科技(深圳)有限公司 Methord, device and server for controlling route search for simulated objects
CN112328843A (en) * 2020-10-30 2021-02-05 深圳市元征科技股份有限公司 Method and related device for searching rewritten communication parameters in ODX (optical Density reduction)
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

Also Published As

Publication number Publication date
CN106294123B (en) 2018-12-18

Similar Documents

Publication Publication Date Title
KR20210053122A (en) Method, apparatus and storage medium for training of neural network
US20190171840A1 (en) Access controlled graph query spanning
KR101726030B1 (en) Method and device for controlling page rollback
RU2718154C1 (en) Method and device for displaying possible word and graphical user interface
CN107247805B (en) Path searching method, device and computing terminal based on A-x algorithm
CN111566652B (en) Context-aware recommendation for assisting a user in completing a task
US20160232374A1 (en) Permission control method and apparatus
CN107329750A (en) The recognition methods of advertisement page, jump method and mobile terminal in application program
KR20180008480A (en) System and method for extracting and sharing application-related user data
CN105868105A (en) Application traversal testing method and device, and mobile terminal
CN105630686A (en) Traversal testing method and device for applications and mobile terminal
CN105183837B (en) Thumbnail list view display method and system of mobile terminal
CN104572922A (en) Image processing method and device based on mobile equipment
CN104965664A (en) Application operation method and apparatus
CN105512033B (en) A kind of automated testing method of mobile terminal, device and mobile terminal
CN105373479A (en) Automatic test method and device of memory leakage and mobile terminal
US20120221969A1 (en) Scrollable list navigation using persistent headings
CN107291772B (en) Search access method and device and electronic equipment
CN105516321A (en) Data acquisition method and device
CN104991847A (en) Memory leakage automatic testing method and apparatus and mobile terminal
EP2690567A2 (en) Method for managing data and an electronic device thereof
KR20150055600A (en) Method, terminal and electronic device for processing e-book document
CN103218555A (en) Logging-in method and device for application program
CN106294123A (en) A kind of travel through the method for route matching, device and mobile terminal in test
CN104516673A (en) Icon display method, equipment and mobile terminal

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