Test method and device, electronic equipment and storage medium

Through traffic recording and playback technology, the user's operation path and problem page are recorded and reproduced, and the specific situation of the user's operation path and problem page are solved, and the problem of low efficiency of reproducing problems is achieved, achieving rapid and accurate problem investigation and resolution.

CN119902984APending Publication Date: 2025-04-29HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411989912.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Technicians are less efficient when reproducing application problems encountered by users, and it is difficult to quickly and accurately reproduce the specific situation of the user's operation path and problem page.

Method used

Through traffic recording technology, users' operation paths and related interface data, static resources and cache data are recorded to generate complete test data; subsequently, users' operations are reproduced on any brand, model, system version, and application version of devices through traffic playback technology.

Benefits of technology

Ensure the completeness and accuracy of the user's operation path, enable technicians to quickly and accurately reproduce the problems encountered by users, and improve the efficiency of problem investigation and resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902984A_ABST
    Figure CN119902984A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test method and device, electronic equipment and a storage medium. The method comprises the steps of opening a first page of an application program in response to a flow recording starting operation for the application program; in response to at least one test operation for the application program, obtaining interface data generated by each test operation; in response to a traffic recording ending operation for the application program, obtaining test data of a second page, the second page being a page where the application program is located when traffic recording is ended, and the test data of the second page being a page where the application program is located when traffic recording is ended; the test data of the second page comprises static resources required by the second page, cache data required by the second page, interface data generated by test operation related to the second page and a user operation path, and the user operation path is used for representing at least one page passed in the process of jumping from the first page to the second page. Therefore, the real and complete user operation path can be quickly reproduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of testing technology. More specifically, the embodiments of the present disclosure relate to a testing method, a testing device, an electronic device and a storage medium. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] If a user encounters a problem while using an application product, they can usually provide feedback to customer service through text descriptions, page screenshots, screen recordings, etc. After receiving user feedback, customer service can try to help the user solve the problem, or give a secondary description of the user's problem and submit it to the technical staff. After receiving user feedback or a customer service ticket, the technical staff can first try to manually reproduce the problem encountered by the user based on the original description from the user or the secondary description from the customer service, and then troubleshoot and fix the problem. It can be seen that the efficiency of technical staff in reproducing problems is low, which in turn leads to low efficiency in technical staff in troubleshooting and solving problems. Summary of the invention

[0004] In a first aspect of an embodiment of the present disclosure, a testing method is provided, comprising: in response to a start traffic recording operation for an application, opening a first page of the application; in response to at least one test operation for the application, obtaining interface data generated by each test operation, the interface data comprising interface request data and interface response data; in response to an end traffic recording operation for the application, obtaining test data for a second page, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data for the second page comprises static resources required for the second page, cached data required for the second page, interface data generated by test operations related to the second page, and a user operation path, wherein the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

[0005] In a second aspect of the disclosed embodiment, a testing device is provided, comprising: a start recording module, for opening a first page of an application in response to a start traffic recording operation for the application; an acquisition module, for obtaining interface data generated by each test operation in response to at least one test operation for the application, the interface data comprising interface request data and interface response data; an end recording module, for obtaining test data of a second page in response to an end traffic recording operation for the application, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page comprises static resources required for the second page, cached data required for the second page, interface data generated by test operations related to the second page, and a user operation path, wherein the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

[0006] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the test method.

[0007] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the test method is implemented.

[0008] In a fifth aspect of the embodiments of the present disclosure, a program product is provided, including a program code. When the program code is run on an electronic device, the program code is used to enable the electronic device to execute the test method.

[0009] The above embodiments of the present disclosure have at least the following beneficial effects:

[0010] On the one hand, by responding to the start traffic recording operation for the application, the first page of the application is automatically opened, and the user operation path is recorded from the first page. Compared with the page where the user decides to start recording by himself, the integrity of the user operation path in the test data can be guaranteed, which is conducive to the subsequent successful reproduction of the real and complete user operation path, and facilitates the troubleshooting and resolution of problems encountered by users.

[0011] On the other hand, by recording the static resources required for the second page, the cached data required for the second page, and the interface data generated by the test operations related to the second page in the test data of the second page, compared to the method of manually reproducing by referring to the user description, the test operations related to the second page can be reproduced through traffic playback based on the test data of the second page on electronic devices of any brand, model, system version, and application version, thereby allowing technicians to experience application behaviors and interactions consistent with users. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0013] Figure 1 It is a schematic diagram of a customer service work order provided by an exemplary embodiment.

[0014] Figure 2 is a flow chart of a testing method provided by an exemplary embodiment;

[0015] Figure 3 is a schematic diagram of a flow recording process provided by an exemplary embodiment;

[0016] Figure 4 is a block diagram of a testing device provided by an exemplary embodiment;

[0017] Figure 5 is a schematic diagram of a readable storage medium corresponding to a test method provided by an exemplary embodiment;

[0018] Figure 6 It is a schematic diagram of an electronic device capable of implementing the above method provided by an exemplary embodiment.

[0019] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0020] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0021] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method, computer-readable storage medium, or program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0022] According to an embodiment of the present disclosure, a testing method, a device, an electronic device and a storage medium are proposed.

[0023] In this document, it should be understood that any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning. In addition, the data involved in this disclosure may be data authorized by the user or fully authorized by all parties.

[0024] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.

[0025] Application Scenario Overview

[0026] In some embodiments, if a user encounters a problem while using an application product, the user can usually provide feedback to customer service based on text descriptions, page screenshots, screen recordings, etc. After receiving user feedback, the customer service can make a secondary description of the user's problem and submit it to the technical staff. After receiving user feedback or a customer service work order, the technical staff can first try to manually reproduce the problem encountered by the user based on the original description from the user or the secondary description from the customer service, and then troubleshoot and repair the problem. Among them, when the technical staff tries to manually reproduce the problem encountered by the user, they need to first prepare a terminal device of the same brand and model as the user, the same system version, and the same application version, and then try to reproduce the user's operation based on the user's text description, screen recording, etc., in order to reproduce the problem encountered by the user.

[0027] For example, Figure 1 FIG. 1 is a schematic diagram of a customer service work order provided by an exemplary embodiment. Figure 1 As shown, the user's original description is "When checking what songs others are listening to, the song I am listening to is always displayed. I have to click into the details page to see what others are listening to. The problematic screen recording file uploaded by the user." The customer service's secondary description is "Check the other party's homepage, the status on it shows the songs I am listening to, and the user clicks in to see the songs the other party is listening to. Guiding to clear the cache, still wrong. APP version number 9.1.81. System version iPhone17.3.".

[0028] In the above embodiment, the original text description of the user feedback may be unclear or inaccurate, and the screen recording file or screenshot uploaded by the user may not accurately reflect the problem. The secondary description of the customer service may also be unclear, inaccurate, or miss key points. In this case, it is difficult for the technician to quickly reproduce the problem encountered by the user based on the user feedback or customer service work order, which leads to low efficiency in solving the problem for the technician.

[0029] For example, if a user first enters page B from page A, authorizes member information in page B, and then enters page C from page B after authorization, page C can be used normally. However, if the user jumps from page B to page C without authorizing member information, page C cannot be used normally. The problem recording file uploaded by the user may only record the scenario where page C cannot be used normally after entering page C from page B. Therefore, it is difficult for the technician to quickly reproduce the problem based on the user's original feedback on the abnormality of page C, and locate the cause of the problem as the user did not authorize member information in page B.

[0030] In addition, for some occasional problems or problems that have been fixed when technicians try to reproduce, it is difficult for technicians to reproduce the problems encountered by users based on user feedback or customer service tickets.

[0031] It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario. SUMMARY OF THE INVENTION

[0033] In view of this, this manual provides a technical solution for testing based on traffic recording and traffic playback, which allows technicians to quickly reproduce the problems encountered by users.

[0034] The core concept of this manual is that during the process of traffic recording, not only the real and complete user operation path can be recorded, but also the client static resources, client cache data, interface request data and interface response data related to the problem page can be recorded; in the subsequent process of traffic playback, there are no special requirements for the brand, model, system version and application version of the playback device. By performing traffic playback on the test data obtained by traffic recording, user operations can be quickly reproduced.

[0035] In some embodiments of the present disclosure, in response to a start traffic recording operation for an application, a first page of the application is opened; in response to at least one test operation for the application, interface data generated by each test operation is obtained, the interface data including interface request data and interface response data; in response to an end traffic recording operation for the application, test data of a second page is obtained, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page includes static resources required for the second page, cached data required for the second page, interface data generated by test operations related to the second page, and a user operation path, wherein the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

[0036] Through the above method, on the one hand, by responding to the start traffic recording operation for the application, the first page of the application is automatically opened, and the user operation path is recorded from the first page. Compared with the page where the user decides to start recording by himself, the integrity of the user operation path in the test data can be guaranteed, which is conducive to the subsequent successful reproduction of the real and complete user operation path, and facilitates the troubleshooting and resolution of problems encountered by users.

[0037] On the other hand, by recording the static resources required for the second page, the cached data required for the second page, and the interface data generated by the test operations related to the second page in the test data of the second page, compared to the method of manually reproducing by referring to the user description, the test operations related to the second page can be reproduced through traffic playback based on the test data of the second page on electronic devices of any brand, model, system version, and application version, thereby allowing technicians to experience application behaviors and interactions consistent with users.

[0038] Exemplary Methods

[0039] The technical concept of this specification is described in detail below through specific embodiments.

[0040] One or more embodiments shown in the present disclosure may be applied to a terminal. In some embodiments, the present disclosure may be executed by a traffic recording and playback program or a test program deployed on the terminal and independent of the application being tested, or may be executed by a traffic recording and playback function module or a test module embedded in the application being tested.

[0041] One or more embodiments shown in the present disclosure may be applied to a server. In some embodiments, the present disclosure may be executed by a traffic recording and playback service or a test service deployed on a server, or may be executed by a middleware. A terminal may call the above-mentioned traffic recording and playback service, test service or middleware to complete the test method shown in the present disclosure.

[0042] In the embodiments of the present disclosure, the server may include a server, a server cluster formed by multiple servers, or a cloud server. The server may be an independent physical server, a server cluster or a 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0043] In the embodiments of the present disclosure, the terminal may be an electronic device used by a user, and may specifically include but is not limited to a smart phone, a desktop computer, a tablet computer, a laptop computer, an e-book reader, a smart watch, a smart bracelet, and other electronic devices with certain computing capabilities.

[0044] In the implementation manner of the present disclosure, the terminal and the server may be directly or indirectly connected via wired communication or wireless communication, and the present disclosure does not impose any special limitation thereto.

[0045] The following first describes the traffic recording process shown in the present disclosure.

[0046] See also Figure 2 , Figure 2 1 is a flow chart of a testing method provided by an exemplary embodiment. The method may include the following steps:

[0047] Step S201: In response to a start traffic recording operation for an application, a first page of the application is opened.

[0048] Among them, the operation of starting traffic recording for the application may include but is not limited to: triggering the start recording option or the problem feedback option within the tested application; or, the test application and the tested application are independent of each other, the tested application is selected within the test application, and the start recording option or the problem feedback option is triggered.

[0049] In order to ensure the integrity of the user operation path in the test data, and thus ensure the consistency of the user experience when the subsequent technicians reproduce it, the first page can be the home page of the application.

[0050] For example, in response to a user clicking a “Feedback” button in application #1, a start recording operation for application #1 may be detected, and the homepage of application #1 may be opened.

[0051] In some possible implementations, in order to ensure the security of user privacy data, before opening the first page of the application, it is necessary to obtain traffic recording authorization for the application.

[0052] For example, in response to the user clicking the "Problem Feedback" button in application #1, the user may first be prompted to confirm whether to enter the traffic recording process, and may also be prompted to obtain local files used in the traffic recording process and interface data generated during the traffic recording process, and may also be prompted to record the screen; if the user confirms to enter the traffic recording process and agrees to grant traffic recording permissions for the application, the homepage of application #1 may be opened and the traffic recording process may be performed.

[0053] Step S202: In response to at least one test operation on the application, interface data generated by each test operation is obtained, where the interface data includes interface request data and interface response data.

[0054] The test operation may include at least one of the following: opening a page; clicking an element; or sliding an element. The elements that are clicked or slid may include, but are not limited to, buttons, options, floating windows, pages, and the like.

[0055] For example, after opening the homepage of application #1, in response to a click operation on the banner on the homepage, the interface request data and interface response data generated by this banner click operation can be obtained; in response to a jump operation on page B on the homepage, the page can be jumped from the homepage to page B, and the interface request data and interface response data generated by this page opening operation can be obtained; in response to a sliding operation on page B on page B, the interface request data and interface response data generated by this sliding page operation can be obtained, etc., until the end of recording operation for application #1 is detected.

[0056] In some possible implementations, the interface request data and interface response data generated by each test operation can be obtained through the network interception middleware. Network interception middleware refers to a tool or library for intercepting, checking, and modifying network requests sent by an application and network responses received. Network interception middleware can be used to implement functions such as logging, security checks, performance monitoring, data caching, and flow control. For example, on the Android platform, the network interception middleware OkHttpInterceptors can be used to intercept and modify requests sent by the OkHttp library and responses received. For example, on the iOS platform, URLProtocol can be used to intercept and process specific URL requests. It should be noted that the above is merely an exemplary description of the network interception middleware used, and the present disclosure does not specifically limit this.

[0057] Step S203: In response to the end traffic recording operation for the application, the test data of the second page is obtained, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page includes static resources required for the second page, cached data required for the second page, interface data generated by the test operation related to the second page, and a user operation path, and the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

[0058] For example, in response to the end of the traffic recording operation for the application, the current page of the application is page C, and the static resources required by page C, the cache data required by page C, the interface data generated by the test operation related to page C, and the user operation path can be packaged as the test data of page C. Among them, the user operation path can be "home page → page B → page C". In some possible implementations, the pages visited by the user during the traffic recording process can be recorded by exposing the buried points.

[0059] Static resources refer to files that do not change frequently in an application, including image files, style sheet files, script files, font files, and multimedia files. These files are stored as static files on the server and can be directly referenced in a web page or application through a URL. Static resources usually do not contain dynamically generated content, and they usually do not change frequently during the life cycle of an application.

[0060] The cache data refers to data dynamically generated and cached in the terminal. The cache data may also include local files of the terminal used by the application.

[0061] In the above embodiment, static resources and cached data may be stored in a page format.

[0062] In the above embodiment, the static resources or cached data of the second page include not only resource files corresponding to the dedicated components of the second page, but also resource files corresponding to the common components reused by the second page, wherein the common components may be components reused by multiple pages of the application.

[0063] In some possible implementations, the test data of the second page also includes static resources required by other pages in the user operation path except the second page, cache data required by other pages, and interface data generated by test operations related to other pages.

[0064] For example, if the user operation path is "Homepage→Page B→Page C", the test data of Page C may include the static resources required for the homepage, the static resources required for Page B, the static resources required for Page C, the cached data required for the homepage, the cached data required for Page B, the cached data required for Page C, the interface request data and interface response data (if any) generated by the test operations related to the homepage, the interface request data and interface response data (if any) generated by the test operations related to Page B, the interface request data and interface response data generated by the test operations related to Page C, and the user operation path.

[0065] In the above embodiment, if the test data of the second page does not include the static resources required by other pages in the user operation path, the cache data required by other pages, and the interface data generated by the test operations related to other pages, the data volume of the test data of the second page can be reduced while ensuring the realization of traffic playback, which is conducive to reducing the storage cost and processing cost of the test data. If the test data of the second page includes the static resources required by each page in the user operation path, the cache data required by each page, and the interface data generated by the test operations related to each page, the integrity and accuracy of the test data can be ensured, which is convenient for further reuse of the test data later.

[0066] In some possible implementations, in order to facilitate the technicians to more intuitively determine the interactive effect of each test operation, the test data of the second page may also include a page screenshot. In this case, before responding to any test operation on the application, a screenshot of the page where the application is currently located is taken; after responding to any test operation on the application, a screenshot of the page where the application is currently located is taken.

[0067] For example, after opening the homepage of application #1, in response to a click operation on the banner on the homepage, you can first take a screenshot of the homepage, then respond to the click event on the banner, and then take a screenshot of the homepage again; in response to a jump operation on page B on the homepage, you can first take a screenshot of the homepage, then respond to the jump operation on page B, and then take a screenshot of page B again.

[0068] In some possible embodiments, since it is difficult for technicians to determine how the user achieved the operation by merely referring to different page screenshots, in order to facilitate technicians to more intuitively determine the test operations of the user on each page, the elements being operated can be marked. For example, when the test operation is a click element operation, first mark the element being clicked, and then take a screenshot of the page where the application is currently located.

[0069] Among them, marking the element can include, but is not limited to: highlighting the background of the element; adding marks such as arrows to the element; flashing the element, etc., which cannot be listed one by one here.

[0070] In some possible embodiments, in order to ensure the security of the user's privacy data, before reporting the test data of the second page, it is necessary to first obtain the reporting authorization for the test data of the second page.

[0071] For example, in response to the end traffic recording operation for the application, if the current page of the application is page C, the user can be prompted to determine whether to report the test data of page C, and the user can also be prompted about what information the test data of page C specifically involves, especially what privacy information it involves; if the user determines to report the test data of page C and agrees to grant the reporting right for the test data of page C, then the test data of page C can be reported to the server.

[0072] In some possible embodiments, in order to ensure the security of the user's privacy data, before reporting the test data of the second page, desensitization processing can be performed on the privacy data involved or some test data that the user expects to keep confidential. In this case, in response to the desensitization operation for the target data, the target data included in the test data of the second page is replaced.

[0073] For example, the target data can include the user's name and ID number. After obtaining the test data of page C, in response to the desensitization operation for the target data, the user's name included in the test data of page C can be replaced with "A", and the ID number included in the test data of page C can be replaced with "******************". It should be noted that regarding the specific target data and the fields used to replace the target data, the above is only an exemplary description, and the present disclosure does not limit this.

[0074] The following combines Figure 3 to describe the traffic recording process exemplarily. Figure 3 is a schematic diagram of the traffic recording process provided by an exemplary embodiment.

[0075] As Figure 3As shown, in response to a start traffic recording operation for an application, a traffic recording authorization for the application may be obtained.

[0076] After successful authorization, you can open page A of the application, record the interface data of the page opening request, and take a screenshot of page A. Record the user operation path as "page A". Record the static resources required for page A and the cached data required for page A. Perform test operations in page A, such as sliding page A, taking a screenshot of page A before sliding down, responding to the slide event of page A, recording the interface data of the slide request, and taking a screenshot of page A. For example, click element 1, annotate element 1, take a screenshot of page A, respond to the click event on element 1, record the interface data of the click request, and take a screenshot of page A.

[0077] Jump from page A to page B, record the interface data of the page opening request, and take a screenshot of page B. Record the user operation path as "page A→page B". Record the static resources required by page B and the cached data required by page B. Perform test operations in page B, such as clicking element 2, annotating element 2, taking a screenshot of page B, responding to the click event on element 2, recording the interface data of the click request, and taking a screenshot of page B.

[0078] Jump from page B to page C, record the interface data of the page opening request, and take a screenshot of page C. Record the user operation path as "page A→page B→page C". Record the static resources required for page C and the cache data required for page C. Perform test operations in page C, such as clicking element 3, annotating element 3, taking a screenshot of page C, responding to the click event on element 3, recording the interface data of the click request, and taking a screenshot of page C.

[0079] In response to the end of the traffic recording operation, the test data of page C is obtained. If necessary, the target data in the test data can be desensitized. The (desensitized) test data of page C is reported.

[0080] The following continues to describe the traffic playback process shown in the present disclosure.

[0081] In some possible implementations, it is supported to perform traffic playback of the test data of the second page on any terminal equipped with the tested application by pushing a playback task. In this case, a playback task notification pushed by the server can be received, and the playback task notification is used to instruct to perform traffic playback of the test operation related to the second page; further, the test data of the second page can be downloaded.

[0082] In some possible implementations, it is supported to create a playback task in the form of a graphic code, and the user can obtain the playback task by scanning the code on a terminal equipped with the tested application. In this case, in response to the scanning operation on the graphic code, the download address of the test data on the second page can be obtained; the test data on the second page is downloaded from the download address. The graphic code may include but is not limited to a barcode, a QR code, etc.

[0083] In some possible implementations, after obtaining the test data of the second page, playback task 2 can be performed. In this case, the test data of the second page can be obtained; the second page can be opened according to the static resources required by the second page and the cached data required by the second page; and the test operations related to the second page are replayed in the second page according to the interface data generated by the test operations related to the second page. Among them, the test operations related to the second page are replayed in the second page according to the interface data generated by the test operations related to the second page, including: using the interface request data generated by the test operations related to the second page to initiate a request to the middleware; using the interface response data generated by the test operations related to the second page as the response returned by the middleware.

[0084] For example, after downloading the test data of page C, the environment of the tested application can be configured according to the static resources required by page C and the cached data required by page C, and page C can be opened with the data required by page C (such as the interface request data and interface response data for opening the operation of page C); further, according to the interface data generated by the test operation related to page C, the interface request data can be used in page C to initiate a request to the network interception middleware, and the interface response data included in the test data can be used as the response returned by the network interception middleware to achieve traffic playback of the test operation related to page C. It should be noted that during the traffic playback process, a request is sent to the network interception middleware instead of initiating a real request to the real interface. Accordingly, since no real request is initiated, the network interception middleware can return the interface response data included in the test data as a response.

[0085] In some possible implementations, if the test data of the second page includes the static resources required for each page in the user operation path, the cached data required for each page, and the interface data generated by the test operations related to each page, the traffic of the test operations related to the page can be replayed in each page, which is not elaborated here.

[0086] In some possible implementations, in order to facilitate the technicians to more intuitively determine the interactive effect of each test operation during the traffic playback process, the playback result of the second page may also include a page screenshot. In this case, before the traffic playback of any test operation related to the second page is performed, a screenshot of the page where the application is currently located is taken; after the traffic playback of any test operation related to the second page is performed, a screenshot of the page where the application is currently located is taken; wherein, for any test operation, the page screenshot obtained during the traffic recording process is inconsistent with the page screenshot obtained during the traffic playback process, indicating that the reproduction of this test operation has failed.

[0087] In some possible implementations, since it is difficult for technicians to determine what operations the user has performed by referring only to different page screenshots, in order to facilitate technicians to more intuitively determine the user's test operations in each page, the operated elements can be marked.

[0088] Regarding the specific implementation method of page screenshots, for parts not described in detail, please refer to the page screenshots during the traffic recording process in the previous article, which will not be repeated here.

[0089] In some possible implementations, displaying and viewing a list of recorded test data is supported.

[0090] In some possible implementations, it is supported to add test data of multiple pages to a playback task to implement batch traffic playback.

[0091] In some possible implementations, the support technician modifies the recorded test data and verifies whether the problem encountered by the user has been solved based on the modified test data, or performs regression verification on the new function of the tested application based on the modified test data.

[0092] Exemplary Devices

[0093] In an exemplary embodiment of the present disclosure, a testing device is also provided.

[0094] See also Figure 4 , Figure 4 is a block diagram of a testing device provided by an exemplary embodiment.

[0095] like Figure 4 As shown, the test device 400 may include: a start recording module 401, an acquisition module 402 and an end recording module 403. Among them:

[0096] In some embodiments, the start recording module is used to open the first page of the application in response to a start traffic recording operation for the application; the acquisition module is used to obtain interface data generated by each test operation in response to at least one test operation for the application, and the interface data includes interface request data and interface response data; the end recording module is used to obtain test data of the second page in response to an end traffic recording operation for the application, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page includes static resources required by the second page, cached data required by the second page, interface data generated by test operations related to the second page, and a user operation path, and the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

[0097] In some embodiments, the test operation includes at least one of the following: opening a page operation; clicking an element operation; or sliding an element operation.

[0098] In some embodiments, the test data of the second page also includes a page screenshot; the device also includes a recording and screenshot module; the recording and screenshot module is used to take a screenshot of the page where the application is currently located before responding to any test operation for the application; the recording and screenshot module is used to take a screenshot of the page where the application is currently located after responding to any test operation for the application.

[0099] In some embodiments, when the test operation is an element click operation, the device further includes a marking module; the marking module is used to mark the clicked element.

[0100] In some embodiments, the test data of the second page also includes static resources required by other pages in the user operation path except the second page, cache data required by the other pages, and interface data generated by test operations related to the other pages.

[0101] In some embodiments, the device further includes an authorization obtaining module; the authorization obtaining module is used to obtain traffic recording authorization for the application; the authorization obtaining module is used to obtain reporting authorization for test data for the second page.

[0102] In some embodiments, the device further includes a data desensitization module; the data desensitization module is configured to replace the target data contained in the test data of the second page in response to a desensitization operation on the target data.

[0103] In some embodiments, the device also includes a traffic replay module; the traffic replay module is used to obtain test data of the second page; the traffic replay module is used to open the second page according to the static resources required by the second page and the cached data required by the second page; the traffic replay module is used to perform traffic replay on the test operations related to the second page in the second page according to the interface data generated by the test operations related to the second page; wherein, the traffic replay on the test operations related to the second page in the second page according to the interface data generated by the test operations related to the second page includes: using the interface request data generated by the test operations related to the second page to initiate a request to the middleware; using the interface response data generated by the test operations related to the second page as the response returned by the middleware.

[0104] In some embodiments, the traffic replay module is used to receive a replay task notification pushed by a server, and the replay task notification is used to instruct traffic replay of test operations related to the second page; the traffic replay module is used to download test data of the second page.

[0105] In some embodiments, the traffic playback module is used to obtain a download address of the test data of the second page in response to a scanning operation on the graphic code; the traffic playback module is used to download the test data of the second page from the download address.

[0106] In some embodiments, the device also includes a playback and screenshot module; the playback and screenshot module is used to take a screenshot of the page where the application is currently located before traffic replay is performed on any test operation related to the second page; the playback and screenshot module is used to take a screenshot of the page where the application is currently located after traffic replay is performed on any test operation related to the second page; wherein, for any test operation, the page screenshot obtained during the traffic recording process is inconsistent with the page screenshot obtained during the traffic playback process, indicating that the reproduction of this test operation has failed.

[0107] The specific details of each module of the above-mentioned testing device 400 have been described in detail in the previous description of the testing method process, so they will not be repeated here.

[0108] It should be noted that, although several modules or units of the test device 400 are mentioned in the above detailed description, such division is not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0109] Exemplary Media

[0110] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to enable the electronic device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0111] See also Figure 5 , Figure 5 It is a schematic diagram of a readable storage medium corresponding to a testing method provided by an exemplary embodiment.

[0112] refer to Figure 5 As shown, a readable storage medium 500 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the readable storage medium of the present disclosure is not limited thereto. In the present disclosure, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0113] The readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0114] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0115] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0116] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0117] Exemplary Electronic Devices

[0118] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned testing method is also provided.

[0119] See also Figure 6 , Figure 6 It is a schematic diagram of an electronic device capable of implementing the above method provided by an exemplary embodiment.

[0120] Refer to the following Figure 6 hereinafter describes an electronic device 600 according to such an embodiment of the present disclosure. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 601, at least one storage unit 602, and a bus 603 connecting different system components (including the storage unit 602 and the processing unit 601).

[0122] The storage unit stores program codes, and the program codes can be executed by the processing unit 601, so that the processing unit 601 executes the steps of the above-mentioned various embodiments of this specification.

[0123] The storage unit 602 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6021 and / or a cache storage unit 6022 , and may further include a read-only storage unit (ROM) 6023 .

[0124] The storage unit 602 may also include a program / utility 6024 having a set (at least one) of program modules 6025, such program modules 6025 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the reality of a network environment.

[0125] Bus 603 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0126] The electronic device 600 may also communicate with one or more external devices 604 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 605. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 606. As shown, the network adapter 606 communicates with other modules of the electronic device 600 via a bus 603. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0127] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0129] It should be noted that, although several units / modules or subunits / modules of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0130] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0131] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A testing method, comprising: In response to a start traffic recording operation for an application, opening a first page of the application; In response to at least one test operation on the application, obtaining interface data generated by each test operation, the interface data including interface request data and interface response data; In response to the end traffic recording operation for the application, test data of the second page is obtained, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page includes static resources required by the second page, cached data required by the second page, interface data generated by the test operation related to the second page, and a user operation path, and the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

2. According to the method of claim 1, the test data of the second page further includes a page screenshot; the method further includes at least one of the following: Before responding to any test operation on the application, taking a screenshot of the page where the application is currently located; After responding to any test operation on the application, a screenshot is taken of the page where the application is currently located.

3. The method according to claim 1, further comprising: In response to the desensitization operation on the target data, the target data included in the test data of the second page is replaced.

4. The method according to claim 1, further comprising: Obtaining test data of the second page; Opening the second page according to the static resources required by the second page and the cached data required by the second page; According to the interface data generated by the test operation related to the second page, replay the traffic of the test operation related to the second page in the second page; Among them, according to the interface data generated by the test operation related to the second page, the test operation related to the second page is replayed in the second page, including: using the interface request data generated by the test operation related to the second page to initiate a request to the middleware; using the interface response data generated by the test operation related to the second page as the response returned by the middleware.

5. The method according to claim 4, wherein obtaining the test data of the second page comprises: Receive a playback task notification pushed by the server, where the playback task notification is used to instruct traffic playback of the test operation related to the second page; Download the test data of the second page.

6. The method according to claim 4, wherein obtaining the test data of the second page comprises: In response to a scanning operation on the graphic code, obtaining a download address of the test data of the second page; Download the test data of the second page from the download address.

7. A testing device, comprising: A start recording module, configured to open a first page of the application in response to a start traffic recording operation for the application; An acquisition module, configured to obtain, in response to at least one test operation on the application, interface data generated by each test operation, wherein the interface data includes interface request data and interface response data; An end recording module is used to obtain test data of a second page in response to an end traffic recording operation for the application, wherein the second page is the page where the application is located when the traffic recording is ended, and the test data of the second page includes static resources required for the second page, cached data required for the second page, interface data generated by test operations related to the second page, and a user operation path, and the user operation path is used to characterize at least one page passed through in the process of jumping from the first page to the second page.

8. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 6.

10. A program product, comprising a program code, wherein when the program code is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods of claims 1-6.