CN106168923A - A kind of function traversal and interface traversal method and system - Google Patents
A kind of function traversal and interface traversal method and system Download PDFInfo
- Publication number
- CN106168923A CN106168923A CN201610509877.2A CN201610509877A CN106168923A CN 106168923 A CN106168923 A CN 106168923A CN 201610509877 A CN201610509877 A CN 201610509877A CN 106168923 A CN106168923 A CN 106168923A
- Authority
- CN
- China
- Prior art keywords
- view node
- view
- container
- heap
- node container
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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)
- Acyclic And Carbocyclic Compounds In Medicinal Compositions (AREA)
Abstract
The invention discloses a kind of function traversal and interface traversal method and system, method therein includes: joined in view node container heap by the new view node container occurred on interface;In the view node heap of the view node container that each exercisable sub-view node in view node container is joined correspondence;After the view that sub-view node is corresponding is operated, sub-view node is deleted from the view node heap of corresponding view node container;After the view node heap of view node container is cleared, view node container is deleted from view node container heap;After view node container heap is cleared, it is considered as a subfunction traversal and has traveled through with interface.Can effectively distinguish, by the present invention, the UI control being traversed and not yet obtain the UI control of traversal, and then preferably supporting that more fully automatic interface traversal travels through with function.
Description
Technical field
The present invention relates to apply technical field of measurement and test, in particular, relate to a kind of function traversal and interface traversal method
And system.
Background technology
Along with the increase of android system market share, increasing developer develops based on android system
APP (Application, application).Every money APP, after exploitation, can not reach the standard grade at once, because when actually used, have
It is likely to appear in the response of river flowing from Guizhou Province through Hunan into Dongting Lake method, UI when user clicks on certain function and when redirecting, redirects the bug such as failure or logical error.Cause
This, typically after APP has developed, after needing to travel through the APP developed, just can decide whether to carry out this APP
Issue.
At present, APP traversal is divided into two kinds, and one is the traversal at UI (User Interface, user interface) interface, its
Requiring to have traveled through all of interface, another kind is function traversal, and it requires all functions in traversal APP.In function time
In going through, need by judging that the change at UI interface determines whether the function at certain UI interface is complete traversal, even
In the traversal of UI interface, it is also desirable to ensure that the clicked all of interface of guarantee of crossing of each control is obtained for traversal.Also
That is, need by judging that the change at interface determines whether to complete function traversal and interface travels through.
But, be there are some defects in the judgment mode of interface change at present.Such as, sentenced by current activity
During disconnected interface change, the UI switched mutually as framgent multiple under same activity or multiple tab then cannot do
Go out correct judgement.When judging that interface changes by the UI path contrast at interface, then may in the interface of part change
Cause the operation repeated in a large number, even without thinking over details, then there will be the endless loop of UI interface traversal.Certainly,
In order to avoid the endless loop that UI interface travels through occurs, the upper limit of same UI operand can be limited, but this kind of strategy is led the most unavoidably
Cause careless omission.Additionally, when by comparing control property and judging that interface changes, owing to it uses the control of different attribute
Adding in a stack, operation performs the judgement of the interface change carried out the most in turn, then occur under different activity
When having the control of same alike result, the judgement to the change of UI interface arises that careless omission.Accordingly, it would be desirable to a kind of new interface change
Judgment mode has determined whether that function traversal and interface travel through.
Summary of the invention
In view of the above problems, it is proposed that the present invention in case provide one overcome the problems referred to above or at least in part solve on
State function traversal and interface traversal method and the corresponding system of problem.
According to one aspect of the present invention, it is provided that a kind of function traversal and interface traversal method, including:
The new view node container occurred on interface is joined in view node container heap;Wherein, a view joint
Point comprises many sub-view nodes, a corresponding view of sub-view node;
Each exercisable sub-view node in described view node container is joined the view node container of correspondence
View node heap in;
After the view that described sub-view node is corresponding is operated, by described sub-view node from corresponding view node
The view node heap of container is deleted;
After the view node heap of described view node container is cleared, by described view node container from described view
Node container heap is deleted;
After described view node container heap is cleared, it is considered as a subfunction traversal and has traveled through with interface.
Alternatively, before the new view node container occurred on interface is joined in view node container heap, also
Including: judge on interface, whether to occur in that new view node container.
Alternatively, when judging to occur on interface multiple new view node container, at the new view joint occurred
Point container determines that a view node container joins in described view node container heap.
Alternatively, in the new view node container occurred, determine that a view node container joins described view
During in node container heap, according to the UI structural path of the new view node container occurred, by described new view
The view node container that UI structural path level in node container is the highest joins in described view node container heap.
Alternatively, described son is determined according to clickable or the long-clickable attribute of described sub-view node
Whether view node is exercisable sub-view node.
Alternatively, when clickable or the long-clickable attribute of described sub-view node is true, described
Sub-view node is considered as operable;Otherwise, described sub-view node is considered as inoperable.
According to a further aspect in the invention, it is provided that a kind of function traversal and interface Ergodic Theory, including:
View node container adds unit, for the new view node container occurred on interface is joined view node
In container heap;Wherein, a view node comprises many sub-view nodes, a corresponding view of sub-view node;
View node adds unit, for being added by each exercisable sub-view node in described view node container
In the view node heap of corresponding view node container;
View knot removal unit, for after the view that described sub-view node is corresponding is operated, regards described son
Node of graph is deleted from the view node heap of corresponding view node container;
View node container deletes unit, is used for after the view node heap of described view node container is cleared, will
Described view node container is deleted from described view node container heap;
Travel through unit, for after described view node container heap is cleared, be considered as a subfunction traversal
Travel through with interface.
Alternatively, also include: the first judging unit, new by occur on interface for adding unit at view node container
View node container join in view node container heap before, it is judged that whether occur in that on interface that new view node holds
Device.
Alternatively, also include: view node container determines unit, for judging interface at described first judging unit
When multiple new view node container occurs, in the new view node container occurred, determine that a view node container adds
Enter in described view node container heap.
Alternatively, described view node container determine unit during determining view node container, according to being occurred
The UI structural path of new view node container, by the highest for the UI structural path level in described new view node container
One view node container joins in described view node container heap.
Alternatively, also include: the second judging unit, for clickable or long-according to described sub-view node
Clickable attribute, it is judged that whether described sub-view node is exercisable sub-view node.
Alternatively, judge that whether described sub-view node is the mistake of exercisable view node at described second judging unit
Cheng Zhong,
When clickable or the long-clickable attribute of described sub-view node is true, described sub-view
Node is considered as operable;Otherwise, described sub-view node is considered as inoperable.
Function traversal according to the present invention and interface traversal method, it is possible to efficiently differentiate the UI control that has been traversed and
Not yet obtain the UI control of traversal, and then preferably support that the interface traversal of more fully automatization travels through with function.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of description, and in order to allow above and other objects of the present invention, the feature and advantage can
Become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit common for this area
Technical staff will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, and is not considered as the present invention
Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 shows function traversal and the flow chart of interface traversal method according to an embodiment of the invention;
Fig. 2 shows function traversal and the flow chart of interface traversal method in accordance with another embodiment of the present invention;
Fig. 3 shows function traversal and the logical structure block diagram of interface Ergodic Theory according to an embodiment of the invention;
Fig. 4 shows function traversal and the logical structure frame of interface Ergodic Theory in accordance with another embodiment of the present invention
Figure.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the 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.
With reference to Fig. 1, the figure shows the main of function traversal and interface traversal method according to an embodiment of the invention
Flow process, the function traversal in the present embodiment mainly comprises the steps: with interface traversal method
S110: the new view node container occurred on interface is joined in view node container heap;Wherein, one regards
Node of graph comprises many sub-view nodes, a corresponding view of sub-view node.
Android is the tissue of control in screen, and each view (control) can form a sets of views
(ViewGroup), sets of views is a view containing other views.In android.view bag, ViewGroup inherits
View, therefore itself also has a characteristic of View, and the main function of sets of views is that it can comprise other views, makees
Container for other views.
It is to say, owing to there is view object and sets of views object in Android, therefore, it can view object
Regard view node as, and sets of views object regards view node container as.
Additionally, in the UI structural system of Android, a UI interface can comprise a view, and sets of views itself
Also it is a view, and sets of views can comprise again several views, therefore, according to the UI structure of Android, can will set
Each view on standby interface, including measure, layout, draw etc., operation is considered as a view node container, and will be each
Each attribute that operation is had is considered as the view node under this view node container.
Such as, layout is considered as a view node container, the id that layout is had, text, index,
The attributes such as class, content-dese, clickable are considered as a view node.But it should be recognized that layout is making
While view node container, it itself also it is a view node.In the present embodiment, each view node container is only born
Blame management itself and the sub-view node itself directly comprised, and each sub-view node all stores oneself place
View node container, the most every sub-view node all stores oneself structural path in whole UI.
S120: each exercisable sub-view node in view node container is joined the view node container of correspondence
View node heap in.
In the user interface portion of Android, Button control is one of the most frequently used control, and user can be by clicking on
It triggers sequence of events.A clickable attribute mark is had in the xml document attribute of Android Button control
Signing, this tag inheritance is from the xml attribute of View, and therefore, its value must be logical value (i.e. true or false).This label
Whether purpose is to arrange certain button control can be clicked.
Therefore, in the present embodiment, certain Button control can being regarded, the son under certain view node container regards as
According to clickable or the long-clickable attribute of this sub-view node, node of graph, determines that whether sub-view node is
Exercisable sub-view node.Specifically, clickable or the long-clickable attribute of group view node is true
Time, this sub-view node is considered as operable;Otherwise, this sub-view node is considered as inoperable.That is: when certain sub-view node
When clickable is true, represent that this sub-view node can be clicked, otherwise represent that this sub-view node can not be clicked;
When the long-clickable of certain sub-view node is true, represent that this sub-view node can be long pressed, otherwise represent
This sub-view node can not be long pressed.S130: after the view that sub-view node is corresponding is operated, by sub-view node from right
The view node heap of the view node container answered is deleted.
Wherein, compared to before by control is added stacked in carry out UI traversal by the way of, entering the control in stack must
Must follow principle first-in last-out, i.e. the control during advanced person is stacked is pressed at the bottom of stack, last control is in stack top, when traversal,
The control of press-in stack top needs first to pop, so, it is possible to traversal can be made to go wrong, and then cause traveling through unsuccessfully;And
The present invention by sub-view node is joined correspondence view node container view node heap in, owing to heap can be seen as
Being one tree, it does not has principle first-in last-out to limit, as long as after view corresponding to certain sub-view node is operated, so that it may
So that this sub-view node is deleted from the view node heap of corresponding view node container.Accordingly, with respect to stack, heap has relatively
Big degree of freedom.
It is to say, in the present embodiment, by the sub-view node operated from corresponding view node container
Which sub-view node is the mode deleted in view node heap can be apparent from is operated, and which sub-view node does not has
Have and operated, it is to avoid occur missing the problem of certain sub-view node, so that the judgement to interface change is the most accurate.
S140: after the view node heap of view node container is cleared, holds view node container from view node
Device heap is deleted.
In the present embodiment, by emptying the view node container of view node heap from corresponding view node container
Which control is the mode deleted can effectively distinguish has been traversed, and which control is not traversed, thus avoids becoming interface
There is careless omission in the judgement changed.
S150: after view node container heap is cleared, has been considered as a subfunction traversal and has traveled through with interface.
As example, under sets of views A, include view A1, A2 and A3.Therefore, it can regard sets of views A as view
Node container A, view A1, A2 and A3 regard sub-view node A1, A2 and A3 under view node container A as.
When the method utilizing the present invention to provide carries out function traversal with interface traversal, first view node container A is added
Enter in view node container heap, then judge whether this view node container A has exercisable sub-view node.According to son
The clickable Attribute Discovery of view node A1, A2, A3, sub-view node A1, A2, A3 are operable, by sub-view node A1,
A2, A3 join in the view node heap of view node container A.
After the view that sub-view node A1, A2 under view node container A are corresponding with A3 is operated, by A1, A2 and
A3 deletes from the view node heap of view node container A;After the view node heap of view node container A is cleared, will
View node container A deletes from view node container heap.Due to now, view node container heap contains only view node
Container A, therefore, after view node container A is deleted, view node container heap has been empty, now, is i.e. considered as simultaneously
Complete a subfunction traversal to travel through with interface.
Further, with reference to Fig. 2, the figure shows function traversal in accordance with another embodiment of the present invention and travel through with interface
The flow process of method, the function traversal in the present embodiment includes with interface traversal method:
S210: judge whether occur in that new view node container on interface.
Owing to each view on interface can be considered as a view node, several view nodes form one
View node container, and each view node container is only responsible for itself and sub-view node itself that directly comprise,
Therefore, after operating change each time, it is possible to the judgement center of gravity changed at interface is from UI interface unbound, then judges interface
On whether occur in that new view node container.
S220: when there is multiple view node container, adds the highest for a UI structural level view node container
In view node container heap, and exercisable for each in view node container view node is joined the view of correspondence
In the view node heap of node container heap.
In the present embodiment, if it find that multiple view node container, then just find out wherein UI structural level the highest
A view node container join in view node container heap, and each is newly added in view node container heap
View node container, exercisable for each of which view node can be joined the view of view node container heap of correspondence
In node heap.
Such as, occur in that sets of views A, sets of views B and sets of views C, then through to sets of views A, the UI structure sheaf of B, C simultaneously
The judgement of level finds, sets of views B and C belong to the sub-view under sets of views A, now, then sets of views A joins view node and holds
In device heap.
S230: after the view that view node is corresponding is operable to, deletes the view of correspondence from view node heap
Node, after a view node heap is cleared, deletes a view node container from view node container heap.
S240: after view node container heap is cleared, is considered as completing a subfunction traversal and interface travels through.
As another example of the present invention, under sets of views A, include sets of views A1 and view A2, A3, view
Three views A11, A12 and A13 are included under group A1.The most now, can judge that going out to have reproduced two view nodes on interface holds
Device, it may be assumed that view node container A and view node container A1, and by view node container A and the UI of view node container A1
The analysis of structural level finds, the structural level of view node container A is the highest, therefore, it can by sets of views A1 and view A2,
A3 regards sub-view node A1, A2 and A3 under view node container A as.
When the method utilizing the present invention to provide carries out function traversal with interface traversal, first view node container A is added
Enter in view node container heap, then judge whether this view node container A has exercisable sub-view node.According to son
The clickable Attribute Discovery of view node A1, A2, A3, sub-view node A1, A2, A3 are operable, by sub-view node A1,
A2, A3 join in the view node heap of view node container A.
During additionally, whether have exercisable sub-view node in judging view node container A, find sub-view node A1
Also have down sub-view node, now, then regard sub-view node A1 as sub-view node container A1, A11, A12 and A13 are then seen
Make the sub-view node under sub-view node A1.
Judge whether to have under sub-view node container A1 exercisable sub-view node, also according to A11, A12 and A13
Clickable attribute judges, by judging, A11, A12 and A13 are the most operable, now, A11, A12 and A13 are joined son
In the view node heap of view node container A1, after the view corresponding with A13 as A11, A12 is operated, by A11, A12 and A3
Delete from the view node heap of sub-view node container A1, after A11, A12 and A13 are all deleted, A1 is saved from view
The view node heap of some container A is deleted.
After the view corresponding at A2 with A3 is operated, A2 and A3 is deleted from the view node heap of view node container A
Remove, after the view node heap of view node container A is cleared, view node container A is deleted from view node container heap
Remove.Similarly, since now, view node container heap contains only view node container A, therefore, when view node container A quilt
After deletion, view node container heap has been empty, now, is i.e. considered as completing a subfunction traversal and interface time simultaneously
Go through.
To sum up, the function utilizing the present invention to provide travels through and interface traversal method, is saved by imported view node and view
Point container concept such that it is able to UI control that effective differentiation has been traversed and not yet obtain the UI control traveled through, Jin Ergeng
Good support more fully automatic interface traversal travels through with function.
Another aspect of the present invention is described below.
With reference to Fig. 3, the figure shows function traversal and the logic of interface Ergodic Theory according to an embodiment of the invention
Structure.Function traversal in the present embodiment specifically includes that with interface Ergodic Theory
View node container adds unit 310, view node container in the present embodiment add unit 310 be mainly used in by
The new view node container occurred on interface joins in view node container heap;Wherein, a view node comprises multiple
Sub-view node, a corresponding view of sub-view node.
With reference to aforementioned, Android is the tissue of control in screen, and each view (control) can form a view
Group (ViewGroup), sets of views is a view containing other views.In android.view bag, ViewGroup continues
Having held View, therefore itself also has a characteristic of View, and the main function of sets of views is that it can comprise other views,
Container as other views.
It is to say, owing to there is view object and sets of views object in Android, therefore, it can view object
Regard view node as, and sets of views object regards view node container as.
Additionally, in the UI structural system of Android, a UI interface can comprise a view, and sets of views itself
Also it is a view, and sets of views can comprise again several views, therefore, according to the UI structure of Android, can will set
Each view on standby interface, including measure, layout, draw etc., operation is considered as a view node container, and will be each
Each attribute that operation is had is considered as the view node under this view node container.
Such as, layout is considered as a view node container, the id that layout is had, text, index,
The attributes such as class, content-desc, clickable are considered as a view node.But it should be recognized that layout is making
While view node container, it itself also it is a view node.In the present embodiment, each view node container is only born
Blame management itself and the sub-view node itself directly comprised, and each sub-view node all stores oneself place
View node container, the most every sub-view node all stores oneself structural path in whole UI.
View node adds unit 320, and the view node in the present embodiment adds unit 320 and is mainly used in view node
In container in the view node heap of the view node container that each exercisable sub-view node joins correspondence.
With reference also to aforementioned, in the user interface portion of Android, Button control is one of the most frequently used control, uses
Sequence of events can be triggered by clicking on it in family.One is had in the xml document attribute of Android Button control
Clickable attribute tags, this tag inheritance is from the xml attribute of View, and therefore, its value must be logical value (i.e. true or
false).Whether the purpose of this label is to arrange certain button control can be clicked.
Therefore, in the present embodiment, certain Button control can being regarded, the son under certain view node container regards as
According to clickable or the long-clickable attribute of this sub-view node, node of graph, determines that whether sub-view node is
Exercisable sub-view node.Specifically, clickable or the long-clickable attribute of group view node is true
Time, this sub-view node is considered as operable;Otherwise, this sub-view node is considered as inoperable.That is: when certain sub-view node
When clickable is true, represent that this sub-view node can be clicked, otherwise represent that this sub-view node can not be clicked;
When the long-clickable of certain sub-view node is true, represent that this sub-view node can be long pressed, otherwise represent
This sub-view node can not be long pressed.
View knot removal unit 330, the view knot removal unit 330 in the present embodiment is mainly used in saving at sub-view
After the view that point is corresponding is operated, sub-view node is deleted from the view node heap of corresponding view node container.
Compared to before by control is added stacked in carry out UI traversal by the way of, the control entered in stack must comply with
Principle first-in last-out, i.e. the control during advanced person is stacked is pressed at the bottom of stack, last control, in stack top, when traversal, is pressed into stack
The control on top needs first to pop, so, it is possible to traversal can be made to go wrong, and then cause traveling through unsuccessfully;And the present invention
By sub-view node is joined correspondence view node container view node heap in, owing to heap can be regarded as one
Tree, it not have principle first-in last-out to limit, as long as after view corresponding to certain individual sub-view node is operated, it is possible to should
Sub-view node is deleted from the view node heap of corresponding view node container.Accordingly, with respect to stack, heap has bigger oneself
By spending.
It is to say, in the present embodiment, by the sub-view node operated from corresponding view node container
Which sub-view node is the mode deleted in view node heap can be apparent from is operated, and which sub-view node does not has
Have and operated, it is to avoid occur missing the problem of certain sub-view node, so that the judgement to interface change is the most accurate.
View node container deletes unit 340, and the view node container in the present embodiment is deleted unit 340 and is mainly used in
After the view node heap of view node container is cleared, view node container is deleted from view node container heap.
Having traveled through unit 350, the traversal in the present embodiment completes unit 350 and is mainly used at view node container heap quilt
After emptying, it is considered as a subfunction traversal and has traveled through with interface.
Further, with reference to Fig. 4, the figure shows function traversal in accordance with another embodiment of the present invention and travel through with interface
The logical structure of system.
Fig. 4 combines Fig. 3, in the present embodiment, adds, at view node container, new the regarding that unit 310 will occur on interface
Before node of graph container joins in view node container heap, also include:
First judging unit 301, in the present embodiment, whether the first judging unit 301 is mainly used in judging to go out on interface
Show new view node container.
View node container determines unit 302, and in the present embodiment, view node container determines that unit 302 is mainly used in
When the first judging unit 301 judges to occur on interface multiple new view node container, at the new view joint occurred
Point container determines that a view node container joins in view node container heap.
In the present embodiment, view node container determine unit 302 during determining view node container, according to institute
The UI structural path of the new view node container occurred, the UI structural path layer in the new view node container that will be occurred
A highest view node container of level joins in view node container heap.
Second judging unit 311, in the present embodiment, the second judging unit 311 is mainly used according to sub-view node
Clickable or long-clickable attribute, it is judged that whether sub-view node is exercisable sub-view node.Wherein,
When clickable or the long-clickable attribute of group view node is true, this sub-view node is considered as operable;
Otherwise, this sub-view node is considered as inoperable.
With reference to aforementioned, owing to each view on interface can be considered as a view node, several views save
Point forms a view node container, and each view node container is only responsible for son that is own and that itself directly comprise
View node, therefore, after operating change each time, it is possible to the judgement center of gravity changed at interface, from UI interface unbound, turns
And judge on interface, whether to occur in that new view node container.
When occurring in that multiple view node container, just find out the view node container that wherein UI structural level is the highest
Join in view node container heap, and the view node container in view node container heap, meeting are newly added for each
In the view node heap of the view node container heap that exercisable for each of which view node is joined correspondence.
After the view that view node is corresponding is operable to, from view node heap, delete the view node of correspondence,
After a view node heap is cleared, from view node container heap, delete a view node container.When view node
After container heap is cleared, it is considered as completing a subfunction traversal and interface travels through.
To sum up, the function utilizing the present invention to provide travels through and interface Ergodic Theory, it is possible to effective differentiation has been traversed
UI control and not yet obtain traversal UI control, and then preferably support more fully automatic interface traversal with function time
Go through.
Algorithm and display are not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant provided herein.
Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system
Structure be apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various
Programming language realizes the content of invention described herein, and the description done language-specific above is to disclose this
Bright preferred forms.
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, 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 feature more more than the feature being expressly recited in each claim protected.More precisely, as following
Claims reflected as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself
All as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively
Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list
Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any
Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint
Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose
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.
The all parts embodiment of the present invention can realize with hardware, or to run on one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that and can use in practice
Microprocessor or digital signal processor (DSP) realize according to embodiments of the present invention realize reminding window showing advertisements be
The some or all functions of the some or all parts in system.The present invention is also implemented as performing described here
Part or all equipment of method or device program (such as, computer program and computer program).This
The program realizing the present invention of sample can store on a computer-readable medium, or can have one or more signal
Form.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or with any other
Form provides.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of not
Arrange element in the claims or step.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such
Element.The present invention and can come real by means of including the hardware of some different elements by means of properly programmed computer
Existing.If in the unit claim listing equipment for drying, several in these devices can be by same hardware branch
Specifically embody.Word first, second and third use do not indicate that any order.These word explanations can be run after fame
Claim.
The invention discloses, A1, a kind of function traversal and interface traversal method, including:
The new view node container occurred on interface is joined in view node container heap;Wherein, a view joint
Point comprises many sub-view nodes, a corresponding view of sub-view node;
Each exercisable sub-view node in described view node container is joined the view node container of correspondence
View node heap in;
After the view that described sub-view node is corresponding is operated, by described sub-view node from corresponding view node
The view node heap of container is deleted;
After the view node heap of described view node container is cleared, by described view node container from described view
Node container heap is deleted;
After described view node container heap is cleared, it is considered as a subfunction traversal and has traveled through with interface.
A2, according to the method described in A1, it is characterised in that the new view node container occurred on interface is being joined
Before in view node container heap, also include:
Judge on interface, whether to occur in that new view node container.
A3, according to the method described in A2, it is characterised in that when judging that multiple new view node container occurs on interface
Time, in the new view node container occurred, determine that a view node container joins described view node container heap
In.
A4, according to the method described in A3, it is characterised in that in the new view node container occurred, determine that one regards
During node of graph container joins in described view node container heap,
According to the UI structural path of the new view node container occurred, by the UI in described new view node container
The view node container that structural path level is the highest joins in described view node container heap.
A5, according to the method described in A1, it is characterised in that according to clickable or long-of described sub-view node
Clickable attribute determines whether described sub-view node is exercisable sub-view node.
A6, according to the method described in A5, it is characterised in that as clickable or long-of described sub-view node
When clickable attribute is true, described sub-view node is considered as operable;Otherwise,
Described sub-view node is considered as inoperable.
B7, a kind of function traversal and interface Ergodic Theory, including:
View node container adds unit, for the new view node container occurred on interface is joined view node
In container heap;Wherein, a view node comprises many sub-view nodes, a corresponding view of sub-view node;
View node adds unit, for being added by each exercisable sub-view node in described view node container
In the view node heap of corresponding view node container;
View knot removal unit, for after the view that described sub-view node is corresponding is operated, regards described son
Node of graph is deleted from the view node heap of corresponding view node container;
View node container deletes unit, is used for after the view node heap of described view node container is cleared, will
Described view node container is deleted from described view node container heap;
Travel through unit, for after described view node container heap is cleared, be considered as a subfunction traversal
Travel through with interface.
B8, according to the system described in B7, it is characterised in that also include:
First judging unit, for adding, at view node container, the new view node container that unit will occur on interface
Before joining in view node container heap, it is judged that whether occur in that new view node container on interface.
B9, according to the system described in B8, it is characterised in that also include:
View node container determines unit, for judging occur multiple new regarding on interface at described first judging unit
During node of graph container, in the new view node container occurred, determine that a view node container joins described view joint
In some container heap.
B10, according to the system described in B9, it is characterised in that described view node container determines that unit is determining that view saves
During some container,
According to the UI structural path of the new view node container occurred, by the UI in described new view node container
The view node container that structural path level is the highest joins in described view node container heap.
B11, according to the system described in B7, it is characterised in that also include:
Second judging unit, for clickable or the long-clickable attribute according to described sub-view node,
Judge whether described sub-view node is exercisable sub-view node.
B12, according to the system described in B11, it is characterised in that judge described sub-view node at described second judging unit
During whether being exercisable view node,
When clickable or the long-clickable attribute of described sub-view node is true, described sub-view
Node is considered as operable;Otherwise,
Described sub-view node is considered as inoperable.
Claims (10)
1. a function traversal and interface traversal method, it is characterised in that including:
The new view node container occurred on interface is joined in view node container heap;Wherein, a view node bag
Containing many sub-view nodes, a corresponding view of sub-view node;
Each exercisable sub-view node in described view node container is joined regarding of corresponding view node container
In node of graph heap;
After the view that described sub-view node is corresponding is operated, by described sub-view node from corresponding view node container
View node heap in delete;
After the view node heap of described view node container is cleared, by described view node container from described view node
Container heap is deleted;
After described view node container heap is cleared, it is considered as a subfunction traversal and has traveled through with interface.
2. function traversal as claimed in claim 1 and interface traversal method, it is characterised in that new by occur on interface
Before view node container joins in view node container heap, also include:
Judge on interface, whether to occur in that new view node container.
3. function traversal as claimed in claim 2 and interface traversal method, it is characterised in that
When judging to occur on interface multiple new view node container, determine in the new view node container occurred
One view node container joins in described view node container heap.
4. function traversal as claimed in claim 3 and interface traversal method, it is characterised in that at the new view joint occurred
During some container determines that a view node container joins in described view node container heap,
According to the UI structural path of the new view node container occurred, by the UI structure in described new view node container
The view node container that path level is the highest joins in described view node container heap.
5. function traversal as claimed in claim 1 and interface traversal method, it is characterised in that
Whether clickable or long-clickable attribute according to described sub-view node determines described sub-view node
For exercisable sub-view node.
6. function traversal as claimed in claim 5 and interface traversal method, it is characterised in that
When clickable or the long-clickable attribute of described sub-view node is true, described sub-view node
It is considered as operable;Otherwise,
Described sub-view node is considered as inoperable.
7. function traversal and an interface Ergodic Theory, including:
View node container adds unit, for the new view node container occurred on interface is joined view node container
In heap;Wherein, a view node comprises many sub-view nodes, a corresponding view of sub-view node;
View node adds unit, right for being joined by each exercisable sub-view node in described view node container
In the view node heap of the view node container answered;
View knot removal unit, for after the view that described sub-view node is corresponding is operated, saves described sub-view
Point is deleted from the view node heap of corresponding view node container;
View node container deletes unit, for after the view node heap of described view node container is cleared, by described
View node container is deleted from described view node container heap;
Travel through unit, for after described view node container heap is cleared, be considered as subfunction traversal and a boundary
Face travels through.
8. function traversal as claimed in claim 7 and interface Ergodic Theory, it is characterised in that also include:
First judging unit, adds the new view node container occurred on interface for adding unit at view node container
Before in view node container heap, it is judged that whether occur in that new view node container on interface.
9. function traversal as claimed in claim 8 and interface Ergodic Theory, it is characterised in that also include:
View node container determines unit, for judging occur multiple new view joint on interface at described first judging unit
During point container, in the new view node container occurred, determine that a view node container joins described view node and holds
In device heap.
10. function traversal as claimed in claim 9 and interface Ergodic Theory, it is characterised in that described view node container is true
Cell during determining view node container,
According to the UI structural path of the new view node container occurred, by the UI structure in described new view node container
The view node container that path level is the highest joins in described view node container heap.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610509877.2A CN106168923A (en) | 2016-06-30 | 2016-06-30 | A kind of function traversal and interface traversal method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610509877.2A CN106168923A (en) | 2016-06-30 | 2016-06-30 | A kind of function traversal and interface traversal method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106168923A true CN106168923A (en) | 2016-11-30 |
Family
ID=58064935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610509877.2A Pending CN106168923A (en) | 2016-06-30 | 2016-06-30 | A kind of function traversal and interface traversal method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106168923A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108415822A (en) * | 2017-02-10 | 2018-08-17 | 阿里巴巴集团控股有限公司 | A kind of random testing method and device |
CN109766081A (en) * | 2019-02-01 | 2019-05-17 | 网易(杭州)网络有限公司 | Traverse the method and device of container |
CN109857668A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | UI automated function test method, test device, test equipment and storage medium |
CN110162453A (en) * | 2018-02-11 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Test method, device, computer readable storage medium and computer equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8281258B1 (en) * | 2010-03-26 | 2012-10-02 | Amazon Technologies Inc. | Object traversal to select focus |
CN103853649A (en) * | 2012-11-28 | 2014-06-11 | 百度在线网络技术(北京)有限公司 | Application program testing method and system |
CN104035867A (en) * | 2014-06-04 | 2014-09-10 | 重庆泰凯科技有限公司 | Android-based application function traverse test method |
CN104050076A (en) * | 2013-03-12 | 2014-09-17 | 阿里巴巴集团控股有限公司 | Testing method, device and system of application software on mobile terminal |
CN104699608A (en) * | 2015-03-10 | 2015-06-10 | 于秀山 | Automatic test method and device for graphic user interface software |
CN105718370A (en) * | 2016-01-21 | 2016-06-29 | 上海斐讯数据通信技术有限公司 | Android equipment test method and test device |
-
2016
- 2016-06-30 CN CN201610509877.2A patent/CN106168923A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8281258B1 (en) * | 2010-03-26 | 2012-10-02 | Amazon Technologies Inc. | Object traversal to select focus |
CN103853649A (en) * | 2012-11-28 | 2014-06-11 | 百度在线网络技术(北京)有限公司 | Application program testing method and system |
CN104050076A (en) * | 2013-03-12 | 2014-09-17 | 阿里巴巴集团控股有限公司 | Testing method, device and system of application software on mobile terminal |
CN104035867A (en) * | 2014-06-04 | 2014-09-10 | 重庆泰凯科技有限公司 | Android-based application function traverse test method |
CN104699608A (en) * | 2015-03-10 | 2015-06-10 | 于秀山 | Automatic test method and device for graphic user interface software |
CN105718370A (en) * | 2016-01-21 | 2016-06-29 | 上海斐讯数据通信技术有限公司 | Android equipment test method and test device |
Non-Patent Citations (1)
Title |
---|
毋建军 等: "《Android应用开发案例教程》", 31 March 2013, 北京:清华大学出版社 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108415822A (en) * | 2017-02-10 | 2018-08-17 | 阿里巴巴集团控股有限公司 | A kind of random testing method and device |
CN110162453A (en) * | 2018-02-11 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Test method, device, computer readable storage medium and computer equipment |
CN110162453B (en) * | 2018-02-11 | 2022-03-01 | 腾讯科技(深圳)有限公司 | Test method, test device, computer readable storage medium and computer equipment |
CN109766081A (en) * | 2019-02-01 | 2019-05-17 | 网易(杭州)网络有限公司 | Traverse the method and device of container |
CN109766081B (en) * | 2019-02-01 | 2022-03-08 | 网易(杭州)网络有限公司 | Method and device for traversing container |
CN109857668A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | UI automated function test method, test device, test equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9612937B2 (en) | Determining relevant events in source code analysis | |
US8589884B2 (en) | Method and system for identifying regression test cases for a software | |
CN105630463B (en) | For detecting the method and device of JAR packet conflict | |
US9064057B2 (en) | Processing automation scripts of software | |
JP6253555B2 (en) | System and method for a high performance graph analysis engine | |
CN106168923A (en) | A kind of function traversal and interface traversal method and system | |
CN105868096B (en) | For showing the method, device and equipment of web page test result in a browser | |
US8752003B2 (en) | Model driven approach for availability management framework (AMF) configuration generation | |
CN103034575B (en) | Collapse analytical approach and device | |
CN104572321A (en) | Test selection method and device based on domination criterion | |
US9785416B2 (en) | Presenting a custom view in an integrated development environment based on a variable selection | |
CN103049373B (en) | A kind of localization method of collapse and device | |
Baudry et al. | Measuring design testability of a UML class diagram | |
CN104142881B (en) | The adaptation defect inspection method and detection device of application programming interface | |
JP2006216028A (en) | Baseline architecture monitor application for distributed system | |
KR20060043081A (en) | Priority binding | |
CN105573915A (en) | Test method and device based on code coverage rate | |
CN111309413B (en) | Interface display method and device, electronic equipment and storage medium | |
JP6648511B2 (en) | Support device, support method, and program | |
US20130346909A1 (en) | Navigation to a data definition in a diff context | |
CN103365772B (en) | Software test automatic evaluation device and method | |
US10042638B2 (en) | Evaluating documentation coverage | |
Perez et al. | Framing program comprehension as fault localization | |
US20150355993A1 (en) | Detecting potential class loader problems using the class search path sequence for each class loader | |
JP2011170697A (en) | Software structure analyzing 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161130 |