CN112965916A - Page testing method, page testing device, electronic equipment and readable storage medium - Google Patents
Page testing method, page testing device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN112965916A CN112965916A CN202110381223.7A CN202110381223A CN112965916A CN 112965916 A CN112965916 A CN 112965916A CN 202110381223 A CN202110381223 A CN 202110381223A CN 112965916 A CN112965916 A CN 112965916A
- Authority
- CN
- China
- Prior art keywords
- page
- tested
- pages
- attribute information
- test
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 256
- 238000000034 method Methods 0.000 claims abstract description 41
- 238000004590 computer program Methods 0.000 claims abstract description 28
- 230000015654 memory Effects 0.000 claims description 11
- 238000013527 convolutional neural network Methods 0.000 claims description 5
- 238000012549 training Methods 0.000 claims description 5
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 239000002699 waste material Substances 0.000 description 5
- 238000001545 Page's trend test Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 108010001267 Protein Subunits Proteins 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
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)
- Debugging And Monitoring (AREA)
Abstract
The disclosure provides a page testing method, which is used in the technical field of computers or other fields. The method comprises the following steps: acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2; determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested; determining N target test pages from the M pages to be tested according to the attribute path information, wherein different target test pages have different attribute path information, and N is more than or equal to 1 and less than or equal to M; and testing the N target test pages. The disclosure also provides a page testing device, an electronic device, a computer readable storage medium and a computer program product.
Description
Technical Field
The disclosed embodiments relate to the field of computer technologies, and more particularly, to a page testing method, a page testing apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
The APP (Application) generally refers to software installed on an intelligent terminal, and is used for improving the deficiency and personalization of an original system, so that the mobile phone improves the functions thereof, and is a main means for providing richer use experience for users.
In the related technology, when the jump of the APP page is tested, the APP is firstly abstracted into a directed graph, and then the directed graph is subjected to a depth search test by a depth-first traversal method. Each node in the directed graph represents a page of the APP, and each edge represents a jump relationship between different pages.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: because there are many similar pages in the APP, the similar pages in the APP can be tested repeatedly through the test method in the related technology, which causes the problems of low test efficiency and resource waste.
Disclosure of Invention
In view of this, the disclosed embodiments provide a page testing method, a page testing apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
One aspect of the embodiments of the present disclosure provides a page testing method, including:
acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2;
determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested;
determining N target test pages from the M pages to be tested according to the attribute path information, wherein different target test pages have different attribute path information, and N is more than or equal to 1 and less than or equal to M; and
and testing the N target test pages.
According to an embodiment of the present disclosure, the determining attribute path information of each page to be tested in the M pages to be tested includes:
determining the page type of each page to be tested in the M pages to be tested;
determining target page attribute information of the page to be tested according to the page type of the page to be tested; and
and determining page path information of the page to be tested.
According to the embodiment of the disclosure, the page testing method further comprises the following steps:
determining a first test page and a second test page corresponding to the page types aiming at each page type in the R page types, wherein R is more than or equal to 1;
determining first original page attribute information corresponding to the first test page;
determining second original page attribute information corresponding to the second test page;
under the condition that an actual test result is determined to be inconsistent with an expected test result, adjusting the first original page attribute information and the second original page attribute information to obtain adjusted first original page attribute information and second original page attribute information, wherein the actual test result is a result used for representing that the first test page and the second test page are different test pages according to the first original page attribute information and the second original page attribute information, and the expected test result is a result used for representing that the first test page and the second test page are actually the same test page;
determining a new actual test result according to the adjusted first original page attribute information and second original page attribute information until the new actual test result is consistent with the expected test result;
and under the condition that the new actual test result is consistent with the expected test result, determining the adjusted first original page attribute information or second original page attribute information as target page attribute information corresponding to the page type.
According to the embodiment of the disclosure, the adjusted first original page attribute information and second original page attribute information comprise U page attributes, wherein U is more than or equal to 2;
determining the adjusted first original page attribute information or second original page attribute information as target page attribute information corresponding to the page type under the condition that the new actual test result is consistent with the expected test result, including:
under the condition that the new actual test result is consistent with the expected test result, determining V page attributes from U page attributes in the adjusted first original page attribute information or second original page attribute information according to the priority of the page attributes, wherein V is more than or equal to 1 and less than or equal to U; and
and determining the V page attributes as target page attribute information corresponding to the page types.
According to the embodiment of the present disclosure, the determining the target page attribute information of the page to be tested according to the page type of the page to be tested includes:
determining original page attribute information of the page to be tested according to the page type of the page to be tested; and
inputting the page type of the page to be tested and the original page attribute information of the page to be tested into a page attribute information determination model, and outputting the target page attribute information of the page to be tested, wherein the page attribute information determination model is generated by utilizing convolutional neural network model training.
According to an embodiment of the present disclosure, the testing the N target test pages includes:
generating a directed graph according to the page path information of the N target test pages; and
and traversing the directed graph to realize the test of the N target test pages.
According to an embodiment of the present disclosure, traversing the directed graph to implement testing of the N target test pages includes:
and traversing the directed graph by using a depth-first traversal method to realize the test of the N target test pages.
Another aspect of the embodiments of the present disclosure provides a page testing apparatus, including:
the acquisition module is used for acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2;
the first determining module is used for determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested;
a second determining module, configured to determine N target test pages from the M pages to be tested according to the attribute path information, where different target test pages have different attribute path information, and N is greater than or equal to 1 and is less than or equal to M; and
and the test module is used for testing the N target test pages.
Another aspect of an embodiment of the present disclosure provides an electronic device including: one or more processors; memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of embodiments of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of an embodiment of the present disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the attribute path information of the page to be tested is determined according to the page attribute information and the page path information of the page to be tested, and the page to be tested with different attribute path information is determined from all the pages to be tested in the object to be tested according to the attribute path information so as to perform page testing. Because each target test page is determined according to the attribute path information which can represent the page to be tested, repeated tests of the target test pages with the same attribute path information are avoided, system resources are saved, and the test efficiency is improved. The problems of low testing efficiency and resource waste in the prior art are solved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically shows an exemplary system architecture to which a page test method may be applied according to an embodiment of the present disclosure.
FIG. 2 schematically shows a flow chart of a page testing method according to an embodiment of the present disclosure.
FIG. 3 schematically shows a flow diagram of a page testing method according to another embodiment of the present disclosure.
FIG. 4 schematically shows a block diagram of a page testing apparatus according to an embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
At present, when an APP page jump is tested, a method adopted by the related technology is to abstract the APP into a directed graph, each node in the directed graph represents a page of the APP, and each edge represents a jump relationship between different pages. And then carrying out depth search test on the directed graph by a depth-first traversal method.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: because there are many similar pages in the APP, the similar pages in the APP can be tested repeatedly through the test method in the related technology, which causes the problems of low test efficiency and resource waste.
Embodiments of the present disclosure provide a page testing method, a page testing apparatus, an electronic device, a computer-readable storage medium, and a computer program product. The page testing method, the page testing device, the electronic device, the computer-readable storage medium and the computer program product of the embodiments of the disclosure may be applied to the field of computer technology, and may also be applied to any field except the field of computer technology, which is not limited in the embodiments of the disclosure. The page testing method comprises the following steps: acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2; determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested; determining N target test pages from the M pages to be tested according to the attribute path information, wherein different target test pages have different attribute path information, and N is more than or equal to 1 and less than or equal to M; and testing the N target test pages.
FIG. 1 schematically shows an exemplary system architecture 100 to which a page test method may be applied, according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the page testing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the page testing apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The page testing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the page testing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the page testing method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Correspondingly, the page testing device provided by the embodiment of the disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
For example, the object to be tested may be originally stored in any one of the terminal devices 101, 102, or 103 (e.g., the terminal device 101, but not limited thereto), or may be stored on an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the page testing method provided by the embodiment of the present disclosure, or send the test object to another terminal device, server, or server cluster, and execute the page testing method provided by the embodiment of the present disclosure by another terminal device, server, or server cluster that receives the test object.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 2 schematically shows a flow chart of a page testing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, M pages to be tested corresponding to the object to be tested are obtained, where M is greater than or equal to 2.
According to an embodiment of the present disclosure, the object to be tested may refer to an object that needs to be tested on a carrier. The type of object to be tested may include software or APP (Application). The carrier may comprise an electronic device, the electronic device may comprise a terminal device, and the terminal device may comprise a smartphone, a tablet, a laptop or desktop computer, or the like. The pages to be tested may include any page of the object to be tested.
For example, taking an object to be tested as a certain mobile phone bank APP on a smart phone as an example, the page to be tested may include a login page, a payment page, a news page, an inquiry page, and the like of the mobile phone bank APP.
In operation S202, attribute path information of each page to be tested in the M pages to be tested is determined, where the attribute path information includes target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested.
According to the embodiment of the present disclosure, the target page attribute information may include page content attribute information, page color attribute information, page structure attribute information, and the like, and may also include any other information that can represent a page to be tested, which is not limited herein. The page path information may include a jump relationship between the current page to be tested and other pages to be tested, and the like.
In operation S203, according to the attribute path information, N target test pages are determined from M pages to be tested, where different target test pages have different attribute path information, and N is greater than or equal to 1 and less than or equal to M.
According to the embodiment of the disclosure, since the test object may include a plurality of pages to be tested having the same page attribute path information, in order to save test resources and improve test efficiency, the pages to be tested having the same page attribute path information do not need to be tested completely, and only one of the pages to be tested is tested. The target test page may include pages to be tested having different attribute path information.
For example, taking an object to be tested as a certain mobile phone bank APP on a smart phone, and pages to be tested as a first fund page, a second fund page, a user information page and a payment page of the mobile phone bank APP as examples. If the first fund page and the second fund page have the same page structure, the same page type, the same skip relation with the user information page and the payment page, and the like, and the description of the first fund page and the second fund page is different, the first fund page and the second fund page are considered to have the same attribute path information. And when the first fund page and the second fund page have the same attribute path information and the first fund page and the second fund page have different attribute path information with the user information page and the payment page, taking the first fund page or the second fund page, the user information page and the payment page as target test pages of the mobile phone bank APP. It should be noted that the above embodiments are only exemplary embodiments, and may be any other object to be tested according to specific implementation needs.
In operation S204, N target test pages are tested.
According to the embodiment of the disclosure, the attribute path information of the page to be tested is determined according to the page attribute information and the page path information of the page to be tested, and the page to be tested with different attribute path information is determined from all the pages to be tested in the object to be tested according to the attribute path information so as to perform page testing. Because each target test page is determined according to the attribute path information which can represent the page to be tested, repeated tests of the target test pages with the same attribute path information are avoided, system resources are saved, and the test efficiency is improved. The problems of low testing efficiency and resource waste in the prior art are solved.
According to the embodiment of the disclosure, determining attribute path information of each page to be tested in M pages to be tested comprises: determining the page type of each page to be tested in the M pages to be tested; determining target page attribute information of the page to be tested according to the page type of the page to be tested; and determining page path information of the page to be tested.
According to the embodiment of the disclosure, the page types may be divided according to specific functions of the page to be tested, or may be divided according to other methods, which is not limited herein. The target page attribute information may include page content, page color, page structure, and the like, and may also include any other information that may characterize the page to be tested, which is not limited in this disclosure. The page path information may include a jump relationship between the current page to be tested and other pages to be tested, and the like.
For example, the page types are divided according to the specific functions of the pages to be tested, and the objects to be tested are partial pages of a certain mobile phone bank APP on the smart phone. The page types of the page to be tested can include a payment type page providing a payment function, a presentation type page providing a presentation function, a login type page providing a login function, and the like.
FIG. 3 schematically shows a flow diagram of a page testing method according to another embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S301 to S306.
In operation S301, for each page type of the R page types, a first test page and a second test page corresponding to the page type are determined, where R ≧ 1.
According to an embodiment of the present disclosure, the first test page and the second test page belong to the same page type.
For example, the object to be tested is taken as a certain mobile phone bank APP on the smart phone, and the first test page and the second test page are respectively a first fund display page and a second fund display page of the mobile phone bank APP. The first fund display page and the second fund display page are used for displaying fund information, namely the first fund display page and the second fund display page belong to the same page type.
It should be noted that the page type in the foregoing embodiment corresponds to only two test pages, and according to specific implementation needs, the page type may also correspond to multiple test pages at the same time.
In operation S302, first original page attribute information corresponding to a first test page is determined.
In operation S303, second original page attribute information corresponding to the second test page is determined.
According to the embodiment of the disclosure, the first original page attribute information may include attribute information extracted from the first test page according to any method and capable of characterizing the first test page. The second original page attribute information may include attribute information extracted from the second test page according to any method and capable of characterizing the first test page.
For example, taking the first test page as a landing page of a certain mobile phone application as an example, the first original page attribute information may include at least one of structure attribute information, color attribute information, content attribute information, input box structure attribute information, input box color attribute information, icon symbol attribute information, and other attribute information of the page. The second original page attribute information is the same as the first original page attribute information, and is not described herein again.
In operation S304, under the condition that it is determined that the actual test result is inconsistent with the expected test result, the first original page attribute information and the second original page attribute information are adjusted to obtain the adjusted first original page attribute information and second original page attribute information, where the actual test result is a result used for representing that the first test page and the second test page are different test pages according to the first original page attribute information and the second original page attribute information, and the expected test result is a result used for representing that the first test page and the second test page are actually the same test page.
According to the embodiment of the disclosure, the first test page and the second test page are actually pages of the same type, and the result obtained by testing according to the first original page attribute information and the second original page attribute information shows that the first test page and the second test page are pages of different types, so that the types of the first original page attribute information and the second original page attribute information need to be adjusted.
In operation S305, a new actual test result is determined according to the adjusted first original page attribute information and the second original page attribute information until the new actual test result is consistent with the expected test result.
In operation S306, in a case that the new actual test result is consistent with the expected test result, the adjusted first original page attribute information or second original page attribute information is determined as target page attribute information corresponding to the page type.
According to the embodiment of the disclosure, the adjusted first original page attribute information and the adjusted second original page attribute information include U page attributes, wherein U is greater than or equal to 2.
According to the embodiment of the present disclosure, in a case that a new actual test result is consistent with an expected test result, determining the adjusted first original page attribute information or second original page attribute information as target page attribute information corresponding to a page type, includes:
under the condition that the new actual test result is consistent with the expected test result, determining V page attributes from U page attributes in the adjusted first original page attribute information or second original page attribute information according to the priority of the page attributes, wherein V is more than or equal to 1 and less than or equal to U; and determining the V page attributes as target page attribute information corresponding to the page types.
According to the embodiment of the disclosure, the first original page attribute information or the second original page attribute information may include a plurality of page attributes, in order to reduce the calculation amount, at least one more representative page attribute is selected from the plurality of page attributes according to the priority of the page attributes, and the selected page attribute is determined as the target page attribute information corresponding to the page type.
According to the embodiment of the disclosure, determining the target page attribute information of the page to be tested according to the page type of the page to be tested comprises the following steps: determining original page attribute information of the page to be tested according to the page type of the page to be tested; inputting the page type of the page to be tested and the original page attribute information of the page to be tested into a page attribute information determination model, and outputting the target page attribute information of the page to be tested, wherein the page attribute information determination model is generated by utilizing a convolutional neural network model for training.
According to the embodiment of the disclosure, the page attribute information determining mode is generated through the convolutional neural network model training, the speed of determining the page attribute information can be increased, and the efficiency of page detection is further improved.
According to the embodiment of the disclosure, the testing of the N target test pages comprises the following steps: generating a directed graph according to the page path information of the N target test pages; and the directed graph is traversed, and the test of the N target test pages is realized.
According to an embodiment of the present disclosure, the method of traversing a directed graph may include depth-first traversal.
According to the embodiment of the disclosure, the directed graph is traversed, and the test of N target test pages is realized, including: and (4) traversing the directed graph by using a depth-first traversal method to realize the test of the N target test pages.
According to the embodiment of the disclosure, each node in the directed graph represents each target test page in the APP, each edge represents the jump relation between different target test pages, and the pages with different attribute path information can be tested by a depth-first traversal method, so that test resources are saved and test efficiency is improved under the condition that test effects are guaranteed.
FIG. 4 schematically shows a block diagram of a page testing apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the page test apparatus 400 includes an obtaining module 401, a first determining module 402, a second determining module 403, and a testing module 404.
The obtaining module 401 is configured to obtain M pages to be tested corresponding to the object to be tested, where M is greater than or equal to 2.
The first determining module 402 is configured to determine attribute path information of each page to be tested in the M pages to be tested, where the attribute path information includes target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested.
The second determining module 403 is configured to determine N target test pages from the M pages to be tested according to the attribute path information, where different target test pages have different attribute path information, and N is greater than or equal to 1 and is less than or equal to M.
The testing module 404 is configured to test the N target test pages.
According to the embodiment of the disclosure, the attribute path information of the page to be tested is determined according to the page attribute information and the page path information of the page to be tested, and the page to be tested with different attribute path information is determined from all the pages to be tested in the object to be tested according to the attribute path information so as to perform page testing. Because each target test page is determined according to the attribute path information which can represent the page to be tested, repeated tests of the target test pages with the same attribute path information are avoided, system resources are saved, and the test efficiency is improved. The problems of low testing efficiency and resource waste in the prior art are solved.
According to an embodiment of the present disclosure, the first determination module 402 includes a first determination unit, a second determination unit, and a third determination unit.
The first determining unit is used for determining the page type of each page to be tested in the M pages to be tested.
And the second determining unit is used for determining the target page attribute information of the page to be tested according to the page type of the page to be tested.
And the third determining unit is used for determining the page path information of the page to be tested.
According to an embodiment of the present disclosure, the page testing apparatus 400 further includes a third determining module, a fourth determining module, a fifth determining module, an adjusting module, a sixth determining module, and a seventh determining module.
And the third determining module is used for determining a first test page and a second test page corresponding to the page types aiming at each page type in the R page types, wherein R is more than or equal to 1.
And the fourth determining module is used for determining the first original page attribute information corresponding to the first test page.
And the fifth determining module is used for determining second original page attribute information corresponding to the second test page.
And the adjusting module is used for adjusting the first original page attribute information and the second original page attribute information under the condition that the actual test result is determined to be inconsistent with the expected test result, so as to obtain the adjusted first original page attribute information and the adjusted second original page attribute information, wherein the actual test result is a result used for representing that the first test page and the second test page are different test pages according to the first original page attribute information and the second original page attribute information, and the expected test result is a result used for representing that the first test page and the second test page are actually the same test page.
And the sixth determining module is used for determining a new actual test result according to the adjusted first original page attribute information and the adjusted second original page attribute information until the new actual test result is consistent with the expected test result.
And the seventh determining module is used for determining the adjusted first original page attribute information or the second original page attribute information as the target page attribute information corresponding to the page type under the condition that the new actual test result is consistent with the expected test result.
According to the embodiment of the disclosure, the adjusted first original page attribute information and the adjusted second original page attribute information include U page attributes, wherein U is greater than or equal to 2.
According to an embodiment of the present disclosure, the seventh determining module includes a fourth determining unit and a fifth determining unit.
And the fourth determining unit is used for determining V page attributes from the U page attributes in the adjusted first original page attribute information or second original page attribute information according to the priority of the page attributes under the condition that the new actual test result is consistent with the expected test result, wherein V is more than or equal to 1 and less than or equal to U.
And the fifth determining unit is used for determining the V page attributes as target page attribute information corresponding to the page types.
According to an embodiment of the present disclosure, the second determination unit includes a first determination subunit and an output subunit.
The first determining subunit is used for determining the original page attribute information of the page to be tested according to the page type of the page to be tested.
And the output subunit is used for inputting the page type of the page to be tested and the original page attribute information of the page to be tested into the page attribute information determination model and outputting the target page attribute information of the page to be tested, wherein the page attribute information determination model is generated by utilizing the convolutional neural network model for training.
According to an embodiment of the present disclosure, the test module 404 includes a generation unit and a test unit.
And the generating unit is used for generating the directed graph according to the page path information of the N target test pages.
And the test unit is used for traversing the directed graph and realizing the test of the N target test pages.
According to an embodiment of the present disclosure, a test unit includes a test subunit.
And the test subunit is used for traversing the directed graph by using a depth-first traversal method to realize the test of the N target test pages.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented at least partially as a hardware Circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a Circuit, or implemented by any one of three implementations of software, hardware, and firmware, or any suitable combination of any of them. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the obtaining module 401, the first determining module 402, the second determining module 403 and the testing module 404 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the obtaining module 401, the first determining module 402, the second determining module 403, and the testing module 404 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable manner of integrating or packaging a circuit, or may be implemented in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the obtaining module 401, the first determining module 402, the second determining module 403 and the testing module 404 may be at least partly implemented as a computer program module, which when executed may perform a corresponding function.
It should be noted that the page testing device portion in the embodiment of the present disclosure corresponds to the page testing method portion in the embodiment of the present disclosure, and the description of the page testing device portion specifically refers to the page testing method portion, which is not described herein again.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, electronic device 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a Display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable Computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM) or flash Memory), a portable compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the preceding. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being adapted to cause the electronic device to carry out the page testing method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 501, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 509, and/or installed from the removable medium 511. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of Network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (11)
1. A page testing method comprises the following steps:
acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2;
determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested;
determining N target test pages from the M pages to be tested according to the attribute path information, wherein different target test pages have different attribute path information, and N is more than or equal to 1 and less than or equal to M; and
and testing the N target test pages.
2. The method of claim 1, wherein said determining attribute path information for each of said M pages to be tested comprises:
determining the page type of each page to be tested in the M pages to be tested;
determining target page attribute information of the page to be tested according to the page type of the page to be tested; and
and determining page path information of the page to be tested.
3. The method of claim 2, further comprising:
determining a first test page and a second test page corresponding to the page types aiming at each page type in the R page types, wherein R is more than or equal to 1;
determining first original page attribute information corresponding to the first test page;
determining second original page attribute information corresponding to the second test page;
under the condition that an actual test result is determined to be inconsistent with an expected test result, adjusting the first original page attribute information and the second original page attribute information to obtain adjusted first original page attribute information and second original page attribute information, wherein the actual test result is a result used for representing that the first test page and the second test page are different test pages according to the first original page attribute information and the second original page attribute information, and the expected test result is a result used for representing that the first test page and the second test page are actually the same test page;
determining a new actual test result according to the adjusted first original page attribute information and second original page attribute information until the new actual test result is consistent with the expected test result;
and under the condition that the new actual test result is consistent with the expected test result, determining the adjusted first original page attribute information or second original page attribute information as target page attribute information corresponding to the page type.
4. The method of claim 3, wherein the adjusted first original page attribute information and second original page attribute information comprise U page attributes, wherein U ≧ 2;
determining the adjusted first original page attribute information or second original page attribute information as target page attribute information corresponding to the page type under the condition that the new actual test result is consistent with the expected test result, including:
under the condition that the new actual test result is consistent with the expected test result, determining V page attributes from U page attributes in the adjusted first original page attribute information or second original page attribute information according to the priority of the page attributes, wherein V is more than or equal to 1 and less than or equal to U; and
and determining the V page attributes as target page attribute information corresponding to the page types.
5. The method of claim 2, wherein the determining the target page attribute information of the page to be tested according to the page type of the page to be tested comprises:
determining original page attribute information of the page to be tested according to the page type of the page to be tested; and
inputting the page type of the page to be tested and the original page attribute information of the page to be tested into a page attribute information determination model, and outputting the target page attribute information of the page to be tested, wherein the page attribute information determination model is generated by utilizing convolutional neural network model training.
6. The method of claim 1, wherein said testing said N target test pages comprises:
generating a directed graph according to the page path information of the N target test pages; and
and traversing the directed graph to realize the test of the N target test pages.
7. The method of claim 6, wherein said traversing said directed graph, enabling testing of said N target test pages, comprises:
and traversing the directed graph by using a depth-first traversal method to realize the test of the N target test pages.
8. A page testing apparatus, comprising:
the acquisition module is used for acquiring M pages to be tested corresponding to the objects to be tested, wherein M is more than or equal to 2;
the first determining module is used for determining attribute path information of each page to be tested in the M pages to be tested, wherein the attribute path information comprises target page attribute information and page path information of the page to be tested, and the page path information is obtained according to a jump relationship between the page to be tested and other pages to be tested in the M pages to be tested;
a second determining module, configured to determine N target test pages from the M pages to be tested according to the attribute path information, where different target test pages have different attribute path information, and N is greater than or equal to 1 and is less than or equal to M; and
and the test module is used for testing the N target test pages.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, is adapted to carry out the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110381223.7A CN112965916B (en) | 2021-04-09 | 2021-04-09 | Page testing method, page testing device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110381223.7A CN112965916B (en) | 2021-04-09 | 2021-04-09 | Page testing method, page testing device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112965916A true CN112965916A (en) | 2021-06-15 |
CN112965916B CN112965916B (en) | 2024-03-08 |
Family
ID=76280065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110381223.7A Active CN112965916B (en) | 2021-04-09 | 2021-04-09 | Page testing method, page testing device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112965916B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113688054A (en) * | 2021-08-31 | 2021-11-23 | 中国平安人寿保险股份有限公司 | Page testing method and device, computer readable storage medium and terminal equipment |
WO2023093137A1 (en) * | 2021-11-24 | 2023-06-01 | 中国银联股份有限公司 | Application (app) testing method and apparatus, electronic device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106919503A (en) * | 2016-11-15 | 2017-07-04 | 阿里巴巴集团控股有限公司 | The method of testing and device of application program |
CN111782317A (en) * | 2020-06-12 | 2020-10-16 | 京东数字科技控股有限公司 | Page testing method and device, storage medium and electronic device |
CN112015635A (en) * | 2019-05-31 | 2020-12-01 | 北京京东尚科信息技术有限公司 | Page testing method, page testing device, electronic equipment and storage medium |
CN112199296A (en) * | 2020-10-29 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Page testing method and device, computer equipment and storage medium |
-
2021
- 2021-04-09 CN CN202110381223.7A patent/CN112965916B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106919503A (en) * | 2016-11-15 | 2017-07-04 | 阿里巴巴集团控股有限公司 | The method of testing and device of application program |
CN112015635A (en) * | 2019-05-31 | 2020-12-01 | 北京京东尚科信息技术有限公司 | Page testing method, page testing device, electronic equipment and storage medium |
CN111782317A (en) * | 2020-06-12 | 2020-10-16 | 京东数字科技控股有限公司 | Page testing method and device, storage medium and electronic device |
CN112199296A (en) * | 2020-10-29 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Page testing method and device, computer equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113688054A (en) * | 2021-08-31 | 2021-11-23 | 中国平安人寿保险股份有限公司 | Page testing method and device, computer readable storage medium and terminal equipment |
WO2023093137A1 (en) * | 2021-11-24 | 2023-06-01 | 中国银联股份有限公司 | Application (app) testing method and apparatus, electronic device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112965916B (en) | 2024-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113946425A (en) | Service processing method and device, electronic equipment and computer readable storage medium | |
CN113434241A (en) | Page skipping method and device | |
CN112965916B (en) | Page testing method, page testing device, electronic equipment and readable storage medium | |
CN114237651A (en) | Installation method and device of cloud native application, electronic equipment and medium | |
CN115357761A (en) | Link tracking method and device, electronic equipment and storage medium | |
CN113553123B (en) | Data processing method, device, electronic equipment and storage medium | |
CN113535577B (en) | Application testing method and device based on knowledge graph, electronic equipment and medium | |
CN113176907A (en) | Interface data calling method and device, computer system and readable storage medium | |
CN113362173A (en) | Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium | |
CN111930629A (en) | Page testing method and device, electronic equipment and storage medium | |
CN113535565B (en) | Interface use case generation method, device, equipment and medium | |
CN112506781B (en) | Test monitoring method, device, electronic equipment, storage medium and program product | |
CN110888583B (en) | Page display method, system and device and electronic equipment | |
CN113448578A (en) | Page data processing method, processing system, electronic device and readable storage medium | |
CN112988604A (en) | Object testing method, testing system, electronic device and readable storage medium | |
CN113656041A (en) | Data processing method, device, equipment and storage medium | |
CN113535590A (en) | Program testing method and device | |
CN112966167A (en) | Data crawling method, device, computer system and computer readable storage medium | |
CN112068814A (en) | Method, device, system and medium for generating executable file | |
CN113360417B (en) | Test method, session modifier, electronic device and medium | |
CN112965699B (en) | Front-end page generation method, device, computer system and readable storage medium | |
CN117649459A (en) | Image drawing method, data generating method and device | |
CN113051090A (en) | Interface processing method and device, interface calling method and device, system and medium | |
CN115098391A (en) | Page detection method, device, equipment and medium | |
CN113760835A (en) | Log management method, middlebox system, electronic device and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |