CN111897723A - Method and device for testing application - Google Patents

Method and device for testing application Download PDF

Info

Publication number
CN111897723A
CN111897723A CN202010696973.9A CN202010696973A CN111897723A CN 111897723 A CN111897723 A CN 111897723A CN 202010696973 A CN202010696973 A CN 202010696973A CN 111897723 A CN111897723 A CN 111897723A
Authority
CN
China
Prior art keywords
link
node
target application
user
application
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.)
Pending
Application number
CN202010696973.9A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010696973.9A priority Critical patent/CN111897723A/en
Publication of CN111897723A publication Critical patent/CN111897723A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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; 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the application provides a method and a device for testing application, which relate to the technical field of computers, and the method comprises the following steps: acquiring operation events, response information of the operation events and operation time of a first user in each page of a target application, then constructing link nodes by adopting each operation event and the response information of each operation event, and sequencing each link node according to the operation time to obtain an operation link of the first user; when the target application is updated, comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating, and obtaining the test result of the target application after updating. By comparing the operation links of the user in the target applications of the new and old versions, the test result of the target application during version updating can be visually obtained, the accuracy of version testing is improved, defects possibly existing after the target application is released can be timely found, and the effect of application testing is improved.

Description

Method and device for testing application
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for testing application.
Background
Currently, a large number of applications are installed on a mobile terminal to meet various needs of users. In the version upgrading process of the application program, if a defect occurs, the operation of the application program is abnormal, so that the application program needs to be tested after the application program is updated.
When the application program is tested, the updated application program is tested by building a test environment in advance, but the test environment is only a simulated environment and cannot truly represent the actual operation environment of the application program, so that defects may exist after the application program is issued, and user experience is influenced.
Disclosure of Invention
The embodiment of the application provides a method and a device for testing an application, which are used for testing an updated application program.
In one aspect, an embodiment of the present application provides a method for testing an application, where the method includes:
acquiring an operation event, response information of the operation event and operation time of a first user in each page of a target application;
constructing link nodes by adopting each operation event and response information of each operation event, and sequencing the link nodes according to the operation time to obtain an operation link of the first user;
when the target application is updated, comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating, and obtaining the test result of the target application after updating.
In one aspect, an embodiment of the present application provides an apparatus for testing an application, where the apparatus includes:
the acquisition module is used for acquiring operation events, response information of the operation events and operation time of the first user in each page of the target application;
the construction module is used for constructing link nodes by adopting each operation event and the response information of each operation event, sequencing each link node according to the operation time and obtaining the operation link of the first user;
and the processing module is used for comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating when the target application is updated, and obtaining the test result of the updated target application.
Optionally, a positioning module is further included;
the positioning module is configured to determine a target node as an abnormal node when a target node exists in each link node of the operation link, where response information of the target node is error report information; and positioning the position of the abnormality in the target application according to the abnormal node.
Optionally, the positioning module is specifically configured to:
acquiring an operation event in the abnormal node and response information of the operation event;
and positioning the abnormal position in the target application according to the operation event in the abnormal node and the response information of the operation event.
Optionally, the positioning module is specifically configured to:
obtaining log information associated with the abnormal node from a log system, wherein the log system comprises log information associated with each link node in the operation link;
and positioning the abnormal position in the target application according to the log information associated with the abnormal node.
Optionally, the positioning module is specifically configured to:
determining a previous link node of the abnormal node and a next link node of the abnormal node from the operation link;
and positioning the position of the abnormality in the target application according to the abnormal node, the previous link node of the abnormal node and the next link node of the abnormal node.
Optionally, the obtaining module is specifically configured to:
and acquiring an operation event, response information of the operation event and operation time of the first user in each page of the target application through a buried point in each page of the target application.
Optionally, the processing module is further configured to:
and sending the operation link of the first user to a terminal for displaying.
Optionally, the processing module is further configured to:
receiving a first viewing request sent by the terminal, wherein the first viewing request is used for indicating viewing of a target link node, and the first viewing request is sent by the terminal after a first operation input by a second user is detected;
and sending the operation event in the target link node and response information of the operation event to the terminal.
Optionally, the processing module is further configured to:
receiving a second viewing request sent by the terminal, wherein the second viewing request is used for indicating to view the log information associated with the target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user;
and sending the position information of the log information associated with the target link node in the log system to the terminal.
In one aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for testing an application when executing the program.
In one aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program executable by a computer device, which when running on the computer device, causes the computer device to perform the steps of the method for testing an application.
In the embodiment of the application, the operation link of the user is constructed based on the operation event of the user in each page of the target application, the response information of the operation event and the operation time, and when the target application is updated, the operation link of the first user in the target application before updating is compared with the operation link of the first user in the target application after updating, so that the test result of the updated target application is obtained. By comparing the operation links of the user in the target applications of the new and old versions, the test result of the target application during version updating can be visually obtained, the accuracy of version testing is improved, defects possibly existing after the target application is released can be timely found, and the effect of application testing is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a diagram of a system architecture according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a method for testing an application according to an embodiment of the present application;
FIG. 3 an embodiment of the present application provides a schematic diagram of an operational link;
FIG. 4 is a schematic diagram of an operational link according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a process for collecting buried point data according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an operational link according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an operational link according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an operational link according to an embodiment of the present application;
FIG. 9 is a flow chart illustrating a method for creating an operational link according to an embodiment of the present application;
FIG. 10 is a schematic flow chart diagram illustrating a method for testing a target application according to an embodiment of the present application;
FIG. 11 is a schematic diagram of an apparatus for testing applications;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
For convenience of understanding, terms referred to in the embodiments of the present invention are explained below.
Embedding points: monitoring events in the running process of the software application, and judging and capturing when the events needing attention occur.
Operating the link: and recording tracks by the user in the process of accessing the page, wherein the tracks comprise links formed by operations of opening the page, clicking a certain function and the like.
The life cycle of the page is as follows: the critical time points for page loading often include the time when a page is opened, updated, closed, etc.
The following is a description of the design concept of the embodiments of the present application.
At present, when an application program is tested, an updated application program is tested by building a test environment in advance, but the test environment is only a simulated environment and cannot truly represent the actual use environment of the application program, so that defects may exist after the application program is issued, and user experience is influenced.
Considering that if the user participates in the application program test, the application program can be operated in the actual use environment, so that the possible defects after the application program is released can be found in time. In view of this, an embodiment of the present application provides a method for testing an application, where the method includes: and acquiring the operation event of the first user in each page of the target application, the response information of the operation event and the operation time. And then constructing link nodes by adopting each operation event and the response information of each operation event, and sequencing the link nodes according to the operation time to obtain the operation link of the first user. When the target application is updated, comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating, and obtaining the test result of the target application after updating.
In the embodiment of the application, an operation link of a user is constructed based on an operation event of the user, response information of the operation event and operation time, and when the target application is updated, the operation link of the first user in the target application before updating is compared with the operation link of the first user in the target application after updating, so that a test result of the updated target application is obtained. By comparing the operation links of the user in the target applications of the new and old versions, the test result of the target application during version updating can be visually obtained, the accuracy of version testing is improved, defects possibly existing after the target application is released can be timely found, and the effect of application testing is improved.
After introducing the design concept of the embodiment of the present application, some brief descriptions are made below on a system architecture to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the system architecture described below is only used for illustrating the embodiment of the present application and is not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Reference is made to fig. 1, which is a system architecture diagram of a method for testing an application provided by an embodiment of the present application. The architecture comprises at least a first terminal device 101, a server 102 and a second terminal device 103.
The terminal device 101 may have a target application installed therein, where the target application may be a web application or a client application pre-installed in the terminal device 101, and the target application in this embodiment may be an e-commerce shopping application, an instant messaging application, a browser, and the like. The method comprises the steps that a buried point is preset in each page of a target application, when a first user operates in the page, the buried point obtains an 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 a server 102, wherein the operation event can be page opening, page closing, page clicking of certain functions in the page, page browsing, page screenshot, page updating and the like. The response information of the operation event may be error information, page content, and the like. Terminal device 101 may include, among other things, one or more processors 1011, memory 1012, I/O interface 1013 to interact with server 102, and display panel 1014. The terminal device 101 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like.
The server 102 may be a background server of the target application, and provides a corresponding service for the target application. The server 102 may also be an analytics server that is independent of the target application's backend servers. After obtaining the operation events, the response information of the operation events and the operation time of the first user in each page of the target application, the server 102 constructs link nodes by using each operation event and the response information of each operation event, and sequences the link nodes according to the operation time to obtain the operation link of the first user. When a target node with response information being error report information exists 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 transmit the operation link of the first user to the second terminal device 103 for presentation. The server 102 may include one or more processors 1021, memory 1022, and an I/O interface 1023 to interact with the terminal device 101, among other things. In addition, server 102 may also configure database 1024. The server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal device 101 and the server 102 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The second terminal device 103 may have a test application installed thereon, where the test application may be a web application or a client application pre-installed in the terminal device 103. The second terminal device 103 obtains the operation links of the first users from the server 102 and displays the operation links in the test application, and the second user can view the operation links of each first user through the test application or test the target 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 updating with the operation link of the first user in the target application after updating to obtain a test result of the updated target application, and sends the test result to the test application, and the test application shows the test result to the user. When the second user needs to view the link node in the operation link, the second user may click the link node in the operation link, and the second terminal device 103 sends the first viewing request to the server 102 in response to the click operation of the second user. The server 102 transmits the operation event of the link node and the response information of the operation event to the second terminal apparatus 103. The second terminal device 103 presents 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 operational link, and when the second user needs to check the log information of the link node, the second user may double-click the link node in the operational link, and the second terminal device 103 sends a second check request to the server 102 in response to the double-click operation of the second user. The server 102 transmits 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 and displays the log information associated with the link node in the log system according to the received location information. Terminal device 103 may include one or more processors 1031, memory 1032, I/O interface 1033 to interact with server 102, and display panel 1034, among other things. The terminal device 103 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal device 103 and the server 102 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Based on the system architecture diagram shown in fig. 1, the embodiment of the present application provides a flow of a method for testing an application, as shown in fig. 2, the flow of the method is executed by an apparatus for testing an application, which may be the server 102 shown in fig. 1, and the method includes the following steps:
step S201, acquiring an operation event, response information of the operation event, and operation time of the first user in each page of the target application.
Specifically, the target application may be an e-commerce shopping application, an instant messaging application, a browser, and the like, and the operation event may be opening a page, closing a page, clicking some function in a page, sliding a page, screenshot in a page, updating a page, and the like. The response information of the operation event may be error information, page content, page version information, user information, and the like.
Step S202, constructing link nodes by adopting each operation event and the response information of each operation event, and sequencing the link nodes according to the operation time to obtain the operation link of the first user.
In a specific implementation, the operation event may include a function name and an operation name, for example, in the operation event "open page a", the function name is "page a", and the operation name is "open".
The following illustrates the process of constructing the operation link, and sets the user M to start the browser, open the page a in the browser, and click the function a-1 in the page a. And opening a page B in the page A, and clicking a function B-1 in the page B firstly and then clicking a function B-2 in the page B. Page B is closed and page a is opened, function a-2 is clicked in page a, and then page a is closed. And opening the page C, inputting C-1 in the page C, then closing the page C, and closing the browser.
According to the operation room, response information for starting a browser and a browser is used as a link node 1, response information for opening a page A and a page A is used as a link node 2, response information for clicking a function A-1 and a function A-1 is used as a link node 3, response information for opening a page B and a page B is used as a link node 4, response information for clicking a function B-1 and a function B-1 is used as a link node 5, response information for clicking a function B-2 and a function B-2 is used as a link node 6, response information for closing a page B and a page B is used as a link node 7, response information for clicking a function A-2 and a function A-2 is used as a link node 8, response information for closing a page A and a page A is used as a link node 9, and response information for opening a page C and a page C is used as a link node 10, the response information of input C-1 and input C-1 is used as link node 11, the response information of closing page C and page C is used as link node 12, and the response information of closing the browser and browser is used as link node 13. The above link nodes are connected in sequence to obtain an operation link, as shown in fig. 3.
In a possible implementation, the life cycle of each page is marked in the operation link according to page opening, clicking, closing and the like, for example, on the basis of the operation link shown in fig. 3, since the link node 2, the link node 3, the link node 8 and the link node 9 are all related to the page a, the four nodes are marked as the life cycle of the page a. Since link node 4, link node 5, link node 6, and link node 7 are all associated with page B, these four nodes are labeled as the life cycle of page B. Since the link node 10, the link node 11, and the link node 12 are all related to the page C, these three nodes are labeled as the life cycle of the page C, and the operation link labeling the life cycle of the page is specifically shown in fig. 4.
Step S203, when the target application is updated, comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating, and obtaining a test result of the target application after updating.
In specific implementation, when the target application is updated, the operation link of the first user in the target application is also changed accordingly. For example, when a new function is added to a certain page of the target application, the operation link of the first user in the updated target application should also include the operation event and the response information of the new function, so that after comparing the operation link of the first user in the target application before updating with the operation link of the first user in the updated target application, it can be tested whether the new function added by the target application is successful. And if the corresponding operation links before and after the target application is updated are the same, indicating that the target application is failed to be updated, otherwise indicating that the target application is successfully updated.
Optionally, the number of the first users may be one or more, and the operation links of the same first user in the new and old versions of the target application may be compared to obtain the updated test result of the target application. Or comparing the operation links of different first users in the new and old versions of the target application to obtain the test result of the updated target application. For example, 20 first users are set, the new version of the target application is released in a grayscale mode, the new version of the target application is released to 10 first users, the other 10 first users continue to use the old version of the target application, and 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 updated test result of the target application.
In addition, the second user may 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 indicates that the target application is updated successfully, otherwise, it indicates that the target application is updated unsuccessfully.
By comparing the operation links of the user in the target applications of the new and old versions, the test result of the target application during version updating can be visually obtained, the accuracy of version testing is improved, defects possibly existing after the target application is released can be timely found, and the effect of application testing is improved.
Optionally, when there is a target node whose response information is error report information in each link node of the operational link, the target node is determined as an abnormal node, and then a position where an abnormality occurs in the target application is located according to the abnormal node.
Specifically, the error information includes error information of JS error, error information of interface error, and other abnormal error information. When the operation event triggers the abnormal function in the page, the page feeds back error reporting information.
Because 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 an abnormal page in the target application. For example, when the link node 5 shown in fig. 4 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.
In the embodiment of the application, the operation link of the user is constructed based on the operation event of the user, the response information of the operation event and the operation time, so that the abnormal condition of the target application can be timely known through the operation link, and when the abnormality occurs, the position where the abnormality occurs in the target application can be located based on the abnormal node in the operation link, and the user does not need to upload a log, so that the efficiency of the abnormal location is improved.
Optionally, in step S201, the operation event, the response information of the operation event, and the operation time of the first user in each page of the target application are acquired through the buried point in each page of the target application.
In specific implementation, standardized embedding is automatically performed in each page of the target application, wherein the embedding can be code embedding, visual embedding, full embedding and the like. When the user operates in the target application, the embedded point monitors the operation of the user, obtains the operation event of the user in each page of the target application, response information of the operation event, operation time and other embedded point data, and reports the operation event, the response information, the operation time and the like.
Illustratively, as shown in fig. 5, a global burdening is performed in each page of the target application in advance, and the burdening is used for monitoring a page life cycle, an operation event and a system function exception, wherein the page life cycle comprises opening, updating and closing, the operation behavior comprises clicking, long pressing and sliding, and the system function exception comprises a JS error, an interface error and other exceptions. When any one of the life cycle of the page, the operation event and the system function abnormity is triggered, the embedded point monitors and automatically generates embedded point data, then the embedded point data is subjected to data standardization processing, and then the processed embedded point data is collected and uploaded to the server. Because the page is automatically subjected to standardized point burying, the cost and the error of manual point burying are effectively reduced.
Optionally, in step S204, the embodiment of the present application provides at least the following embodiments for locating a position where an abnormality occurs in a target application:
according to one possible implementation mode, the operation event in the abnormal node and the response information of the operation event are obtained, and the position 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.
In specific implementation, the specific code of the exception occurring in the target application can be located by analyzing the operation event in the exception node and the response information of the operation event.
According to one possible implementation mode, log information associated with the abnormal node is obtained from a log system, and then the position of the abnormal node in the target application is located according to the log information associated with the abnormal node.
Specifically, the log system includes log information associated with each link node in the operating 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 position information of the log information associated with the abnormal node in the log system can be obtained from the abnormal node, then the log information associated with the abnormal node is obtained from the log system according to the position information of the log information associated with the abnormal node in the log system, and then the abnormal position in the target application is positioned according to the log information associated with the abnormal node. By establishing the relation between the link node and the position of the associated log information, when the link node is an abnormal node, the log information associated with the abnormal node can be quickly positioned from the log system, and the abnormal position is positioned based on the log information, so that the efficiency of abnormal positioning is improved.
In one possible implementation, a link node before the abnormal node and a link node after the abnormal node are determined from the operation links. And positioning the abnormal position in the target application according to the abnormal node, the previous link node of the abnormal node and the next link node of the abnormal node.
In specific implementation, some functional abnormalities may not be caused by operation events in the abnormal node but by operation events in the link nodes before and after the abnormal node, so that the abnormal node, the link node before the abnormal node, and the link node after the abnormal node can be combined to analyze the abnormality and locate the position where the abnormality occurs in the target application. It should be noted that, when a position where an anomaly occurs in a target application is located, the anomaly is not limited to be analyzed by combining a previous link node of the anomalous node and a next link node of the anomalous node, or by combining the previous two link nodes of the anomalous node and the next two link nodes of the anomalous node, and the anomaly is also analyzed, and the like, and the present application is not limited specifically.
In the embodiment of the application, because some exceptions may not be caused by the operation event in the exception node, when the exception node is combined with the normal link node in the exception node and the operation link node to analyze the exception, the accuracy of exception positioning can be effectively improved.
Optionally, after the device for testing applications 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 displaying.
Specifically, the second user can directly observe the operation link of the first user at the terminal, and when the system is abnormal, the abnormal node in the operation link can be directly observed through the visual interface, and the abnormality can be quickly located.
Illustratively, assume that the first user launches the target application, opens page C in the target application, enters C-1 in page C, and then closes page C. And opening the page D, clicking the function D-1 in the page D, closing the page D and closing the target application.
According to the operation time, response information of the starting target application and the target application is used as a link node 1, response information of an open page C and a page C is used as a link node 2, response information of an input C-1 and an input C-1 is used as a link node 3, response information of a close page C and a page C is used as a link node 4, response information of an open page D and a page D is used as a link node 5, response information of a click function D-1 and a function D-1 is used as a link node 6, response information of a close page D and a page D is used as a link node 7, and a close target application is used as a link node 8. The link nodes are sequentially connected and marked with a page life cycle to obtain an operation link, and then the operation link is sent to a terminal for displaying, as shown in fig. 6. The operation link of the first user is sent to the terminal for displaying, so that the second user can observe the operation link of the first user conveniently and can find abnormality in the operation link in time.
In one possible implementation manner, after the device for testing the application constructs the operation link, a first viewing request sent by the terminal is received, the first viewing request is used for indicating to view the target link node, the first viewing request is sent by the terminal after detecting a first operation input by a second user, and 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.
In a specific implementation, the first operation may be a click operation, a double click operation, a long press operation, or the like. The second user can view the operation event in any one of the link nodes in the operation link and the response information of the operation event. When the second user finds that the abnormal node exists in the operation link by observing the operation link of the first user, the second user can click the abnormal node in the operation link to acquire the operation event in the abnormal node and the response information of the operation event from the device of the test application. And then, positioning the position of the abnormality in the target application for the operation event in the abnormal node and the response information of the operation event.
Illustratively, as shown in fig. 7, when the second user finds that the link node 3 in the operation link is an abnormal node by observing the operation link of the first user, the displayed link node 3 may be clicked on the terminal interface, the terminal responds to the click operation of the second user, sends the first viewing request to the device of the test application, and the device of the test 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, and the second user analyzes the operation event in the link node 3 and the response information of the operation event and positions the position of the abnormality in the target application.
In a possible implementation manner, after the device for testing the application constructs the operation link, a second viewing request sent by the terminal is received, the second viewing request is used for indicating to view log information associated with the target link node, and the second viewing request is sent by the terminal after a second operation input by a second user is detected. And the device for testing the application sends the position information of the log information associated with the target link node in the log system to the terminal.
In a specific implementation, the second operation may be a click, a double click, a long press, or the like. The second user may view log information associated with any one of the link nodes in the operational link. When the second user finds that the abnormal node exists in the operation link by observing the operation link of the first user, the abnormal node in the operation link can be double-clicked, and the position information of the log information associated with the abnormal node in the log system can be obtained from the device for testing the application. And then acquiring log information associated with the abnormal node from the log system according to the position information, and then analyzing the log information associated with the abnormal node to locate the position where the abnormality occurs in the target application.
Illustratively, as shown in fig. 8, when the second user finds that the link node 4 in the operation link is an abnormal node by observing the operation link of the first user, the displayed link node 4 may be double-clicked on the terminal interface, the terminal sends a second viewing request to the device of the test application in response to the double-click operation of the second user, and the device of the test 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 from the log system according to the position information of the log information associated with the link node 4 in the log system, and the second user analyzes the log information associated with the link node 4 and locates the position where the abnormality occurs in the target application.
When the operation link is displayed for the second user, the query operation of the second user on the link node is supported, the operation data and the log information of the link node are obtained, the second user can be familiar with the function of the target application conveniently, and the abnormal position is positioned.
In order to better explain the embodiment of the present application, the following describes, with reference to a specific implementation scenario, a process of constructing an operation link, and performing exception location and target application test based on the operation link, where the method includes the steps of interactively executing a first terminal device, a second terminal device, and a server, and specifically includes:
the first terminal device automatically carries out standardized point burying in each page of the target application, wherein the point burying is used for monitoring the life cycle of the page, operation behaviors and system function abnormity, the life cycle of the page comprises opening, updating and closing, the operation behaviors comprise clicking, long pressing and sliding, and the system function abnormity comprises JS errors, interface errors and other abnormity. When any one of the life cycle of the page, the operation behavior and the system function abnormity is triggered, the embedded point monitors and automatically generates embedded point data and reports the embedded point data to the server. The server analyzes the buried point data to obtain an operation link, and then sends the operation link to the second terminal device for visual display, wherein the displayed content comprises data in the user real-time operation link and the link node, and meanwhile, operation link query, log information query and the like are supported, as shown in fig. 9.
When the system is abnormal, the server can automatically locate the position where the abnormality occurs in the target application, and the second user on the second terminal device side can also locate the position where the abnormality occurs in the target application.
In the first mode, when determining that a target node with response information being error report information exists in each link node of an operation link, the server positions the position of an abnormality occurring in the target application according to an operation event in the abnormal node and the response information of the operation event.
And in the second mode, the second user can click the abnormal node in the operation link to acquire the operation event in the abnormal node and the response information of the operation event from the server when observing the operation link displayed by the second terminal device and finding that the abnormal node exists in the operation link. And then analyzing the operation event in the abnormal node and the response information of the operation event, and positioning the position of the abnormality in the target application.
When the target application is updated, the new version of the target application is released in a gray scale mode, that is, the target application of the new version is used by a part of first users, and the other part of the first users continue to use the target application of the old version, as shown in fig. 10, the embedded point data of the first users in the target application of the old version and the embedded point data of the target application of the new version are obtained and reported to the server, and the server analyzes the embedded point data to obtain the old operation link and the new operation link of the first users. The server may compare the old operational link and the new operational link of the first user to obtain the updated test result of the 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 may compare the old operational link with the new operational link to determine the test result for the target application.
In the embodiment of the application, the operation link of the user is constructed based on the operation event of the user, the response information of the operation event and the operation time, so that the abnormal condition of the target application can be timely known through the operation link, and when the abnormality occurs, the position where the abnormality occurs in the target application can be located based on the abnormal node in the operation link, and the user does not need to upload a log, so that the efficiency of the abnormal location is improved. By comparing the operation links of the user in the target applications of the new and old versions, the test result of the target application during version updating can be visually obtained, the accuracy of version testing is improved, defects possibly existing after the target application is released can be timely found, and the effect of application testing is improved.
Based on the same technical concept, the embodiment of the present application provides an apparatus for testing an application, as shown in fig. 11, the apparatus 1100 for testing an application includes:
an obtaining module 1101, configured to obtain an operation event, response information of the operation event, and operation time of a first user in each page of a target application;
a constructing module 1102, configured to construct link nodes by using each operation event and response information of each operation event, and sequence the link nodes according to the operation time to obtain an operation link of the first user;
a processing module 1103, configured to, when the target application is updated, compare an operation link of the first user in the target application before the update with an operation link of the first user in the updated target application, and obtain a test result of the updated target application.
Optionally, a positioning module 1104 is further included;
the positioning module 1104 is configured to determine a target node as an abnormal node when a target node exists in each link node of the operation link, where response information of the target node is error report information; and positioning the position of the abnormality in the target application according to the abnormal node.
Optionally, the positioning module 1104 is specifically configured to:
acquiring an operation event in the abnormal node and response information of the operation event;
and positioning the abnormal position in the target application according to the operation event in the abnormal node and the response information of the operation event.
Optionally, the positioning module 1104 is specifically configured to:
obtaining log information associated with the abnormal node from a log system, wherein the log system comprises log information associated with each link node in the operation link;
and positioning the abnormal position in the target application according to the log information associated with the abnormal node.
Optionally, the positioning module 1104 is specifically configured to:
determining a previous link node of the abnormal node and a next link node of the abnormal node from the operation link;
and positioning the position of the abnormality in the target application according to the abnormal node, the previous link node of the abnormal node and the next link node of the abnormal node.
Optionally, the obtaining module 1101 is specifically configured to:
and acquiring an operation event, response information of the operation event and operation time of the first user in each page of the target application through a buried point in each page of the target application.
Optionally, the processing module 1103 is further configured to:
and sending the operation link of the first user to a terminal for displaying.
Optionally, the processing module 1103 is further configured to:
receiving a first viewing request sent by the terminal, wherein the first viewing request is used for indicating viewing of a target link node, and the first viewing request is sent by the terminal after a first operation input by a second user is detected;
and sending the operation event in the target link node and response information of the operation event to the terminal.
Optionally, the processing module 1103 is further configured to:
receiving a second viewing request sent by the terminal, wherein the second viewing request is used for indicating to view the log information associated with the target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user;
and sending the position information of the log information associated with the target link node in the log system to the terminal.
Based on the same technical concept, the embodiment of the present application provides a computer device, as shown in fig. 12, including at least one processor 1201 and a memory 1202 connected to the at least one processor, where a specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present application, and the processor 1201 and the memory 1202 in fig. 12 are connected through a bus as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present application, the memory 1202 stores instructions executable by the at least one processor 1201, and the at least one processor 1201 can execute the steps included in the method for testing an application by executing the instructions stored in the memory 1202.
The processor 1201 is a control center of the computer device, and may connect various parts of the computer device by using various interfaces and lines, and locate a position where an exception occurs in the target application and test the target application by executing or executing instructions stored in the memory 1202 and calling 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 handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above 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, or in some embodiments, they may be implemented separately on separate chips.
The processor 1201 may 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, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 1202, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1202 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 1202 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1202 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when the program is run on the computer device, causes the computer device to perform the steps of the method for testing an application.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such 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 such modifications and variations.

Claims (10)

1. A method of testing an application, comprising:
acquiring an operation event, response information of the operation event and operation time of a first user in each page of a target application;
constructing link nodes by adopting each operation event and response information of each operation event, and sequencing the link nodes according to the operation time to obtain an operation link of the first user;
when the target application is updated, comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating, and obtaining the test result of the target application after updating.
2. The method of claim 1, further comprising:
when a target node with response information being error reporting information exists in each link node of the operation link, determining the target node as an abnormal node;
and positioning the position of the abnormality in the target application according to the abnormal node.
3. The method of claim 2, wherein locating the location of the anomaly in the target application based on the anomaly node comprises:
acquiring an operation event in the abnormal node and response information of the operation event;
and positioning the abnormal position in the target application according to the operation event in the abnormal node and the response information of the operation event.
4. The method of claim 2, wherein locating the location of the anomaly in the target application based on the anomaly node comprises:
obtaining log information associated with the abnormal node from a log system, wherein the log system comprises log information associated with each link node in the operation link;
and positioning the abnormal position in the target application according to the log information associated with the abnormal node.
5. The method of claim 2, wherein locating the location of the anomaly in the target application based on the anomaly node comprises:
determining a previous link node of the abnormal node and a next link node of the abnormal node from the operation link;
and positioning the position of the abnormality in the target application according to the abnormal node, the previous link node of the abnormal node and the next link node of the abnormal node.
6. The method of claim 1, wherein the obtaining of the operation event, the response information of the operation event, and the operation time of the first user in each page of the target application comprises:
and acquiring an operation event, response information of the operation event and operation time of the first user in each page of the target application through a buried point in each page of the target application.
7. The method of any of claims 1 to 5, further comprising:
and sending the operation link of the first user to a terminal for displaying.
8. The method of claim 7, further comprising:
receiving a first viewing request sent by the terminal, wherein the first viewing request is used for indicating viewing of a target link node, and the first viewing request is sent by the terminal after a first operation input by a second user is detected;
and sending the operation event in the target link node and response information of the operation event to the terminal.
9. The method of claim 7, further comprising:
receiving a second viewing request sent by the terminal, wherein the second viewing request is used for indicating to view the log information associated with the target link node, and the second viewing request is sent by the terminal after detecting a second operation input by a second user;
and sending the position information of the log information associated with the target link node in the log system to the terminal.
10. An apparatus for testing an application, comprising:
the acquisition module is used for acquiring operation events, response information of the operation events and operation time of the first user in each page of the target application;
the construction module is used for constructing link nodes by adopting each operation event and the response information of each operation event, sequencing each link node according to the operation time and obtaining the operation link of the first user;
and the processing module is used for comparing the operation link of the first user in the target application before updating with the operation link of the first user in the target application after updating when the target application is updated, and obtaining the test result of the updated target application.
CN202010696973.9A 2020-07-20 2020-07-20 Method and device for testing application Pending CN111897723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010696973.9A CN111897723A (en) 2020-07-20 2020-07-20 Method and device for testing application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010696973.9A CN111897723A (en) 2020-07-20 2020-07-20 Method and device for testing application

Publications (1)

Publication Number Publication Date
CN111897723A true CN111897723A (en) 2020-11-06

Family

ID=73191067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010696973.9A Pending CN111897723A (en) 2020-07-20 2020-07-20 Method and device for testing application

Country Status (1)

Country Link
CN (1) CN111897723A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631869A (en) * 2020-12-28 2021-04-09 深圳市彬讯科技有限公司 Page loading data monitoring method and device, computer equipment and storage medium
CN113986770A (en) * 2021-12-27 2022-01-28 深圳市明源云科技有限公司 User system upgrading method, device, equipment and medium based on artificial intelligence

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631869A (en) * 2020-12-28 2021-04-09 深圳市彬讯科技有限公司 Page loading data monitoring method and device, computer equipment and storage medium
CN113986770A (en) * 2021-12-27 2022-01-28 深圳市明源云科技有限公司 User system upgrading method, device, equipment and medium based on artificial intelligence
CN113986770B (en) * 2021-12-27 2022-04-22 深圳市明源云科技有限公司 User system upgrading method, device, equipment and medium based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN107391379B (en) Automatic interface testing method and device
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN105553769B (en) A kind of data acquisition and analysis system and method
Syer et al. Leveraging performance counters and execution logs to diagnose memory-related performance issues
CN109302522B (en) Test method, test device, computer system, and computer medium
CN111897723A (en) Method and device for testing application
CN110768872B (en) Inspection method, system, device, computer equipment and storage medium
CN107992409B (en) Test case generation method and device, computer equipment and storage medium
CN105577472A (en) Data acquisition test method and device
Holl et al. Mobile application quality assurance
WO2020096665A2 (en) System error detection
US11436133B2 (en) Comparable user interface object identifications
CN112799940A (en) Regression testing method, device, computer system and computer readable storage medium
CN112817831A (en) Application performance monitoring method, device, computer system and readable storage medium
US9317416B2 (en) Merging automated testing reports
CN111597069A (en) Program processing method, program processing apparatus, electronic device, and storage medium
CN109067605B (en) Storage subsystem fault diagnosis method and device, terminal and storage medium
CN111026647A (en) Code coverage rate obtaining method and device, computer equipment and storage medium
CN113918864A (en) Website page testing method, testing system, testing device, electronic equipment and medium
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN112631905A (en) Execution process data management method and device, computer equipment and storage medium
CN113259152A (en) Network diagnosis method, network diagnosis device, electronic equipment and storage medium
CN112148618A (en) Buried point testing method and buried point testing platform
CN112860556A (en) Coverage rate statistical method, coverage rate statistical device, computer system and readable storage medium
CN112835779A (en) Test case determination method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination