CN108710570A - A kind of view function test method, device and equipment - Google Patents

A kind of view function test method, device and equipment Download PDF

Info

Publication number
CN108710570A
CN108710570A CN201810447148.8A CN201810447148A CN108710570A CN 108710570 A CN108710570 A CN 108710570A CN 201810447148 A CN201810447148 A CN 201810447148A CN 108710570 A CN108710570 A CN 108710570A
Authority
CN
China
Prior art keywords
view
access
feature
value pair
identification
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
CN201810447148.8A
Other languages
Chinese (zh)
Other versions
CN108710570B (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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810447148.8A priority Critical patent/CN108710570B/en
Publication of CN108710570A publication Critical patent/CN108710570A/en
Application granted granted Critical
Publication of CN108710570B publication Critical patent/CN108710570B/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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This specification embodiment discloses a kind of view function test method, device and equipment, the method includes:In test, need to store in view elements to access path possessed by accessed view identification and each accessed view;The access to each view is realized by the view elements not accessed, and screenshotss are carried out to current accessed view, view feature is extracted using feature extraction algorithm;The view feature currently obtained is matched with the view feature for accessing view, judges whether active view has been accessed according to matching result, if being accessed, that terminates current accessed path redirects access.

Description

A kind of view function test method, device and equipment
Technical field
This specification is related to a kind of field of computer technology more particularly to view function test method, device and equipment.
Background technology
In popularizing with types of applications software, the especially extensive use of mobile application software, these are user oriented Application software needs to include user interface (User Interface, UI), so that the intuitive and convenient use mobile application of user is soft Part.In order to ensure software view function of reaching the standard grade is capable of the operation of normal table, need to test its view function.
In the prior art, it for the test of the view function of application software, is typically based on ergodic algorithm and writes test foot It is original to realize, function interaction, compatibility, stability etc. can be carried out to the user interface of application software and tested.At some In mobile application software, since the view of user interface switches, there may be winding problems (that is, repeatedly for same view interface It accesses, is absorbed in endless loop).Current interface is returned still to after interactive button for example, clicking in current interface, it is traditional based on depth The method of first traversal needs for the interface that each there is winding additionally intervene (for example, writing corresponding test foot This) come avoid traversal program generate winding.
Based on the prior art, it is desirable to be able to the scheme for realizing view functional test quickly, easy.
Invention content
A kind of view function test method of this specification embodiment offer, device and equipment, for solving following technology Problem:It is required to the scheme of quick, easy realization view functional test.
In order to solve the above technical problems, what this specification embodiment was realized in:
A kind of view function test method that this specification embodiment provides, including:
Test accesses first view, obtains first view feature;
It according to default view access relation, carries out redirecting access test based on the first view, be accessed to the with redirecting Two views, and obtain the second view feature;
Compare the first view feature and second view feature;
If comparing result is consistent, terminate currently to redirect access test.
A kind of view device for testing functions that this specification embodiment provides, including:
Acquisition module, test access first view, obtain first view feature;
Jump module carries out redirecting access test based on the first view, to redirect according to default view access relation It accesses to the second view, and obtains the second view feature;
Contrast module compares the first view feature and second view feature;
Execution module terminates currently to redirect access test if comparing result is consistent.
The a kind of electronic equipment that this specification embodiment provides, including:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and described instruction is by described at least one A processor executes, so that at least one processor can:
Test accesses first view, obtains first view feature;
It according to default view access relation, carries out redirecting access test based on the first view, be accessed to the with redirecting Two views, and obtain the second view feature;
Compare the first view feature and second view feature;
If comparing result is consistent, terminate currently to redirect access test.
Above-mentioned at least one technical solution that this specification embodiment uses can reach following advantageous effect:
By the sectional drawing based on accessed first view, first view mark is obtained, first view feature and first regards Pel element determines the incidence relation between first view mark and first view feature, establishes first view element key-value pair;Into One step, it will be in first view mark storage to corresponding access path.Corresponding second is accessed according to first view element to regard Figure obtains the second view identification, the second view feature and the second view elements, determines the second view identification and the second view feature Between incidence relation, establish the second view elements key-value pair;Further, by first view component identification and the second view mark Know in storage to access path, generates second and access road strength.Based on each view identification stored in access path after update, by Two view features view feature corresponding with each view identification in access path after update is compared, if comparing result is consistent, Then terminate currently to redirect access, view functional test further is carried out to other access path, it is possible to prevente effectively from view is tested The winding problem for cyclic access occur, can effectively improve view functional test efficiency.
Description of the drawings
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only Some embodiments described in this specification, for those of ordinary skill in the art, in not making the creative labor property Under the premise of, other drawings may also be obtained based on these drawings.
Fig. 1 is the schematic diagram for the view functional test that the scheme of this specification is related under practical application scene;
Fig. 2 is a kind of flow diagram for view function test method that this specification embodiment provides;
Fig. 3 is the flow diagram for the illustration view function test method that this specification embodiment provides;
Fig. 4 is a kind of structural schematic diagram for view device for testing functions that this specification embodiment provides;
Fig. 5 is the schematic diagram that a kind of electronic equipment that this specification embodiment provides executes view function test method.
Specific implementation mode
In order to make those skilled in the art more fully understand the technical solution in this specification, below in conjunction with this explanation Attached drawing in book embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described Embodiment be merely a part but not all of the embodiments of the present application.Based on this specification embodiment, this field The every other embodiment that those of ordinary skill is obtained without creative efforts, should all belong to the application The range of protection.
Fig. 1 is a kind of schematic diagram for the view functional test that the scheme of this specification is related under practical application scene.Base In Depth Priority Algorithm, the view function for the treatment of in test application software is tested.In particular it is necessary to obtain interviewed The sectional drawing for the first view asked extracts first view feature based on the sectional drawing, is identified in conjunction with active view, establishes the first association pass System.Further, by the storage of first view mark in access path (it should be noted that in practical applications, may be simultaneously There are a plurality of access path will be matched when carrying out view feature matching based on current accessed path).Further, it is based on The first view element that first view has redirects and accesses corresponding second view, and by first view element and the second view Access path after mark storage to update.Further, it is based on access path after updating, by the second view feature and first view Feature is compared;If comparing result is consistent, terminate currently to redirect access, the view function of starting other access path is surveyed Examination, so as to effectively avoid winding problem (that is, being accessed repeatedly same view, being absorbed in endless loop access module).Also, it is right Each accesses incidence relation and exports corresponding access path.In addition, view functional test is in the form of server in Fig. 1 It shows, carrying out test to view function based on the view feature of extraction may operate on server, and certainly, which is not It only it is single one, it is also possible to use cluster or distributed structure/architecture.
It should be noted that view functional test mentioned here, various with display circle primarily directed to can be applied to The test of the view function of application software in the equipment in face can be specifically answering based on mobile terminal (for example, mobile phone) Can also be the application software view function survey of the various computer terminals for supporting view display function with software view functional test Examination.Here view may be considered the content interface that webpage, application interface etc. are presented to the user.Here first view and Two views redirect the adjacent view of action priority, specifically, first regards merely to difference in description for characterize one Figure can be understood as redirecting any view before action, and the second view can be understood as redirecting any view after action;" the One " and " second " be not construed as the restriction to amount of views.
Based on above-mentioned scene, the scheme of this specification is described in detail below.
Fig. 2 is a kind of flow diagram for view function test method that this specification embodiment provides, and this method is specific It may comprise steps of:
Step S202:Test accesses first view, obtains first view feature.
It should be noted that accessing the mode of first view, directly accessed when can start application software or by regarding Pel element accesses.For example, if first view is the view that application software initializes the page, can be visited when user opens the software Ask first view;If first view is the view obtained based on the initialization page, user can be passed through by accessing the first view View elements (for example, interactive button that view interface is shown) are clicked to realize to specified page (for example, first view) It accesses.First view mentioned here can be understood as the view feature of multiple views or a view, can be first The view of the accessed initialization page, can also be to be merely illustrative here in rear accessed view, composition pair The limitation of the application embodiment.
It, can be by way of image recognition, in the sectional drawing for extracting each view when obtaining first view feature View feature accelerates robust feature (Speeded Up Robust Features, SURF), Scale invariant for example, may be used The feature point extractions algorithms such as eigentransformation (Scale-invariant feature transform, SIFT);So as to obtain Active view feature.
Step S204:According to default view access relation, carry out redirecting access test based on the first view, to redirect It accesses to the second view, and obtains the second view feature.
Default view access relation mentioned here, it can be understood as, in the view function of application software, each view Between the access relation that redirects defined, in general, can realize jump to given view by view elements Turn to access.For example, can be by " lower one page " or " confirmation " button, realization, which redirects, is accessed the second view.
In general, it may be implemented to redirect access to multiple views based on first view.It is of course also possible at some View elements are not contained in view, then the view, which can not be redirected further, accesses other views.
For the ease of obtaining the second view feature, after redirecting the second view of access, the second of displaying can be directed to and be regarded Figure carries out sectional drawing, obtains the second view sectional drawing image, further, then is based on the image, extracts the second view feature.It needs Illustrate, when carrying out image characteristics extraction based on sectional drawing, often use identical extraction algorithm, to ensure for same The view feature that sectional drawing obtains is identical.
Step S206:Compare the first view feature and second view feature.
It should be noted that first view feature mentioned here can have it is at least one (that is, at least one view regards Figure feature is referred to as first view feature).In practical applications, to carry out Characteristic Contrast, need by the second view feature with Multiple first view features are compared respectively;If finding that one of first view feature is compared with the second view feature As a result consistent, then it is assumed that it is current to redirect the identical view of access discovery, then terminate currently to redirect access.
Step S208:If comparing result is consistent, terminate currently to redirect access test.
Feature mentioned here is consistent, in general, if using identical feature extraction algorithm for identical view, obtains The first view feature and the second view feature obtained is completely the same;It is of course also possible to not quite identical situation occur, for example cut When figure, image definition is different, at this point, for the ease of comparison, can set similarity ratio, for example, similarity reaches 95%, I.e. it is believed that feature is identical.It is unanimously not limited to identical situation described in herein, it can be according to reality in practical application Border situation carries out being considered consistent when which kind of threshold value setting reach.
End mentioned here currently redirects access test, it can be understood as terminates based on the jump for currently redirecting access path Turn to access.In practical applications, if having traversed the access of all view elements, terminate all views and access, complete view There is winding problem so as to effectively avoid accessing repeatedly for same access path in the test of function;If there is also not by The view elements of access then terminate the access test in current accessed path, carry out continuing to redirect continuing with other access path Access test.
Based on above-described embodiment it can be appreciated that by the sectional drawing based on accessed first view, first view is obtained Mark, first view feature and first view element determine the incidence relation between first view mark and first view feature, Establish first view element key-value pair;It further, will be in first view mark storage to corresponding access path.According to first View elements access corresponding second view, obtain the second view identification, the second view feature and the second view elements, determine the Incidence relation between two view identifications and the second view feature establishes the second view elements key-value pair;Further, by first View elements identify and the second view identification is stored into access path, generate second and access road strength.Based on accessing road after update Each view identification stored in diameter, by the second view feature view feature corresponding with each view identification in access path after update It is compared, if comparing result is consistent, terminates currently to redirect access, view function survey further is carried out to other access path Examination can effectively improve view functional test efficiency it is possible to prevente effectively from the winding problem of cyclic access occurs in view test.
In this specification one or more embodiment, test is accessed based on the first view redirect Before, the method can also include:Obtain first view mark and first view element;According to first view mark and institute First view feature is stated, the first incidence relation is established;According to the access instruction for the first view, generate comprising described the The access path of one view identification;According to the first view element, first view element key-value pair is established;Wherein, described One view elements key-value pair includes:First view component identification and access mark.
First incidence relation can be key-value pair form, can also be the form of tables of data.In general, same first View identification can correspond to multiple view features simultaneously;For the ease of establishing the first incidence relation, storage of array can be utilized more A view feature obtains first view feature;For example, the first incidence relation can be to be expressed as { view identification, multidimensional view spy Sign }.In practical applications, corresponding multidimensional view feature can be quickly determined by view identification.
It should be noted that view identification mentioned here, it can be understood as view name or number, it can be to same Each view page in view functional software distinguishes.
In practical applications, when carrying out traversal test to view function, it is based on the same access initial page, it may be simultaneously There is a plurality of access path, for the ease of distinguishing, access path is defined as to a wherein access path here.
It should be noted that access path can in real time generate in access process or test process, often carry out The access of one view or view elements all generates or updates corresponding access path;If for example, accessed first view For initial views, then the mark based on initial views is needed to establish access path;If accessed first view is to pass through other The view elements of view are accessed, then need in the view identification storage to already existing access path by first view (that is, Access path is updated, view identification is added in current accessed path, generates new access path).Accessing road In diameter, it is stored with the view identification for each view being accessed since initial page.To being currently interviewed in subsequent step When asking that the view feature of view is matched, need special based on the view corresponding to the view identification for including in current accessed path Sign carries out matching comparison;It is not match pair with the view feature corresponding to the view identification stored in other access path Than.
The starting point of each access path of storage is that initial page (may be simultaneously present multiple in the application software having Initial page), to needing to establish two independent access path based on the different views element corresponding to same view page;Example Such as, first access path:1-1d-3-3e-4-4f-3, Article 2 access path:1-1d-3-3g-5-5h-1 is visited at this two The first half asked the way in diameter is all 1-1d-3, in order to distinguish path, needs to re-establish two independent access path;Its In, digital representation view identification, number indicates view elements with monogram;Access path format is:A view identification-A views Component identification-B view identification-B view elements identify;It should be noted that may be implemented to B views by A view elements It accesses.
Access instruction mentioned here for first view can be access instruction when clicking initialization view, Can be based on the access instruction for clicking view elements access respective view;Certainly, these access instructions can be triggered by user Or it is triggered by program.
It should be noted that for each view being accessed, possessed view member in the view will be obtained Element needs the access state that each view elements are distinguished by accessing label in order to avoid being directed to same view elements repeated accesses, For example, the mode storage element key-value pair of key-value pair may be used, { 1a, false } indicates the view elements mark in view 1 1a is the view elements not accessed.
In general, it if accessed first view is not initial views, generally requires by the element key-value pair that prestores Unlabelled view elements access.The view elements mentioned here that prestore, other before being access active view regard View elements possessed by figure, the view elements extracted after accessing other views, further, by these view elements Access state be marked and store, obtain the view elements key-value pair that prestores.
In this specification one or more embodiment, the basis presets view access relation, is based on described first View, which redirects, accesses the second view, obtains the second view feature, can specifically include:According to default view access relation, it is based on The corresponding first view element of the unlabelled first view element key-value pair, redirects and accesses corresponding second view, Obtain the second view feature.
In application software, the access relation between each view or incidence relation are all to preset in software , also, the access that redirects between each view is realized often through view elements.After accessing first view, it can extract Go out at least one first view element.As it was noted above, to the first view element newly obtained, first view element key assignments is established Right, the main function of the key-value pair is to distinguish accessed and view elements key-value pair that is not accessing.In practical applications, In order to avoid the repeated accesses (for example, winding problem) for the identical view element in the same view, need to mark in time Access label in each element key-value pair that prestores accessed, for example, the element key-value pair having not visited is { 1a, false }, The element key-value pair accessed is { 1a, true }, wherein 1a indicates view elements mark, false and true identification access marks Note.When carrying out view access based on element, the view elements not being accessed are selected, that is, selection is accessed labeled as false's First view element key-value pair determines the first view component identification, accesses to it, redirects access corresponding second and regards Figure.
In this specification one or more embodiment, after obtaining the second view feature, can also include:Obtain the Two view identifications and the second view elements;According to second view identification and second view feature, the second association is established Relationship;Access label in the accessed first view element key-value pair of label;According to the visit for second view It asks instruction, is based on the access path, more newly-generated includes the first view component identification and second view identification Access path;According to second view elements, the second view elements key-value pair is established;Wherein, the second view elements key Value is to including:Second view elements identify and access label.
As can be seen from the foregoing, it for the ease of distinguishing the access state of each view elements, in practical applications, needs to visiting Access label in the first view element key-value pair asked is marked, for example, being labeled as label is accessed by false true。
The access instruction mentioned here for being directed to the second view is the access instruction sent out based on first view element.Such as It is described previously it is found that in access path, included at least one view identification, access path is based on accessing road after update What diameter obtained, for example, being visited after first view component identification and the second view identification are added to the update generated after access path It asks the way diameter.
In this specification one or more embodiment, compares the first view feature and second view is special Sign, can specifically include:Based on access path, the first incidence relation and the second incidence relation after update, by second view Feature first view feature corresponding with first view mark is compared.
In practical applications, as can be seen from the foregoing, it when carrying out the comparison of view feature, needs to be based on same access road View identification in diameter is compared.It is assumed that the view identification to prestore in current accessed path includes 1 and 3, view elements include 1d;Continue view based on first view element to access, it is assumed that view 4 is accessed based on view elements 3e, by view 4 and access View 1 and 3 corresponding view feature of view in path are compared, and are not found in access path by contrast identical View;Accessed based on the view elements 4f having in view 4, access view be 3, by view 3 successively with current accessed road Each view in diameter is matched successively, and identical view 3, final output access path are matched in current accessed path Can be:1-1d-3-3e-4-4f-3.
When being compared for first view feature and the second view feature, need by its with stored in access path The view identification that respectively prestores is compared successively, if finding the view to match, is terminated to the subsequent view in access path Matching;If not finding the view to match, comparison to the last one view identification in current accessed path;Further, base Continue to access in the view elements that first view has.
When carrying out characteristic matching, used matching algorithm may include:Approximate KNN searching algorithm is selected to carry out real It is existing, including fast nearest-neighbor search (Fast Library for Approximate Nearest Neighbors, FLANN) Deng.
In this specification one or more embodiment, if the comparing result is consistent, terminate currently to redirect access, It can specifically include:If comparing result is consistent, complete access path is exported, end currently redirects access;If the first view With unlabelled first view element key-value pair, then according to the unlabelled first view element key-value pair, continue to access Corresponding view.
For example, it is assumed that output complete access path is 1-1d-3-3e-3, first view is identified as 3, and the second view identification is 3, since view 3 has been accessed, but also there are other unlabelled element key-value pairs simultaneously in view 3, it is assumed that should Unmarked element key-value pair is { 3g, false }, is next further accessed based on access path 1-1d-3-3g-4.If Also there are other view elements other than view elements 4f in view 4, next access path be potentially based on view 4 into Row, obtained newest access path are 1-1d-3-3e-4- ....
It is readily appreciated that, when carrying out comparison matching, the view to winding problem occurs carries out unmarked element key-value pair It accesses or accesses to nearest one view with unmarked element key-value pair, if all view elements are all in the view It is accessed or does not have view elements, be then directed to unlabelled element key-value pair in previous view and access.
In this specification one or more embodiment, if comparing result is inconsistent, can also include:If comparing result Inconsistent, output is stored with access path after the update of the first view component identification and the second view identification;It is based on The unlabelled second element key-value pair, continues to access corresponding view.
For example, it is assumed that the view identification of first view is 3, the view identification of the second view is 5, access path 1-1d-3, Since the view 1 in first view 3 and access path mismatches, then the first view element key-value pair being had based on view 3 is (such as It is described previously it is found that active view key-value pair is just got when accessing to active view) continue to access it is corresponding View, it is assumed that first view component identification is 3e, and corresponding view is view 4.Further, by first view component identification 3e It stores in access path, access path is 1-1d-3-3e-4 after generating update.When continuing to access to view 5, view 5 view feature needs are matched with the view feature of view 1 and view 3 respectively.Until being accessed in current accessed path View identification having the same.
For the ease of understanding technical scheme, below concrete example explanation, be illustrated in figure 3 this specification embodiment The view access function schematic diagram of offer.
Step 1:Start application, into initial views, i.e. initial views 1.
Step 2:Device directive (the adb orders of such as Android platform) is executed, the view elements of active view 1 are obtained, than Such as, the view elements that can be clicked are saved in unlabelled key-value pair { 1a, false }, { 1 element a of view, is not visited for representative It asks }.
Step 3:Screenshotss are carried out to active view 1, extract the characteristics of image of view 1, characteristics of image is stored in the spy of multidimensional In sign vector, view feature is preserved with view identification as pair, and { 1, multidimensional characteristic vectors }, multidimensional characteristic vectors can make It is indicated with an array.
Step 4:It accesses to the element being had not visited in the element key-value pair of view, and the element key assignments to accessing To being marked, such as { 1a, true }, represent { 1 element a of view, accessed }
Step 5:Based on unmarked element key-value pair, the carry out screenshotss after accessing view extract characteristics of image, and with Some multidimensional characteristic vectors are matched;
A:If it does, then the view had accessed, output includes view identification and view elements access path, such as (1->1a->1), view starts to access other this view key-value pairs having not visited, such as 1b;
B:If it does not match, the view is new view, output includes view identification and view elements access path, such as (1->1b->2) step 2-5, is repeated.
Step 6:Above step is repeated, until all key-value pairs have all accessed.
Wherein, step 2, step 4 describes the preservation side for obtaining view elements and element access label that view has Formula.Step 3, step 5 describes view feature extraction and matched flow.Whenever carrying out sectional drawing extraction characteristic manipulation, addition In view information to access path, such as adds (1) and arrive access path, obtain newest access path (1->1a->1).Whenever progress It when element accesses, adds in view elements to access path, such as (1->1b);Other steps pass through classical depth-first search Algorithm DFS is realized.
Based on same thinking, this specification embodiment also provides a kind of view device for testing functions, is illustrated in figure 4 this A kind of structural schematic diagram for view device for testing functions that specification embodiment provides, the device can specifically include:
Acquisition module 401, test access first view, obtain first view feature;
Jump module 402 carries out redirecting access test based on the first view according to default view access relation, with Access is redirected to the second view, and obtains the second view feature;
Contrast module 403 compares the first view feature and second view feature;
Execution module 404 terminates currently to redirect access test if comparing result is consistent.
Further, the acquisition module 401 obtains first view mark and first view element;
According to first view mark and the first view feature, the first incidence relation is established;
According to the access instruction for the first view, the access path for including first view mark is generated;
According to the first view element, first view element key-value pair is established;Wherein, the first view element key assignments To including:First view component identification and access mark.
Further, the jump module 402 is regarded according to default view access relation based on unlabelled described first The corresponding first view element of pel element key-value pair redirects and accesses corresponding second view, obtains the second view feature.
Further, after obtaining the second view feature, further include:
Obtain the second view identification and the second view elements;
According to second view identification and second view feature, the second incidence relation is established;
Access label in the accessed first view element key-value pair of label;
According to the access instruction for second view, it is based on the access path, more newly-generated includes described first View elements identify and the access path of second view identification;
According to second view elements, the second view elements key-value pair is established;Wherein, the second view elements key assignments To including:Second view elements identify and access label.
Further, the contrast module 403 is closed based on access path, the first incidence relation and the second association after update System, second view feature first view feature corresponding with first view mark is compared.
Further, if the comparing result is consistent, terminate currently to redirect access, specifically include:
If comparing result is consistent, complete access path is exported, end currently redirects access;
If the first view has unlabelled first view element key-value pair, regarded according to unlabelled described first Pel element key-value pair continues to access corresponding view.
Further, if comparing result is inconsistent, further include:
If comparing result is inconsistent, output be stored with the first view component identification and the second view identification it is described more Access path after new;
Based on the unlabelled second element key-value pair, continue to access corresponding view.
Based on same thinking, this illustrates that embodiment also provides a kind of computer-readable medium, and the media storage has meter Calculation machine readable instruction, the computer-readable instruction can be executed by processor to realize the side described in any embodiment as above Method.Fig. 5 is the schematic diagram that a kind of computer-readable medium that this specification embodiment provides executes view function test method.
Based on same thinking, this specification embodiment also provides a kind of electronic equipment, including:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and described instruction is by described at least one A processor executes, so that at least one processor can:
Test accesses first view, obtains first view feature;
It according to default view access relation, carries out redirecting access test based on the first view, be accessed to the with redirecting Two views, and obtain the second view feature;
Compare the first view feature and second view feature;
If comparing result is consistent, terminate currently to redirect access test.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the sequence in embodiment It executes and desired result still may be implemented.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can With or it may be advantageous.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For electronic equipment, nonvolatile computer storage media embodiment, since it is substantially similar to the method embodiment, so description It is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Device that this specification embodiment provides, electronic equipment, nonvolatile computer storage media with method are corresponding , therefore, device, electronic equipment, nonvolatile computer storage media also there is the Advantageous similar with corresponding method to imitate Fruit, since the advantageous effects of method being described in detail above, which is not described herein again corresponding intrument, The advantageous effects of electronic equipment, nonvolatile computer storage media.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit is realized can in the same or multiple software and or hardware when specification one or more embodiment.
It should be understood by those skilled in the art that, this specification embodiment can be provided as method, system or computer program Product.Therefore, this specification embodiment can be used complete hardware embodiment, complete software embodiment or combine software and hardware The form of the embodiment of aspect.Moreover, it wherein includes that computer is available that this specification embodiment, which can be used in one or more, It is real in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form for the computer program product applied.
This specification is with reference to the method, equipment (system) and computer program product according to this specification embodiment Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram The combination of flow and/or box in one flow and/or box and flowchart and/or the block diagram.These computers can be provided Program instruction is to all-purpose computer, the processor of special purpose computer, Embedded Processor or other programmable data monitoring devices To generate a machine so that the instruction executed by computer or the processor of other programmable data monitoring devices generates use In the dress for realizing the function of being specified in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes It sets.
These computer program instructions, which may also be stored in, can guide computer or other programmable data monitoring devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data monitoring devices so that counted Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey Sequence module.Usually, program module include routines performing specific tasks or implementing specific abstract data types, program, object, Component, data structure etc..Specification can also be put into practice in a distributed computing environment, in these distributed computing environments, By executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module can With in the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely this specification embodiments, are not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (15)

1. a kind of view function test method, including:
Test accesses first view, obtains first view feature;
According to default view access relation, carries out redirecting access test based on the first view, be regarded with redirecting to access to second Figure, and obtain the second view feature;
Compare the first view feature and second view feature;
If comparing result is consistent, terminate currently to redirect access test.
2. the method as described in claim 1, before carrying out redirecting access test based on the first view, the method is also Including:
Obtain first view mark and first view element;
According to first view mark and the first view feature, the first incidence relation is established;
According to the access instruction for the first view, the access path for including first view mark is generated;
According to the first view element, first view element key-value pair is established;Wherein, the first view element key-value pair packet It includes:First view component identification and access mark.
3. method as claimed in claim 2, the basis presets view access relation, and access is redirected based on the first view Second view obtains the second view feature, specifically includes:
According to default view access relation, it is based on the corresponding first view of the unlabelled first view element key-value pair Element redirects and accesses corresponding second view, obtains the second view feature.
4. method as claimed in claim 3, the method further include:
Obtain the second view identification and the second view elements;
According to second view identification and second view feature, the second incidence relation is established;
Access label in the accessed first view element key-value pair of label;
According to the access instruction for second view, it is based on the access path, more newly-generated includes the first view The access path of component identification and second view identification;
According to second view elements, the second view elements key-value pair is established;Wherein, the second view elements key-value pair packet It includes:Second view elements identify and access label.
5. method as claimed in claim 4 compares the first view feature and second view feature, specifically includes:
Based on access path, the first incidence relation and the second incidence relation after update, by second view feature and described the The corresponding first view feature of one view identification is compared.
6. method as claimed in claim 5 terminates currently to redirect access, specifically include if comparing result is consistent:
If comparing result is consistent, complete access path is exported, end currently redirects access;
If the first view has unlabelled first view element key-value pair, according to the unlabelled first view member Plain key-value pair continues to access corresponding view.
7. method as claimed in claim 5 further includes if comparing result is inconsistent:
If comparing result is inconsistent, after output is stored with the update of the first view component identification and the second view identification Access path;
Based on the unlabelled second element key-value pair, continue to access corresponding view.
8. a kind of view device for testing functions, including:
Acquisition module, test access first view, obtain first view feature;
Jump module is carried out redirecting access test based on the first view, be accessed with redirecting according to default view access relation To the second view, and obtain the second view feature;
Contrast module compares the first view feature and second view feature;
Execution module terminates currently to redirect access test if comparing result is consistent.
9. device as claimed in claim 8, the acquisition module obtain first view mark and first view element;
According to first view mark and the first view feature, the first incidence relation is established;
According to the access instruction for the first view, the access path for including first view mark is generated;
According to the first view element, first view element key-value pair is established;Wherein, the first view element key-value pair packet It includes:First view component identification and access mark.
10. device as claimed in claim 9, the jump module is based on unlabelled institute according to default view access relation The corresponding first view element of first view element key-value pair is stated, redirects and accesses corresponding second view, second is obtained and regards Figure feature.
11. device as claimed in claim 10 further includes after obtaining the second view feature:
Obtain the second view identification and the second view elements;
According to second view identification and second view feature, the second incidence relation is established;
Access label in the accessed first view element key-value pair of label;
According to the access instruction for second view, it is based on the access path, more newly-generated includes the first view The access path of component identification and second view identification;
According to second view elements, the second view elements key-value pair is established;Wherein, the second view elements key-value pair packet It includes:Second view elements identify and access label.
12. device as claimed in claim 11, the contrast module are closed based on access path, the first association after the update System and the second incidence relation carry out second view feature first view feature corresponding with first view mark pair Than.
13. device as claimed in claim 12 terminates currently to redirect access, specifically include if the comparing result is consistent:
If comparing result is consistent, complete access path is exported, end currently redirects access;
If the first view has unlabelled first view element key-value pair, according to the unlabelled first view member Plain key-value pair continues to access corresponding view.
14. device as claimed in claim 12 further includes if comparing result is inconsistent:
If comparing result is inconsistent, after output is stored with the update of the first view component identification and the second view identification Access path;
Based on the unlabelled second element key-value pair, continue to access corresponding view.
15. a kind of electronic equipment, including:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and described instruction is by least one place It manages device to execute, so that at least one processor can:
Test accesses first view, obtains first view feature;
According to default view access relation, carries out redirecting access test based on the first view, be regarded with redirecting to access to second Figure, and obtain the second view feature;
Compare the first view feature and second view feature;
If comparing result is consistent, terminate currently to redirect access test.
CN201810447148.8A 2018-05-11 2018-05-11 View function testing method, device and equipment Active CN108710570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810447148.8A CN108710570B (en) 2018-05-11 2018-05-11 View function testing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810447148.8A CN108710570B (en) 2018-05-11 2018-05-11 View function testing method, device and equipment

Publications (2)

Publication Number Publication Date
CN108710570A true CN108710570A (en) 2018-10-26
CN108710570B CN108710570B (en) 2021-10-29

Family

ID=63868901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810447148.8A Active CN108710570B (en) 2018-05-11 2018-05-11 View function testing method, device and equipment

Country Status (1)

Country Link
CN (1) CN108710570B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150052441A1 (en) * 2013-07-30 2015-02-19 Draios Inc. System, method, and graphical user interface for application topology mapping in hosted computing environments
CN104899140A (en) * 2015-06-03 2015-09-09 上海斐讯数据通信技术有限公司 Test method for mobile terminal assembly
CN104978270A (en) * 2015-07-03 2015-10-14 上海触乐信息科技有限公司 Automatic software testing method and apparatus
CN105260301A (en) * 2015-09-24 2016-01-20 努比亚技术有限公司 Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces
CN105468529A (en) * 2015-12-15 2016-04-06 北京奇虎科技有限公司 Accurate traversal method and apparatus for UI controls of android application
CN105786294A (en) * 2014-12-19 2016-07-20 阿里巴巴集团控股有限公司 Page access path return method and apparatus
CN106294167A (en) * 2016-08-16 2017-01-04 济南大学 The automatic traversal method of Android Application Program Interface and system
CN106909262A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of data processing method and device
US9798650B1 (en) * 2015-08-27 2017-10-24 Jpmorgan Chase Bank, N.A. Application testing system and method
CN107291682A (en) * 2016-03-30 2017-10-24 同方知网(北京)技术有限公司 It is a kind of to divide piece algorithm based on many electronic documents for redirecting processing and twin check
CN107622008A (en) * 2016-07-14 2018-01-23 阿里巴巴集团控股有限公司 The traversal method and device of a kind of five application page

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150052441A1 (en) * 2013-07-30 2015-02-19 Draios Inc. System, method, and graphical user interface for application topology mapping in hosted computing environments
CN105786294A (en) * 2014-12-19 2016-07-20 阿里巴巴集团控股有限公司 Page access path return method and apparatus
CN104899140A (en) * 2015-06-03 2015-09-09 上海斐讯数据通信技术有限公司 Test method for mobile terminal assembly
CN104978270A (en) * 2015-07-03 2015-10-14 上海触乐信息科技有限公司 Automatic software testing method and apparatus
US9798650B1 (en) * 2015-08-27 2017-10-24 Jpmorgan Chase Bank, N.A. Application testing system and method
CN105260301A (en) * 2015-09-24 2016-01-20 努比亚技术有限公司 Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces
CN105468529A (en) * 2015-12-15 2016-04-06 北京奇虎科技有限公司 Accurate traversal method and apparatus for UI controls of android application
CN106909262A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of data processing method and device
CN107291682A (en) * 2016-03-30 2017-10-24 同方知网(北京)技术有限公司 It is a kind of to divide piece algorithm based on many electronic documents for redirecting processing and twin check
CN107622008A (en) * 2016-07-14 2018-01-23 阿里巴巴集团控股有限公司 The traversal method and device of a kind of five application page
CN106294167A (en) * 2016-08-16 2017-01-04 济南大学 The automatic traversal method of Android Application Program Interface and system

Also Published As

Publication number Publication date
CN108710570B (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN110162695B (en) Information pushing method and equipment
CN107562775A (en) A kind of data processing method and equipment based on block chain
CN107562467A (en) Page rendering method, apparatus and equipment
CN108334585A (en) A kind of spiders method, apparatus and electronic equipment
CN108345580A (en) A kind of term vector processing method and processing device
CN109086961A (en) A kind of Information Risk monitoring method and device
CN108171267A (en) User group partitioning method and device, information push method and device
CN107341014A (en) Electronic equipment, the generation method of technical documentation and device
CN108256070A (en) For generating the method and apparatus of information
EP3358474A1 (en) Route search method, device and apparatus, and non-volatile computer storage medium
CN109614372A (en) A kind of object storage, read method, device and service server
CN108804458A (en) A kind of reptile web retrieval method and apparatus
CN110119507A (en) Term vector generation method, device and equipment
CN108021610A (en) Random walk, random walk method, apparatus and equipment based on distributed system
US10846483B2 (en) Method, device, and apparatus for word vector processing based on clusters
CN107391540A (en) A kind of small routine methods of exhibiting, device and grader
CN116034401A (en) System and method for retrieving video using natural language descriptions
CN108921190A (en) A kind of image classification method, device and electronic equipment
AU2018204876A1 (en) Interactive content search using comparisons
CN110008391A (en) The construction method and device, storage medium, computer equipment of user interest portrait
CN109656946A (en) A kind of multilist relation query method, device and equipment
CN109492401A (en) A kind of content vector risk checking method, device, equipment and medium
CN108519986A (en) A kind of webpage generating method, device and equipment
CN108710570A (en) A kind of view function test method, device and equipment
US20160283520A1 (en) Search device, search method, and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201028

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201028

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240229

Address after: 128 Meizhi Road, Guohao Times City # 20-01, Singapore 189773

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right