Page performance test method and device, equipment and storage medium

By screenshotting and triggering operations on the page to be tested, the loading time of the page to be tested is determined, which solves the problem of errors in traditional performance testing and realizes more accurate performance data testing.

CN119537166APending Publication Date: 2025-02-28PING AN HEALTH INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411427583.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Traditional front-end performance testing has uncertain factors such as environmental interference, which leads to errors between the measured values ​​and the actual values, and it is impossible to accurately test the performance data of the page to be tested.

Method used

By taking screenshots of the page to be tested according to the set frequency, and triggering operations on the page to be tested based on the preset page operation instructions, multiple page screenshots are obtained, thereby determining the time point when the page to be tested starts loading and ends loading, and calculating performance data from the user's perspective.

Benefits of technology

It improves the accuracy of the performance data of the page to be tested, and can more accurately detect the performance data displayed on the page to be tested.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to performance testing, and provides a page performance testing method and device, equipment and a storage medium, and the method comprises the steps: carrying out screenshot on a to-be-tested page according to a set frequency, and carrying out triggering operation on the to-be-tested page based on a preset page operation instruction to obtain a plurality of page screenshots; obtaining a first page screenshot when the to-be-tested page starts to be loaded and a second page screenshot when the to-be-tested page ends to be loaded from the plurality of page screenshots; determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot; according to the first time point and the second time point, determining performance data of the to-be-tested page executing the page operation instruction under the user perspective. The invention further relates to the block chain, and aims to improve the test accuracy of the performance data of the to-be-tested page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of performance testing, and in particular to a page performance testing method, device, equipment and storage medium. Background Art

[0002] Front-end performance testing refers to the process of evaluating and optimizing the front-end part of a web page or application. Through automated testing tools, various load conditions are simulated to observe the various performance indicators of the system to ensure that it can operate normally under different environments and loads, and that the performance meets the expected requirements.

[0003] Traditional front-end performance testing requires data transmission between multiple related layers such as the front-end system, terminal equipment, and logical interfaces. There are many uncertain factors such as environmental interference, which leads to a certain error between the measured value and the actual value, so the performance data of the page to be tested cannot be accurately tested. Therefore, how to improve the test accuracy of the performance data of the page to be tested has become an urgent problem to be solved. Summary of the invention

[0004] The main purpose of the present application is to provide a page performance testing method, device, equipment and storage medium, aiming to improve the testing accuracy of the performance data of the page to be tested.

[0005] In a first aspect, the present application provides a page performance testing method, comprising:

[0006] Taking screenshots of the page to be tested at a set frequency, and triggering the page to be tested based on a preset page operation instruction to obtain multiple page screenshots;

[0007] Acquire a first page screenshot and a second page screenshot from the multiple page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading;

[0008] Determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot;

[0009] According to the first time point and the second time point, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0010] In a second aspect, the present application further provides a page performance testing device, the page performance testing device comprising:

[0011] A screenshot module is used to take screenshots of the page to be tested at a set frequency, and to trigger operations on the page to be tested based on preset page operation instructions to obtain multiple page screenshots;

[0012] An acquisition module, configured to acquire a first page screenshot and a second page screenshot from the plurality of page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading;

[0013] A first determining module, used to determine a first time point corresponding to the first page screenshot, and to determine a second time point corresponding to the second page screenshot;

[0014] The second determining module is used to determine the performance data of the page to be tested executing the page operation instruction from the user's perspective according to the first time point and the second time point.

[0015] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the page performance testing method as described above are implemented.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the page performance testing method as described above are implemented.

[0017] The present application provides a page performance testing method, device, equipment and storage medium. The page performance testing method provided by the present application includes: taking screenshots of the page to be tested at a set frequency, and triggering the page to be tested based on a preset page operation instruction to obtain multiple page screenshots; obtaining a first page screenshot when the page to be tested starts loading and a second page screenshot when the page to be tested ends loading from the multiple page screenshots; determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot; and determining the performance data of the page to be tested executing the page operation instruction from the user's perspective based on the first time point and the second time point. The embodiment of the present application substitutes the user's perspective by taking page screenshots to determine the time points when the page to be tested starts loading and ends loading, and can more accurately detect the performance data of the page to be tested in interactive display, thereby greatly improving the test accuracy of the performance data of the page to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A schematic diagram of the steps of a page performance testing method provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a scenario for implementing the page performance testing method provided in this embodiment;

[0021] Figure 3 A schematic diagram of another scenario for implementing the page performance testing method provided in this embodiment;

[0022] Figure 4 A schematic diagram of a test record report provided in an embodiment of the present application;

[0023] Figure 5 A schematic block diagram of a page performance testing device provided in an embodiment of the present application;

[0024] Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0025] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0028] The performance of the front-end system is directly related to the user experience, especially for mobile products. If there is a freeze or the page loads slowly during use, the user experience will be reduced and even cause user loss. Therefore, the general system will be performance tested before release. The traditional performance testing method is aimed at the system level, judging the performance based on service requests and responses. In actual scenarios, users send requests through the front-end, and each related system passes the request layer by layer. The return value is processed by various logical interfaces and then displayed to the user in different forms. This process involves many uncertain factors such as the system, terminal equipment, and environmental interference.

[0029] However, most of the current front-end performance tools judge the front-end performance by the front-end framework loading time. When conducting actual measurements, there is a certain error in simply judging that the user has seen the front-end data based on the completion of the system service response. Therefore, it is impossible to accurately test the performance data of the page to be tested.

[0030] Based on this, the embodiments of the present application provide a page performance test method, device, equipment and storage medium. Among them, the page performance test method can be applied to a terminal device or a server, and the terminal device can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant and a wearable device; the server can be a single server or a server cluster composed of multiple servers. The following is an explanation using the application of the page performance test method to a server as an example.

[0031] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0032] Please refer to Figure 1 , Figure 1 A schematic diagram of the steps of a page performance testing method provided in an embodiment of the present application.

[0033] like Figure 1 As shown, the page performance testing method includes steps S101 to S104.

[0034] Step S101 : taking screenshots of the page to be tested at a set frequency, and performing a trigger operation on the page to be tested based on a preset page operation instruction to obtain multiple page screenshots.

[0035] The setting frequency can be flexibly set according to actual conditions, and the unit of the setting frequency can be seconds or milliseconds. The duration of taking screenshots of the page to be tested according to the setting frequency is greater than the response duration of the page operation instruction. The multiple page screenshots may include at least one first page screenshot when the page to be tested starts loading and at least one second page screenshot when the page to be tested ends loading.

[0036] It should be noted that page operation instructions are used to simulate all operations of the user in the software. The specific page operation instructions depend on the type, function and user interface of the software. Page operation instructions can be triggered automatically or manually by the user. Trigger operations include interactive operations such as dragging and dropping elements, zooming (zooming in / out), rotating views, using gestures (such as sliding, pinching, and long pressing), and data input and management operations such as entering text, selecting options (single selection, multiple selection), uploading / downloading files, filling out forms, saving data, deleting data, updating information, sorting and filtering data.

[0037] It should be noted that triggering the page to be tested based on preset page operation instructions, thereby simulating user operations and obtaining performance during the triggering operation, can more accurately detect the performance data of the page to be tested in interactive display.

[0038] In one embodiment, the set frequency is adjusted at intervals of a preset time, thereby adjusting the frequency of taking screenshots of the page to be tested, and the preset interval time is greater than the response time of the page operation instruction. After each adjustment of the set frequency, a screenshot of the page to be tested is taken according to the adjusted set frequency, thereby executing multiple page operation instructions to obtain multiple related page screenshots generated under the multiple page operation instructions.

[0039] In one embodiment, the page to be tested includes a first page to be tested and a second page to be tested, wherein the first page to be tested is the page to be tested when the page operation instruction starts loading, and the second page to be tested is the page to be tested when the page operation instruction ends loading. After the page to be tested is triggered based on the preset page operation instruction, the page to be tested jumps from the first page to be tested to the second page to be tested; when the maximum resource in the second page to be tested is completely loaded, the timing starts, and when the timing duration is greater than or equal to the set duration threshold, the page to be tested is returned to the first page to be tested, and the operation of triggering the page to be tested based on the preset page operation instruction is re-executed.

[0040] It should be noted that the implementation method of the present application can perform multiple trigger operations on the page to be tested based on the same page operation instruction to obtain multiple related page screenshots generated under multiple page operation instructions. On this basis, the test accuracy of the performance data of the page to be tested can be greatly improved.

[0041] It is understandable that in order to ensure compliance with privacy and security standards during the screenshots of the pages to be tested and the subsequent analysis process, HTTPS and other encryption technologies can be used to protect data transmission. At the same time, in order to further ensure the privacy and security of the above-mentioned page screenshots and other related information, the above-mentioned page screenshots and other related information can also be stored in a node of a blockchain. The technical solution of this application can also be applied to adding other data files stored on the blockchain. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0042] Step S102: Acquire a first page screenshot and a second page screenshot from multiple page screenshots.

[0043] The first page screenshot is a page screenshot when the page to be tested starts loading, and the second page screenshot is a page screenshot when the page to be tested finishes loading. There is at least one first page screenshot and one second page screenshot. When there are multiple first page screenshots and multiple second page screenshots, the multiple first page screenshots and the multiple second page screenshots may correspond one to one, and the one-to-one corresponding first page screenshots and second page screenshots may be determined based on the triggering operation of the same page operation instruction.

[0044] It should be noted that the first page to be tested when the page operation instruction starts loading matches the first page screenshot, and the second page to be tested when the page operation instruction ends loading matches the second page screenshot. Therefore, the first page screenshot and the second page screenshot can be accurately obtained from multiple page screenshots.

[0045] In one embodiment, multiple page screenshots are matched with a first page to be tested, and the first page screenshot is determined from the multiple page screenshots based on the multiple matching results; the first page to be tested is used to represent that the page to be tested starts to execute page operation instructions; and, multiple page screenshots are matched with a second page to be tested, and the second page screenshot is determined from the multiple page screenshots based on the multiple matching results; the second page to be tested is used to represent that the page to be tested ends executing page operation instructions.

[0046] Specifically, by matching the plurality of page screenshots with the first page to be tested respectively, a first matching degree of the plurality of page screenshots can be obtained, and when the first matching degree is greater than a first set matching degree, the page screenshot corresponding to the first matching degree can be determined as the first page screenshot. By matching the plurality of page screenshots with the second page to be tested respectively, a second matching degree of the plurality of page screenshots can be obtained, and when the second matching degree is greater than a second set matching degree, the page screenshot corresponding to the second matching degree can be determined as the second page screenshot.

[0047] It should be noted that the first setting matching degree and the second setting matching degree may be the same or different, and the first setting matching degree and the second setting matching degree may be set according to actual conditions, for example, the first setting matching degree and the second setting matching degree are both 97%. By matching multiple page screenshots with the first page to be tested and the second page to be tested respectively, the first page screenshot and the second page screenshot may be accurately obtained from the multiple page screenshots.

[0048] For example, Figure 2 As shown, the multiple page screenshots include page screenshots 11 to page screenshots 17. By matching the page screenshots 11 to page screenshots 17 with the first page to be tested and the second page to be tested, it is possible to accurately determine from the multiple page screenshots 11 to 17 that the first page screenshot when the page operation instruction starts loading is page screenshot 13, and to determine that the second page screenshot when the page operation instruction ends loading is page screenshot 17.

[0049] In one embodiment, based on a first selected operation triggered by a user, a first page screenshot is obtained from a plurality of page screenshots; and based on a second selected operation triggered by a user, a second page screenshot is obtained from a plurality of page screenshots.

[0050] It should be noted that the first selection operation and the second selection operation can be single-click, double-click, drag and other operations on at least one of the multiple page screenshots, and of course can also be other operations such as marking. Based on the user's first selection operation and the second selection operation, the first page screenshot and the second page screenshot are obtained from the multiple page screenshots, which makes it easier to determine the first page screenshot and the second page screenshot at the start and end of loading of the page to be tested from the user's perspective, thereby greatly improving the accuracy and authenticity of obtaining the first page screenshot and the second page screenshot.

[0051] For example, Figure 3 As shown, the multiple page screenshots include page screenshots 11 to page screenshots 17. Based on the first selection operation triggered by the user, the first page screenshot when the page operation instruction starts loading can be accurately determined from the multiple page screenshots 11 to 17 as page screenshot 12. Based on the second selection operation triggered by the user, the second page screenshot when the page operation instruction ends loading can be accurately determined from the multiple page screenshots 11 to 17 as page screenshot 17.

[0052] Step S103: determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot.

[0053] Each of the plurality of page screenshots corresponds to a time point, which can be determined based on a set frequency or based on the screenshot time of the page screenshot. Therefore, after determining the first page screenshot, the first time point corresponding to the first page screenshot can be quickly obtained. And, after determining the second page screenshot, the second time point corresponding to the second page screenshot can be quickly obtained.

[0054] In one embodiment, a timeline of multiple page screenshots is generated based on a set frequency and a number of screenshots, the timeline including a time point corresponding to each page screenshot; a first time point corresponding to the first page screenshot is obtained from the time point corresponding to each page screenshot, and a second time point corresponding to the second page screenshot is obtained from the time point corresponding to each page screenshot.

[0055] It should be noted that the set frequency can indicate the screenshot time interval between two adjacent page screenshots. The product value of the set frequency and the number of screenshots or the accumulated value of multiple set frequencies can generate a timeline of multiple page screenshots, where each page screenshot corresponds to a time point in the timeline. Therefore, the timeline can be used to quickly and accurately determine the first time point corresponding to the first page screenshot, and determine the second time point corresponding to the second page screenshot.

[0056] For example, Figure 3 As shown, the multiple page screenshots include page screenshots 11 to page screenshots 17. The first page screenshot is page screenshot 12, and the second page screenshot is page screenshot 17. Among them, page screenshots 11 to page screenshots 17 all correspond to a time point in the timeline, so through the timeline, it can be determined that the first time point corresponding to page screenshot 12 (the first page screenshot) is 00:00:58, and the second time point corresponding to page screenshot 17 (the second page screenshot) is 00:01:20.

[0057] In one embodiment, the screenshot time of each page screenshot is obtained; the first time point corresponding to the first page screenshot is obtained from the screenshot time of each page screenshot, and the second time point corresponding to the second page screenshot is obtained. The screenshot time of each page screenshot can be saved when the corresponding page to be tested is screenshotted, so the first time point corresponding to the first page screenshot and the second time point corresponding to the second page screenshot can be quickly and accurately determined.

[0058] Step S104: determining performance data of the page to be tested executing the page operation instruction from the user's perspective according to the first time point and the second time point.

[0059] It should be noted that the current page performance test method obtains the performance data of the page test through the front-end response, which has a slight time difference from the user's actual perception. The implementation method of the present application determines the time points when the page to be tested starts loading and ends loading by taking page screenshots that are more in line with the user's actual perception, and can more accurately detect the performance data of the page to be tested in the interactive display.

[0060] In one embodiment, the performance data of the page under test executing the page operation instruction includes the processing speed of the front-end system, such as the response time or loading time of the page under test executing the page operation instruction, and does not involve the request time of the back-end interface.

[0061] In one embodiment, a first time point corresponding to the screenshot at which the operation request is initiated is determined, and a second time point at which the page is displayed to the user is determined, and a time period obtained by subtracting the first time point from the second time point is the loading time length from the user's perspective;

[0062] In one embodiment, the difference between the first time point and the second time point is calculated to obtain the loading time required for the page to be tested to execute the page operation instruction; the first compensation time is obtained, and the first compensation time is determined based on the difference in time caused by the real user and the simulated user triggering the page operation instruction; based on the loading time and the first compensation time, the performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0063] It should be noted that the first time point may be the first time point corresponding to the first page screenshot at which the page operation instruction is initiated. The second time point may be the time point when the page is presented to the user, that is, the second time point corresponding to the second page screenshot when the page operation instruction finishes loading. The first compensation duration may be pre-set by an expert or obtained through multiple experiments, and the first compensation duration may be a positive value or a negative value. For example, by adding the loading duration and the first compensation duration, the performance data of the page to be tested executing the page operation instruction from the user's perspective can be obtained more accurately, thereby greatly improving the test accuracy of the performance data of the page to be tested.

[0064] In one embodiment, the triggering operation of the page operation instruction is multiple times, and the first page screenshot and the second page screenshot are both multiple. According to the first time point and the second time point, the performance data of the page to be tested executing the page operation instruction from the user's perspective is determined, including: according to the correspondence between each first page screenshot and each second page screenshot, the correspondence between multiple first time points and multiple second time points is determined; the difference between multiple first time points and their corresponding second time points is calculated to obtain the loading time required for the page to be tested to execute multiple page operation instructions respectively; based on a preset abnormal data detection algorithm, the abnormal loading time is eliminated from the multiple loading time to obtain multiple target loading time; based on the multiple target loading time, the performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0065] It should be noted that the triggering operation of the page operation instruction can be multiple times. In this case, the multiple page screenshots obtained include multiple page screenshots of executing multiple page operation instructions. Therefore, the loading time required for the page to be tested to execute multiple page operation instructions can be calculated, and then; based on the preset abnormal data detection algorithm, the loading time with abnormalities is eliminated, which can make the performance data obtained from the user's perspective more accurate, thereby greatly improving the test accuracy of the performance data of the page to be tested.

[0066] In one embodiment, the abnormal data detection algorithm can be a time series abnormal detection algorithm. Specifically, after obtaining the loading time required for the page to be tested to execute multiple page operation instructions, a loading time sequence diagram of the page to be tested is generated based on multiple loading times; based on the time series abnormal detection algorithm, the value with the largest fluctuation in the loading time sequence diagram is deleted to obtain multiple target loading times. Therefore, the accuracy of the performance data obtained from the test from the user's perspective can be greatly improved, so that the performance data of the page to be tested in the interactive display can be more accurately detected, so that the test accuracy of the performance data of the page to be tested can be greatly improved.

[0067] It is understandable that the abnormal data detection algorithm may also include standard deviation method, density-based clustering algorithm, isolation forest, k-means clustering, local anomaly factor and other algorithms, which are not specifically limited in the embodiments of the present application.

[0068] In one embodiment, based on multiple target loading times, performance data of the page to be tested executing page operation instructions from the user's perspective is determined, including: calculating the average of multiple target loading times to obtain an average loading time; obtaining a second compensation time, the second compensation time is determined based on the average of the difference in time caused by the real user and the simulated user triggering the page operation instruction; based on the average loading time and the second compensation time, performance data of the page to be tested executing page operation instructions from the user's perspective is determined.

[0069] Among them, the second compensation time can be pre-set by an expert or obtained through multiple experiments, and the second compensation time can be a positive value or a negative value. It should be noted that in the scenario where multiple page screenshots include multiple page screenshots that execute multiple page operation instructions, and after eliminating abnormal loading times to obtain multiple target loading times, the average of the multiple target loading times can be calculated to obtain the average loading time, and the second compensation time can be added to the average loading time to perform operations such as adding, so that the performance data of the page to be tested executing the page operation instructions from the user's perspective can be obtained more accurately, thereby greatly improving the test accuracy of the performance data of the page to be tested.

[0070] In one embodiment, the method also includes: generating a timeline for taking screenshots of the page to be tested according to a set frequency; determining the screenshot time points corresponding to each page screenshot in the timeline; and generating a test record report of the page to be tested executing page operation instructions based on the timeline, multiple page screenshots, and the screenshot time points corresponding to each page screenshot.

[0071] It should be noted that the test record report can be viewed according to each time point in the timeline. By generating a test record report for the page to be tested, the test content can be traced back during the entire test period, making it easier to find problems with the test data and conveniently locate the performance optimization points of the front-end system.

[0072] For example, Figure 4 As shown, the test record report includes multiple page screenshots and the screenshot time points corresponding to each page screenshot in the timeline. At the same time, the test record report can also include data such as test time, test number, tester, total test duration, test rounds, etc., so the configuration information of the test record report can be set according to actual conditions.

[0073] The page performance testing method provided in the above embodiment takes screenshots of the page to be tested at a set frequency, and triggers the page to be tested based on a preset page operation instruction to obtain multiple page screenshots; obtains the first page screenshot when the page to be tested starts loading and the second page screenshot when the page to be tested ends loading from the multiple page screenshots; determines the first time point corresponding to the first page screenshot, and determines the second time point corresponding to the second page screenshot; and determines the performance data of the page to be tested executing the page operation instruction from the user's perspective based on the first time point and the second time point. The embodiment of the present application substitutes the user's perspective by taking page screenshots to determine the time points when the page to be tested starts loading and ends loading, and can more accurately detect the performance data of the page to be tested in interactive display, thereby greatly improving the test accuracy of the performance data of the page to be tested.

[0074] In order to meet the simulated user operation scenario, the experience problems caused by insufficient front-end performance can be discovered in advance, so as to optimize as soon as possible. The screenshot frequency of the embodiment of the present application can be freely set, the test record report can also be viewed at each time point on the timeline, and the interference factors of the front-end loading process can also be eliminated through the abnormal data detection algorithm. In terms of maintainability, it can continue to be optimized and improved to reduce costs, and the abnormal data detection algorithm for eliminating interference items can be flexibly adjusted according to the development of subsequent technologies.

[0075] The page performance testing method provided in the embodiment of the present application can more realistically reflect the performance of the front-end system, discover performance problems from the user's perspective, and is of great help in restoring user scenarios and improving the quality of front-end experience. Combined with the performance stress test on the server side, the performance optimization points of the front-end system can be located, reducing customer complaints after the system goes online, avoiding user loss, and improving the interaction quality of the front-end system.

[0076] Please refer to Figure 5 , Figure 5 A schematic block diagram of a page performance testing device provided in an embodiment of the present application.

[0077] like Figure 5 As shown, the page performance testing device 200 includes:

[0078] The screenshot module 201 is used to take screenshots of the page to be tested at a set frequency, and to trigger the page to be tested based on a preset page operation instruction to obtain multiple page screenshots;

[0079] An acquisition module 202 is configured to acquire a first page screenshot and a second page screenshot from the plurality of page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading;

[0080] A first determining module 203, configured to determine a first time point corresponding to the first page screenshot, and to determine a second time point corresponding to the second page screenshot;

[0081] The second determination module 204 is used to determine the performance data of the page to be tested executing the page operation instruction from the user's perspective according to the first time point and the second time point.

[0082] In one embodiment, the second determining module 204 is further configured to:

[0083] Calculating the difference between the first time point and the second time point to obtain the loading time required for the page to be tested to execute the page operation instruction;

[0084] Acquire a first compensation duration, where the first compensation duration is determined according to a difference in duration caused by a real user and a simulated user triggering the page operation instruction;

[0085] Performance data of the page to be tested executing the page operation instruction from a user perspective is determined according to the loading duration and the first compensation duration.

[0086] In one embodiment, the triggering operation of the page operation instruction is multiple, and the first page screenshot and the second page screenshot are multiple; the second determination module 204 is further used to:

[0087] Determining a correspondence between a plurality of first time points and a plurality of second time points according to a correspondence between each of the first page screenshots and each of the second page screenshots;

[0088] Calculate the difference between the first time points and the second time points corresponding to each other, and obtain the loading time required for the page to be tested to execute the page operation instructions multiple times respectively;

[0089] Based on a preset abnormal data detection algorithm, abnormal loading durations are eliminated from the multiple loading durations to obtain multiple target loading durations;

[0090] Based on the multiple target loading times, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0091] In one embodiment, the second determining module 204 is further configured to:

[0092] Calculate the average of multiple target loading times to obtain an average loading time;

[0093] Acquire a second compensation duration, where the second compensation duration is determined according to an average value of a difference in duration caused by a real user and a simulated user triggering the page operation instruction;

[0094] The performance data of the page to be tested executing the page operation instruction from the user's perspective is determined according to the average loading time and the second compensation time.

[0095] In one embodiment, the acquisition module 202 is further configured to:

[0096] Matching the plurality of page screenshots with a first page to be tested respectively, and determining a first page screenshot from the plurality of page screenshots according to the plurality of matching results; the first page to be tested is used to indicate that the page to be tested starts to execute the page operation instruction; and,

[0097] The plurality of page screenshots are matched with a second page to be tested respectively, and a second page screenshot is determined from the plurality of page screenshots according to a plurality of matching results; the second page to be tested is used to indicate that the page to be tested finishes executing the page operation instruction.

[0098] In one embodiment, the acquisition module 202 is further configured to:

[0099] Based on a first selected operation triggered by a user, obtaining a first page screenshot from the plurality of page screenshots; and,

[0100] Based on a second selected operation triggered by the user, a second page screenshot is acquired from the multiple page screenshots.

[0101] In one embodiment, the page performance testing device 200 further includes a reporting module, which is used to:

[0102] Generate a timeline for taking screenshots of the page to be tested according to the set frequency;

[0103] Determine the screenshot time point corresponding to each of the page screenshots in the timeline;

[0104] Based on the timeline, the plurality of page screenshots and the screenshot time points corresponding to the page screenshots, a test record report of the page to be tested executing the page operation instruction is generated.

[0105] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned page performance testing method embodiment, and will not be repeated here.

[0106] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 6 Runs on the computer device shown.

[0107] See also Figure 6 , Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0108] like Figure 6 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory, and the storage medium may be non-volatile or volatile.

[0109] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any page performance test method.

[0110] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0111] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any page performance test method.

[0112] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0114] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0115] Taking screenshots of the page to be tested at a set frequency, and triggering the page to be tested based on a preset page operation instruction to obtain multiple page screenshots;

[0116] Acquire a first page screenshot and a second page screenshot from the multiple page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading;

[0117] Determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot;

[0118] According to the first time point and the second time point, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0119] In one embodiment, when the processor implements determining the performance data of the page to be tested executing the page operation instruction from the user perspective according to the first time point and the second time point, it is used to implement:

[0120] Calculating the difference between the first time point and the second time point to obtain the loading time required for the page to be tested to execute the page operation instruction;

[0121] Acquire a first compensation duration, where the first compensation duration is determined according to a difference in duration caused by a real user and a simulated user triggering the page operation instruction;

[0122] Performance data of the page to be tested executing the page operation instruction from a user perspective is determined according to the loading duration and the first compensation duration.

[0123] In one embodiment, the triggering operation of the page operation instruction is multiple, and the first page screenshot and the second page screenshot are both multiple; when the processor implements the step of determining the performance data of the page to be tested executing the page operation instruction from the user's perspective according to the first time point and the second time point, it is used to implement:

[0124] Determining a correspondence between a plurality of first time points and a plurality of second time points according to a correspondence between each of the first page screenshots and each of the second page screenshots;

[0125] Calculate the difference between the first time points and the second time points corresponding to each other, and obtain the loading time required for the page to be tested to execute the page operation instructions multiple times respectively;

[0126] Based on a preset abnormal data detection algorithm, abnormal loading durations are eliminated from the multiple loading durations to obtain multiple target loading durations;

[0127] Based on the multiple target loading times, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

[0128] In one embodiment, when the processor determines the performance data of the page to be tested executing the page operation instruction from the user's perspective based on the multiple target loading durations, it is used to implement:

[0129] Calculate the average of multiple target loading times to obtain an average loading time;

[0130] Acquire a second compensation duration, where the second compensation duration is determined according to an average value of a difference in duration caused by a real user and a simulated user triggering the page operation instruction;

[0131] The performance data of the page to be tested executing the page operation instruction from the user's perspective is determined according to the average loading time and the second compensation time.

[0132] In one embodiment, when the processor implements acquiring the first page screenshot and the second page screenshot from the multiple page screenshots, the processor is used to implement:

[0133] Matching the plurality of page screenshots with a first page to be tested respectively, and determining a first page screenshot from the plurality of page screenshots according to the plurality of matching results; the first page to be tested is used to indicate that the page to be tested starts to execute the page operation instruction; and,

[0134] The plurality of page screenshots are matched with a second page to be tested respectively, and a second page screenshot is determined from the plurality of page screenshots according to a plurality of matching results; the second page to be tested is used to indicate that the page to be tested finishes executing the page operation instruction.

[0135] In one embodiment, when the processor implements acquiring the first page screenshot and the second page screenshot from the multiple page screenshots, the processor is used to implement:

[0136] Based on a first selected operation triggered by a user, obtaining a first page screenshot from the plurality of page screenshots; and,

[0137] Based on a second selected operation triggered by the user, a second page screenshot is acquired from the multiple page screenshots.

[0138] In one embodiment, the processor is further configured to implement:

[0139] Generate a timeline for taking screenshots of the page to be tested according to the set frequency;

[0140] Determine the screenshot time point corresponding to each of the page screenshots in the timeline;

[0141] Based on the timeline, the plurality of page screenshots and the screenshot time points corresponding to the page screenshots, a test record report of the page to be tested executing the page operation instruction is generated.

[0142] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned page performance testing method embodiment, and will not be repeated here.

[0143] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0144] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the page performance testing method of the present application.

[0145] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0146] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0147] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0148] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0149] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A page performance testing method, characterized in that: include: Taking screenshots of the page to be tested at a set frequency, and triggering the page to be tested based on a preset page operation instruction to obtain multiple page screenshots; Acquire a first page screenshot and a second page screenshot from the multiple page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading; Determining a first time point corresponding to the first page screenshot, and determining a second time point corresponding to the second page screenshot; According to the first time point and the second time point, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

2. The page performance testing method according to claim 1, characterized in that: The determining, according to the first time point and the second time point, performance data of the page to be tested executing the page operation instruction from the user's perspective includes: Calculating the difference between the first time point and the second time point to obtain the loading time required for the page to be tested to execute the page operation instruction; Acquire a first compensation duration, where the first compensation duration is determined according to a difference in duration caused by a real user and a simulated user triggering the page operation instruction; Performance data of the page to be tested executing the page operation instruction from a user perspective is determined according to the loading duration and the first compensation duration.

3. The page performance testing method according to claim 1, characterized in that: The triggering operation of the page operation instruction is multiple, and the first page screenshot and the second page screenshot are both multiple; The determining, according to the first time point and the second time point, performance data of the page to be tested executing the page operation instruction from the user's perspective includes: Determining a correspondence between a plurality of first time points and a plurality of second time points according to a correspondence between each of the first page screenshots and each of the second page screenshots; Calculate the difference between the first time points and the second time points corresponding to each other, and obtain the loading time required for the page to be tested to execute the page operation instructions multiple times respectively; Based on a preset abnormal data detection algorithm, abnormal loading durations are eliminated from the multiple loading durations to obtain multiple target loading durations; Based on the multiple target loading times, performance data of the page to be tested executing the page operation instruction from the user's perspective is determined.

4. The page performance testing method according to claim 3, characterized in that: The determining, based on the plurality of target loading durations, performance data of the page to be tested executing the page operation instruction from the user's perspective includes: Calculate the average of multiple target loading times to obtain an average loading time; Acquire a second compensation duration, where the second compensation duration is determined according to an average value of a difference in duration caused by a real user and a simulated user triggering the page operation instruction; The performance data of the page to be tested executing the page operation instruction from the user's perspective is determined according to the average loading time and the second compensation time.

5. The page performance testing method according to any one of claims 1 to 4, characterized in that: The acquiring the first page screenshot and the second page screenshot from the plurality of page screenshots comprises: Matching the plurality of page screenshots with a first page to be tested respectively, and determining a first page screenshot from the plurality of page screenshots according to the plurality of matching results; the first page to be tested is used to indicate that the page to be tested starts to execute the page operation instruction; and, The plurality of page screenshots are matched with a second page to be tested respectively, and a second page screenshot is determined from the plurality of page screenshots according to a plurality of matching results; the second page to be tested is used to indicate that the page to be tested finishes executing the page operation instruction.

6. The page performance testing method according to any one of claims 1 to 4, characterized in that: The acquiring the first page screenshot and the second page screenshot from the plurality of page screenshots comprises: Based on a first selected operation triggered by a user, obtaining a first page screenshot from the plurality of page screenshots; and, Based on a second selected operation triggered by the user, a second page screenshot is acquired from the multiple page screenshots.

7. The page performance testing method according to any one of claims 1 to 4, characterized in that: The method further comprises: Generate a timeline for taking screenshots of the page to be tested according to the set frequency; Determine the screenshot time point corresponding to each of the page screenshots in the timeline; Based on the timeline, the plurality of page screenshots and the screenshot time points corresponding to the page screenshots, a test record report of the page to be tested executing the page operation instruction is generated.

8. A page performance testing device, characterized in that: The page performance testing device comprises: A screenshot module is used to take screenshots of the page to be tested at a set frequency, and to trigger operations on the page to be tested based on preset page operation instructions to obtain multiple page screenshots; An acquisition module, configured to acquire a first page screenshot and a second page screenshot from the plurality of page screenshots, wherein the first page screenshot is a page screenshot when the page to be tested starts to load, and the second page screenshot is a page screenshot when the page to be tested finishes loading; A first determining module, used to determine a first time point corresponding to the first page screenshot, and to determine a second time point corresponding to the second page screenshot; The second determining module is used to determine the performance data of the page to be tested executing the page operation instruction from the user's perspective according to the first time point and the second time point.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the page performance testing method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the page performance testing method according to any one of claims 1 to 7 is implemented.