CN111694735B - Page performance testing method and device, electronic equipment and storage medium - Google Patents
Page performance testing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111694735B CN111694735B CN202010464966.6A CN202010464966A CN111694735B CN 111694735 B CN111694735 B CN 111694735B CN 202010464966 A CN202010464966 A CN 202010464966A CN 111694735 B CN111694735 B CN 111694735B
- Authority
- CN
- China
- Prior art keywords
- performance
- page
- current page
- current
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
- G06F11/3612—Software analysis for verifying properties of programs by runtime analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a page performance test method, a device, electronic equipment and a storage medium, wherein an agent class for simulating an operation generated when a user operates a current page is obtained in response to a performance test instruction triggered by the user; identifying the proxy class corresponding to the current page to obtain target operation of proxy class simulation execution; if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to the test start time and current performance data corresponding to the test end time, and determining the performance index of the current page based on the historical performance data and the current performance data. Therefore, according to the method provided by the embodiment of the invention, the performance identification of the page element in the current page needing performance test is obtained, the test starting time and the test ending time are defined, and the performance index of the current page can be accurately determined according to the performance data corresponding to the two times.
Description
Technical Field
The present disclosure relates to the field of application page performance testing technologies, and in particular, to a page performance testing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid growth of the number of application software (APP), the number of application software selectable by a user is increasing, and the requirements of the application software are also increasing, so that besides meeting basic performances, the user experience of the application software is also good. The experience effect of the application software comprises short starting time of UI (User Interface) pages (short page rendering time), good fluency, small memory occupation and the like. In order to ensure the fluency of UI page display, performance test is required to be carried out on the UI page, and corresponding improvement is carried out according to the test result.
At present, in the field of UI page test, most of tests remain on a manual test level, and the average value of multiple test results is used as a performance index of the UI page through repeated tests. However, when the performance index is tested manually, a tester is required to repeatedly operate the APP for 10-20 times to repeatedly test, and when the page is rendered, the time when the page starts to be loaded and the whole page is rendered is manually determined, and recording is performed, so that a large error exists between the recorded test result and the actual test result.
Disclosure of Invention
The application provides a page performance testing method, a page performance testing device, electronic equipment and a storage medium, and aims to solve the problem that the accuracy is low when the page performance is tested by the existing method.
In a first aspect, the present application provides a method for testing page performance, including the following steps:
responding to a performance test instruction triggered by a user and used for performing performance test on a current page, and acquiring a proxy class corresponding to the current page, wherein the proxy class is used for simulating an operation generated when the user operates the current page;
identifying the proxy class corresponding to the current page, and obtaining target operation of simulation execution of the proxy class;
if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to test start time and current performance data corresponding to test end time, wherein the page element is an element displayed in the current page when responding to the target operation, the test start time is the time of displaying the page element corresponding to the previous performance identifier in the previous page, and the test end time is the time of displaying the page element corresponding to the performance identifier in the current page;
and determining the performance index of the current page based on the historical performance data and the current performance data.
Further, the obtaining the proxy class corresponding to the current page includes:
acquiring a plurality of operations generated when a user operates a current page;
encapsulating a plurality of the operation abstractions into a base class;
and calling language dynamic proxy characteristics to perform simulation execution on the base class, and generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class.
Further, the method further comprises the following steps:
and adding a performance identifier in a last displayed page element of the current page in response to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
Further, the determining the performance index of the current page based on the historical performance data and the current performance data includes:
and calculating a data difference value between the historical performance data and the current performance data, and taking the data difference value as a performance index of the current page.
Further, the method further comprises the following steps:
acquiring performance indexes corresponding to performance tests performed on the current page for a plurality of times;
and calculating a performance average value of the performance indexes corresponding to the performance tests, and taking the performance average value as a final performance index of the current page.
In a second aspect, the present application provides a page performance testing apparatus, including:
the proxy class acquisition module is used for responding to a performance test instruction triggered by a user and used for performing performance test on the current page, acquiring a proxy class corresponding to the current page, and simulating an operation generated when the user operates the current page;
the target operation determining module is used for identifying the proxy class corresponding to the current page and obtaining target operation which is simulated and executed by the proxy class;
the performance data acquisition module is used for acquiring historical performance data corresponding to a test start time and current performance data corresponding to a test end time when a performance identifier exists in a page element corresponding to the target operation, wherein the page element is an element displayed in the current page when the target operation is responded, the test start time is a time for displaying a page element corresponding to a previous performance identifier in a previous page, and the test end time is a time for displaying the page element corresponding to the performance identifier in the current page;
and the performance index determining module is used for determining the performance index of the current page based on the historical performance data and the current performance data.
Further, the agent class acquisition module includes:
an operation acquisition unit configured to acquire a plurality of operations generated when a user operates a current page;
the packaging unit is used for packaging a plurality of operation abstractions into a base class;
and the proxy class generating unit is used for calling the language dynamic proxy characteristics to perform simulation execution on the base class and generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class.
Further, the method further comprises the following steps:
and the performance identification adding module is used for responding to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
Further, the performance index determining module is further configured to calculate a data difference between the historical performance data and the current performance data, and use the data difference as the performance index of the current page.
Further, the method further comprises the following steps:
the test result acquisition module is used for acquiring performance indexes corresponding to performance tests performed on the current page for a plurality of times;
and the final performance index determining module is used for calculating the performance average value of the performance indexes corresponding to the performance tests, and taking the performance average value as the final performance index of the current page.
In a third aspect, the present application provides an electronic device, including:
a memory for storing program instructions;
and the processor is used for calling and executing the program instructions in the memory so as to realize the page performance testing method in the first aspect.
In a fourth aspect, the present application provides a storage medium having a computer program stored therein, where when the computer program is executed by at least one processor of a page performance testing apparatus, the page performance testing apparatus executes the page performance testing method according to the first aspect.
According to the technical scheme, the page performance testing method, the device, the electronic equipment and the storage medium provided by the embodiment of the invention are used for responding to the performance testing instruction triggered by the user to acquire the proxy class for simulating the operation generated when the user operates the current page; identifying the proxy class corresponding to the current page to obtain target operation of proxy class simulation execution; if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to the test start time and current performance data corresponding to the test end time, and determining the performance index of the current page based on the historical performance data and the current performance data. Therefore, according to the method provided by the embodiment of the invention, the performance identification of the page element in the current page needing performance test is obtained, the test starting time and the test ending time are defined, and the performance index of the current page can be accurately determined according to the performance data corresponding to the two times.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a page performance test method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating proxy class according to an embodiment of the present invention;
FIG. 3 is a flowchart of a page testing method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a page performance testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to improve accuracy of performance test of the UI page of the APP, the embodiment of the invention provides a UI automation platform which can be in a webpage form and can be applied to a user-defined test scene. The UI automation platform is used for providing a data interface by calling an application open source framework so as to realize communication connection with the terminal equipment.
When in test, a user operates the UI automation platform, inputs a test script, positions the test script to a UI page of the APP in the terminal equipment, executes the test script for multiple times to automatically perform repeated test for multiple times, improves the test efficiency, and can ensure the accuracy of test results.
The performance test is used for testing performance indexes of a certain UI page, namely loading speed, response time, page rendering time, flow consumption, smoothness, memory occupation and the like of the UI page.
Fig. 1 is a flowchart of a page performance testing method according to an embodiment of the present invention. Referring to fig. 1, the method for testing page performance provided by the embodiment of the invention is executed by a UI automation platform, and specifically includes the following steps:
s1, responding to a performance test instruction triggered by a user and used for performing performance test on a current page, and acquiring a proxy class corresponding to the current page, wherein the proxy class is used for simulating an operation generated when the user operates the current page.
When a user operates the UI automation platform to perform performance test on a UI page of a certain APP, a performance test instruction is generated, and the performance test instruction is used for performing performance test on the current page of the APP.
When the performance test is carried out on the current page, the proxy class simulates the operation generated when the user operates the current page, so that the manual operation of the user is avoided, the repeated detection process can be automatically carried out, the efficiency is high, and the accuracy is good.
Operations include clicking, inputting, sliding, and the like. The simulation execution refers to that the proxy class replaces the operation of the user, namely, in the test process, the user does not need to operate for many times, and the proxy class only needs to execute the operation, for example, the proxy class simulates to execute the clicking operation, or the proxy class simulates to execute the input operation, or the proxy class simulates to execute the sliding operation.
Fig. 2 is a flowchart of a method for generating proxy class according to an embodiment of the present invention. Referring to fig. 2, when the UI automation platform generates a proxy class, the method includes:
s11, acquiring a plurality of operations generated when a user operates a current page.
S12, encapsulating a plurality of operation abstractions into a base class.
S13, calling language dynamic proxy characteristics to perform simulation execution on the base class, generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class.
When the performance of the current page of the APP is detected, various operations of the APP by a user are obtained, each operation is abstractly packaged into a base class, a Proxyclass proxy class is generated by utilizing the characteristics of Java language dynamic proxy, and each operation in the base class is simulated and executed.
After the UI automation platform generates the proxy class, in the repeated subsequent tests, the proxy class can be directly called to simulate and execute the operation of the user so as to perform performance test on the current page aiming at the specific operation of the user.
S2, identifying the proxy class corresponding to the current page, and obtaining target operation of proxy class simulation execution.
Due to different user operations, the UI automation platform needs to execute different test methods. Therefore, when the performance test is performed on the current page, it is required to determine which operation is currently required to perform the performance test, and after the performance test is completed on the current page in response to the operation, the performance test is performed in response to the next operation.
Therefore, the method provided in this embodiment needs to obtain which operation the proxy class currently simulates to perform. The proxy class is identified by utilizing the characteristic of Java reflection, the target operation which is simulated and executed is determined, and then the performance index of the current page in response to the target operation is tested.
S3, if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to the test start time and current performance data corresponding to the test end time, wherein the page element refers to an element displayed in a current page when responding to the target operation, the test start time refers to the time of displaying the page element corresponding to the previous performance identifier in a previous page, and the test end time refers to the time of displaying the page element corresponding to the performance identifier in the current page.
In the method provided by the embodiment, when testing the performance index of the current page, in order to facilitate the UI automation platform to accurately obtain the test start time and the test end time, it is required to determine whether the performance identifier exists in the page element corresponding to the target operation. Therefore, the UI automation platform provided in this embodiment adds a performance identifier to a page that needs performance testing, where the performance identifier is used to characterize a time point of performance testing.
The basis for adding the performance identifier in the page element is that when the user operates the UI automation platform to perform performance test on the UI page of the APP, the user can select a performance test function on the page displayed by the UI automation platform, and after performance test is selected, user selection characteristics are generated immediately.
When a user operates the UI automation platform to perform performance test on a UI page of a certain APP, a performance test instruction is generated, and meanwhile, based on selection of the user, the performance test instruction carries user selection characteristics so as to determine that performance test is required to be performed on the current UI page. The UI automation platform, when executing the performance test procedure, includes: and adding a performance identifier in the last displayed page element of the current page in response to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
In order to accurately determine the performance index of the rendering process of a certain UI page, a performance identifier may be added to the last page element of the current page after the last page element is displayed. Each UI page comprises a plurality of page elements, each page element is sequentially displayed, and the performance identifier is added on the last displayed page element to mark that the rendering of the current UI page is finished.
For example, when a user operates an APP to search for room source information and call a landlord, the detail page of the room source information is the page that needs to be tested for performance currently. The page comprises page elements such as room source information, reservation telephone, reservation button and the like, and usually after a user clicks an entry detail page, the reservation button is finally displayed, and then a performance identifier is added on the page element such as the reservation button.
When the UI automation platform collects performance indexes of the current page responding to the target operation, judging whether performance identification exists in the page element of the current page, and specifically judging whether performance exists in the last displayed page element of the current page.
If so, the time for displaying the last page element in the current page responding to the target operation is taken as the test ending time, and the time for displaying the last page element in the previous page is taken as the test starting time. The last displayed page element of the previous page is also added with a performance identifier, and the performance identifier of the previous page and the performance identifier of the current page are used as a starting node and an ending node of the performance test after the previous page jumps to the current page.
And respectively acquiring historical performance data corresponding to the test start time and current performance data corresponding to the test end time, namely, the historical performance data corresponding to the previous performance identifier and the current performance data corresponding to the current performance identifier. The test start time refers to the time of displaying the page element corresponding to the previous performance identifier in the previous page, and the test end time refers to the time of displaying the page element corresponding to the performance identifier in the current page.
The current performance data refers to performance data generated after the current page responds to the target operation of the user and when the performance identifier is identified, namely corresponding performance data after the last page element of the current page is displayed; the historical performance data refers to performance data generated by the previous page after responding to the operation of the previous user when the performance identification of the previous page is identified, namely, the performance data corresponding to the last page element of the previous page after being displayed, and the historical performance data can be used as the performance data when the current page responds to the target operation of the user.
S4, determining the performance index of the current page based on the historical performance data and the current performance data.
After the test starting time and the test ending time are accurately determined, the performance index of the current page can be calculated according to the performance data corresponding to the two time points.
Specifically, the UI automation platform in the process of determining the performance index of the current page includes: and calculating a data difference value between the historical performance data and the current performance data, and taking the data difference value as a performance index of the current page.
Because the historical performance data can be used as the performance data when the current page responds to the target operation of the user, and the current performance data is the performance data generated after the current page responds to the target operation of the user, the performance index generated when the current page responds to the target operation can be determined by making the two performance data worse.
For example, when the target operation is clicking, the rendering time, the flow consumption and the like of the current page are tested, the time when the previous page displays the page element corresponding to the previous performance identifier is taken as the test starting time T1, the time when the page element corresponding to the performance identifier is displayed in the current page is taken as the test ending time T2, and then the overall rendering time t=t2-T1 of the current page in response to the target operation.
And taking the flow of the page element corresponding to the previous performance identifier displayed on the previous page as historical performance data Q1, and taking the flow of the page element corresponding to the performance identifier displayed on the current page as current performance data Q2, wherein the flow Q=Q2-Q1 consumed when the current page responds to the target operation.
For another example, when the target operation is sliding, the fluency and the like of the current page are tested, the difference heart rate of the page element corresponding to the previous performance identifier displayed on the previous page is taken as historical performance data F1, the difference heart rate of the page element corresponding to the performance identifier displayed on the current page is taken as current performance data F2, and then the difference heart rate f=f2-F1 when the current page responds to the target operation. And finally, judging the fluency of the current page according to the measured heart rate difference, namely whether the jam phenomenon exists or not.
The performance indexes can also comprise a memory, a CPU and the like, when the performance is tested, the method can be adopted to calibrate the test starting time and the test ending time according to the two performance identifiers, and then the performance indexes corresponding to the current page are determined according to the performance data of the two time points. For specific testing procedures, reference may be made to the foregoing, and details are not repeated here.
In order to ensure the accuracy of the performance test results, the UI automation platform can call the proxy class, execute multiple tests on the current page, and calculate the average value of the test results each time to obtain the final performance index of the current page.
Fig. 3 is a flowchart of a page testing method according to an embodiment of the present invention. For this reason, referring to fig. 3, the method provided in the embodiment of the present invention, on the basis of the foregoing method provided, further includes:
s501, obtaining performance indexes corresponding to performance tests performed on the current page for a plurality of times.
S502, calculating a performance average value of performance indexes corresponding to the performance tests for a plurality of times, and taking the performance average value as a final performance index of the current page.
And each time the UI automation platform executes a performance test process, a performance index is obtained, the performance indexes of multiple tests are averaged, and the performance average is used as the final performance index of the current page, so that the accuracy of the performance execution of the current page is ensured.
According to the technical scheme, the page performance testing method provided by the embodiment of the invention responds to the performance testing instruction triggered by the user to obtain the proxy class for simulating the operation generated when the user operates the current page; identifying the proxy class corresponding to the current page to obtain target operation of proxy class simulation execution; if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to the test start time and current performance data corresponding to the test end time, and determining the performance index of the current page based on the historical performance data and the current performance data. Therefore, according to the method provided by the embodiment of the invention, the performance identification of the page element in the current page needing performance test is obtained, the test starting time and the test ending time are defined, and the performance index of the current page can be accurately determined according to the performance data corresponding to the two times.
Fig. 4 is a block diagram of a page performance testing apparatus according to an embodiment of the present invention. Referring to fig. 4, a page performance testing apparatus provided by an embodiment of the present invention is configured to execute the page performance testing method shown in fig. 1, where the apparatus includes: the proxy class acquisition module 10 is used for responding to a performance test instruction triggered by a user and used for performing performance test on a current page, acquiring a proxy class corresponding to the current page, wherein the proxy class is used for simulating an operation generated when the user operates the current page; the target operation determining module 20 is configured to identify a proxy class corresponding to the current page, and obtain a target operation that is performed by simulation of the proxy class; the performance data obtaining module 30 is configured to obtain, when a performance identifier exists in a page element corresponding to the target operation, historical performance data corresponding to a test start time and current performance data corresponding to a test end time, where the page element is an element displayed in the current page in response to the target operation, the test start time is a time when a page element corresponding to a previous performance identifier is displayed in a previous page, and the test end time is a time when a page element corresponding to the performance identifier is displayed in the current page; a performance index determining module 40, configured to determine a performance index of the current page based on the historical performance data and the current performance data.
Further, the agent class acquisition module 10 includes: an operation acquisition unit configured to acquire a plurality of operations generated when a user operates a current page; the packaging unit is used for packaging a plurality of operation abstractions into a base class; and the proxy class generating unit is used for calling the language dynamic proxy characteristics to perform simulation execution on the base class and generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class.
Further, the method further comprises the following steps: and the performance identification adding module is used for responding to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
Further, the performance index determining module 40 is further configured to calculate a data difference between the historical performance data and the current performance data, and use the data difference as the performance index of the current page.
Further, the method further comprises the following steps: the test result acquisition module is used for acquiring performance indexes corresponding to performance tests performed on the current page for a plurality of times; and the final performance index determining module is used for calculating the performance average value of the performance indexes corresponding to the performance tests, and taking the performance average value as the final performance index of the current page.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. As shown in fig. 5, an electronic device provided in the present application includes: a memory 601 for storing program instructions; a processor 602, configured to invoke and execute program instructions in the memory, so as to implement the page performance testing method according to the first aspect.
In this embodiment, the processor 602 and the memory 601 may be connected by a bus or other means. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk.
The storage medium is provided with a computer program stored therein, and when at least one processor of the page performance testing device executes the computer program, the page performance testing device executes the page performance testing method described in the foregoing embodiment.
The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the page performance test apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for the relevant points.
The embodiments of the present invention described above do not limit the scope of the present invention.
Claims (10)
1. The page performance testing method is characterized by comprising the following steps of:
responding to a performance test instruction triggered by a user and used for performing performance test on a current page, acquiring a plurality of operations generated when the user operates the current page, abstractly packaging the operations into a base class, calling the dynamic proxy characteristics of a language to perform simulation execution on the base class, and generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class;
identifying the proxy class corresponding to the current page, and obtaining target operation of simulation execution of the proxy class;
if the performance identifier exists in the page element corresponding to the target operation, acquiring historical performance data corresponding to test start time and current performance data corresponding to test end time, wherein the page element is an element displayed in the current page when responding to the target operation, the test start time is the time of displaying the page element corresponding to the previous performance identifier in the previous page, and the test end time is the time of displaying the page element corresponding to the performance identifier in the current page;
and determining the performance index of the current page based on the historical performance data and the current performance data.
2. The method as recited in claim 1, further comprising:
and adding a performance identifier in a last displayed page element of the current page in response to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
3. The method of claim 1, wherein the determining the performance indicator for the current page based on the historical performance data and the current performance data comprises:
and calculating a data difference value between the historical performance data and the current performance data, and taking the data difference value as a performance index of the current page.
4. The method as recited in claim 1, further comprising:
acquiring performance indexes corresponding to performance tests performed on the current page for a plurality of times;
and calculating a performance average value of the performance indexes corresponding to the performance tests, and taking the performance average value as a final performance index of the current page.
5. A page performance testing apparatus, comprising:
the proxy class acquisition module is used for responding to a performance test instruction triggered by a user and used for performing performance test on the current page, acquiring a proxy class corresponding to the current page, and simulating an operation generated when the user operates the current page;
the agent class acquisition module includes:
an operation acquisition unit configured to acquire a plurality of operations generated when a user operates a current page;
the packaging unit is used for packaging a plurality of operation abstractions into a base class;
the proxy class generating unit is used for calling the language dynamic proxy characteristics to perform simulation execution on the base class and generating a proxy class corresponding to the current page, wherein the proxy class is used for performing simulation execution on each operation in the base class;
the target operation determining module is used for identifying the proxy class corresponding to the current page and obtaining target operation which is simulated and executed by the proxy class;
the performance data acquisition module is used for acquiring historical performance data corresponding to a test start time and current performance data corresponding to a test end time when a performance identifier exists in a page element corresponding to the target operation, wherein the page element is an element displayed in the current page when the target operation is responded, the test start time is a time for displaying a page element corresponding to a previous performance identifier in a previous page, and the test end time is a time for displaying the page element corresponding to the performance identifier in the current page;
and the performance index determining module is used for determining the performance index of the current page based on the historical performance data and the current performance data.
6. The apparatus as recited in claim 5, further comprising:
and the performance identification adding module is used for responding to a performance test instruction carrying a user selection characteristic, wherein the user selection characteristic is used for representing whether the current page needs performance test or not.
7. The apparatus of claim 5, wherein the performance level determination module is further configured to calculate a data difference between the historical performance data and the current performance data, and use the data difference as the performance level of the current page.
8. The apparatus as recited in claim 5, further comprising:
the test result acquisition module is used for acquiring performance indexes corresponding to performance tests performed on the current page for a plurality of times;
and the final performance index determining module is used for calculating the performance average value of the performance indexes corresponding to the performance tests, and taking the performance average value as the final performance index of the current page.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory to implement the page performance test method of any of claims 1-4.
10. A storage medium having stored therein a computer program which, when executed by at least one processor of a page performance testing apparatus, performs the page performance testing method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010464966.6A CN111694735B (en) | 2020-05-28 | 2020-05-28 | Page performance testing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010464966.6A CN111694735B (en) | 2020-05-28 | 2020-05-28 | Page performance testing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111694735A CN111694735A (en) | 2020-09-22 |
CN111694735B true CN111694735B (en) | 2023-07-21 |
Family
ID=72478613
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010464966.6A Active CN111694735B (en) | 2020-05-28 | 2020-05-28 | Page performance testing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111694735B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112905448A (en) * | 2021-01-25 | 2021-06-04 | 长沙市到家悠享网络科技有限公司 | Nested page performance test method, equipment and storage medium |
CN113094268B (en) * | 2021-04-07 | 2024-05-07 | 中国工商银行股份有限公司 | Test method, test device, test equipment and test medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583198A (en) * | 2018-12-12 | 2019-04-05 | 北京字节跳动网络技术有限公司 | Monitor method, apparatus, storage medium and the electronic equipment of the page |
CN110297759A (en) * | 2019-05-22 | 2019-10-01 | 深圳壹账通智能科技有限公司 | A kind of method, apparatus making test page script, equipment and storage medium |
CN111026638A (en) * | 2019-10-29 | 2020-04-17 | 贝壳技术有限公司 | Webpage automatic testing method and device, electronic equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7490316B2 (en) * | 2004-12-02 | 2009-02-10 | International Business Machines Corporation | Method and apparatus to implement adaptive scripting tool |
CN101635655B (en) * | 2008-07-25 | 2012-01-04 | 阿里巴巴集团控股有限公司 | Method, device and system for page performance test |
CN101763306A (en) * | 2009-12-24 | 2010-06-30 | 深圳市金蝶移动互联技术有限公司 | Method for automatically testing performance of front end as well as device and system therefor |
CN103713988B (en) * | 2012-09-29 | 2018-01-26 | 腾讯科技(深圳)有限公司 | Program test device and method |
CN104794050B (en) * | 2014-01-21 | 2018-09-18 | 腾讯科技(深圳)有限公司 | The test method of application program, apparatus and system |
CN105095093A (en) * | 2015-09-30 | 2015-11-25 | 上海斐讯数据通信技术有限公司 | Intelligent terminal performance test method and system |
CN110287441A (en) * | 2019-06-27 | 2019-09-27 | 广州华多网络科技有限公司 | Detection method, device, equipment and the storage medium of page load duration |
-
2020
- 2020-05-28 CN CN202010464966.6A patent/CN111694735B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583198A (en) * | 2018-12-12 | 2019-04-05 | 北京字节跳动网络技术有限公司 | Monitor method, apparatus, storage medium and the electronic equipment of the page |
CN110297759A (en) * | 2019-05-22 | 2019-10-01 | 深圳壹账通智能科技有限公司 | A kind of method, apparatus making test page script, equipment and storage medium |
CN111026638A (en) * | 2019-10-29 | 2020-04-17 | 贝壳技术有限公司 | Webpage automatic testing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111694735A (en) | 2020-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107480039B (en) | Small file read-write performance test method and device for distributed storage system | |
JP5669630B2 (en) | Test case generation method, program and system | |
CN111694735B (en) | Page performance testing method and device, electronic equipment and storage medium | |
CN109684188B (en) | Test method and device | |
CN110059003B (en) | Automatic test method, device, electronic equipment and readable storage medium | |
CN107080945B (en) | Method and device for testing artificial intelligence behaviors in game and electronic equipment | |
CN110320378B (en) | Method, apparatus, device and computer readable storage medium for applying for a quality control test | |
CN110569194A (en) | interface testing method and device, electronic equipment and storage medium | |
CN111190572A (en) | Visualization method and device for page buried point data, electronic equipment and storage medium | |
EP2568302A1 (en) | Automatically generating executable code for a test sequence | |
CN110532193A (en) | A kind of method for analyzing performance, calculates equipment and storage medium at device | |
CN105095093A (en) | Intelligent terminal performance test method and system | |
CN113590498A (en) | Method and system for testing application starting time of desktop operating system | |
CN109360618A (en) | A kind of management method and system of electronization test report | |
CN113656318A (en) | Software version testing method and device and computer equipment | |
CN112346994A (en) | Test information correlation method and device, computer equipment and storage medium | |
CN111881021A (en) | Interface test method, device and system | |
CN111258899A (en) | Use case generation method and device, electronic equipment and computer readable storage medium | |
CN117130946B (en) | Test scene generation method and device, electronic equipment and readable storage medium | |
CN116795723B (en) | Chain unit test processing method and device and computer equipment | |
CN113297062A (en) | Test method and device, electronic equipment and storage medium | |
CN116860606A (en) | Code detection method, medium, device and computing equipment | |
CN114816956A (en) | Interface performance test method and device | |
CN114201388A (en) | Python function-based dynamic baffle testing method and related device | |
CN117632620A (en) | Management method and device for software radio equipment test |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |