Off-line loading test method, device, equipment, computer readable medium and product

The offline loading test method simplifies and enhances efficiency by installing a target application, collecting online and offline logs, and aggregating them to streamline the testing process, addressing the inefficiencies of existing methods.

CN119149377APending Publication Date: 2024-12-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310722495.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing offline loading test methods are cumbersome and inefficient, requiring tools to capture network requests, client debugging code, and customized test pages, with black box testing being complex and time-consuming.

Method used

An offline loading test method that installs a target application based on web page configuration information, collects online and offline loading logs, and aggregates them to generate a loading test log, simplifying the testing process and avoiding the need for network request capture and customized pages.

Benefits of technology

Simplifies the offline loading test operation and improves efficiency by eliminating the need for tool packet capture and customized test pages, enabling faster and more effective problem identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149377A_ABST
    Figure CN119149377A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an offline loading test method, device and equipment, a computer readable medium and a product. A specific embodiment of the method comprises the steps of installing a target application according to webpage execution configuration information of a target webpage corresponding to the target application; obtaining client webpage configuration information corresponding to the target webpage through the installed target application; loading a target webpage online in the installed target application through the webpage link and the client webpage configuration information so as to collect webpage online loading logs; according to the client webpage configuration information, loading a target webpage in an installed target application in an off-line manner so as to collect a webpage off-line loading log; and summarizing the webpage online loading log and the webpage offline loading log to obtain a loading test log of the target webpage. The embodiment is related to off-line loading, the off-line loading test operation is simplified, the problem positioning mode is simplified, and the off-line test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an offline loading test method, apparatus, device, computer-readable medium, and product. Background Art

[0002] Offline loading technology packages the static resources of the first screen of the page and loads them to the local disk in advance. When loading the page, the resources are directly loaded from the local disk or memory to improve the loading and rendering performance of the H5 page. At present, when testing offline loading technology, the usual methods are: using tools to capture network requests, adding client debugging code, and customizing test pages for testing, and most of them use black box testing.

[0003] However, the inventors have found that when the above-mentioned method is used to test the offline loading technology, the following technical problems often occur: the testing method of the tool to capture network requests, add client debugging code, and customize the test page requires the combination of tools, debugging code, and customized test pages. The operation is relatively cumbersome, and the combined execution of the test method is time-consuming. The black box testing method is more complicated to locate the test problem, and the test efficiency is low.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose an offline load test method, an apparatus, an electronic device, a computer-readable medium, and a computer program product to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide an offline loading test method, which includes: installing the target application according to the web page execution configuration information of the target web page corresponding to the target application, wherein the web page execution configuration information includes the web page link of the target web page; obtaining the client web page configuration information corresponding to the target web page through the installed target application; loading the target web page online in the installed target application through the web page link and the client web page configuration information to collect the online web page loading log; loading the target web page offline in the installed target application according to the client web page configuration information to collect the offline web page loading log; aggregating the online web page loading log and the offline web page loading log to obtain the loading test log of the target web page.

[0008] Optionally, the method further includes: generating a test report based on the above-mentioned loading test log.

[0009] Optionally, before installing the target application according to the web page execution configuration information of the target web page corresponding to the target application, the method further includes: receiving the web page execution configuration information of the target web page corresponding to the target application sent by the trigger end; and sending the current execution task identifier to the trigger end.

[0010] Optionally, the method further includes: sending the test report and the currently executed task identifier to the trigger end.

[0011] Optionally, installing the target application according to the web page execution configuration information of the target web page corresponding to the target application includes: in response to determining that the target application has been installed locally, uninstalling the locally installed target application; and installing the target application according to the web page execution configuration information of the target web page corresponding to the target application.

[0012] Optionally, after installing the target application according to the web page execution configuration information of the target web page corresponding to the target application, the method further includes: logging in a user account in the target application.

[0013] Optionally, the client web page configuration information includes grayscale configuration information, and the grayscale configuration information includes a user account set; and the target web page is loaded offline in the installed target application based on the client web page configuration information, including: in response to determining that the user account set includes a user account logged in in the target application, the target web page is loaded offline in the installed target application.

[0014] Optionally, the target web page is loaded online in the installed target application through the web page link and the client web page configuration information to collect a web page online loading log, including: obtaining the page online loading information of the target web page; generating a web page online loading log according to the page online loading information.

[0015] Optionally, the target web page is offline loaded in the installed target application to collect a web page offline loading log, including: obtaining page offline loading information of the target web page; and generating a web page offline loading log according to the page offline loading information.

[0016] Optionally, the above-mentioned web page online loading log includes performance information, and the above-mentioned web page offline loading log includes performance information and resource information; and the above-mentioned web page online loading log and the above-mentioned web page offline loading log are aggregated and processed to obtain the loading test log of the above-mentioned target web page, including: determining the resource information included in the above-mentioned web page offline loading log as hit detection information; determining performance detection information according to the performance information included in the above-mentioned web page online loading log and the performance information included in the above-mentioned web page offline loading log; determining the above-mentioned hit detection information and the above-mentioned performance detection information as the loading test log of the above-mentioned target web page.

[0017] Optionally, generating a test report based on the above-mentioned loading test log includes: determining basic information corresponding to the above-mentioned target web page, wherein the above-mentioned basic information includes test creation user information, application information and test information; obtaining test process information of the above-mentioned target web page, wherein the above-mentioned test process information includes an online page screenshot set and an offline page screenshot set; generating a test report based on the above-mentioned basic information, the above-mentioned test process information and the hit detection information and performance detection information included in the above-mentioned loading test log.

[0018] In a second aspect, some embodiments of the present disclosure provide an offline loading test device, which includes: an installation unit, configured to install the target application according to the web page execution configuration information of the target web page corresponding to the target application, wherein the web page execution configuration information includes the web page link of the target web page; an acquisition unit, configured to acquire the client web page configuration information corresponding to the target web page through the installed target application; an online loading unit, configured to load the target web page online in the installed target application through the web page link and the client web page configuration information to collect the online web page loading log; an offline loading unit, configured to load the target web page offline in the installed target application according to the client web page configuration information to collect the offline web page loading log; a summarizing unit, configured to summarize the online web page loading log and the offline web page loading log to obtain the loading test log of the target web page.

[0019] Optionally, the offline loading test device further includes: a generating unit configured to generate a test report according to the loading test log.

[0020] Optionally, before the installation unit, the offline loading test device further includes: a receiving unit and a first sending unit. The receiving unit is configured to receive web page execution configuration information of a target web page corresponding to a target application sent by the triggering end. The first sending unit is configured to send a current execution task identifier to the triggering end.

[0021] Optionally, the offline loading test device further includes: a second sending unit, configured to send the test report and the currently executed task identifier to the trigger end.

[0022] Optionally, the installation unit is further configured to: in response to determining that the target application has been installed locally, uninstall the locally installed target application; and install the target application according to the web page execution configuration information of the target web page corresponding to the target application.

[0023] Optionally, after the installation unit, the offline loading test device further includes: a login unit configured to log in a user account in the above target application.

[0024] Optionally, the client web page configuration information includes grayscale configuration information, and the grayscale configuration information includes a user account set.

[0025] Optionally, the offline loading unit is further configured to: in response to determining that the user account set includes a user account logged in to the target application, offline load the target webpage in the installed target application.

[0026] Optionally, the online loading unit is further configured to: obtain online page loading information of the target web page; and generate a web page online loading log according to the online page loading information.

[0027] Optionally, the offline loading unit is further configured to: obtain page offline loading information of the target web page; and generate a web page offline loading log according to the page offline loading information.

[0028] Optionally, the webpage online loading log includes performance information, and the webpage offline loading log includes performance information and resource information.

[0029] Optionally, the summary unit is further configured to: determine the resource information included in the above-mentioned web page offline loading log as hit detection information; determine the performance detection information based on the performance information included in the above-mentioned web page online loading log and the performance information included in the above-mentioned web page offline loading log; determine the above-mentioned hit detection information and the above-mentioned performance detection information as the loading test log of the above-mentioned target web page.

[0030] Optionally, the generation unit is further configured to: determine basic information corresponding to the above-mentioned target web page, wherein the above-mentioned basic information includes test creation user information, application information and test information; obtain test process information of the above-mentioned target web page, wherein the above-mentioned test process information includes an online page screenshot set and an offline page screenshot set; generate a test report based on the above-mentioned basic information, the above-mentioned test process information and the hit detection information and performance detection information included in the above-mentioned loading test log.

[0031] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0032] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0033] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner of the above-mentioned first aspect when executed by a processor.

[0034] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the offline loading test method of some embodiments of the present disclosure, the offline loading test operation is simplified, the method of locating problems is simplified, and the efficiency of offline testing is improved. Specifically, the reasons for the cumbersome operation of offline loading test and the low efficiency of offline testing are: the test method of capturing network requests with tools, adding client debugging code and customizing test pages needs to be combined with tools, debugging code and customized test pages, the operation is relatively cumbersome, and the combined execution of the test method takes a long time, and the method of locating test problems in the black box test method is relatively complex, and the test efficiency is low. Based on this, the offline loading test method of some embodiments of the present disclosure, first, according to the web page execution configuration information of the target web page corresponding to the target application, the target application is installed. Among them, the web page execution configuration information includes the web page link of the target web page. Thus, according to the configuration related information of the target web page of the pre-configured test application, the application can be installed locally to build the basic software environment for offline testing. Then, through the installed target application, the client web page configuration information corresponding to the target web page is obtained. Thus, the configuration related information of the target web page when loading can be obtained through the application. Afterwards, the target web page is loaded online in the installed target application through the web page link and the client web page configuration information to collect the web page online loading log. Thus, the target web page can be loaded online in the application in advance, so that the log of the online loading target web page can be collected, and the static resources can be cached locally in advance. Then, according to the client web page configuration information, the target web page is loaded offline in the installed target application to collect the web page offline loading log. Thus, the target web page can be loaded offline locally after the online loading target web page to collect the log of the online loading target web page. Finally, the web page online loading log and the web page offline loading log are aggregated and processed to obtain the loading test log of the target web page. Thus, the test problem of the offline loading target web page can be located through the aggregated loading test log. Also, because the offline loading of the target web page is tested by the pre-configured web page execution configuration information and the client web page configuration information, the network request of the tool packet capture, the client debugging code, and the customized test page are not adopted, which simplifies the offline loading test operation. In addition, the test problems of offline loading target web pages can be located through the summarized load test logs, which can avoid the disadvantages of black box testing, simplify the method of locating problems, and improve the efficiency of offline testing. Therefore, the offline loading test operation is simplified, the method of locating problems is simplified, and the efficiency of offline testing is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0036] Figure 1 is a flow chart of some embodiments of the offline load test method according to the present disclosure;

[0037] Figure 2 is a flow chart of some other embodiments of the offline loading test method according to the present disclosure;

[0038] Figure 3 is a schematic diagram of a test report of an offline loading test method according to some embodiments of the present disclosure;

[0039] Figure 4 is a schematic structural diagram of some embodiments of the off-line loading test device according to the present disclosure;

[0040] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0041] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0042] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0043] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0044] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0045] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0046] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0047] Figure 1 The process 100 of some embodiments of the offline loading test method according to the present disclosure is shown. The offline loading test method comprises the following steps:

[0048] Step 101 : installing a target application according to web page execution configuration information of a target web page corresponding to the target application.

[0049] In some embodiments, the execution subject (e.g., client) of the offline load test method may install the target application according to the web page execution configuration information of the target web page of the corresponding target application. Among them, the target application may be any application that needs to be subjected to offline load test. The target web page may be a page displayed in the target application. For example, the target web page may be a page representing a preset business. The preset business may be a value reduction business (e.g., a promotion activity). The web page execution configuration information may be configuration related information when the target web page of the pre-configured test application is tested. The web page execution configuration information may include a web page link of the target web page. The web page link may be represented by a uniform resource locator (URL). The web page execution configuration information may also include, but is not limited to: triggering user information, executing client type. The triggering user information may be related information of the user who triggers the offline load test of the target web page of the target application. The triggering user information may include, but is not limited to: user identification. The executing client type may be the type of the client that performs the offline load test (e.g., the executing client type may be Android or iOS).

[0050] In practice, the execution subject may determine whether the execution client type included in the web page execution configuration information is the same as the current client type in response to determining that the web page execution configuration information of the target web page corresponding to the target application is received. The current client type may be the type of the client system of the execution subject. Then, in response to determining that the execution client type is the same as the current client type and the target application is not installed locally, the target application of the version corresponding to the execution client type may be installed locally.

[0051] In some optional implementations of some embodiments, the execution subject may uninstall the target application installed locally in response to determining that the target application has been installed locally. Then, the target application may be installed according to the web page execution configuration information of the target web page corresponding to the target application. Thus, when the target application has been installed locally, the installed target application may be uninstalled first, and then the target application may be installed. This may avoid interference from the last cache of the client when the web page is not entered for the first time, thereby improving the accuracy of the test results of the offline loading test.

[0052] Optionally, after step 101, the execution subject may also log in the user account in the target application. Here, the user account may be pre-set and is not specifically limited. Thus, the operation of logging in the user account in the user client may be simulated.

[0053] Step 102: Obtain client web page configuration information corresponding to the target web page through the installed target application.

[0054] In some embodiments, the execution subject may obtain the client webpage configuration information corresponding to the target webpage through the installed target application. The client webpage configuration information may be configuration related information of the pre-configured target webpage when it is loaded on the client. The client webpage configuration information may include but is not limited to at least one of the following: real-time verification information, login state synchronization information, and download timing information. The real-time verification information may be information related to the real-time update mechanism of the resources to be loaded. The resources to be loaded may include but are not limited to: html, css, js, and pictures. The real-time verification information may include but is not limited to: the identification of each resource to be loaded. The login state synchronization information may be information about the login state to be synchronized. The login state synchronization information may include each login state to be synchronized. The download timing information may be information related to the time when the resource to be loaded needs to be downloaded. For example, the download timing information may be but is not limited to: download after entering the application, download after waiting for a predetermined time after starting the application, and download when entering the page for the first time. In practice, the execution subject may read the client webpage configuration information issued by the interface through the webpage link.

[0055] Step 103 : load the target web page online in the installed target application through the web page link and the client web page configuration information to collect the web page online loading log.

[0056] In some embodiments, the execution subject may load the target web page online in the installed target application through the web page link to collect the web page online loading log. In practice, the execution subject may access the web page link in the target application to load the target web page online in the target application, and may collect the web page online loading log when loading the target web page. The execution subject may also download the resource to be loaded corresponding to the target web page to the local in response to determining that the current time is the time corresponding to the download timing information. The execution subject may also determine the updated login status as the login status of the target web page in response to determining that the login status of the target application is updated, and the login status synchronization information includes the updated login status. The execution subject may also store the updated resource to be loaded locally in response to determining that the resource to be loaded of the target application is updated, and the real-time verification information includes the identifier of the updated resource to be loaded. The web page online loading log may include the loading time.

[0057] In some optional implementations of some embodiments, the above-mentioned execution subject can obtain the online page loading information of the above-mentioned target web page. Among them, the above-mentioned online page loading information can be various information output by various variables to the front-end console when the target web page is loaded online. For example, the online page loading information can be the content output by the console.log() of JS. In practice, the above-mentioned execution subject can realize the communication between JS and native through the JSBridge tool, so that JSBridge obtains the content of the console.log() method of JS through a hook. Then, based on the above-mentioned online page loading information, a web page online loading log is generated. In practice, the above-mentioned execution subject can print the online page loading information into an online web page loading log according to a preset method through the JSBridge tool. There is no limitation on the specific setting of the preset method. Thus, the collection of the online web page loading log can be realized through the debugging tool of the client.

[0058] Step 104 : Offline loading of the target web page in the installed target application according to the client web page configuration information to collect offline web page loading logs.

[0059] In some embodiments, the execution subject may load the target webpage offline in the installed target application according to the client webpage configuration information to collect the webpage offline loading log. In practice, the execution subject may load the target webpage offline in the installed target application according to the locally stored static resources corresponding to the target webpage in response to the current time being greater than the time corresponding to the download timing information, and may collect the webpage offline loading log at the same time.

[0060] Optionally, the client web page configuration information includes grayscale configuration information. The grayscale configuration information may be an online user grayscale policy configured according to a user whitelist or a preset ratio. That is, the offline loading technology is used only for users who log in to the account or are screened according to a preset ratio. The grayscale configuration information includes a user account set. The user account set may be each user account in the user whitelist, or may be each user account screened according to a preset ratio.

[0061] In some optional implementations of some embodiments, the execution subject may load the target webpage offline in the installed target application in response to determining that the user account set includes a user account logged in in the target application. Thus, the offline loading test task may be executed according to the gray configuration information.

[0062] In some optional implementations of some embodiments, the above-mentioned execution entity can obtain the page offline loading information of the above-mentioned target web page. In practice, the above-mentioned execution entity can realize the communication between JS and native through the JSBridge tool, so that JSBridge obtains the content of the console.log() method of JS through hook. Then, the web page offline loading log can be generated according to the above-mentioned page offline loading information. In practice, the above-mentioned execution entity can print the page offline loading information into a web page offline loading log in a preset manner through the JSBridge tool. Thus, the collection of web page offline loading logs can be realized through the debugging tool of the client.

[0063] Step 105 , aggregate and process the webpage online loading log and the webpage offline loading log to obtain a loading test log of the target webpage.

[0064] In some embodiments, the execution entity may aggregate the webpage online loading log and the webpage offline loading log to obtain the loading test log of the target webpage. In practice, the execution entity may combine the webpage online loading log and the webpage offline loading log into the loading test log of the target webpage. Here, the combination may be information splicing.

[0065] It should be noted that steps 101-105 can be abstracted at the technical level as steps executed by an executor, which automatically simulates user behavior to achieve automatic execution of offline load test tasks.

[0066] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the offline loading test method of some embodiments of the present disclosure, the offline loading test operation is simplified, the method of locating problems is simplified, and the efficiency of offline testing is improved. Specifically, the reasons for the cumbersome operation of offline loading test and the low efficiency of offline testing are: the test method of capturing network requests with tools, adding client debugging code and customizing test pages needs to be combined with tools, debugging code and customized test pages, the operation is relatively cumbersome, and the combined execution of the test method takes a long time, and the method of locating test problems in the black box test method is relatively complex, and the test efficiency is low. Based on this, the offline loading test method of some embodiments of the present disclosure, first, according to the web page execution configuration information of the target web page corresponding to the target application, the target application is installed. Among them, the web page execution configuration information includes the web page link of the target web page. Thus, according to the configuration related information of the target web page of the pre-configured test application, the application can be installed locally to build the basic software environment for offline testing. Then, through the installed target application, the client web page configuration information corresponding to the target web page is obtained. Thus, the configuration related information of the target web page when loading can be obtained through the application. Afterwards, the target web page is loaded online in the installed target application through the web page link and the client web page configuration information to collect the web page online loading log. Thus, the target web page can be loaded online in the application in advance, so that the log of the online loading target web page can be collected, and the static resources can be cached locally in advance. Then, according to the client web page configuration information, the target web page is loaded offline in the installed target application to collect the web page offline loading log. Thus, the target web page can be loaded offline locally after the online loading target web page to collect the log of the online loading target web page. Finally, the web page online loading log and the web page offline loading log are aggregated and processed to obtain the loading test log of the target web page. Thus, the test problem of the offline loading target web page can be located through the aggregated loading test log. Also, because the offline loading of the target web page is tested by the pre-configured web page execution configuration information and the client web page configuration information, the network request of the tool packet capture, the client debugging code, and the customized test page are not adopted, which simplifies the offline loading test operation. In addition, the test problems of offline loading target web pages can be located through the summarized load test logs, which can avoid the disadvantages of black box testing, simplify the method of locating problems, and improve the efficiency of offline testing. Therefore, the offline loading test operation is simplified, the method of locating problems is simplified, and the efficiency of offline testing is improved.

[0067] Further references Figure 2 , which shows a process 200 of another embodiment of an offline loading test method. The process 200 of the offline loading test method includes the following steps:

[0068] Step 201 : installing a target application according to web page execution configuration information of a target web page corresponding to the target application.

[0069] Step 202: Obtain client web page configuration information corresponding to the target web page through the installed target application.

[0070] Step 203: load the target web page online in the installed target application through the web page link and the client web page configuration information to collect the web page online loading log.

[0071] Step 204 : Offline loading of the target web page in the installed target application according to the client web page configuration information to collect the web page offline loading log.

[0072] In some embodiments, the specific implementation of the above-mentioned execution body steps 201-204 and the technical effects brought about can be referred to Figure 1 The corresponding steps 101-104 in the embodiments are not described in detail here.

[0073] Step 205: determine the resource information included in the webpage offline loading log as hit detection information.

[0074] In some embodiments, the execution subject (e.g., client) of the offline loading test method may determine the resource information included in the above-mentioned web page offline loading log as hit detection information. Here, the above-mentioned web page online loading log may include performance information. The above-mentioned web page offline loading log may include performance information and resource information. Here, the performance information may include, but is not limited to, at least one of the following: loading time, first rendering time. The first rendering time may be the time taken to render the first content. Resource information may include, but is not limited to, at least one of the following: resource link, an identifier representing whether offline resources are used, and project type. For example, the link to the image resource may be represented as "https: / / ***.png". The link to the css resource may be represented as "https: / / ***.css". The project type may be the type of the project mentioned above for the offline resource. For example, the project type may be a public project class or a self-use project class.

[0075] Optionally, the webpage offline loading log may also include hit information. The hit information may represent relevant information using a certain offline loading technology. The hit information may include but is not limited to: the name of the offline loading technology, an identifier representing whether the offline loading technology corresponding to the offline loading technology name is used, and the time consumed to use the offline loading technology corresponding to the offline loading technology name. The offline loading technology may include but is not limited to: HTML pre-download, interface pre-load.

[0076] Step 206: Determine performance detection information based on the performance information included in the online webpage loading information and the performance information included in the offline webpage loading log.

[0077] In some embodiments, the execution entity may determine the performance detection information based on the performance information included in the online loading information of the web page and the performance information included in the offline loading log of the web page. In practice, the execution entity may determine the percentage of improvement of the first rendering time and the loading time included in the offline loading log of the web page relative to the first rendering time and the loading time included in the online loading information of the web page as the first rendering time improvement ratio and the loading time improvement ratio, respectively. Then, the first rendering time included in the offline loading log of the web page, the first rendering time included in the online loading log of the web page, and the improvement ratio of the first rendering time may be determined as the first opening time performance information. Next, the loading time included in the offline loading log of the web page, the loading time included in the online loading log of the web page, and the improvement ratio of the loading time may be determined as the loading time performance information. Finally, the first opening time performance information and the loading time performance information may be determined as the performance detection information.

[0078] Optionally, the first opening time performance information and the loading time performance information may also include the name of the offline loading technology used.

[0079] Step 207: determine the hit detection information and the performance detection information as a load test log of the target web page.

[0080] In some embodiments, the hit detection information and the performance detection information are determined as a load test log of the target web page.

[0081] Step 208: Generate a test report based on the load test log.

[0082] In some embodiments, the execution subject may generate a test report based on the load test log. In practice, the execution subject may fill the load test log into a preset report to obtain a test report. There is no limitation on the format and specific form of the preset report.

[0083] In some optional implementations of some embodiments, first, the execution subject may determine the basic information corresponding to the target web page. The basic information includes test creation user information, application information and test information. The test creation user information may be the trigger user information included in the web page execution configuration information. The application information may be the relevant information of the target application. The application information may include but is not limited to at least one of the following: application version, login account. The test information may be the relevant information of the offline load test task. The test information may include but is not limited to at least one of the following: test target, test platform. Then, the test process information of the target web page may be obtained. The test process information includes an online page screenshot collection and an offline page screenshot collection. In practice, the execution subject may obtain the screenshots of each page of the preset number of sliding pages when the target web page is displayed online as the online page screenshot collection. For example, the online page screenshot collection may include the screenshot of the initial online display of the target web page and the screenshot of the target web page after sliding down the page once. Then, the execution subject may obtain the screenshots of each page of the preset number of sliding pages when the target web page is displayed offline as the offline page screenshot collection. Finally, a test report can be generated based on the above basic information, the above test process information, and the hit detection information and performance detection information included in the above load test log. In practice, the above execution entity can fill the above basic information, the above test process information, and the hit detection information and performance detection information included in the above load test log into a preset report to obtain a test report. As an example, the test report can refer to Figure 3 . Figure 3 The "*" in can be any character.

[0084] Optionally, before step 201, the above-mentioned execution entity may also receive the web page execution configuration information of the target web page corresponding to the target application sent by the trigger end. Among them, the above-mentioned trigger end may be a device for configuring configuration-related information of the offline load test. Configuration-related information may include web page execution configuration information. The web page execution configuration information may be configured through the front-end configuration page of the trigger end. Configuration-related information may be stored in the server. For example, configuration-related information may be stored in a database of the server (e.g., MySQL, Redis). Then, the current execution task identifier may be sent to the above-mentioned trigger end. Among them, the current execution task identifier may be an identifier for uniquely representing the current offline test task. Thus, the triggering user of the offline load test may configure the web page execution configuration information of the offline load test at the trigger end, so as to send it to the client to perform the offline load test.

[0085] Optionally, the execution subject may also send the test report and the current execution task identifier to the trigger end, so that the trigger user of the trigger end can view the test result of the current offline loading test according to the received current execution task identifier.

[0086] from Figure 2 It can be seen that Figure 1 Compared with the description of some corresponding embodiments, Figure 2 The process 200 of the offline loading test method in some corresponding embodiments embodies the steps of expanding the test report. Therefore, the schemes described in these embodiments can allow testers to intuitively know the test results of the offline loading test through the test report, simplifying the offline loading test operation.

[0087] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an offline loading test device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0088] like Figure 4 As shown, the offline loading test device 400 of some embodiments includes: an installation unit 401, an acquisition unit 402, an online loading unit 403, an offline loading unit 404 and a summary unit 405. The installation unit 401 is configured to install the target application according to the web page execution configuration information of the target web page corresponding to the target application, wherein the web page execution configuration information includes the web page link of the target web page; the acquisition unit 402 is configured to acquire the client web page configuration information corresponding to the target web page through the installed target application; the online loading unit 403 is configured to load the target web page online in the installed target application through the web page link and the client web page configuration information to collect the web page online loading log; the offline loading unit 404 is configured to load the target web page offline in the installed target application according to the client web page configuration information to collect the web page offline loading log; the summary unit 405 is configured to summarize the web page online loading log and the web page offline loading log to obtain the loading test log of the target web page.

[0089] Optionally, the offline loading test device 400 may further include: a generating unit (not shown in the figure), configured to generate a test report according to the above-mentioned loading test log.

[0090] Optionally, before the installation unit 401, the offline loading test device 400 may further include: a receiving unit and a first sending unit (not shown in the figure). The receiving unit is configured to receive web page execution configuration information of a target web page corresponding to a target application sent by the triggering end. The first sending unit is configured to send a current execution task identifier to the triggering end.

[0091] Optionally, the offline loading test device 400 may further include: a second sending unit (not shown in the figure), configured to send the test report and the currently executed task identifier to the trigger end.

[0092] Optionally, the installation unit 401 may be further configured to: in response to determining that the target application has been installed locally, uninstall the target application installed locally; and install the target application according to the web page execution configuration information of the target web page corresponding to the target application.

[0093] Optionally, after the installation unit 401, the offline loading test device 400 may further include: a login unit (not shown in the figure), configured to log in a user account in the above target application.

[0094] Optionally, the client web page configuration information includes grayscale configuration information, and the grayscale configuration information includes a user account set.

[0095] Optionally, the offline loading unit 404 may be further configured to: in response to determining that the user account set includes a user account logged in to the target application, offline load the target webpage in the installed target application.

[0096] Optionally, the online loading unit 403 may be further configured to: obtain online page loading information of the target web page; and generate an online web page loading log according to the online page loading information.

[0097] Optionally, the offline loading unit 404 may be further configured to: obtain offline page loading information of the target web page; and generate a web page offline loading log according to the offline page loading information.

[0098] Optionally, the webpage online loading log includes performance information, and the webpage offline loading log includes performance information and resource information.

[0099] Optionally, the summary unit 405 can be further configured to: determine the resource information included in the above-mentioned web page offline loading log as hit detection information; determine the performance detection information based on the performance information included in the above-mentioned web page online loading log and the performance information included in the above-mentioned web page offline loading log; determine the above-mentioned hit detection information and the above-mentioned performance detection information as the loading test log of the above-mentioned target web page.

[0100] Optionally, the generation unit can be further configured to: determine the basic information corresponding to the above-mentioned target web page, wherein the above-mentioned basic information includes test creation user information, application information and test information; obtain the test process information of the above-mentioned target web page, wherein the above-mentioned test process information includes an online page screenshot set and an offline page screenshot set; generate a test report based on the above-mentioned basic information, the above-mentioned test process information and the hit detection information and performance detection information included in the above-mentioned loading test log.

[0101] It is understood that the units described in the device 400 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 400 and the units included therein, and will not be described in detail here.

[0102] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 (e.g., a terminal device) suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0103] like Figure 5 As shown, the electronic device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0104] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0105] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0106] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer 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. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0108] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: installs the target application according to the web page execution configuration information of the target web page corresponding to the target application, wherein the web page execution configuration information includes the web page link of the target web page; obtains the client web page configuration information corresponding to the target web page through the installed target application; loads the target web page online in the installed target application through the web page link and the client web page configuration information to collect the online web page loading log; loads the target web page offline in the installed target application according to the client web page configuration information to collect the offline web page loading log; and aggregates the online web page loading log and the offline web page loading log to obtain the loading test log of the target web page.

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

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be set in a processor, for example, it may be described as: a processor includes an installation unit, an acquisition unit, an online loading unit, an offline loading unit and a summary unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the installation unit may also be described as "a unit that installs the above-mentioned target application according to the web page execution configuration information of the target web page corresponding to the target application."

[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0113] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned offline loading test methods when executed by a processor.

[0114] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. An offline loading test method, comprising: Installing the target application according to web page execution configuration information of a target web page corresponding to the target application, wherein the web page execution configuration information includes a web page link of the target web page; Obtaining client web page configuration information corresponding to the target web page through the installed target application; Loading the target web page online in the installed target application through the web page link and the client web page configuration information to collect web page online loading logs; According to the client web page configuration information, offline loading the target web page in the installed target application to collect web page offline loading logs; The webpage online loading log and the webpage offline loading log are aggregated to obtain a loading test log of the target webpage.

2. The method according to claim 1, wherein: The method further comprises: Generate a test report based on the loading test log.

3. The method according to claim 2, wherein: Before installing the target application according to the web page execution configuration information of the target web page corresponding to the target application, the method further includes: receiving web page execution configuration information of a target web page corresponding to a target application sent by a triggering end; The identifier of the currently executed task is sent to the triggering end.

4. The method according to claim 3, wherein: The method further comprises: The test report and the currently executed task identifier are sent to the triggering end.

5. The method according to claim 1, wherein: The step of installing the target application according to the web page execution configuration information of the target web page corresponding to the target application includes: In response to determining that the target application has been installed locally, uninstalling the target application installed locally; The target application is installed according to the web page execution configuration information of the target web page corresponding to the target application.

6. The method according to claim 1, wherein: After installing the target application according to the web page execution configuration information of the target web page corresponding to the target application, the method further includes: Log in to the user account in the target application.

7. The method according to claim 6, wherein: The client web page configuration information includes grayscale configuration information, and the grayscale configuration information includes a user account set; as well as The step of offline loading the target webpage in the installed target application according to the client webpage configuration information includes: In response to determining that the user account set includes a user account logged in to the target application, the target webpage is loaded offline in the installed target application.

8. The method according to claim 1, wherein: The step of loading the target web page online in the installed target application through the web page link and the client web page configuration information to collect a web page online loading log includes: Obtaining online page loading information of the target web page; Generate a web page online loading log according to the page online loading information.

9. The method according to claim 1, wherein: The offline loading of the target webpage in the installed target application to collect the offline webpage loading log includes: Obtaining offline loading information of the target web page; Generate a webpage offline loading log according to the page offline loading information.

10. The method according to claim 2, wherein: The webpage online loading log includes performance information, and the webpage offline loading log includes performance information and resource information; as well as The process of aggregating the webpage online loading log and the webpage offline loading log to obtain the loading test log of the target webpage includes: Determining resource information included in the webpage offline loading log as hit detection information; Determining performance detection information according to the performance information included in the online webpage loading log and the performance information included in the offline webpage loading log; The hit detection information and the performance detection information are determined as a load test log of the target web page.

11. The method according to claim 10, wherein: Generating a test report according to the load test log includes: Determine basic information corresponding to the target webpage, wherein the basic information includes test creation user information, application information and test information; Acquire test process information of the target webpage, wherein the test process information includes an online page screenshot set and an offline page screenshot set; A test report is generated based on the basic information, the test process information, and the hit detection information and performance detection information included in the load test log.

12. An off-line loading test device, comprising: An installation unit is configured to install the target application according to web page execution configuration information of a target web page corresponding to the target application, wherein the web page execution configuration information includes a web page link of the target web page; an acquisition unit, configured to acquire client web page configuration information corresponding to the target web page through the installed target application; an online loading unit, configured to load the target web page online in the installed target application through the web page link and the client web page configuration information, so as to collect a web page online loading log; an offline loading unit, configured to load the target web page offline in the installed target application according to the client web page configuration information, so as to collect a web page offline loading log; The aggregation unit is configured to aggregate the online webpage loading log and the offline webpage loading log to obtain the loading test log of the target webpage.

13. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.

14. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.