CN115098362A - Page testing method and device, electronic equipment and storage medium - Google Patents

Page testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115098362A
CN115098362A CN202210679735.6A CN202210679735A CN115098362A CN 115098362 A CN115098362 A CN 115098362A CN 202210679735 A CN202210679735 A CN 202210679735A CN 115098362 A CN115098362 A CN 115098362A
Authority
CN
China
Prior art keywords
page
target
path
state transition
transition diagram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210679735.6A
Other languages
Chinese (zh)
Other versions
CN115098362B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210679735.6A priority Critical patent/CN115098362B/en
Publication of CN115098362A publication Critical patent/CN115098362A/en
Application granted granted Critical
Publication of CN115098362B publication Critical patent/CN115098362B/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
    • 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/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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, a page testing device, electronic equipment and a storage medium, relates to the technical field of automatic testing, and further relates to the field of page automatic testing so as to at least solve the technical problem of low accuracy of page testing in the related art. The specific implementation scheme is as follows: acquiring a current page and a target page, wherein the target page is a page to be jumped corresponding to the current page; performing path planning on a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to the jump between the different pages; and testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.

Description

Page testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of interface automation testing technologies, and in particular, to a page automation testing method and apparatus, an electronic device, and a storage medium.
Background
The test of the mobile terminal mainly pays attention to whether a certain function point in a page can be fed back as expected, at present, a test case is manually written, after writing, a tester specially executing the test needs to know a test target, communicate the test case and the test steps, and finally execute the related case.
Disclosure of Invention
The disclosure provides a page testing method, a page testing device, electronic equipment and a storage medium, which are used for at least solving the technical problem of low accuracy of testing a page in the related art.
According to an aspect of the present disclosure, there is provided a page testing method, including: acquiring a current page and a target page, wherein the target page is a page to be jumped corresponding to the current page; performing path planning on a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to the jump between the different pages; and testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
According to another aspect of the present disclosure, there is provided a page testing apparatus including: the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a current page and a target page, and the target page is a page to be jumped corresponding to the current page; the path planning module is used for planning paths of a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing the jumping relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing the operation corresponding to jumping between the different pages; and the test module is used for testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
According to still another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the page test method provided by the disclosure.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the page test method proposed by the present disclosure.
According to yet another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the page testing method proposed by the present disclosure.
In the disclosure, a current page and a target page are obtained firstly, wherein the target page is a page to be skipped corresponding to the current page; performing path planning on a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to the jump between the different pages; determining a target control corresponding to a target path based on the target state transition diagram, wherein the target control is used for realizing page jump; and testing the target path based on the target control to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page or not, so that the efficiency of testing the page is improved. It is easy to notice that the test path of the page is planned through the target state transition diagram, the test path does not need to be planned manually, the test efficiency can be improved, the target path is tested through the target control, whether the current page can successfully jump to the target page or not can be judged, and the technical problem of low accuracy in testing the page in the related technology is solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become readily apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a block diagram of a hardware structure of a computer terminal (or mobile device) for implementing a page test method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a page testing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a target state transition diagram according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a pruning-based screening mechanism according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an example pruning-based screening mechanism in accordance with an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a hybrid planning approach based on page source code according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a page testing apparatus according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The application program test of the mobile terminal relates to function test, stability test, manual test and the like, the test target is often to test a specific function point, and the tests mainly pay attention to whether a certain function point is fed back as expected or not, for example, whether a live broadcast page can be skipped to by clicking a live broadcast cover or not. In the preparation stage, an effective way for automatically reaching the target page (the current scheme needs manual intervention operation) is lacked, and when the number of the tested functional points is large, great effort needs to be invested in maintaining the way for reaching the target page (for example, how to reach the live page), and the main effort cannot be invested in testing the target functional points (clicking the live cover). The current technical solution is to write a path to the target page manually during testing and to execute the testing activity in the target.
The prior art has the following defects:
1. the method has the advantages that the labor input is large, the test cases are manually compiled, the tester needs to know the position of the target page, the operation sequence is designed, and the steps of compiling and maintaining the related cases are needed. After the execution fails, the path needs to be manually detected and corrected, and the path cannot be automatically adjusted in real time according to the current page result.
2. Cannot be automated. After writing the use cases, the testers who specially execute the tests need to know the test targets, communicate the test use cases and the test steps, and finally execute the related use cases.
In accordance with an embodiment of the present disclosure, a page testing method is provided, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method embodiments provided by the embodiments of the present disclosure may be executed in a mobile terminal, a computer terminal or similar electronic devices. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the disclosure described and/or claimed herein. Fig. 1 is a block diagram of a hardware structure of a computer terminal (or mobile device) for implementing a page test method according to an embodiment of the present disclosure.
As shown in fig. 1, the computer terminal 100 includes a computing unit 101 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)102 or a computer program loaded from a storage unit 108 into a Random Access Memory (RAM) 103. In the RAM 103, various programs and data necessary for the operation of the computer terminal 100 can also be stored. The computing unit 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
A number of components in the computer terminal 100 are connected to the I/O interface 105, including: an input unit 106 such as a keyboard, a mouse, and the like; an output unit 107 such as various types of displays, speakers, and the like; a storage unit 108, such as a magnetic disk, optical disk, or the like; and a communication unit 109 such as a network card, modem, wireless communication transceiver, etc. The communication unit 109 allows the computer terminal 100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 101 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 101 performs the page test method described herein. For example, in some embodiments, the page testing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 108. In some embodiments, part or all of the computer program may be loaded and/or installed onto the computer terminal 100 via the ROM 102 and/or the communication unit 109. When the computer program is loaded into RAM 103 and executed by computing unit 101, one or more steps of the page testing method described herein may be performed. Alternatively, in other embodiments, the computing unit 101 may be configured to perform the page test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here can be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
It should be noted that in some alternative embodiments, the electronic device shown in fig. 1 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the electronic device described above.
In the above operating environment, the present disclosure provides a page testing method as shown in fig. 2, which may be performed by a computer terminal or similar electronic device as shown in fig. 1. FIG. 2 is a flowchart of a page testing method according to an embodiment of the present disclosure. As shown in fig. 2, the method may include the steps of:
step S201, a current page and a target page are acquired.
And the target page is a page to be jumped corresponding to the current page. The target page may be a plurality of pages, and the number of the target pages is not limited herein.
The current page may be a page to which the jump is started. The destination page mentioned above may be the page to which the jump is ultimately made. The current page and the target page may be different pages in the web page.
The current page and the target page can be selected by a tester according to the test requirement. The current page and the target page can be automatically generated according to the test items, for example, if the jump function of the live broadcast page needs to be tested, the live broadcast page can be automatically selected as the current page according to the test items of the jump function of the live broadcast page, and the page where the live broadcast room corresponding to the target cover in the live broadcast page is located is the target page.
In the live broadcast scene, the current page may be a page where a live main page is located, and the target page may be a page where a live broadcast room is located. The page jump function entering the live broadcast room in the live broadcast scene can be tested. In an instant messaging scene, the current page can be a page where a chat address book is located, and the target page can be a page where a chat interface is located. The page jump function entering the chat interface in the instant messaging scene can be tested.
In an optional embodiment, the process of jumping the current page and the target page may not pass through other pages, and the process of jumping the current page and the target page may also transfer to jump other pages.
Step S202, path planning is carried out on the current page and the target page based on the target state transition diagram, and a target path is obtained.
The target state transition diagram is used for representing a jump relation among different pages through a plurality of nodes and edges among adjacent nodes, each node in the plurality of nodes represents different pages, and the edges among the adjacent nodes are used for representing operations corresponding to the jump among the different pages.
The target state transition diagram may be a state transition diagram constructed based on historical experience.
The nodes can be used for representing pages, and the edges between adjacent nodes can be a jump relationship between different pages, wherein the jump relationship can be a jump to another page through a control in the page.
In an alternative embodiment, the jump relationship may be represented by an operation on a control. The control can be manipulated differently to jump to a different page, for example, by clicking on the control to jump to page a and by sliding the control to jump to page B.
In another alternative embodiment, the jump relationship may be represented by an operation on a page, and different operations may be performed on the page to jump to other pages, for example, page a may jump to page B by sliding right, page C may jump by sliding left, and page a may be entered into page D by double-clicking.
In an optional embodiment, the operation relationship of the application page may be globally depicted, so that in the subsequent path planning process applied to the application page, the operation relationship of the page may be manually constructed, the page operation relationship may be automatically obtained in operation activities such as the page, and the obtained page operation relationship may be abstracted. Optionally, the page may be used as a node, and the operation on the page may be used as an edge to construct an action relationship graph between pages, that is, the target state transition graph may be stored in the graph database, and when the target state transition graph needs to be used, the target state transition graph may be retrieved from the graph database.
In another optional embodiment, after determining the current page starting to jump and the target page to be reached finally, the page source codes of the current page and the target page may be acquired, so that the jump path planning is performed on the current page and the target page according to the page source codes through the target state transition diagram, and the target path with high jump efficiency and high jump success rate is obtained.
Fig. 3 is a schematic diagram of a destination state transition diagram according to an embodiment of the present disclosure, where each node (page 1, page 2, etc.) represents a page node, each edge (action 1, action 2, etc.) represents an action relationship, and a directed graph formed by the nodes is stored in a graph database, as shown in fig. 3, taking the example that page 1 reaches page 7, page 1 may first go to page 2, and then go to page 7 through action 2, where page 1 may be a current page, and page 7 may be a destination page.
Step S203, testing the target path to obtain a test result, where the test result is used to indicate whether the current page successfully jumps to the target page.
In an optional embodiment, when the jump between adjacent nodes in the target path needs to be implemented through a control, the corresponding target control may be obtained according to the target path first, so that the target path is tested according to the target control, and a test result is obtained.
Optionally, when the jump between adjacent nodes in the target path is not implemented through a control, the target path may be directly tested to obtain a test result.
In an optional embodiment, a test machine may be used to automatically test a target path, and determine whether the target path can be successfully jumped from a current page to a target page, if the target path can be jumped from the current page to the target page, it indicates that the jump function from the current page to the target page is normal, and it may be determined that the test is successful; if the target path cannot be jumped from the current page to the target page, the jump function from the current page to the target page is abnormal, the test failure can be determined, the jump failure node can be fed back after the test failure, so that a user can process the page corresponding to the jump failure node, and the target path can be further tested after the processing.
In another optional embodiment, after the target path is tested, the test result and the target state transition diagram may be output to a display interface of a tester, so that the tester may check a failed node through the target state transition diagram under the condition that the test result is that the current page does not successfully jump to the target page, process a page corresponding to the node, and perform further testing.
In another optional embodiment, after determining the position of the current page in the target state transition diagram, it needs to determine which action is executed to the target page, since there are possibly multiple paths to the target page, it needs to sort and match the controls needed by these actions according to the historical success rate, if the current page is located according to the page uniqueness identifier, it needs to judge whether there is an operable control on the path according to the page source code and obtain the corresponding operation, if the position of the page is judged according to the control in the current page, it can directly obtain the corresponding operation, after the target path and the action needed to be performed are obtained, the target path and the action can be converted into the command to be executed and transmitted to the testing machine, the testing machine will automatically execute the corresponding action and reach a new page, and continue to execute the above process on the new page, until the target page is reached.
In the method, a current page and a target page are obtained firstly, wherein the target page is a page to be jumped corresponding to the current page; performing path planning on a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to the jump between the different pages; determining a target control corresponding to a target path based on the target state transition diagram, wherein the target control is used for realizing page jump; and testing the target path based on the target control to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page, so that the efficiency of testing the page is improved. It is easy to notice that the test path of the page is planned through the target state transition diagram, the test path does not need to be planned manually, the test efficiency can be improved, the target path is tested, whether the current page can successfully jump to the target page or not can be judged, and the technical problem of low accuracy in page testing in the related technology is solved.
Optionally, performing path planning on the current page and the target page based on the target state transition diagram to obtain a target path, including: acquiring a first page identifier of a current page and a second page identifier of a target page; judging whether the target state transition diagram has a first page identifier and a second page identifier; and determining a target path based on the first page identification and the second page identification in response to the first page identification existing in the target state transition diagram.
The first page identifier may be unique identification information of the current page.
The second page identifier may be unique identification information of the target page.
In an optional embodiment, page source codes of a current page and a target page may be obtained first, and a first page identifier and a second page identifier may be determined according to information of the page source codes, where the page source codes are a basis for rendering an application page, and the page source codes include layout, data information, and the like of each control in the page.
In another optional embodiment, after the first page identifier and the second page identifier are obtained, it may be determined whether the target state transition diagram has the first page identifier and the second page identifier, if the first page identifier exists in the target state transition diagram, a target path may be determined according to the first page identifier and the second page identifier, if the first page identifier does not exist in the target state transition diagram, it is described that a page source code in the current page is changed, matching may be performed on the page source code in the target state transition diagram according to a control in the page source code, a page with the same control or a larger number of the same controls is determined as the current page, and the page identifier of the page is determined as the first page identifier, so as to complete a page testing process.
In yet another optional embodiment, if the first page identifier exists in the target state transition diagram, the nodes corresponding to the first page identifier and the second page identifier in the target state transition diagram may be determined according to the target state transition diagram, that is, the corresponding positions of the first page identifier and the second page identifier in the target state transition diagram may be determined, bidirectional traversal may be performed on the nodes corresponding to the first page identifier and the nodes corresponding to the second page identifier, a shortest path between the first page identifier and the second page identifier is found, and the shortest path is determined to be the target path.
Through the steps, the target path can be determined directly according to the first page identification and the second page identification under the condition that the first page identification exists in the target state transition diagram, the path searching efficiency can be improved, and the testing efficiency is improved.
Optionally, determining the target path based on the first page identifier and the second page identifier includes: determining a first page identifier at a first node of a target state transition graph; determining a second node of the target state transition diagram identified by the second page; acquiring at least one path between a first node and a second node; and determining the shortest path in the at least one path as a target path.
In an alternative embodiment, the first page may be determined to identify a first node in the target state transition graph, the second page may be determined to identify a second node in the target state transition graph, at least one path between the first node and the second node may be obtained, and when there are multiple paths, the multiple paths may be filtered, and the highest usage frequency or the shortest path may be filtered as the target path.
Through the steps, after the first page identification and the second page identification are obtained, the first node corresponding to the first page identification is determined, the second node corresponding to the second page identification is determined, at least one path can be found through the nodes in the target state transition graph, the shortest path is determined as a target path, and the efficiency of the jump test from the current page to the target page can be improved through the shortest path.
Optionally, the method further comprises: responding to the target state transition diagram without a first page identifier, and acquiring a first control identifier of the current page, wherein the first control identifier is an identifier of at least one control contained in the current page; judging whether a first page containing a first control identifier exists in the target state transition diagram or not, wherein a target path exists between the first page and the target page; and responding to the first page existing in the target state transition diagram, and determining that the third page identifier of the first page is the first page identifier.
The first control identification may be a unique identification corresponding to one or more controls in the current page.
The third page identifier may be a current page identifier of the first page, and if a first page with a higher similarity to the current page exists in the target state transition diagram, the current page identifier of the first page, that is, the third page identifier may be set as the first page identifier of the current page, so as to determine the first node of the target state transition diagram according to the first page identifier, and thus determine the target path according to the first node and the second node.
In an optional embodiment, because various personalized contents exist, page source codes of the same page are often changed, so that the first identification information of the current page is often difficult to match to a corresponding node in the target state transition diagram, that is, under the condition that the first page identification does not exist in the target state transition diagram, matching needs to be performed according to each control in the page source codes of the current page, whether a node corresponding to a page containing the same control exists is searched, and a path exists between the node and the target page.
In another optional embodiment, when the first page identifier does not exist in the target state transition diagram, the first control identifier of the current page may be obtained, and the first page having the same control identifier is matched according to the first control identifier, where the current page may be a page in which a page source code of the first page is changed, the first page may be a page stored in the target state transition diagram before the change, and if the page is changed, the page identifier information corresponding to the page may also be changed in a step-by-step manner, so that the first page may be a page before the current page is changed. At this time, the first page identification may be updated to the third page identification of the first page.
Through the steps, matching can be carried out according to the control identification when the first page identification does not exist in the target state transition diagram, and the page identification can be changed due to the fact that the content in the page is changed, so that whether the first page containing the first control identification exists or not can be judged according to the target state transition diagram, if the first page contains the first control identification, the first page is indicated to be the page before the current page is changed in a high probability manner, at the moment, the third page identification of the first page can be determined to be the first page identification, the target path can be determined according to the first page, and the subsequent testing process is facilitated.
Optionally, the method further comprises: responding to the target state transition diagram without the first page identification, and acquiring the control attribute of the current page, wherein the control attribute is text information corresponding to at least one control contained in the current page; determining a second page based on the target state transition diagram and the control attribute, wherein the similarity between the control attribute contained in the second page and the control attribute corresponding to the current page is greater than the preset similarity; and determining that the fourth page identifier of the second page is the first page identifier.
The control attribute of the current page may be text information and a resource identifier corresponding to at least one control, where the text information may be a textual description of the control, for example, a name of the control.
In an optional embodiment, when the page identifier of the first page does not exist in the target state transition diagram, fuzzy matching may be performed on the control attribute according to the page source code recorded in the target state transition diagram, so as to obtain a second page having the control attribute corresponding thereto, and it is determined that a fourth page identifier of the second page is the first page identifier.
Through the steps, under the condition that the target state transition diagram does not contain the first page identification or the first control identification, the second page close to the current page can be determined according to the control attributes, so that the target path can be determined according to the second page, and the subsequent test process is facilitated.
Optionally, the method further comprises: constructing a temporary state transition diagram based on the current page and the target page; planning paths of the current page and the target page based on the temporary state transition diagram to obtain a first path; comparing the first path with the target path to obtain a comparison result, wherein the comparison result is used for indicating whether the first path is smaller than the target path; and in response to the comparison result that the first path is smaller than the target path, replacing the target path in the target state transition diagram as the first path.
In an optional embodiment, a temporary state transition diagram may be constructed for operation information or test information when a current page reaches a target page, where the temporary state transition diagram may be a simple state transition diagram, and may be constructed by simplifying information and operation information in the current page and the target page, and optionally may be obtained by cleaning information and operation information in the target page.
In another alternative embodiment, the shortest path from the current page to the destination page may be calculated according to a shortest-circuit algorithm, in which process the shortest-circuit algorithm may help to delete nodes that are passed by loops, long paths, etc. The current page may be a starting page, for example, the current page may be a top page of an application program, and the target page may be a page that needs to be reached finally (may be a specific page frame). It should be noted that the target page may be a plurality of pages.
In another optional embodiment, after the path planning is performed on the current page and the target page according to the temporary state transition diagram to obtain the first path, the first path and the target path may be compared to determine whether the first path is smaller than the target path, and if the first path is smaller than the target path, the target path in the target state transition diagram may be replaced with the first path.
In yet another optional embodiment, when the comparison result is that the first path is smaller than the target path, the use frequency of the target path may be obtained, when the use frequency of the target path is greater than a preset value, the target state transition diagram may not be updated, and when the use frequency of the target path is smaller than the preset value, the target path in the target state transition diagram may be replaced with the first path.
The mode described in the above steps is actually a screening process for pruning the target state transition diagram, and since the historical operation experience is disordered, the number of action relationships in the target state transition diagram increases with the lapse of time; at the same time, changes in the application version cause certain actions to fail. Therefore, the target state transition diagram needs to be adjusted continuously, the action needing to be updated is preprocessed before the target state transition diagram is updated every time, and a screening mechanism for pruning the state transition diagram can be established. Fig. 4 is a schematic diagram of a pruning-based screening mechanism according to an embodiment of the present disclosure.
In the learning stage, a temporary graph structure is constructed for the operation information of each task, the graph structure is stored in a memory in an adjacent graph mode, then the shortest path from the current page to each target page is calculated according to the shortest path algorithm, and in the process, the shortest path algorithm can help to delete nodes passing through loops, long paths and the like.
In the forgetting stage, a series of paths obtained in the learning stage are compared with the paths in the target state transition diagram, and for longer paths, the paths are rejected more probably, and finally whether to replace the old paths with new paths or directly reject the new paths is determined according to the priority selection rule. Through the learning and forgetting processes, only ordered data with a certain scale in the state transition diagram along with the change of time can be ensured, and the data are effective data along with the change of the version, so that invalid paths can be deleted in time.
Fig. 5 is a schematic diagram of an example pruning-based screening mechanism according to an embodiment of the present disclosure. Each letter represents a different destination page, different numbers represent different states of the destination pages, and each destination page only needs one path in the process of extracting the shortest path, so that the actions of the dotted lines and the related nodes in fig. 5 cannot be reserved, and only the actions of the solid lines and the related nodes are reserved. In the forgetting stage, if the number of paths in the state transition diagram exceeds a certain threshold, a new path is reserved or rejected according to the priority, and the specific priority formula can be
Figure BDA0003697863970000131
Wherein, reject i Path for probability of rejecting ith path i Is the ith path, len (path) i ) Is the length of the ith path, Σ is the summation symbol, and the probability of rejecting the ith path is the length of the ith path divided by the sum of the lengths of all paths. As many segments of the path as possible can be preserved by this formula.
As can be seen from the above formula, the probability that a path is deleted or rejected is proportional to its length.
Through the steps, the redundant paths in the target state transition diagram can be deleted by constructing the temporary state transition diagram, and the storage resources occupied by the target state transition diagram can be reduced.
Optionally, the method further comprises: responding to the test result that the current page is not successfully jumped to the target page, and acquiring a preset node in the target path, wherein the preset node is a node corresponding to the page which is not successfully jumped and passes in the process that the current page is jumped to the target page; adding a preset program to a preset page corresponding to a preset node to obtain an addition result, wherein the preset program is a program which does not depend on a target control to jump to the preset page; and testing the target path based on the adding result to obtain a testing result.
The preset node may be a node with a failed jump.
In the target state transition diagram, one node may correspond to one page, when a current page jumps to a target page, multiple nodes may pass through, if there is a node that has not jumped successfully, the node may be determined to be a preset node, and a preset page corresponding to the preset node is obtained, where the preset page may be an intermediate page that needs to be jumped between the current page and the target page, and the preset page may also be the target page.
In an optional embodiment, when the test result is that the current page is not successfully jumped to the target page, a preset node with a failed jump in the target path may be determined, a corresponding preset page with a failed jump is determined based on the preset node, a page source code of the preset page may be obtained, and a preset program is added to the page source code, where the preset program may be a preset url schema (uniform Resource Locator ).
The adding result may be a preset page to which a preset program is added, the edge in the target path before the node corresponding to the preset page may be updated according to the adding result, that is, the operation relationship may be updated by directly jumping to the preset page through the preset program, and then the target path is updated, and the updated target path may be tested to obtain a test result.
Through the steps, the program can be added to the preset page which fails to jump, the jump is not required to be carried out according to the control, and the jump can be directly carried out, so that the success rate of the target path test is improved.
Optionally, the method further comprises: acquiring a target test case and historical operation information, wherein the target test case is a skip relation between a third page and a fourth page which are compiled in advance and/or generated randomly, and the historical operation information is a skip relation between the third page and the fourth page in a historical operation process; and constructing a target state transition diagram based on the target test case and/or the historical operation information.
The target test case may be an operation relationship between a page source code and page jump written by a tester in advance, the target test case may also be a jump relationship between a third page and a fourth page generated randomly, and the historical operation information may be information retained by a user in a historical operation process on the page. The third page may be a starting page, and the fourth page may be a final destination page.
Through the steps, the target state transition diagram can be constructed by using various types of data, so that the constructed target state transition diagram contains various rich contents, and the application range of the target state transition diagram is widened.
In an optional embodiment, the target state transition diagram may be constructed by combining the target test case and the page source code of the historical operation information, and the target state transition diagram may be updated by using a new test case or new operation information when there is a new test case or new operation information.
Fig. 6 is a schematic diagram of a hybrid planning mode based on a page source code according to an embodiment of the present disclosure, where in the hybrid planning mode based on the page source code, a target test case may be constructed by a page unique identifier positioning position, a non-test case may be constructed by a page unique identifier positioning position associated with a control unique identifier, a target state transition diagram may be constructed by the target test case, and the target state transition diagram may be updated according to the non-test case, that is, the above-mentioned historical operation information.
Through the page testing method provided by the disclosure, the manpower of testers can be saved. In the process of testing the functions of the page, a tester does not need to know how to reach the target page, does not need to repeatedly write the front step, does not need to repeatedly operate the front step, and only needs to pay attention to how to perform specific testing on the target page. The page testing method disclosed by the invention can be automatically executed. Before reaching the target page, the system does not need manual intervention, and the system is judged by a strategy, sends a related instruction to a testing machine and automatically executes the related instruction. The page testing method disclosed by the invention has a wide application scene, can help a tester to quickly reach a target page to be tested through path planning, can also be applied to automatic accurate testing and path repairing of regression testing cases, and has a wide application scene.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the methods of the embodiments of the present disclosure.
The present disclosure further provides a page testing apparatus, which is used to implement the above embodiments and preferred embodiments, and the description of the page testing apparatus is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a structure of a page testing apparatus according to an embodiment of the present disclosure, and as shown in fig. 7, a page testing apparatus 700 includes: an acquisition module 702, a path planning module 704, and a test module 706.
The device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a current page and a target page, and the target page is a page to be jumped corresponding to the current page; the path planning module is used for carrying out path planning on a current page and a target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jumping relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to jumping between the different pages; and the test module is used for testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
Optionally, the path planning module includes: the device comprises an acquisition unit, a judgment unit and a determination unit.
The acquisition unit is used for acquiring a first page identifier of a current page and a second page identifier of a target page; the judging unit is used for judging whether the target state transition diagram has a first page identifier and a second page identifier; the determining unit is used for responding to the first page identification existing in the target state transition diagram and determining the target path based on the first page identification and the second page identification.
Optionally, the determining unit includes: determining a subunit and acquiring the subunit.
The determining subunit is configured to determine that the first page identifier is on a first node of the target state transition graph; the determining subunit is further configured to determine that the second page identifier is at a second node of the target state transition graph; the acquiring subunit is used for acquiring at least one path between the first node and the second node; the determining subunit is further configured to determine a shortest path of the at least one path as the target path.
Optionally, the apparatus further comprises: the device comprises a judging module and a determining module.
The obtaining module is further configured to obtain a first control identifier of the current page in response to that the target state transition diagram does not have the first page identifier, where the first control identifier is an identifier of at least one control included in the current page; the judging module is further used for judging whether a first page containing a first control identification exists in the target state transition diagram, wherein a target path exists between the first page and the target page; the determining module is further configured to determine that a third page identifier of the first page is the first page identifier in response to the first page existing in the target state transition diagram.
Optionally, the obtaining module is further configured to obtain a control attribute of the current page in response to that the first page identifier does not exist in the target state transition diagram, where the control attribute is text information corresponding to at least one control included in the current page; the determining module is further used for determining a second page based on the target state transition diagram and the control attribute, wherein the similarity between the control attribute contained in the second page and the control attribute corresponding to the current page is greater than the preset similarity; the determining module is further configured to determine that a fourth page identifier of the second page is the first page identifier.
Optionally, the apparatus further comprises: the device comprises a construction module, a comparison module and a replacement module.
The construction module is used for constructing a temporary state transition diagram based on a current page and a target page; the path planning module is also used for planning paths of the current page and the target page based on the temporary state transition diagram to obtain a first path; the comparison module is further used for comparing the first path with the target path to obtain a comparison result, wherein the comparison result is used for indicating whether the first path is smaller than the target path; the replacing module is further used for replacing the target path in the target state transition diagram as the first path in response to the comparison result that the first path is smaller than the target path.
Optionally, the apparatus further comprises: an adding module and a testing module.
The obtaining module is further used for responding to the test result that the current page is not successfully jumped to the target page, and obtaining a preset node in the target path, wherein the preset node is a node corresponding to the page which is not successfully jumped and passes in the process that the current page is jumped to the target page; the adding module is further used for adding a preset program to a preset page corresponding to the preset node to obtain an adding result, wherein the preset program is a program which does not depend on the target control to jump to the preset page; the test module is further used for testing the target path based on the adding result to obtain a test result.
Optionally, the obtaining module is further configured to obtain a target test case and historical operation information, where the target test case is a skip relationship between a third page and a fourth page that are compiled in advance and/or generated randomly, and the historical operation information is a skip relationship between the third page and the fourth page in a historical operation process; the building module is also used for building a target state transition diagram based on the target test case and/or the historical operation information.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
According to an embodiment of the present disclosure, there is also provided an electronic device including a memory having stored therein computer instructions and at least one processor configured to execute the computer instructions to perform the steps in any of the above method embodiments.
Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present disclosure, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a current page and a target page, wherein the target page is a page to be jumped corresponding to the current page;
s2, performing path planning on the current page and the target page based on the target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing the jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing the operation corresponding to the jump between the different pages;
and S3, testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
According to an embodiment of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored therein computer instructions, wherein the computer instructions are arranged to perform the steps in any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned nonvolatile storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a current page and a target page, wherein the target page is a page to be jumped corresponding to the current page;
s2, performing path planning on the current page and the target page based on the target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing the jump relation between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing the operation corresponding to the jump between the different pages;
and S3, testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
Alternatively, in this embodiment, the non-transitory computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The present disclosure also provides a computer program product according to an embodiment of the present disclosure. Program code for implementing method embodiments of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the above embodiments of the present disclosure, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
The foregoing is merely a preferred embodiment of the present disclosure, and it should be noted that modifications and embellishments could be made by those skilled in the art without departing from the principle of the present disclosure, and these should be considered as the protection scope of the present disclosure.

Claims (19)

1. A page testing method comprises the following steps:
acquiring a current page and a target page, wherein the target page is a page to be jumped corresponding to the current page;
performing path planning on the current page and the target page based on a target state transition diagram to obtain a target path, wherein the target state transition diagram is used for representing a jump relationship between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents different pages, and the edges between the adjacent nodes are used for representing operations corresponding to the jump between the different pages;
and testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
2. The method of claim 1, wherein performing path planning on the current page and the target page based on a target state transition diagram to obtain a target path comprises:
acquiring a first page identifier of the current page and a second page identifier of the target page;
judging whether the target state transition diagram has the first page identification and the second page identification;
and in response to the first page identifier existing in the target state transition diagram, determining the target path based on the first page identifier and the second page identifier.
3. The method of claim 2, wherein determining the target path based on the first page identification and the second page identification comprises:
determining that the first page identifier is at a first node of the target state transition graph;
determining that the second page identifier is at a second node of the target state transition graph;
acquiring at least one path between the first node and the second node;
determining a shortest path of the at least one path as the target path.
4. The method of claim 2, wherein the method further comprises:
responding to the target state transition diagram without the first page identification, and acquiring a first control identification of the current page, wherein the first control identification is an identification of at least one control contained in the current page;
judging whether a first page containing the first control identification exists in the target state transition diagram, wherein the target path exists between the first page and the target page;
and responding to the first page existing in the target state transition diagram, and determining that a third page identifier of the first page is the first page identifier.
5. The method of claim 2, wherein the method further comprises:
responding to the target state transition diagram without the first page identification, and acquiring a control attribute of the current page, wherein the control attribute is text information corresponding to at least one control contained in the current page;
determining a second page based on the target state transition diagram and the control attribute, wherein the similarity between the control attribute contained in the second page and the control attribute corresponding to the current page is greater than a preset similarity;
and determining that a fourth page identifier of the second page is the first page identifier.
6. The method of claim 1, wherein the method further comprises:
constructing a temporary state transition diagram based on the current page and the target page;
performing path planning on the current page and the target page based on the temporary state transition diagram to obtain a first path;
comparing the first path with the target path to obtain a comparison result, wherein the comparison result is used for indicating whether the first path is smaller than the target path;
and in response to the comparison result that the first path is smaller than the target path, replacing the target path in the target state transition diagram with the first path.
7. The method of claim 1, wherein the method further comprises:
responding to the test result that the current page is not successfully jumped to the target page, and acquiring a preset node in the target path, wherein the preset node is a node corresponding to the page which is not successfully jumped and passes in the process that the current page is jumped to the target page;
adding a preset program to a preset page corresponding to the preset node to obtain an addition result, wherein the preset program is a program which does not depend on a target control to jump to the preset page;
and testing the target path based on the adding result to obtain the testing result.
8. The method of claim 1, wherein the method further comprises:
acquiring a target test case and historical operation information, wherein the target test case is a skip relation between a third page and a fourth page which are compiled in advance and/or generated randomly, and the historical operation information is a skip relation between the third page and the fourth page in a historical operation process;
and constructing the target state transition diagram based on the target test case and/or the historical operation information.
9. A page testing apparatus, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a current page and a target page, and the target page is a page to be jumped corresponding to the current page;
a path planning module, configured to perform path planning on the current page and the target page based on a target state transition diagram to obtain a target path, where the target state transition diagram is used to represent a jump relationship between different pages through a plurality of nodes and edges between adjacent nodes, each node in the plurality of nodes represents a different page, and the edges between the adjacent nodes are used to represent operations corresponding to the jumps between the different pages;
and the test module is used for testing the target path to obtain a test result, wherein the test result is used for indicating whether the current page is successfully jumped to the target page.
10. The apparatus of claim 9, wherein the path planning module comprises:
the acquisition unit is used for acquiring a first page identifier of the current page and a second page identifier of the target page;
the judging unit is used for judging whether the first page identifier and the second page identifier exist in the target state transition diagram or not;
a determining unit, configured to determine, in response to the first page identifier existing in the target state transition diagram, the target path based on the first page identifier and the second page identifier.
11. The apparatus of claim 10, wherein the determining unit comprises:
a determining subunit, configured to determine that the first page identifier is at a first node of the target state transition diagram;
the determining subunit is further configured to determine that the second page identifier is at a second node of the target state transition graph;
an obtaining subunit, configured to obtain at least one path between the first node and the second node;
the determining subunit is further configured to determine a shortest path of the at least one path as the target path.
12. The apparatus of claim 10, wherein the apparatus further comprises:
the obtaining module is further configured to obtain a first control identifier of the current page in response to that the first page identifier does not exist in the target state transition diagram, where the first control identifier is an identifier of at least one control included in the current page;
the judging module is used for judging whether a first page containing the first control identification exists in the target state transition diagram or not, wherein the target path exists between the first page and the target page;
the determining module is further configured to determine that a third page identifier of the first page is the first page identifier in response to the first page existing in the target state transition diagram.
13. The apparatus of claim 10, wherein,
the obtaining module is further configured to obtain a control attribute of the current page in response to that the first page identifier does not exist in the target state transition diagram, where the control attribute is text information corresponding to at least one control included in the current page;
the determining module is further configured to determine a second page based on the target state transition diagram and the control attribute, where a similarity between the control attribute contained in the second page and the control attribute corresponding to the current page is greater than a preset similarity;
the determining module is further configured to determine that a fourth page identifier of the second page is the first page identifier.
14. The apparatus of claim 9, wherein the apparatus further comprises:
the building module is used for building a temporary state transition diagram based on the current page and the target page;
the path planning module is used for planning paths of the current page and the target page based on the temporary state transition diagram to obtain a first path;
the comparison module is used for comparing the first path with the target path to obtain a comparison result, wherein the comparison result is used for indicating whether the first path is smaller than the target path;
and the replacing module is used for replacing the target path in the target state transition diagram as the first path in response to the comparison result that the first path is smaller than the target path.
15. The apparatus of claim 9, wherein the apparatus further comprises:
the obtaining module is configured to obtain a preset node in the target path in response to the test result indicating that the current page is not successfully jumped to the target page, where the preset node is a node corresponding to a page that passes through the process of the current page jumping to the target page and is not successfully jumped;
the adding module is used for adding a preset program to a preset page corresponding to the preset node to obtain an adding result, wherein the preset program is a program which does not depend on a target control and jumps to the preset page;
and the test module is used for testing the target path based on the adding result to obtain the test result.
16. The apparatus of claim 9, wherein,
the acquisition module is further used for acquiring a target test case and historical operation information, wherein the target test case is a jump relation between a third page and a fourth page which are written in advance and/or generated randomly, and the historical operation information is a jump relation between the third page and the fourth page in a historical operation process;
the building module is further used for building the target state transition diagram based on the target test case and/or the historical operation information.
17. An electronic device, comprising:
at least one processor; and
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 perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202210679735.6A 2022-06-16 2022-06-16 Page test method, page test device, electronic equipment and storage medium Active CN115098362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210679735.6A CN115098362B (en) 2022-06-16 2022-06-16 Page test method, page test device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210679735.6A CN115098362B (en) 2022-06-16 2022-06-16 Page test method, page test device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115098362A true CN115098362A (en) 2022-09-23
CN115098362B CN115098362B (en) 2023-04-28

Family

ID=83291101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210679735.6A Active CN115098362B (en) 2022-06-16 2022-06-16 Page test method, page test device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115098362B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756233A (en) * 2023-08-23 2023-09-15 博智安全科技股份有限公司 Situation data processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271139A1 (en) * 2008-04-28 2009-10-29 Kabushiki Kaisha Toshiba Test case generation apparatus, generation method therefor, and program storage medium
CN109542776A (en) * 2018-11-07 2019-03-29 北京潘达互娱科技有限公司 Page comparison method, device and equipment
CN109558307A (en) * 2017-09-26 2019-04-02 卓望数码技术(深圳)有限公司 A kind of test method and system of games
CN111694756A (en) * 2020-07-31 2020-09-22 北京字节跳动网络技术有限公司 Application program testing method and device
CN113032268A (en) * 2021-03-30 2021-06-25 深圳市腾讯信息技术有限公司 Software testing method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271139A1 (en) * 2008-04-28 2009-10-29 Kabushiki Kaisha Toshiba Test case generation apparatus, generation method therefor, and program storage medium
CN109558307A (en) * 2017-09-26 2019-04-02 卓望数码技术(深圳)有限公司 A kind of test method and system of games
CN109542776A (en) * 2018-11-07 2019-03-29 北京潘达互娱科技有限公司 Page comparison method, device and equipment
CN111694756A (en) * 2020-07-31 2020-09-22 北京字节跳动网络技术有限公司 Application program testing method and device
CN113032268A (en) * 2021-03-30 2021-06-25 深圳市腾讯信息技术有限公司 Software testing method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756233A (en) * 2023-08-23 2023-09-15 博智安全科技股份有限公司 Situation data processing method and device, electronic equipment and storage medium
CN116756233B (en) * 2023-08-23 2023-11-07 博智安全科技股份有限公司 Situation data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115098362B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
US20080120601A1 (en) Information processing apparatus, method and program for deciding priority of test case to be carried out in regression test background of the invention
US20170132638A1 (en) Relevant information acquisition method and apparatus, and storage medium
CN105095059A (en) Method and device for automated testing
CN102567565B (en) Cable parameter processing method and system utilizing same
CN105224396A (en) A kind of business data processing method and device
CN110532056A (en) A kind of control recognition methods and device applied in user interface
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN114461534A (en) Software performance testing method and system, electronic equipment and readable storage medium
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN104182416A (en) File downloading system and method
CN111176992B (en) Flow engine testing method and device, computer equipment and storage medium
CN109063846B (en) Machine learning operation method, device, equipment and storage medium
CN116127154A (en) Knowledge tag recommendation method and device, electronic equipment and storage medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN113238748B (en) Direct current control and protection program page modification and verification method, device, terminal and medium
CN112463596B (en) Test case data processing method, device and equipment and processing equipment
CN115576834A (en) Software test multiplexing method, system, terminal and medium for supporting fault recovery
CN104536897A (en) Automatic testing method and system based on keyword
CN114490408A (en) Test case generation method, device, equipment, storage medium and product
CN109560964B (en) Equipment compliance checking method and device
JPH05240745A (en) Method for generating test specification
CN113868137A (en) Method, device and system for processing buried point data and server
CN107196789B (en) Method and device for checking base station parameters
CN109284097A (en) Realize method, equipment, system and the storage medium of complex data analysis
CN109582534B (en) Method and device for determining operation entry of system and server

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