A method and device for testing application
By building and comparing users' operation links in different versions of applications, the problem that the existing technology cannot truly reflect the actual operating environment of the application is solved, and the accuracy and effectiveness of application testing are improved.
Patent Information
- Application Number
- CN202010696973.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-07-20
AI Technical Summary
When testing applications, the prior art cannot truly reflect the actual operating environment of the application, resulting in defects that may affect the user experience after the application is released.
By obtaining the user's operation events, response information and operation time on each page of the target application, the user's operation link is built, and when the application is updated, the old version and the new version of the operation link are compared to the test results.
It improves the accuracy of version testing, can promptly discover possible defects after application release, and improves the effectiveness of application testing.
Smart Images

Figure CN111897723B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method and device for testing an application. Background Art
[0002] Currently, a large number of applications are installed on mobile terminals to meet various needs of users. During the version upgrade process, if there are defects in the application, it will cause the application to run abnormally. Therefore, after the application is updated, it is necessary to test the application.
[0003] When testing an application, the updated application is tested by pre-building a test environment. However, this test environment is only a simulated environment and cannot truly reflect the actual operating environment of the application. As a result, defects may still exist in the application after it is released, thus affecting the user experience. Summary of the invention
[0004] The embodiments of the present application provide a method and apparatus for testing an application, which are used to test an updated application.
[0005] In one aspect, an embodiment of the present application provides a method for testing an application, the method comprising:
[0006] Acquire operation events of the first user in each page of the target application, response information of the operation events, and operation time;
[0007] constructing a link node using each operation event and response information of each operation event, and sorting each link node according to the operation time to obtain the operation link of the first user;
[0008] When the target application is updated, the operation link of the first user in the target application before the update is compared with the operation link of the first user in the target application after the update to obtain a test result of the updated target application.
[0009] On the one hand, an embodiment of the present application provides a device for testing an application, the device comprising:
[0010] An acquisition module, used to acquire operation events of the first user in each page of the target application, response information of the operation events, and operation time;
[0011] A construction module, configured to construct a link node using each operation event and response information of each operation event, and sort each link node according to the operation time to obtain the operation link of the first user;
[0012] The processing module is used to compare the operation link of the first user in the target application before the update with the operation link of the first user in the target application after the update when the target application is updated, so as to obtain the test result of the updated target application.
[0013] Optionally, a positioning module is also included;
[0014] The positioning module is used to determine the target node as an abnormal node when there is a target node whose response information is an error message in each link node of the operation link; and locate the position where the abnormality occurs in the target application according to the abnormal node.
[0015] Optionally, the positioning module is specifically used for:
[0016] Acquire the operation event in the abnormal node and the response information of the operation event;
[0017] The location where the abnormality occurs in the target application is located according to the operation event in the abnormal node and the response information of the operation event.
[0018] Optionally, the positioning module is specifically used for:
[0019] Obtaining log information associated with the abnormal node from a log system, wherein the log system includes log information associated with each link node in the operation link;
[0020] The location where the abnormality occurs in the target application is located according to the log information associated with the abnormal node.
[0021] Optionally, the positioning module is specifically used for:
[0022] Determine a previous link node of the abnormal node and a subsequent link node of the abnormal node from the operation link;
[0023] The location where the abnormality occurs in the target application is located according to the abnormal node, the previous link node of the abnormal node, and the next link node of the abnormal node.
[0024] Optionally, the acquisition module is specifically used for:
[0025] Through the embedding points in each page of the target application, the operation events, response information of the operation events and the operation time of the first user in each page of the target application are obtained.
[0026] Optionally, the processing module is further used for:
[0027] The operation link of the first user is sent to the terminal for display.
[0028] Optionally, the processing module is further used for:
[0029] receiving a first viewing request sent by the terminal, where the first viewing request is used to instruct viewing of a target link node, and the first viewing request is sent by the terminal after detecting a first operation input by a second user;
[0030] The operation event in the target link node and response information of the operation event are sent to the terminal.
[0031] Optionally, the processing module is further used for:
[0032] receiving a second viewing request sent by the terminal, where the second viewing request is used to instruct to view log information associated with a target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user;
[0033] Sending the location information of the log information associated with the target link node in the log system to the terminal.
[0034] On the one hand, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for testing an application when executing the program.
[0035] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of the above-mentioned method for testing an application.
[0036] In the embodiment of the present application, the user's operation link is constructed based on the user's operation events in each page of the target application, the response information of the operation event, and the operation time. When the target application is updated, the operation link of the first user in the target application before the update is compared with the operation link of the first user in the target application after the update to obtain the test result of the updated target application. By comparing the user's operation links in the new and old versions of the target application, the test result of the target application when the version is updated can be intuitively obtained, the accuracy of the version test can be improved, and the defects that may exist after the target application is released can be discovered in time, thereby improving the effect of application testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A system architecture diagram provided for an embodiment of the present application;
[0039] Figure 2 The present application embodiment provides a flowchart of a method for testing an application;
[0040] Figure 3 The embodiment of the present application provides a schematic diagram of an operation link;
[0041] Figure 4 The embodiment of the present application provides a schematic diagram of an operation link;
[0042] Figure 5 The present application embodiment provides a schematic diagram of a process for collecting buried point data;
[0043] Figure 6 The embodiment of the present application provides a schematic diagram of an operation link;
[0044] Figure 7 The embodiment of the present application provides a schematic diagram of an operation link;
[0045] Figure 8 The embodiment of the present application provides a schematic diagram of an operation link;
[0046] Fig. 9 The present application embodiment provides a flowchart of a method for creating an operation link;
[0047] Fig.10 The present application embodiment provides a flowchart of a method for testing a target application;
[0048] Fig.11 The present application embodiment provides a schematic diagram of the structure of a device for testing an application;
[0049] Fig.12 An embodiment of the present application provides a schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0052] Tracking: Detect events during the running of software applications, and judge and capture events that require attention when they occur.
[0053] Operation link: The operation record of the user in the process of accessing the page, including the link consisting of operations such as opening the page and clicking a certain function.
[0054] Page life cycle: The key time points of page loading, often including the moments when the page is opened, updated, and closed.
[0055] The design concept of the embodiments of the present application is introduced below.
[0056] Currently, when testing applications, updated applications are tested by pre-building a test environment. However, this test environment is only a simulated environment and cannot truly reflect the actual usage environment of the application. As a result, defects may still exist in the application after it is released, thus affecting the user experience.
[0057] Considering that if users are allowed to participate in application testing, the application can be run in the actual use environment, so that defects that may exist after the application is released can be discovered in time. In view of this, an embodiment of the present application provides a method for testing an application, the method comprising: obtaining the operation events of the first user in each page of the target application, the response information of the operation events, and the operation time. Then, a link node is constructed using each operation event and the response information of each operation event, and each link node is sorted according to the operation time to obtain the operation link of the first user. When the target application is updated, the operation link of the first user in the target application before the update is compared with the operation link of the first user in the target application after the update, and the test result of the updated target application is obtained.
[0058] In the embodiment of the present application, the user's operation link is constructed based on the user's operation event, the response information of the operation event, and the operation time. When the target application is updated, the operation link of the first user in the target application before the update is compared with the operation link of the first user in the target application after the update to obtain the test result of the updated target application. By comparing the user's operation link in the new and old versions of the target application, the test result of the target application when the version is updated can be intuitively obtained, the accuracy of the version test can be improved, and the defects that may exist after the target application is released can be discovered in time, thereby improving the effect of application testing.
[0059] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the system architecture to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the system architecture introduced below is only used to illustrate the embodiments of the present application and is not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0060] refer to Figure 1, which is a system architecture diagram of the method for testing an application provided in an embodiment of the present application. The architecture at least includes a first terminal device 101, a server 102 and a second terminal device 103.
[0061] The terminal device 101 may be installed with a target application, which may be a web version application or a client application preinstalled in the terminal device 101. The target application in the embodiment of the present application may be an e-commerce shopping application, an instant messaging application, a browser, etc. A buried point is pre-set in each page of the target application. When the first user operates in the page, the buried point obtains the operation event, response information of the operation event, and operation time of the first user in each page of the target application, and then sends the obtained operation event, response information of the operation event, and operation time to the server 102, wherein the operation event may be opening a page, closing a page, clicking on certain functions in a page, browsing a page, taking a screenshot of a page, updating a page, etc. The response information of the operation event may be an error message, page content, etc. The terminal device 101 may include one or more processors 1011, a memory 1012, an I / O interface 1013 interacting with the server 102, and a display panel 1014, etc. The terminal device 101 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
[0062] The server 102 may be a background server of the target application, providing corresponding services for the target application. The server 102 may also be an analysis server independent of the background server of the target application. After obtaining the operation events, response information of the operation events and operation time of the first user in each page of the target application, the server 102 uses each operation event and the response information of each operation event to construct a link node, and sorts each link node according to the operation time to obtain the operation link of the first user. When there is a target node whose response information is an error message in each link node of the operation link, the target node is determined as an abnormal node, and the position where the abnormality occurs in the target application is located according to the abnormal node. In addition, the server 102 may also send the operation link of the first user to the second terminal device 103 for display. The server 102 may include one or more processors 1021, a memory 1022 and an I / O interface 1023 interacting with the terminal device 101, etc. In addition, the server 102 may also configure a database 1024. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 101 and the server 102 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0063] A test application can be installed on the second terminal device 103. The test application can be a web version application or a client application pre-installed in the terminal device 103. The second terminal device 103 obtains the operation link of the first user from the server 102 and displays it in the test application. The second user can view the operation link of each first user or test the target application through the test application. When the target application is updated, the test application sends a test request to the server 102. The server 102 compares the operation link of the first user in the target application before the update with the operation link of the first user in the target application after the update, obtains the test result of the updated target application, and sends the test result to the test application. The test application displays the test result to the user. When the second user needs to view the link node in the operation link, he can click the link node in the operation link. The second terminal device 103 responds to the click operation of the second user and sends the first viewing request to the server 102. The server 102 sends the operation event of the link node and the response information of the operation event to the second terminal device 103. The second terminal device 103 displays the operation event of the link node and the response information of the operation event in the test application. In addition, the log system includes log information associated with each link node in the operation link. When the second user needs to view the log information of the link node, he can double-click the link node in the operation link. The second terminal device 103 responds to the second user's double-click operation and sends a second viewing request to the server 102. The server 102 sends the location information of the log information associated with the link node in the log system to the second terminal device 103. The second terminal device 103 locates the log information associated with the link node in the log system according to the received location information and displays it. The terminal device 103 may include one or more processors 1031, a memory 1032, an I / O interface 1033 interacting with the server 102, and a display panel 1034, etc. The terminal device 103 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent speaker, a smart watch, etc., but is not limited thereto. The terminal device 103 and the server 102 may be directly or indirectly connected via wired or wireless communication, and this application is not limited thereto.
[0064] based on Figure 1 The system architecture diagram shown in the figure, the embodiment of the present application provides a process of a method for testing an application, such as Figure 2 As shown, the process of the method is executed by a device for testing an application, and the device for testing an application may be Figure 1 The server 102 shown includes the following steps:
[0065] Step S201: Acquire operation events of the first user in each page of the target application, response information of the operation events, and operation time.
[0066] Specifically, the target application may be an e-commerce shopping application, an instant messaging application, a browser, etc., and the operation event may be opening a page, closing a page, clicking certain functions on a page, sliding a page, taking a screenshot of a page, updating a page, etc. The response information of the operation event may be error information, page content, page version information, user information, etc.
[0067] Step S202: construct a link node using each operation event and the response information of each operation event, and sort each link node according to the operation time to obtain the operation link of the first user.
[0068] In a specific implementation, an operation event may include a function name and an operation name. For example, in an operation event "open page A", the function name is "page A" and the operation name is "open".
[0069] The following example illustrates the process of building an operation link. Suppose user M starts a browser, opens page A in the browser, and clicks function A-1 in page A. Opens page B in page A, first clicks function B-1 in page B, then clicks function B-2. Closes page B and opens page A, clicks function A-2 in page A, and then closes page A. Opens page C, enters C-1 in page C, then closes page C and closes the browser.
[0070] According to the operation, starting the browser and the response information of the browser are used as link node 1, opening page A and the response information of page A are used as link node 2, clicking function A-1 and the response information of function A-1 are used as link node 3, opening page B and the response information of page B are used as link node 4, clicking function B-1 and the response information of function B-1 are used as link node 5, clicking function B-2 and the response information of function B-2 are used as link node 6, closing page B and the response information of page B are used as link node 7, clicking function A-2 and the response information of function A-2 are used as link node 8, closing page A and the response information of page A are used as link node 9, opening page C and the response information of page C are used as link node 10, input C-1 and the response information of input C-1 are used as link node 11, closing page C and the response information of page C are used as link node 12, and closing the browser and the response information of the browser are used as link node 13. The above link nodes are connected in sequence to obtain the operation link, as shown in the following example. Figure 3 shown.
[0071] In one possible implementation, the life cycle of each page is marked in the operation link according to the page opening, clicking, closing and other operations. For example, Figure 3Based on the operation links shown, since link nodes 2, 3, 8, and 9 are all related to page A, these four nodes are marked as the life cycle of page A. Since link nodes 4, 5, 6, and 7 are all related to page B, these four nodes are marked as the life cycle of page B. Since link nodes 10, 11, and 12 are all related to page C, these three nodes are marked as the life cycle of page C. The specific operation links for marking page life cycles are as follows: Figure 4 shown.
[0072] Step S203: when the target application is updated, the operation link of the first user in the target application before the update is compared with the operation link of the first user in the target application after the update, to obtain a test result of the updated target application.
[0073] In a specific implementation, when the target application is updated, the operation link of the first user in the target application will also change accordingly. For example, when a new function is added to a page of the target application, the operation link of the first user in the updated target application should also include the operation event and response information of the new function. Therefore, after comparing the operation link of the first user in the target application before the update with the operation link of the first user in the target application after the update, it can be tested whether the new function added to the target application is successful. If the corresponding operation links before and after the target application is updated are the same, it means that the target application update failed, otherwise it means that the target application update was successful.
[0074] Optionally, the first user may be one or more, and the operation links of the same first user in the new and old versions of the target application can be compared to obtain the test results of the updated target application. The operation links of different first users in the new and old versions of the target application can also be compared to obtain the test results of the updated target application. For example, set the number of first users to 20, and grayscale release the new version of the target application. The new version of the target application is released to 10 of the first users, and the other 10 first users continue to use the old version of the target application. Then, the operation links of the 10 first users using the new version of the target application are compared with the operation links of the 10 first users using the old version of the target application to obtain the test results of the updated target application.
[0075] In addition, the second user can also set an expected operation link for the updated target application, and then compare the operation link of the first user in the updated target application with the expected operation link. If the operation links are the same, it means that the target application is updated successfully, otherwise it means that the target application is updated unsuccessfully.
[0076] By comparing the operation links of users in the new and old versions of the target application, you can intuitively obtain the test results of the target application when the version is updated, improve the accuracy of version testing, and promptly discover possible defects after the target application is released, thereby improving the effectiveness of application testing.
[0077] Optionally, when there is a target node whose response information is error information among the link nodes of the operation link, the target node is determined as an abnormal node, and then the position where the abnormality occurs in the target application is located according to the abnormal node.
[0078] Specifically, the error information includes the error information of JS error, the error information of interface error and other abnormal error information. When the operation event triggers the abnormal function in the page, the page will feedback the error information.
[0079] Since the link node is related to the operation event, when the link node is an abnormal node, the operation event in the link node is an abnormal event, and the page corresponding to the operation event is the abnormal page in the target application. Figure 4 When the link node 5 shown is an abnormal node, the page B in the browser is an abnormal page, and the function B-1 in the page B is an abnormal function.
[0080] In the embodiment of the present application, the user's operation link is constructed based on the user's operation event, the response information of the operation event and the operation time, so the abnormal situation of the target application can be timely known through the operation link, and when an abnormality occurs, the location where the abnormality occurs in the target application can be located based on the abnormal node in the operation link, without relying on the user to upload the log, thereby improving the efficiency of abnormality location.
[0081] Optionally, in the above step S201, the operation events of the first user in each page of the target application, the response information of the operation events and the operation time are obtained through the embedding points in each page of the target application.
[0082] In the specific implementation, standardized tracking is automatically performed in each page of the target application, where the tracking can be code tracking, visual tracking, full tracking, etc. When the user operates in the target application, the tracking will detect the user's operation, obtain the user's operation events in each page of the target application, the response information of the operation event, the operation time and other tracking data, and report them.
[0083] For example, Figure 5As shown, global tracking is performed in advance in each page of the target application. Tracking is used to detect page life cycle, operation events and system function anomalies. The page life cycle includes opening, updating and closing, and the operation behaviors include clicking, long pressing and sliding. System function anomalies include JS errors, interface errors and other anomalies. When any of the page life cycle, operation events and system function anomalies is triggered, tracking is detected and automatically generates tracking data, and then the tracking data is standardized. After that, the processed tracking data is collected and uploaded to the server. Since the pages are automatically standardized, the cost and errors of manual tracking are effectively reduced.
[0084] Optionally, in the above step S204, the embodiment of the present application provides at least the following implementation methods for locating the location where the abnormality occurs in the target application:
[0085] In a possible implementation, an operation event in an abnormal node and response information of the operation event are acquired, and a location where the abnormality occurs in a target application is located according to the operation event in the abnormal node and the response information of the operation event.
[0086] In a specific implementation, the specific code where the exception occurs in the target application can be located by analyzing the operation event in the abnormal node and the response information of the operation event.
[0087] In a possible implementation, log information associated with the abnormal node is obtained from a log system, and then the location where the abnormality occurs in the target application is located according to the log information associated with the abnormal node.
[0088] Specifically, the log system includes log information associated with each link node in the operation link. Optionally, each link node includes location information of the log information in the log system. When the link node is an abnormal node, the location information of the log information associated with the abnormal node in the log system can be obtained from the abnormal node, and then the log information associated with the abnormal node can be obtained from the log system based on the location information of the log information associated with the abnormal node in the log system, and then the location of the abnormality in the target application can be located based on the log information associated with the abnormal node. By establishing a connection between the link node and the location of the associated log information, when the link node is an abnormal node, the log information associated with the abnormal node can be quickly located from the log system, and then the abnormal location can be located based on the log information, thereby improving the efficiency of abnormal location.
[0089] In a possible implementation, the previous link node and the next link node of the abnormal node are determined from the operation link, and the abnormal position in the target application is located according to the abnormal node, the previous link node and the next link node of the abnormal node.
[0090] In specific implementation, some functional anomalies may not be caused by operation events in the abnormal node, but by operation events in the previous and next link nodes of the abnormal node. Therefore, the abnormal node, the previous link node of the abnormal node, and the next link node of the abnormal node can be combined to analyze the anomaly and locate the location where the anomaly occurs in the target application. It should be noted that when locating the location where the anomaly occurs in the target application, it is not limited to analyzing the anomaly in combination with the previous link node of the abnormal node and the next link node of the abnormal node. It can also be combined with the first two link nodes of the abnormal node to analyze the anomaly, or it can be combined with the first two link nodes of the abnormal node and the next two link nodes of the abnormal node to analyze the anomaly, etc. This application does not make specific limitations on this.
[0091] In the embodiment of the present application, since some anomalies may not be caused by operation events in abnormal nodes, when the anomalies are analyzed in combination with the abnormal nodes and normal link nodes in the operation link, the accuracy of anomaly locating can be effectively improved.
[0092] Optionally, after the device for testing the application in the embodiment of the present application constructs the operation link of the first user, the operation link of the first user is sent to the terminal for display.
[0093] Specifically, the second user can directly observe the operation link of the first user on the terminal, and when an abnormality occurs in the system, the abnormal node in the operation link can be directly observed through the visual interface, and the abnormality can be quickly located.
[0094] Exemplarily, it is assumed that the first user starts the target application, opens page C in the target application, enters C-1 in page C, and then closes page C. Opens page D, clicks function D-1 in page D, closes page D, and closes the target application.
[0095] According to the operation time, the start target application and the response information of the target application are used as link node 1, the opening of page C and the response information of page C are used as link node 2, the input C-1 and the response information of input C-1 are used as link node 3, the closing of page C and the response information of page C are used as link node 4, the opening of page D and the response information of page D are used as link node 5, the clicking of function D-1 and the response information of function D-1 are used as link node 6, the closing of page D and the response information of page D are used as link node 7, and the closing of the target application is used as link node 8. The above link nodes are connected in sequence and the page life cycle is marked to obtain the operation link, and then the operation link is sent to the terminal for display, as shown in the following figure. Figure 6 By sending the operation link of the first user to the terminal for display, it is convenient for the second user to observe the operation link of the first user and find abnormalities in the operation link in time.
[0096] In one possible implementation, after the device for testing the application builds an operation link, it receives a first viewing request sent by the terminal, where the first viewing request is used to indicate viewing of a target link node. The first viewing request is sent by the terminal after detecting a first operation input by a second user. The device for testing the application sends an operation event in the target link node and response information of the operation event to the terminal.
[0097] In a specific implementation, the first operation may be a click, double-click, long press, or other operation. The second user may view the operation event in any link node in the operation link and the response information of the operation event. When the second user observes the operation link of the first user and finds that there is an abnormal node in the operation link, the second user may click the abnormal node in the operation link to obtain the operation event in the abnormal node and the response information of the operation event from the device of the test application. Then, the operation event in the abnormal node and the response information of the operation event are used to locate the location where the abnormality occurs in the target application.
[0098] For example, Figure 7 As shown, when the second user observes the operation link of the first user and finds that the link node 3 in the operation link is an abnormal node, the second user can click the displayed link node 3 on the terminal interface. The terminal responds to the click operation of the second user and sends a first viewing request to the device for testing the application. The device for testing the application sends the operation event in the link node 3 and the response information of the operation event to the terminal. The terminal displays the operation event in the link node 3 and the response information of the operation event. The second user analyzes the operation event in the link node 3 and the response information of the operation event to locate the abnormal position in the target application.
[0099] In a possible implementation, after the device for testing the application builds the operation link, it receives a second viewing request sent by the terminal, the second viewing request is used to instruct to view the log information associated with the target link node, and the second viewing request is sent by the terminal after detecting the second operation input by the second user. The device for testing the application sends the location information of the log information associated with the target link node in the log system to the terminal.
[0100] In a specific implementation, the second operation may be a click, double-click, long press, or other operation. The second user may view the log information associated with any link node in the operation link. When the second user observes the operation link of the first user and finds that there is an abnormal node in the operation link, the second user may double-click the abnormal node in the operation link to obtain the location information of the log information associated with the abnormal node in the log system from the device of the test application. Then, the log information associated with the abnormal node is obtained from the log system according to the location information, and then the log information associated with the abnormal node is analyzed to locate the location where the abnormality occurs in the target application.
[0101] For example, Figure 8 As shown, when the second user observes the operation link of the first user and finds that the link node 4 in the operation link is an abnormal node, the second user can double-click the displayed link node 4 on the terminal interface. The terminal responds to the double-click operation of the second user and sends a second viewing request to the device for testing the application. The device for testing the application sends the location information of the log information associated with the link node 4 in the log system to the terminal. The terminal obtains the log information associated with the link node 4 in the log system based on the location information of the log information associated with the link node 4 in the log system. The second user analyzes the log information associated with the link node 4 and locates the location where the abnormality occurs in the target application.
[0102] While displaying the operation link to the second user, the second user is supported to query the link node and obtain the operation data and log information of the link node, so as to help the second user become familiar with the functions of the target application and locate the abnormal position.
[0103] In order to better explain the embodiment of the present application, the following describes the process of building an operation link and performing abnormality location and target application testing based on the operation link provided by the embodiment of the present application in combination with a specific implementation scenario. The method is interactively executed by a first terminal device, a second terminal device, and a server, and specifically includes:
[0104] The first terminal device automatically performs standardized tracking in each page of the target application. The tracking is used to detect the page life cycle, operation behavior and system function anomalies, where the page life cycle includes opening, updating, and closing, and the operation behavior includes clicking, long pressing and sliding. System function anomalies include JS errors, interface errors and other anomalies. When any of the page life cycle, operation behavior and system function anomalies is triggered, the tracking detection and automatic generation of tracking data is reported to the server. The server analyzes the tracking data, obtains the operation link, and then sends the operation link to the second terminal device for visual display. The displayed content includes the user's real-time operation link and the data in the link node. It also supports operation link query, log information query, etc. Fig. 9 shown.
[0105] When an abnormality occurs in the system, the server may automatically locate the location where the abnormality occurs in the target application, or the second user on the second terminal device may locate the location where the abnormality occurs in the target application.
[0106] Method 1: When the server determines that there is a target node whose response information is an error message in each link node of the operation link, the server locates the location where the exception occurs in the target application according to the operation event in the abnormal node and the response information of the operation event.
[0107] Method 2: When the second user observes the operation link displayed on the second terminal device and finds an abnormal node in the operation link, he can click the abnormal node in the operation link to obtain the operation event and the response information of the operation event in the abnormal node from the server. Then, the operation event and the response information of the operation event in the abnormal node are analyzed to locate the abnormal location in the target application.
[0108] When the target application is updated, the new version of the target application is released in grayscale, that is, the new version of the target application is given to some first users, and the other first users continue to use the old version of the target application, such as Fig.10 As shown, the tracking point will obtain the tracking point data of the first user in the old version of the target application and the tracking point data in the new version of the target application, and report it to the server. The server analyzes the tracking point data to obtain the old operation link and the new operation link of the first user. The server can compare the old operation link and the new operation link of the first user to obtain the test result of the updated target application. The server can also send the old operation link and the new operation link of the first user to the second terminal device for visual display. The second user can compare the old operation link and the new operation link to determine the test result of the target application.
[0109] In the embodiment of the present application, the user's operation link is constructed based on the user's operation event, the response information of the operation event, and the operation time, so the abnormal situation of the target application can be timely known through the operation link, and when an abnormality occurs, the location where the abnormality occurs in the target application can be located based on the abnormal node in the operation link, and no longer relies on the user to upload the log, thereby improving the efficiency of abnormal location. By comparing the user's operation link in the new and old versions of the target application, the test results of the target application during the version update can be intuitively obtained, the accuracy of the version test can be improved, and at the same time, the defects that may exist after the target application is released can be discovered in time, improving the effect of application testing.
[0110] Based on the same technical concept, the present application embodiment provides a device for testing applications, such as Fig.11 As shown, the device 1100 for testing application includes:
[0111] The acquisition module 1101 is used to acquire the operation events, response information of the operation events and the operation time of the first user in each page of the target application;
[0112] A construction module 1102 is used to construct a link node using each operation event and the response information of each operation event, and sort the link nodes according to the operation time to obtain the operation link of the first user;
[0113] The processing module 1103 is used to compare the operation link of the first user in the target application before the update with the operation link of the first user in the target application after the update when the target application is updated, so as to obtain the test result of the updated target application.
[0114] Optionally, a positioning module 1104 is also included;
[0115] The positioning module 1104 is used to determine the target node as an abnormal node when there is a target node whose response information is an error message among the link nodes of the operation link; and locate the position where the abnormality occurs in the target application according to the abnormal node.
[0116] Optionally, the positioning module 1104 is specifically configured to:
[0117] Acquire the operation event in the abnormal node and the response information of the operation event;
[0118] The location where the abnormality occurs in the target application is located according to the operation event in the abnormal node and the response information of the operation event.
[0119] Optionally, the positioning module 1104 is specifically configured to:
[0120] Obtaining log information associated with the abnormal node from a log system, wherein the log system includes log information associated with each link node in the operation link;
[0121] The location where the abnormality occurs in the target application is located according to the log information associated with the abnormal node.
[0122] Optionally, the positioning module 1104 is specifically configured to:
[0123] Determine a previous link node of the abnormal node and a subsequent link node of the abnormal node from the operation link;
[0124] The location where the abnormality occurs in the target application is located according to the abnormal node, the previous link node of the abnormal node, and the next link node of the abnormal node.
[0125] Optionally, the acquisition module 1101 is specifically used for:
[0126] Through the embedding points in each page of the target application, the operation events, response information of the operation events and the operation time of the first user in each page of the target application are obtained.
[0127] Optionally, the processing module 1103 is further configured to:
[0128] The operation link of the first user is sent to the terminal for display.
[0129] Optionally, the processing module 1103 is further configured to:
[0130] receiving a first viewing request sent by the terminal, where the first viewing request is used to instruct viewing of a target link node, and the first viewing request is sent by the terminal after detecting a first operation input by a second user;
[0131] The operation event in the target link node and response information of the operation event are sent to the terminal.
[0132] Optionally, the processing module 1103 is further configured to:
[0133] receiving a second viewing request sent by the terminal, where the second viewing request is used to instruct to view log information associated with a target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user;
[0134] Sending the location information of the log information associated with the target link node in the log system to the terminal.
[0135] Based on the same technical concept, the embodiment of the present application provides a computer device, such as Fig.12 As shown, it includes at least one processor 1201 and a memory 1202 connected to the at least one processor. The specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present application. Fig.12 For example, the processor 1201 and the memory 1202 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0136] In the embodiment of the present application, the memory 1202 stores instructions that can be executed by at least one processor 1201. The at least one processor 1201 can execute the steps included in the aforementioned method of testing the application by executing the instructions stored in the memory 1202.
[0137] Among them, the processor 1201 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, and locate the location where the abnormality occurs in the target application and test the target application by running or executing instructions stored in the memory 1202 and calling the data stored in the memory 1202. Optionally, the processor 1201 may include one or more processing units, and the processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1201. In some embodiments, the processor 1201 and the memory 1202 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0138] Processor 1201 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0139] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1202 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1202 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0140] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned method for testing the application.
[0141] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0145] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0146] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for testing an application, characterized in that: include: When the target application is updated, a new version of the target application is released in grayscale; Acquire operation events, response information of the operation events, and operation time of the first user in each page of the old version of the target application; Constructing a link node using each operation event and response information of each operation event, and sorting each link node according to the operation time to obtain an old operation link of the first user, where the old operation link is an operation record track of the first user in the process of accessing the page of the old version of the target application; Acquire operation events, response information of the operation events, and operation time of the first user in each page of the new version of the target application; Constructing a link node using each operation event and response information of each operation event, and sorting each link node according to the operation time to obtain a new operation link of the first user, where the new operation link is an operation record track of the first user in the process of accessing the page of the new version of the target application; comparing the old operational link with the new operational link; When the old operation link is the same as the new operation link, the target application update fails; When there is a target node whose response information is an error message among the link nodes of the new operation link, the target node is determined as an abnormal node; The location where the exception occurs in the target application of the new version is located according to the exception node.
2. The method according to claim 1, characterized in that The locating the location where the abnormality occurs in the target application according to the abnormal node includes: Acquire the operation event in the abnormal node and the response information of the operation event; The location where the abnormality occurs in the target application is located according to the operation event in the abnormal node and the response information of the operation event.
3. The method according to claim 1, characterized in that The locating the location where the abnormality occurs in the target application according to the abnormal node includes: Obtaining log information associated with the abnormal node from a log system, wherein the log system includes log information associated with each link node in the operation link; The location where the abnormality occurs in the target application is located according to the log information associated with the abnormal node.
4. The method according to claim 1, characterized in that The locating the location where the abnormality occurs in the target application according to the abnormal node includes: Determine a previous link node of the abnormal node and a subsequent link node of the abnormal node from the operation link; The location where the abnormality occurs in the target application is located according to the abnormal node, the previous link node of the abnormal node, and the next link node of the abnormal node.
5. The method according to claim 1, characterized in that The obtaining of the operation events, response information of the operation events, and operation time of the first user in each page of the target application includes: Through the embedding points in each page of the target application, the operation events, response information of the operation events and the operation time of the first user in each page of the target application are obtained.
6. The method according to any one of claims 1 to 4, characterized in that: Also includes: The operation link of the first user is sent to the terminal for display.
7. The method according to claim 6, characterized in that Also includes: receiving a first viewing request sent by the terminal, where the first viewing request is used to instruct viewing of a target link node, and the first viewing request is sent by the terminal after detecting a first operation input by a second user; The operation event in the target link node and response information of the operation event are sent to the terminal.
8. The method according to claim 6, characterized in that Also includes: receiving a second viewing request sent by the terminal, where the second viewing request is used to instruct to view log information associated with a target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user; Sending the location information of the log information associated with the target link node in the log system to the terminal.
9. A device for testing an application, characterized in that: include: An acquisition module, used for grayscale publishing a new version of the target application when the target application is updated; Acquire operation events, response information of the operation events, and operation time of the first user in each page of the old version of the target application; A construction module, configured to construct a link node using each operation event and response information of each operation event, and sort each link node according to the operation time, to obtain an old operation link of the first user, wherein the old operation link is an operation record track of the first user in the process of accessing a page of the old version of the target application; The acquisition module is further used to acquire the operation events, response information of the operation events and operation time of the first user in each page of the new version of the target application; The construction module is further used to construct a link node using each operation event and response information of each operation event, and sort each link node according to the operation time to obtain a new operation link of the first user, where the new operation link is an operation record track of the first user in the process of accessing the page of the new version of the target application; A processing module, used for comparing the old operation link with the new operation link; when the old operation link is the same as the new operation link, the target application fails to be updated; When there is a target node whose response information is an error message among the link nodes of the new operation link, the target node is determined as an abnormal node; The location where the exception occurs in the target application of the new version is located according to the exception node.
Citation Information
Patent Citations
Beta testing method and device
CN106484610A
Page monitoring method and device based on user behavior data
CN110532157A
System fault processing method and device for to-be-analyzed system, equipment and storage medium
CN110995468A