CN108710570B - View function testing method, device and equipment - Google Patents

View function testing method, device and equipment Download PDF

Info

Publication number
CN108710570B
CN108710570B CN201810447148.8A CN201810447148A CN108710570B CN 108710570 B CN108710570 B CN 108710570B CN 201810447148 A CN201810447148 A CN 201810447148A CN 108710570 B CN108710570 B CN 108710570B
Authority
CN
China
Prior art keywords
view
access
identifier
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.)
Active
Application number
CN201810447148.8A
Other languages
Chinese (zh)
Other versions
CN108710570A (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
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co 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

Images

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

The embodiment of the specification discloses a method, a device and equipment for testing view functions, wherein the method comprises the following steps: during testing, the accessed view identification and the view elements of each accessed view need to be stored in an access path; the method comprises the steps of realizing access to each view through an unaccessed view element, carrying out screen capture on the currently accessed view, and extracting view features by using a feature extraction algorithm; and matching the currently acquired view characteristics with the view characteristics of the accessed view, judging whether the current view is accessed according to the matching result, and if the current view is accessed, ending the jump access of the current access path.

Description

View function testing method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for testing a view function.
Background
With the popularization of various types of application software, especially the wide application of mobile application software, these User-oriented application software needs to include a User Interface (UI) so that a User can intuitively and conveniently use the mobile application software. In order to ensure that the view function of the online software can normally and stably run, the view function of the online software needs to be tested.
In the prior art, a test script is usually written based on a traversal algorithm to test a view function of application software, and a user interface of the application software can be tested for function interaction, compatibility, stability and the like. In some mobile applications, there may be a loop back problem (i.e., repeated accesses to the same view interface, trapping in dead loops) due to view switching of the user interface. For example, after clicking an interactive button in the current interface, the current interface still returns, and the conventional depth-first traversal-based method needs additional intervention (e.g., writing a corresponding test script) for each interface with a loop to avoid the loop generated by the traversal program.
Based on the prior art, a scheme capable of quickly and simply realizing view function testing is needed.
Disclosure of Invention
The embodiment of the specification provides a view function testing method, a device and equipment, which are used for solving the following technical problems: a solution for implementing a view function test quickly and easily is needed.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
the method for testing the view function provided by the embodiment of the specification comprises the following steps:
testing and accessing a first view to obtain a first view characteristic;
according to a preset view access relation, performing a jump access test based on the first view to jump access to a second view and obtain a second view characteristic;
comparing the first view feature and the second view feature;
and if the comparison result is consistent, ending the current jump access test.
The embodiment of this specification provides a view function testing arrangement, includes:
the acquisition module tests and accesses the first view to acquire first view characteristics;
the skip module is used for carrying out skip access test based on the first view according to a preset view access relation so as to skip access to a second view and obtain the characteristics of the second view;
a comparison module that compares the first view feature and the second view feature;
and the execution module is used for ending the current jump access test if the comparison result is consistent.
An electronic device provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
testing and accessing a first view to obtain a first view characteristic;
according to a preset view access relation, performing a jump access test based on the first view to jump access to a second view and obtain a second view characteristic;
comparing the first view feature and the second view feature;
and if the comparison result is consistent, ending the current jump access test.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
obtaining a first view identifier, a first view feature and a first view element based on the accessed screenshot of the first view, determining an incidence relation between the first view identifier and the first view feature, and establishing a first view element key value pair; further, the first view identification is stored into the corresponding access path. Accessing a corresponding second view according to the first view element, acquiring a second view identifier, a second view feature and a second view element, determining an association relation between the second view identifier and the second view feature, and establishing a second view element key value pair; further, the first view element identification and the second view identification are stored in the access path, and a second access path is generated. And comparing the second view characteristics with view characteristics corresponding to the view identifications in the updated access path based on the view identifications stored in the updated access path, if the comparison result is consistent, ending the current jump access, and further performing view function test on other access paths, so that the loop problem of cyclic access in view test can be effectively avoided, and the view function test efficiency can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic diagram of a view function test involved in a practical application scenario of the solution of the present specification;
fig. 2 is a schematic flow chart of a view function testing method provided in an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method for testing view functions according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of a view function testing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating an electronic device executing view function testing method according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
Fig. 1 is a schematic diagram of a view function test involved in a practical application scenario of the solution of the present specification. And testing the view function in the application software to be tested based on a depth-first search algorithm. Specifically, a screenshot of an accessed first view needs to be acquired, first view features are extracted based on the screenshot, and a first association relation is established by combining a current view identifier. Further, the first view identifier is stored in the access path (it should be noted that, in practical applications, multiple access paths may exist at the same time, and when view features are matched, matching is performed based on the current access path). And further, based on a first view element of the first view, skipping to access a corresponding second view, and storing the first view element and the second view identifier to the updated access path. Further, comparing the second view characteristic with the first view characteristic based on the updated access path; if the comparison result is consistent, the current jump access is ended, and the view function test of other access paths is started, so that the loop-back problem (namely, repeated access to the same view and trapping in a dead loop access mode) can be effectively avoided. And, outputting a corresponding access path for each access association. In addition, the view function tests in fig. 1 are all shown in the form of servers, and the test of the view function based on the extracted view features may be performed on the servers, which are not only a single server, but also may adopt a cluster or distributed architecture.
The view function test described herein is mainly directed to a test of a view function of application software that can be applied to various devices having display interfaces, and specifically, may be an application software view function test based on a mobile terminal (e.g., a mobile phone), or an application software view function test of various computer terminals that support the view display function. The views herein may be considered content interfaces presented to the user as web pages, application interfaces, and the like. The first view and the second view are only used for descriptive difference and are used for representing views adjacent to one jump action in sequence, specifically, the first view can be understood as any view before the jump action, and the second view can be understood as any view after the jump action; the terms first and second should not be construed as limiting the number of views.
Based on the above-described scenarios, the following describes the embodiments of the present specification in detail.
Fig. 2 is a schematic flow chart of a view function testing method provided in an embodiment of the present specification, where the method specifically includes the following steps:
step S202: and testing and accessing the first view to obtain the first view characteristics.
It should be noted that the manner of accessing the first view may be directly accessed when the application software is started or accessed through a view element. For example, if the first view is a view of an application initialization page, the user may access the first view when opening the software; if the first view is a view obtained based on an initialized page, accessing the first view may be accomplished by a user clicking on a view element (e.g., an interactive button displayed by a view interface) to access a specified page (e.g., the first view). The first view mentioned herein may be understood as a view of multiple views or a view feature of one view, and may be a view of an initialization page accessed first or a view accessed later, which is merely an example and does not limit the embodiments of the present application.
When the first view feature is obtained, the view feature in the screenshot of each view can be extracted in an image recognition mode, for example, feature point extraction algorithms such as Speeded Up Robust Features (SURF), Scale-invariant feature transform (SIFT), and the like can be adopted; so that the current view characteristics can be obtained.
Step S204: and according to a preset view access relation, performing jump access test based on the first view to jump access to a second view and obtain the characteristics of the second view.
The preset view access relationship is understood to mean that, in the view function of the application software, the jump access relationship between the views is already defined, and in general, jump access to a specified view can be realized through the view element. Jump access to the second view may be implemented, for example, by a "next page" or "ok" button.
In general, jump access to multiple views can be implemented based on a first view. Of course, it is also possible that some views do not contain view elements, and that view cannot jump further to access other views.
In order to obtain the second view characteristics, after the second view is accessed based on the jump, screenshot can be performed on the displayed second view to obtain a second view screenshot image, and further, the second view characteristics are extracted based on the second view screenshot image. It should be noted that when image feature extraction is performed based on a screenshot, the same extraction algorithm is often used, so as to ensure that view features obtained for the same screenshot are the same.
Step S206: comparing the first view feature and the second view feature.
It should be noted that there may be at least one first view feature (i.e., the view feature of at least one view is referred to as a first view feature). In practical application, if feature comparison is to be performed, the second view feature needs to be compared with the plurality of first view features respectively; and if one of the first view characteristics is consistent with the second view characteristic comparison result, the current jump access is considered to find the same view, and the current jump access is ended.
Step S208: and if the comparison result is consistent, ending the current jump access test.
The features mentioned here are consistent, and generally speaking, if the same feature extraction algorithm is adopted for the same view, the obtained first view feature is completely consistent with the second view feature; of course, the situations may also occur that the images are not completely consistent, for example, when the screenshots are captured, the image definitions are different, and at this time, for convenience of comparison, the similarity ratio may be set, for example, the similarity reaches 95%, and the features may be considered to be the same. The agreement is not limited to the exact same case, and in actual practice, it may be considered to be the agreement when setting which threshold value is reached, depending on the actual situation.
The ending of the current jump access test as used herein is understood to mean ending a jump access based on the current jump access path. In practical application, if the access of all view elements is traversed, all view access is ended, and the test of view functions is completed, so that the problem of loop back caused by repeated access of the same access path can be effectively avoided; if the view elements which are not accessed exist, the access test of the current access path is ended, and the jump access test is continued for other access paths.
Based on the above embodiments, it can be understood that, by obtaining the first view identifier, the first view feature and the first view element based on the accessed screenshot of the first view, determining the association relationship between the first view identifier and the first view feature, and establishing the first view element key value pair; further, the first view identification is stored into the corresponding access path. Accessing a corresponding second view according to the first view element, acquiring a second view identifier, a second view feature and a second view element, determining an association relation between the second view identifier and the second view feature, and establishing a second view element key value pair; further, the first view element identification and the second view identification are stored in the access path, and a second access path is generated. And comparing the second view characteristics with view characteristics corresponding to the view identifications in the updated access path based on the view identifications stored in the updated access path, if the comparison result is consistent, ending the current jump access, and further performing view function test on other access paths, so that the loop problem of cyclic access in view test can be effectively avoided, and the view function test efficiency can be effectively improved.
In one or more embodiments of the present specification, before performing the jump access test based on the first view, the method may further include: acquiring a first view identifier and a first view element; establishing a first association relation according to the first view identifier and the first view feature; generating an access path containing the first view identification according to the access instruction aiming at the first view; establishing a first view element key-value pair according to the first view element; wherein the first view element key-value pair comprises: the first view element identification and the access flag.
The first association relationship may be in the form of a key-value pair or a data table. Generally, one and the same first view identifier may correspond to a plurality of view features at the same time; in order to establish the first association relationship, the array can be used for storing a plurality of view characteristics to obtain a first view characteristic; for example, the first association may be expressed as { view identification, multidimensional view feature }. In practical application, the corresponding multi-dimensional view features can be quickly determined through view identification.
It should be noted that the view identifier referred to herein may be understood as a view name or a view number, which can distinguish each view page in the same view function software.
In practical application, when a view function is subjected to traversal test, multiple access paths may appear simultaneously based on the same access initial page, and for convenience of distinction, one of the access paths is defined as an access path.
It should be noted that the access path may be generated in real time in the access process or the test process, and a corresponding access path is generated or updated every time a view or a view element is accessed; for example, if the accessed first view is an initial view, an access path needs to be established based on the identifier of the initial view; if the accessed first view is accessed through view elements of other views, the view identifier of the first view needs to be stored in the existing access path (i.e., the access path is updated, the view identifier is added to the current access path, and a new access path is generated). In the access path, view identifiers of the views accessed from the initial page are stored. When the view features of the currently accessed view are matched in the subsequent steps, matching comparison needs to be performed on the basis of the view features corresponding to the view identifiers contained in the current access path; and the matching comparison is not carried out with the view characteristics corresponding to the view identifications stored in other access paths.
The starting point of each stored access path is an initial page (some application software may have multiple initial pages at the same time), and two independent access paths need to be established for different view elements corresponding to the same view page; for example, the first access path: 1-1d-3-3e-4-4f-3, the second access path: 1-1d-3-3g-5-5h-1, the first half of the two access paths are both 1-1d-3, and in order to distinguish the paths, two independent access paths need to be reestablished; wherein the numbers represent view identifiers and the combination of the numbers and the letters represent view elements; the access path format is: view identification-A view element identification-B view element identification; it should be noted that access to the B view can be realized through the a view element.
The access instruction for the first view may be an access instruction when the initialization view is clicked, or an access instruction for accessing the corresponding view based on clicking a view element; of course, these access instructions may be triggered by the user or by the program.
It should be noted that, for each accessed view, view elements in the view are acquired, and in order to avoid repeated accesses to the same view element, the access statuses of the view elements need to be distinguished by access flags, for example, an element key-value pair, {1a, false }, may be stored in a key-value pair manner, which indicates that the view element identifier 1a in view 1 is an unvisited view element.
Generally, if the first view to be accessed is not the initial view, it is often necessary to access through unmarked view elements of the pre-stored key value pairs. The pre-stored view elements are view elements of other views before the current view is accessed, the view elements are extracted after the other views are accessed, and further, the access states of the view elements are marked and stored to obtain the key value pairs of the pre-stored view elements.
In one or more embodiments of the present specification, the accessing a second view based on the first view jump according to a preset view access relationship to obtain a second view feature specifically may include: and jumping to access a corresponding second view based on the first view element corresponding to the unmarked first view element key value pair according to a preset view access relation, and acquiring second view characteristics.
In application software, the access relationship or association relationship between the views is preset in the software, and jump access between the views is often realized through view elements. After accessing the first view, at least one first view element is extracted. As previously described, for the newly acquired first view element, a first view element key-value pair is established, which has the primary role of distinguishing between visited and unvisited view element key-value pairs. In practical applications, in order to avoid repeated accesses (e.g., a loop back problem) to the same view element in the same view, it is necessary to mark the access flag in each accessed pre-stored element key value pair in time, for example, the un-accessed element key value pair is {1a, false }, and the accessed element key value pair is {1a, true }, where 1a represents a view element identifier, and false and true identify the access flag. When view access is carried out on the basis of elements, view elements which are not accessed are selected, namely, a first view element key value pair marked as false is selected for access, the first view element identification is determined and accessed, and jump access is carried out on a corresponding second view.
In one or more embodiments of the present specification, after acquiring the second view feature, the method may further include: acquiring a second view identifier and a second view element; establishing a second association relation according to the second view identifier and the second view characteristic; marking an access mark in the accessed first view element key value pair; updating and generating an access path containing the first view element identification and the second view identification based on the access path according to an access instruction aiming at the second view; establishing a second view element key-value pair according to the second view element; wherein the second view element key-value pair comprises: the second view element identification and the access flag.
As described above, in order to distinguish the access states of the view elements, in practical applications, the access flag in the accessed first view element key value pair needs to be marked, for example, the access flag is marked as true by false.
The access instruction for the second view is herein referred to as an access instruction issued based on the first view element. As mentioned above, at least one view identifier is already included in the access path, and the updated access path is obtained based on the access path, for example, an updated access path generated after the first view element identifier and the second view identifier are added to the access path.
In one or more embodiments of the present description, comparing the first view feature and the second view feature may specifically include: and comparing the second view characteristic with the first view characteristic corresponding to the first view identifier based on the updated access path, the first incidence relation and the second incidence relation.
In practical applications, as can be seen from the foregoing, when comparing view features, the comparison needs to be performed based on view identifiers in the same access path. Assuming that the view identifier pre-stored in the current access path includes 1 and 3, and the view element includes 1 d; continuing view access based on the first view element, and comparing the view 4 with view features respectively corresponding to the view 1 and the view 3 in the access path on the assumption that the view 4 is accessed based on the view element 3e, wherein the same view is not found in the access path through comparison; accessing based on a view element 4f in the view 4, where the access view is 3, sequentially matching the view 3 with each view in the current access path, and matching the same view 3 in the current access path, where the final output access path may be: 1-1d-3-3e-4-4 f-3.
When the first view characteristic and the second view characteristic are compared, the first view characteristic and the second view characteristic need to be sequentially compared with each pre-stored view identifier stored in the access path, and if a matched view is found, the matching of a subsequent view in the access path is terminated; if no matched view is found, comparing the last view identifier in the current access path; further, access continues based on the view element the first view has.
When performing feature matching, the matching algorithm used may include: the Approximate Nearest neighbor search algorithm is selected to be implemented, and comprises Fast Library for Approximate Nearest Neighbors (FLANN) and the like.
In one or more embodiments of the present specification, if the comparison result is consistent, ending the current jump access may specifically include: if the comparison result is consistent, outputting a complete access path, and ending the current jump access; if the first view has an unmarked first view element key-value pair, continuing to access the corresponding view according to the unmarked first view element key-value pair.
For example, assuming that the output full access path is 1-1d-3-3e-3, the first view is identified as 3, and the second view is identified as 3, since view 3 has already been accessed, but view 3 also has other unmarked element key-value pairs, assuming that the unmarked element key-value pair is {3g, false }, then further access is performed based on access path 1-1d-3-3 g-4. If view 4 also has other view elements in addition to view element 4f, the following access path may proceed based on view 4, resulting in the latest access path being 1-1d-3-3e-4- ….
It is easy to understand that when performing contrast matching, the view in which the loop back problem occurs is accessed by the key value pair of the unmarked element or the latest view with the unmarked element key value pair, and if all the view elements in the view are accessed or have no view element, the unmarked element key value pair in the previous view is accessed.
In one or more embodiments of the present disclosure, if the comparison result is inconsistent, the method may further include: if the comparison result is inconsistent, outputting the updated access path in which the first view element identifier and the second view identifier are stored; based on the second element key-value pair that is not marked, continuing to access the corresponding view.
For example, assuming that the view identifier of the first view is 3, the view identifier of the second view is 5, and the access path 1-1d-3, since the first view 3 does not match the view 1 in the access path, the corresponding view is continuously accessed based on the first view element key value pair of the view 3 (as described above, the current view key value pair is acquired when the current view is accessed), and assuming that the first view element identifier is 3e, the corresponding view is view 4. Further, the first view element identifier 3e is stored in the access path, and the updated access path is generated to be 1-1d-3-3 e-4. While continuing to access view 5, the view features of view 5 need to be matched with the view features of view 1 and view 3, respectively. Until the current access path is accessed to have the same view identification.
To facilitate understanding of the technical solution of the present application, the following specifically illustrates, as shown in fig. 3, a view access function diagram provided in an embodiment of the present specification.
Step 1: and starting the application and entering an initial view, namely an initial view 1.
Step 2: and executing a device instruction (such as an adb command of an Android platform) to acquire the view element of the current view 1, for example, saving a clickable view element into an unmarked key-value pair {1a, false } to represent { view 1 element a, not accessed }.
And step 3: the method comprises the steps of capturing a screen of a current view 1, extracting image features of the view 1, storing the image features in a multi-dimensional feature vector, storing the view features and view identifiers as pair, {1, the multi-dimensional feature vector }, and representing the multi-dimensional feature vector by using an array.
And 4, step 4: the method comprises the steps of accessing the element key value pair of the view which is not accessed, and marking the accessed element key value pair, such as {1a, true } for representing { view 1 element a, accessed }
And 5: based on the key value pairs of the unmarked elements, performing screen capture on the accessed view, extracting image features, and matching the image features with the existing multi-dimensional feature vectors;
a: if the view is accessed, the output contains the view identifier and the access path of the view element, such as (1- >1a- >1), and the view starts to access other un-accessed key-value pairs of the view, such as 1 b;
b: if not, the view is a new view, the output contains the view identification and the view element access path, such as (1- >1b- >2), and step 2-5 is repeated.
Step 6: the above steps are repeated until all key-value pairs have been accessed.
Step 2 and step 4 describe the manner of obtaining view elements of the view and saving the element access marks. Step 3 and step 5 describe a flow of view feature extraction and matching. And adding view information into the access path every time when the screenshot feature extraction operation is carried out, and obtaining the latest access path (1- >1a- >1) if the view information is added into the access path (1). Every time an element access is made, adding a view element into the access path, such as (1- >1 b); and other steps are realized by a classic depth first search algorithm DFS.
Based on the same idea, an embodiment of the present specification further provides a view function testing apparatus, and as shown in fig. 4, the view function testing apparatus provided in the embodiment of the present specification has a schematic structural diagram, and the apparatus may specifically include:
an obtaining module 401, configured to test and access the first view, and obtain a first view feature;
a skip module 402, performing a skip access test based on the first view according to a preset view access relationship, so as to skip access to a second view and obtain a second view characteristic;
a comparison module 403 for comparing the first view feature and the second view feature;
and the execution module 404 ends the current jump access test if the comparison result is consistent.
Further, the obtaining module 401 obtains a first view identifier and a first view element;
establishing a first association relation according to the first view identifier and the first view feature;
generating an access path containing the first view identification according to the access instruction aiming at the first view;
establishing a first view element key-value pair according to the first view element; wherein the first view element key-value pair comprises: the first view element identification and the access flag.
Further, the skip module 402 skips and accesses a corresponding second view based on the unmarked key value pair of the first view element and the corresponding first view element according to a preset view access relationship, so as to obtain a second view feature.
Further, after the second view feature is obtained, the method further includes:
acquiring a second view identifier and a second view element;
establishing a second association relation according to the second view identifier and the second view characteristic;
marking an access mark in the accessed first view element key value pair;
updating and generating an access path containing the first view element identification and the second view identification based on the access path according to an access instruction aiming at the second view;
establishing a second view element key-value pair according to the second view element; wherein the second view element key-value pair comprises: the second view element identification and the access flag.
Further, the comparing module 403 compares the second view feature with the first view feature corresponding to the first view identifier based on the updated access path, the first association relationship and the second association relationship.
Further, if the comparison result is consistent, ending the current jump access, specifically including:
if the comparison result is consistent, outputting a complete access path, and ending the current jump access;
if the first view has an unmarked first view element key-value pair, continuing to access the corresponding view according to the unmarked first view element key-value pair.
Further, if the comparison result is inconsistent, the method further comprises the following steps:
if the comparison result is inconsistent, outputting the updated access path in which the first view element identifier and the second view identifier are stored;
based on the second element key-value pair that is not marked, continuing to access the corresponding view.
Along these same lines, the present embodiments also provide a computer readable medium, which stores computer readable instructions that can be executed by a processor to implement the method described in any of the above embodiments. Fig. 5 is a schematic diagram of a computer-readable medium for performing a view function testing method according to an embodiment of the present disclosure.
Based on the same idea, an embodiment of this specification further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
testing and accessing a first view to obtain a first view characteristic;
according to a preset view access relation, performing a jump access test based on the first view to jump access to a second view and obtain a second view characteristic;
comparing the first view feature and the second view feature;
and if the comparison result is consistent, ending the current jump access test.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
The apparatus, the electronic device, the nonvolatile computer storage medium and the method provided in the embodiments of the present description correspond to each other, and therefore, the apparatus, the electronic device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data monitoring apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data monitoring apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data monitoring apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data monitoring apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A method of view functionality testing, comprising:
testing and accessing a first view to obtain a first view characteristic; the first view feature is used for establishing a first incidence relation with a first view identifier;
acquiring a first view identifier and a first view element;
establishing a first association relation according to the first view identifier and the first view feature;
generating an access path containing the first view identification according to the access instruction aiming at the first view;
establishing a first view element key-value pair according to the first view element; wherein the first view element key-value pair comprises: a first view element identification and an access flag;
according to a preset view access relation, performing a jump access test based on the first view to jump access to a second view and obtain a second view characteristic;
acquiring a second view identifier and a second view element;
establishing a second association relation according to the second view identifier and the second view characteristic;
marking an access mark in the accessed first view element key value pair;
updating and generating an access path containing the first view element identification and the second view identification based on the access path according to an access instruction aiming at the second view;
establishing a second view element key-value pair according to the second view element; wherein the second view element key-value pair comprises: a second view element identification and an access flag;
comparing the first view feature and the second view feature;
if the comparison result is consistent, ending the current jump access test;
the performing, according to a preset view access relationship, a jump access test based on the first view to jump access to a second view and obtain a second view feature specifically includes:
according to a preset view access relation, jumping to access a corresponding second view based on a first view element corresponding to the unmarked first view element key value pair to obtain a second view characteristic; the second view characteristic is used for establishing a second association relation with the second view identifier;
and according to the access instruction for the second view, updating and generating an access path containing the first view element identification and the second view identification based on the access path containing the first view identification.
2. The method of claim 1, wherein comparing the first view feature to the second view feature comprises:
and comparing the second view characteristic with the first view characteristic corresponding to the first view identifier based on the updated access path, the first incidence relation and the second incidence relation.
3. The method according to claim 2, wherein if the comparison result is consistent, ending the current jump access, specifically comprising:
if the comparison result is consistent, outputting a complete access path, and ending the current jump access;
if the first view has an unmarked first view element key-value pair, continuing to access the corresponding view according to the unmarked first view element key-value pair.
4. The method of claim 2, further comprising, if the comparison results are inconsistent:
if the comparison result is inconsistent, outputting the updated access path in which the first view element identifier and the second view identifier are stored;
based on the unlabeled second element key-value pair, access to the corresponding view continues.
5. A view function testing apparatus comprising:
the acquisition module tests and accesses the first view to acquire first view characteristics; the first view feature is used for establishing a first incidence relation with a first view identifier;
the acquisition module acquires a first view identifier and a first view element;
establishing a first association relation according to the first view identifier and the first view feature;
generating an access path containing the first view identification according to the access instruction aiming at the first view;
establishing a first view element key-value pair according to the first view element; wherein the first view element key-value pair comprises: a first view element identification and an access flag;
the skip module is used for carrying out skip access test based on the first view according to a preset view access relation so as to skip access to a second view and obtain the characteristics of the second view;
acquiring a second view identifier and a second view element;
establishing a second association relation according to the second view identifier and the second view characteristic;
marking an access mark in the accessed first view element key value pair;
updating and generating an access path containing the first view element identification and the second view identification based on the access path according to an access instruction aiming at the second view;
establishing a second view element key-value pair according to the second view element; wherein the second view element key-value pair comprises: a second view element identification and an access flag;
a comparison module that compares the first view feature and the second view feature;
the execution module is used for ending the current jump access test if the comparison results are consistent;
the skip module skips and accesses a corresponding second view based on the unmarked first view element key value pair corresponding to the first view element according to a preset view access relation to obtain a second view characteristic; the second view characteristic is used for establishing a second association relation with the second view identifier;
and according to the access instruction for the second view, updating and generating an access path containing the first view element identification and the second view identification based on the access path containing the first view identification.
6. The apparatus of claim 5, the comparison module to compare the second view feature to a first view feature corresponding to the first view identifier based on the updated access path, the first association, and the second association.
7. The apparatus of claim 6, wherein if the comparison result is consistent, ending the current jump access specifically includes:
if the comparison result is consistent, outputting a complete access path, and ending the current jump access;
if the first view has an unmarked first view element key-value pair, continuing to access the corresponding view according to the unmarked first view element key-value pair.
8. The apparatus of claim 6, further comprising, if the comparison results are inconsistent:
if the comparison result is inconsistent, outputting the updated access path in which the first view element identifier and the second view identifier are stored;
based on the unlabeled second element key-value pair, access to the corresponding view continues.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
testing and accessing a first view to obtain a first view characteristic; the first view feature is used for establishing a first incidence relation with a first view identifier;
acquiring a first view identifier and a first view element;
establishing a first association relation according to the first view identifier and the first view feature;
generating an access path containing the first view identification according to the access instruction aiming at the first view;
establishing a first view element key-value pair according to the first view element; wherein the first view element key-value pair comprises: a first view element identification and an access flag;
according to a preset view access relation, performing a jump access test based on the first view to jump access to a second view and obtain a second view characteristic;
acquiring a second view identifier and a second view element;
establishing a second association relation according to the second view identifier and the second view characteristic;
marking an access mark in the accessed first view element key value pair;
updating and generating an access path containing the first view element identification and the second view identification based on the access path according to an access instruction aiming at the second view;
establishing a second view element key-value pair according to the second view element; wherein the second view element key-value pair comprises: a second view element identification and an access flag;
comparing the first view feature and the second view feature;
if the comparison result is consistent, ending the current jump access test;
the performing, according to a preset view access relationship, a jump access test based on the first view to jump access to a second view and obtain a second view feature specifically includes:
according to a preset view access relation, jumping to access a corresponding second view based on a first view element corresponding to the unmarked first view element key value pair to obtain a second view characteristic; the second view characteristic is used for establishing a second association relation with the second view identifier;
and according to the access instruction for the second view, updating and generating an access path containing the first view element identification and the second view identification based on the access path containing the first view identification.
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 CN108710570A (en) 2018-10-26
CN108710570B true 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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9246773B2 (en) * 2013-07-30 2016-01-26 Draios Inc. System, method, and graphical user interface for application topology mapping in hosted computing environments

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN108710570A (en) 2018-10-26

Similar Documents

Publication Publication Date Title
CN109189682B (en) Script recording method and device
CN107808098B (en) Model safety detection method and device and electronic equipment
US9990209B2 (en) Digital assistance device for facilitating multi-stage setup
CN107025174B (en) Method, device and readable storage medium for user interface anomaly test of equipment
CN107609437B (en) Target graphic code identification method and device
CN109033772B (en) Verification information input method and device
CN107480587B (en) Model configuration and image recognition method and device
CN107066519B (en) Task detection method and device
CN107783766B (en) Method and device for cleaning files of application program
CN111930809A (en) Data processing method, device and equipment
CN112347512A (en) Image processing method, device, equipment and storage medium
CN112612690A (en) User interface information processing method and device, electronic equipment and storage medium
CN108710570B (en) View function testing method, device and equipment
CN104156306A (en) Application process detection method and device and terminal equipment
CN113360385A (en) Test method, device, equipment and medium
US20150095897A1 (en) Method and apparatus for converting programs
CN115221523B (en) Data processing method, device and equipment
CN108334775B (en) Method and device for detecting jail-crossing plug-in
CN108681490B (en) Vector processing method, device and equipment for RPC information
CN109376289B (en) Method and device for determining target application ranking in application search result
CN112181798B (en) Data recording method and device
CN112579938A (en) Page loading method and device, storage medium and electronic equipment
CN114238119A (en) Automatic testing method and system for android application and storage medium
CN111598092A (en) Method for determining target area in image, method and device for identifying target
CN110825726B (en) Block chain data detection method, device and equipment

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