CN109766256A - H5 page performance test method, apparatus and computer equipment in application program - Google Patents

H5 page performance test method, apparatus and computer equipment in application program Download PDF

Info

Publication number
CN109766256A
CN109766256A CN201811572820.2A CN201811572820A CN109766256A CN 109766256 A CN109766256 A CN 109766256A CN 201811572820 A CN201811572820 A CN 201811572820A CN 109766256 A CN109766256 A CN 109766256A
Authority
CN
China
Prior art keywords
page
test
data
time
packet capturing
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.)
Granted
Application number
CN201811572820.2A
Other languages
Chinese (zh)
Other versions
CN109766256B (en
Inventor
易李军
魏万勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201811572820.2A priority Critical patent/CN109766256B/en
Publication of CN109766256A publication Critical patent/CN109766256A/en
Application granted granted Critical
Publication of CN109766256B publication Critical patent/CN109766256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

This application involves H5 page performance test method, apparatus, computer equipment and storage mediums in a kind of application program.This method comprises: obtaining the address of the H5 page to be measured of application program to be measured, the test to the H5 page is generated to instruct, test instruction is sent to test terminal, test instruction is used to indicate the H5 page that test terminal opens test terminal, call packet capturing interface, open the packet capturing program of test terminal, obtain all kinds of time-consuming data of the H5 page default critical event in load, obtain the packet capturing file of packet capturing program and the journal file of application programs to be measured, according to packet capturing file, journal file and all kinds of time-consuming data, the performance test results of the H5 page are obtained.This method opens the H5 page of application program in test terminal, get most true performance data, it is ensured that obtain true test data, ensure that the accuracy of test data, simultaneously according to packet capturing file, all kinds of time-consuming data and journal file can fully assess the H5 page.

Description

H5 page performance test method, apparatus and computer equipment in application program
Technical field
This application involves page monitoring technology fields, more particularly to the page performance test side H5 in a kind of application program Method, device, computer equipment and storage medium.
Background technique
The fast development of careless internet and mobile terminal device, webpage when user is to using mobile terminal viewing webpage The requirement of loading velocity is higher and higher.Therefore, especially heavy to the performance test of the H5 page of application program when application issued It wants.
In traditional test method, by the relevant performance data such as network traffic, the performance of the H5 page is assessed.It should Method test dimension is single, can not fully assess H5 page performance.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of application journey that can fully assess H5 page performance H5 page performance test method, apparatus, computer equipment and storage medium in sequence.
A kind of H5 page performance test method in application program, which comprises
The address of the H5 page to be measured of application program to be measured is obtained, the test to the H5 page is generated and instructs;
The test instruction is sent to test terminal, the test instruction is used to indicate the test terminal and opens the survey Try the H5 page of terminal;
Packet capturing interface is called, the packet capturing program of test terminal is opened;
Obtain all kinds of time-consuming data of the H5 page default critical event in load;
Obtain the packet capturing file of the packet capturing program and the journal file of application programs to be measured;
According to the packet capturing file, journal file and all kinds of time-consuming data, the performance test results of the H5 page are obtained.
In another embodiment, all kinds of time-consuming data for obtaining the H5 page default critical event in load The step of, comprising:
The browse controls for receiving the H5 page bury information in load;
Bury information according to described, obtain at the beginning of the default critical event in the H5 page loading procedure point and End time point;
The time difference with end time point is put at the beginning of according to the default critical event, is obtained and each default key The corresponding all kinds of time-consuming data of event.
In another embodiment, described that information is buried according to, it obtains default in the H5 page loading procedure At the beginning of critical event the step of point and end time point, comprising:
When receive bury information when, call test terminal, the default critical event in H5 page loading procedure when Between put screenshot;
According to each time point for burying an information content and screenshot, determine the title of default critical event, sart point in time and End time point.
In another embodiment, according to the packet capturing file, journal file and all kinds of time-consuming data, the H5 page is obtained The step of the performance test results, comprising:
According to the packet capturing file and the journal file, resources flowing amount data and http request data are obtained;
According to the page of the H5 page described in all kinds of time-consuming data, resources flowing amount data and http request data assessment Can, obtain the performance test results of the H5 page.
In another embodiment, before sending the step of test instructs to test terminal, the method also includes:
It is instructed according to test, sends unloading command to the test terminal, the unloading command is used to indicate the test Terminal unloads the application program to be measured;
Clear up the daily record data of the application program to be measured;
Send installation instruction to the test terminal, the installation instruction be used to indicate described in test terminal installation to Survey application program.
In another embodiment, the method also includes:
It receives and the report generation of the H5 page to be measured is requested;
Graph tool is called, according to all kinds of time-consuming data, resources flowing amount data and the http request data of the H5 page, is generated Visual H5 page performance detection report.
H5 page performance test device in a kind of application program, described device include:
Instruction acquisition module is tested, the address of the H5 page to be measured for obtaining application program to be measured is generated to the H5 page Test instruction;
Instruction sending module, for sending the test instruction to test terminal, the test instruction is used to indicate described Test terminal opens the H5 page of the test terminal;
Packet capturing processing module opens the packet capturing program of test terminal for calling packet capturing interface;
Time-consuming obtains module, for obtaining all kinds of time-consuming data of the H5 page default critical event in load;
Data acquisition module, for obtaining the packet capturing file of the packet capturing program and the log text of application programs to be measured Part;
Performance estimation module, for obtaining the H5 page according to the packet capturing file, journal file and all kinds of time-consuming data The performance test results.
In another embodiment, the time-consuming module that obtains includes:
An acquisition module is buried, the browse controls for receiving the H5 page bury information in load;
Time-obtaining module obtains the default key in the H5 page loading procedure for burying information according to Point and end time point at the beginning of event;
Computing module is obtained for the time difference of point and end time point at the beginning of according to the default critical event Take all kinds of time-consuming data corresponding with each default critical event.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device realizes the step of any one of the various embodiments described above the method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of method described in any one of the various embodiments described above is realized when row
H5 page performance test method, apparatus, computer equipment and storage medium in above-mentioned application program, by utilizing survey The packet capturing program for trying terminal obtains the packet capturing file in H5 page loading procedure to be measured, obtains all kinds of consumptions in the load of the H5 page When data and journal file, according to packet capturing file, all kinds of time-consuming data and journal file obtain the performance test results.This method The H5 page of application program is opened in test terminal, gets most true performance data, it is ensured that true test data is obtained, It ensure that the accuracy of test data, while according to packet capturing file, all kinds of time-consuming data and journal file can fully assess H5 The page.
Detailed description of the invention
Fig. 1 is the application scenario diagram of H5 page performance test method in application program in one embodiment;
Fig. 2 is the flow diagram of H5 page performance test method in application program in one embodiment;
Fig. 3 is the structural block diagram of H5 page performance test device in application program in one embodiment;
Fig. 4 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
H5 page performance test method in application program provided by the present application can be applied to application ring as shown in Figure 1 In border.Wherein, test host 102 is connect with test terminal 104, and specific connection type can be USB or other network connections. Test host obtains the address of the H5 page of application program to be measured, generates the test to the H5 page and instructs, sends to test terminal Test instruction, test instruction are used to indicate the H5 page that test terminal opens test terminal, call packet capturing interface, open test eventually The packet capturing program at end obtains all kinds of time-consuming data of the H5 page in load, obtains the packet capturing file of packet capturing program and to be measured answers The performance test of the H5 page is obtained according to packet capturing file, journal file and all kinds of time-consuming data with the journal file of program program As a result.Test host and test terminal can be, but not limited to be various personal computers, laptop, smart phone, plate Computer and portable wearable device.
In one embodiment, as shown in Fig. 2, a kind of H5 page performance test method in application program is provided, with this Method is applied to be illustrated for the test host in Fig. 1, comprising the following steps:
S202 obtains the address of the H5 page to be measured of application program to be measured, generates the test to 5 page of H and instructs.
Specifically, relevant information is tested by test configurations page configuration in test host, the information including testing terminal, The information of the information of application program to be measured and the H5 page to be measured.The information of test terminal includes testing the title of terminal, IP Location and communication port etc..The information of application program to be measured includes the title of application software to be measured.The information of the H5 page to be measured includes The address of the H5 page to be measured.
In test host by the address of the H5 page to be measured of test configurations page configuration application program to be measured, generate to H The test of 5 pages instructs.
S204 sends test instruction to test terminal, opens the H5 page of test terminal, and test instruction is used to indicate test Terminal opens the H5 page of test terminal.
Specifically, test host is communicated with test terminal, and test instruction is sent to test terminal, test test terminal root According to the address of the H5 page to be measured of the application program to be measured in test instruction, application program to be measured is called, is opened to be measured using journey The address of the H5 page to be measured of sequence.
S206 calls packet capturing interface, opens the packet capturing program of test terminal.
Wherein, packet capturing program is mounted on test terminal, and packet capturing program is to refer to test the network transmission transmission of terminal It intercepted and captured, retransmitted with the data packet of receiving, being edited, the tool of the operations such as unloading, such as Fiddler packet capturing program.By grabbing Packet program, being capable of the data on flows that is spent of acquisition request page resource and HTTP request data.
S208 obtains all kinds of time-consuming data of the H5 page default critical event in load.
Wherein, default critical event refers to the critical event of page representation page performance during loading, and classification can It is preset according to the needs of performance test, such as the Dom event of loading page, white screen event, loads beginning event and load End Event etc..Time-consuming data are the key components of H5 page performance.In a kind of embodiment, it is previously implanted and buries in the H5 page Point.It buries a little, i.e., is embedded in one section of shell script in advance in the H5 page of level of application, is triggered in H5 page loading procedure default When material time, automatic reported data is to testing host.Reported data a little is buried by reception, reported data is analyzed, Obtain all kinds of time-consuming data of the H5 page in load.
S210 obtains the packet capturing file of packet capturing program and the journal file of application programs to be measured.
Wherein, packet capturing file is that packet capturing program is tested terminal by network transmission transmission and connect in H5 page loading procedure The data packet received.Data packet include the serial number of data packet, the time, source target MAC (Media Access Control) address, source purpose IP address, protocol type, The contents such as source destination slogan.Journal file is the journal file that application program to be measured generates in executing test process.According to Packet capturing file and journal file can obtain data on flows and HTTP request data in H5 page loading procedure.
S212 obtains the performance test results of the H5 page according to packet capturing file, journal file and all kinds of time-consuming data.
Specifically, packet capturing file, journal file and all kinds of time-consuming data are parsed, number needed for obtaining performance test According to.Wherein, data needed for performance test can be pre-configured with, and the source of data needed for configuring and keyword are obtaining packet capturing After file, journal file and all kinds of time-consuming data, is parsed using keyword from the data in corresponding source, obtain required performance and survey Try data.For example, parsing packet capturing file and journal file, the data on flows that the available page request is spent, parsing consumption When data, white screen in H5 page loading procedure can be obtained, the time data of the costs such as LOAD load.
In a kind of embodiment, data needed for performance test may include time data, resource size data, compressing file Data, transmitted data compressing, domain name number data, total number of request data, HTTP data and HTTP return code data etc..Time Data such as white screen time, Dom load time, resource load time etc..Resource size data include single resource in the H5 page Size.Compressing file data include the information data whether resource file compresses.Transmitted data compressing includes JS, the response such as picture Compressed data in packet header, domain name number data include domain name number involved in a page, total to request number including one The page always request in number.Whether it includes a large amount of useless HTTP head information etc. that HTTP data include in request.
H5 page performance test method in above-mentioned application program, by using test terminal packet capturing program, obtain to The packet capturing file in H5 page loading procedure is surveyed, all kinds of time-consuming data and journal file in the load of the H5 page are obtained, according to grabbing APMB package, all kinds of time-consuming data and journal file, obtain the performance test results.This method opens application program in test terminal The H5 page gets most true performance data, it is ensured that and true test data is obtained, ensure that the accuracy of test data, Simultaneously according to packet capturing file, all kinds of time-consuming data and journal file can fully assess the H5 page.
In another embodiment, the H5 page is obtained in load the step of all kinds of time-consuming data of default critical event, Include: to receive the browse controls of the H5 page to bury information in load, according to information is buried, obtains in H5 page loading procedure Default critical event at the beginning of point and end time point, according to default critical event at the beginning of put and the end time The time difference of point obtains all kinds of time-consuming data corresponding with each default critical event.
Specifically, browse controls (webview) is based on webkit engine, shows the control of web page, pass through opening The H5 page to be measured for testing the application program to be measured of terminal, being capable of analog subscriber true operation, it is ensured that obtains truthful data.It buries a little Refer to that the webview of some default critical event insertion scripts to(for) the H5 page test journey when triggering these critical events Sequence is to test host reported data, and test host is put at the beginning of default critical event when obtaining the H5 page and the result time Point, according to default critical event at the beginning of point and end time point time difference.Wherein, the type root of critical event is preset It is determined according to information is buried.The Dom event of critical event such as loading page, load beginning event and load End Event.
In another embodiment, according to information is buried, opening for the default critical event in H5 page loading procedure is obtained Begin time point and the step of end time point, comprising: when receive bury information when, call test terminal, loaded in the H5 page The time point screenshot of default critical event in the process determines default close according to each time point for burying an information content and screenshot Title, sart point in time and the end time point of key events.
Specifically, the load condition that test terminal is able to know that the H5 page according to information is buried, buries information when getting When, screenshot instruction is generated, is communicated with test terminal, calls test terminal to current H5 page screenshot, and obtain current screenshot Information, the information of current screenshot includes pictorial information, buries information and temporal information.Wherein, pictorial information can be used for work Personnel combine daily record data to carry out problem investigation.According to each time point for burying information and screenshot, default critical event is determined Title, sart point in time and end time point.
In the present embodiment, by obtaining time data using the method for burying information and screenshot of the browse controls in load Comparison, the time data counted on by the event call-back of webview are reliable and accurate.
In another embodiment, according to packet capturing file, journal file and all kinds of time-consuming data, the performance of the H5 page is obtained The step of test result, comprising: according to packet capturing file and journal file, obtain resources flowing amount data and http request data, root According to all kinds of time-consuming data, the page performance of resources flowing amount data and the http request data assessment H5 page, the property of the H5 page is obtained It can test result.
Traditionally the analysis of H5 page performance only considered resources flowing amount data there is no time quantization data are considered, this In embodiment, resources flowing amount data and http request data are removed, also generate all kinds of time-consuming data of the H5 page to be measured, it can be comprehensive Assess H5 page performance in ground.
Specifically, the reference threshold of settable all data, will the obtained every test data of test and reference threshold into Row compares, and obtains the performance test results of the H5 page.
In another embodiment, test instruction is sent to test terminal, test instruction is used to indicate test terminal and opens Before the step of testing the H5 page of terminal, further includes: instructed according to test, send unloading command to test terminal, unloading refers to Order is used to indicate test terminal and unloads application program to be measured, clears up the daily record data of application program to be measured, sends to test terminal Installation instruction, installation instruction are used to indicate test terminal and install application program to be measured.
Specifically, it after receiving test instruction, to avoid this data from being interfered by test data before, is executing Before this test, the unloading test mounted application program to be measured of terminal clears up the daily record data of application program to be measured, lays equal stress on Application program to be measured is newly installed, to ensure that the accuracy of test data.
In another embodiment, H5 page performance test method in application program further include: receive to the H5 page to be measured Report generation request, calls graph tool, according to all kinds of time-consuming data, resources flowing amount data and the http request number of the H5 page According to generating the report of visual H5 page performance detection.
Specifically, it after the time quantization data, resources flowing amount data and http request data for obtaining the H5 page, is configuring The instruction of page configuration report generation, which may include the requested H5 page, can be a page, or multiple pages Face can be the comparison of the data to multiple pages.Specifically, it receives and the report generation of the H5 page to be measured is requested, according to H5 All kinds of time-consuming data, resources flowing amount data and the http request data of the page, generate visual H5 page performance detection report. By generating examining report, all kinds of time-consuming data, http request waterfall stream in H5 test process, resource can be intuitively shown Flow, page screenshot, ADB log etc..
It should be understood that although each step in the flow chart of Fig. 2 is successively shown according to the instruction of arrow, this A little steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these steps It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, at least part in Fig. 2 Step may include that perhaps these sub-steps of multiple stages or stage are executed in synchronization to multiple sub-steps It completes, but can execute at different times, the execution sequence in these sub-steps or stage, which is also not necessarily, successively to be carried out, But it can be executed in turn or alternately at least part of the sub-step or stage of other steps or other steps.
In one embodiment, as shown in figure 3, providing H5 page performance test device in a kind of application program, comprising: Test instruction acquisition module, instruction sending module, packet capturing processing module, time-consuming module, data acquisition module and the performance of obtaining are commented Estimate module, in which:
Instruction acquisition module 302 is tested, the address of the H5 page to be measured for obtaining application program to be measured is generated to H5 pages The test in face instructs.
Instruction sending module 304, for sending test instruction to test terminal, test instruction is used to indicate test terminal and beats Open the H5 page of test terminal.
Packet capturing processing module 306 opens the packet capturing program of test terminal for calling packet capturing interface.
Time-consuming obtains module 308, for obtaining all kinds of time-consuming data of the H5 page default critical event in load.
Data acquisition module 310, for obtaining the packet capturing file of packet capturing program and the log text of application programs to be measured Part.
Performance estimation module 312, for obtaining the H5 page according to packet capturing file, journal file and all kinds of time-consuming data The performance test results.
H5 page performance test device in above-mentioned application program is obtained to be measured by the packet capturing program using test terminal Packet capturing file in H5 page loading procedure obtains all kinds of time-consuming data and journal file in the load of the H5 page, according to packet capturing File, all kinds of time-consuming data and journal file, obtain the performance test results.This method opens the H5 of application program in test terminal The page gets most true performance data, it is ensured that obtains true test data, ensure that the accuracy of test data, together When according to packet capturing file, all kinds of time-consuming data and journal file can fully assess the H5 page.
In another embodiment, the time-consuming module that obtains includes:
An acquisition module is buried, the browse controls for receiving the H5 page bury information in load;
Time-obtaining module, for obtaining opening for the default critical event in H5 page loading procedure according to information is buried Begin time point and end time point;
Computing module, for according to preset critical event at the beginning of point and end time point time difference, obtain with The corresponding all kinds of time-consuming data of each default critical event.
Specifically, time-obtaining module, for when receive bury information when, call test terminal, loaded in the H5 page The time point screenshot of default critical event in the process determines default close according to each time point for burying an information content and screenshot Title, sart point in time and the end time point of key events.
In another embodiment, performance estimation module, comprising:
Parsing module, for obtaining resources flowing amount data and http request data according to packet capturing file and journal file.
Performance test module, for according to H5 pages of all kinds of time-consuming data, resources flowing amount data and http request data assessment The page performance in face, obtains the performance test results of the H5 page.
In another embodiment, H5 page performance test device further includes cleaning modul in application program;
Instruction sending module is also used to be instructed according to test, sends unloading command to test terminal, unloading command is for referring to Show that test terminal unloads application program to be measured.
Cleaning modul, for clearing up the daily record data of application program to be measured.
Instruction sending module, is also used to send installation instruction to test terminal, and installation instruction is used to indicate test terminal peace Fill application program to be measured.
In another embodiment, H5 page performance test device in application program further include:
Report request module, for receiving the report generation request to the H5 page to be measured.
Chart processing module, for calling graph tool, according to all kinds of time-consuming data of the H5 page, resources flowing amount data and Http request data generate visual H5 page performance detection report.
Specific restriction about H5 page performance test device in application program may refer to above for application program The restriction of middle H5 page performance test method, details are not described herein.In above-mentioned application program in H5 page performance test device Modules can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware Or independently of in the processor in computer equipment, can also be stored in a software form in the memory in computer equipment, The corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 4.The computer equipment includes processor, the memory, network interface, display connected by system bus Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with Realize a kind of H5 page performance test method in application program.The display screen of the computer equipment can be liquid crystal display or Electric ink display screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible to calculate Key, trace ball or the Trackpad being arranged on machine equipment shell can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 4, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with Computer program, the processor perform the steps of when executing computer program
The address of the H5 page to be measured of application program to be measured is obtained, the test to the H5 page is generated and instructs;
Test instruction is sent to test terminal, test instruction is used to indicate the H5 page that test terminal opens test terminal;
Packet capturing interface is called, the packet capturing program of test terminal is opened;
Obtain all kinds of time-consuming data of the H5 page default critical event in load;
Obtain the packet capturing file of packet capturing program and the journal file of application programs to be measured;
According to packet capturing file, journal file and all kinds of time-consuming data, the performance test results of the H5 page are obtained.
In another embodiment, the H5 page is obtained in load the step of all kinds of time-consuming data of default critical event, Include:
The browse controls for receiving the H5 page bury information in load;
According to information is buried, point and end time at the beginning of the default critical event in H5 page loading procedure are obtained Point;
The time difference with end time point is put at the beginning of according to default critical event, is obtained and each default critical event Corresponding all kinds of time-consuming data.
In another embodiment, according to information is buried, opening for the default critical event in H5 page loading procedure is obtained The step of time point beginning and end time point, comprising:
When receive bury information when, call test terminal, the default critical event in H5 page loading procedure when Between put screenshot;
According to each time point for burying an information content and screenshot, determine the title of default critical event, sart point in time and End time point.
In another embodiment, according to packet capturing file, journal file and all kinds of time-consuming data, the performance of the H5 page is obtained The step of test result, comprising:
According to packet capturing file and journal file, resources flowing amount data and http request data are obtained;
According to all kinds of time-consuming data, the page performance of resources flowing amount data and the http request data assessment H5 page, obtain The performance test results of the H5 page.
In one embodiment, it is also performed the steps of when processor executes computer program
It is instructed according to test, sends unloading command to test terminal, it is to be measured that unloading command is used to indicate test terminal unloading Application program;
Clear up the daily record data of application program to be measured;
Installation instruction is sent to test terminal, installation instruction is used to indicate test terminal and installs application program to be measured.
In one embodiment, it is also performed the steps of when processor executes computer program
It receives and the report generation of the H5 page to be measured is requested;
Graph tool is called, according to all kinds of time-consuming data, resources flowing amount data and the http request data of the H5 page, is generated Visual H5 page performance detection report.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
The address of the H5 page to be measured of application program to be measured is obtained, the test to the H5 page is generated and instructs;
Test instruction is sent to test terminal, test instruction is used to indicate the H5 page that test terminal opens test terminal;
Packet capturing interface is called, the packet capturing program of test terminal is opened;
Obtain all kinds of time-consuming data of the H5 page default critical event in load;
Obtain the packet capturing file of packet capturing program and the journal file of application programs to be measured;
According to packet capturing file, journal file and all kinds of time-consuming data, the performance test results of the H5 page are obtained.
In another embodiment, the H5 page is obtained in load the step of all kinds of time-consuming data of default critical event, Include:
The browse controls for receiving the H5 page bury information in load;
According to information is buried, point and end time at the beginning of the default critical event in H5 page loading procedure are obtained Point;
The time difference with end time point is put at the beginning of according to default critical event, is obtained and each default critical event Corresponding all kinds of time-consuming data.
In another embodiment, according to information is buried, opening for the default critical event in H5 page loading procedure is obtained The step of time point beginning and end time point, comprising:
When receive bury information when, call test terminal, the default critical event in H5 page loading procedure when Between put screenshot;
According to each time point for burying an information content and screenshot, determine the title of default critical event, sart point in time and End time point.
In another embodiment, according to packet capturing file, journal file and all kinds of time-consuming data, the performance of the H5 page is obtained The step of test result, comprising:
According to packet capturing file and journal file, resources flowing amount data and http request data are obtained;
According to all kinds of time-consuming data, the page performance of resources flowing amount data and the http request data assessment H5 page, obtain The performance test results of the H5 page.
In one embodiment, it is also performed the steps of when processor executes computer program
It is instructed according to test, sends unloading command to test terminal, it is to be measured that unloading command is used to indicate test terminal unloading Application program;
Clear up the daily record data of application program to be measured;
Installation instruction is sent to test terminal, installation instruction is used to indicate test terminal and installs application program to be measured.
In one embodiment, it is also performed the steps of when processor executes computer program
It receives and the report generation of the H5 page to be measured is requested;
Graph tool is called, according to all kinds of time-consuming data, resources flowing amount data and the http request data of the H5 page, is generated Visual H5 page performance detection report.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of H5 page performance test method in application program, which comprises
The address of the H5 page to be measured of application program to be measured is obtained, the test to the H5 page is generated and instructs;
The test instruction is sent to test terminal, the test instruction is used to indicate the test terminal and opens the test eventually The H5 page at end;
Packet capturing interface is called, the packet capturing program of test terminal is opened;
Obtain all kinds of time-consuming data of the H5 page default critical event in load;
Obtain the packet capturing file of the packet capturing program and the journal file of application programs to be measured;
According to the packet capturing file, journal file and all kinds of time-consuming data, the performance test results of the H5 page are obtained.
2. according to the method described in claim 2, it is characterized in that, described obtain the H5 page default crucial thing in load The step of all kinds of time-consuming data of part, comprising:
The browse controls for receiving the H5 page bury information in load;
Information is buried according to described, puts and terminates at the beginning of obtaining the default critical event in the H5 page loading procedure Time point;
The time difference with end time point is put at the beginning of according to the default critical event, is obtained and each default critical event Corresponding all kinds of time-consuming data.
3. obtaining the H5 page the method according to claim 1, wherein described bury information according to At the beginning of default critical event in loading procedure the step of point and end time point, comprising:
When receive bury information when, call test terminal, the time point of the default critical event in H5 page loading procedure Screenshot;
According to each time point for burying an information content and screenshot, title, sart point in time and the end of default critical event are determined Time point.
4. the method according to claim 1, wherein according to the packet capturing file, journal file and all kinds of time-consumings Data, the step of obtaining the performance test results of the H5 page, comprising:
According to the packet capturing file and the journal file, resources flowing amount data and http request data are obtained;
According to the page performance of the H5 page described in all kinds of time-consuming data, resources flowing amount data and http request data assessment, Obtain the performance test results of the H5 page.
5. the method according to claim 1, wherein to test terminal send the test instruction the step of it Before, the method also includes:
It is instructed according to test, sends unloading command to the test terminal, the unloading command is used to indicate the test terminal Unload the application program to be measured;
Clear up the daily record data of the application program to be measured;
Installation instruction is sent to the test terminal, and the installation instruction is used to indicate the test terminal and installs described to be measured answer Use program.
6. according to the method described in claim 4, it is characterized in that, the method also includes:
It receives and the report generation of the H5 page to be measured is requested;
Graph tool is called, according to all kinds of time-consuming data, resources flowing amount data and the http request data of the H5 page, is generated visual The H5 page performance detection of change is reported.
7. H5 page performance test device in a kind of application program, which is characterized in that described device includes:
Instruction acquisition module is tested, the address of the H5 page to be measured for obtaining application program to be measured generates the survey to the H5 page Examination instruction;
Instruction sending module, for sending the test instruction to test terminal, the test instruction is used to indicate the test Terminal opens the H5 page of the test terminal;
Packet capturing processing module opens the packet capturing program of test terminal for calling packet capturing interface;
Time-consuming obtains module, for obtaining all kinds of time-consuming data of the H5 page default critical event in load;
Data acquisition module, for obtaining the packet capturing file of the packet capturing program and the journal file of application programs to be measured;
Performance estimation module, for obtaining the performance of the H5 page according to the packet capturing file, journal file and all kinds of time-consuming data Test result.
8. the method according to the description of claim 7 is characterized in that the time-consuming module that obtains includes:
An acquisition module is buried, the browse controls for receiving the H5 page bury information in load;
Time-obtaining module obtains the default critical event in the H5 page loading procedure for burying information according to At the beginning of point and end time point;
Computing module, for the time difference of point and end time point at the beginning of according to the default critical event, obtain with The corresponding all kinds of time-consuming data of each default critical event.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 6 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
CN201811572820.2A 2018-12-21 2018-12-21 Method and device for testing H5 page performance in application program and computer equipment Active CN109766256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811572820.2A CN109766256B (en) 2018-12-21 2018-12-21 Method and device for testing H5 page performance in application program and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811572820.2A CN109766256B (en) 2018-12-21 2018-12-21 Method and device for testing H5 page performance in application program and computer equipment

Publications (2)

Publication Number Publication Date
CN109766256A true CN109766256A (en) 2019-05-17
CN109766256B CN109766256B (en) 2023-02-07

Family

ID=66450855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811572820.2A Active CN109766256B (en) 2018-12-21 2018-12-21 Method and device for testing H5 page performance in application program and computer equipment

Country Status (1)

Country Link
CN (1) CN109766256B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221954A (en) * 2019-05-29 2019-09-10 吉旗(成都)科技有限公司 Application program for mobile terminal page method for monitoring performance and device
CN110781437A (en) * 2019-10-28 2020-02-11 北京字节跳动网络技术有限公司 Method and device for acquiring webpage image loading duration and electronic equipment
CN110928767A (en) * 2019-10-12 2020-03-27 平安国际智慧城市科技股份有限公司 Webpage analysis method, device, equipment and storage medium
CN111061606A (en) * 2019-11-04 2020-04-24 深圳震有科技股份有限公司 Monitoring and early warning method based on browser, terminal and storage medium
CN111371643A (en) * 2020-02-28 2020-07-03 京东数字科技控股有限公司 Authentication method, device and storage medium
CN111444103A (en) * 2020-03-31 2020-07-24 腾讯音乐娱乐科技(深圳)有限公司 Automatic testing method for Web page and related equipment
CN112115057A (en) * 2020-09-24 2020-12-22 京东数字科技控股股份有限公司 Automatic test method, device and equipment for application program page building process
CN113449227A (en) * 2020-03-24 2021-09-28 北京新氧科技有限公司 Page information processing method and terminal equipment
CN113741397A (en) * 2021-09-09 2021-12-03 四川虹美智能科技有限公司 Performance test method and system of intelligent household equipment
WO2022161047A1 (en) * 2021-01-29 2022-08-04 北京沃东天骏信息技术有限公司 Event tracking analysis method and apparatus for page
US11500758B2 (en) 2020-09-02 2022-11-15 Coupang Corp. Systems and methods for analyzing application loading times

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100161787A1 (en) * 2008-12-23 2010-06-24 Verizon Corporate Resources Group Llc Web page response monitoring
CN106330990A (en) * 2015-06-17 2017-01-11 阿里巴巴集团控股有限公司 B/S structure performance monitoring analysis system and method
CN107479907A (en) * 2016-06-07 2017-12-15 中兴通讯股份有限公司 The development approach of application program, apparatus and system
CN107783899A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 The method of testing of the H5 pages, device and computer equipment in application program
WO2018113385A1 (en) * 2016-12-24 2018-06-28 上海壹账通金融科技有限公司 Method and system for dynamically tracking application of client, client, and server
CN108345632A (en) * 2017-12-29 2018-07-31 中国平安财产保险股份有限公司 Call method, device, equipment and the computer readable storage medium of the H5 pages

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100161787A1 (en) * 2008-12-23 2010-06-24 Verizon Corporate Resources Group Llc Web page response monitoring
CN106330990A (en) * 2015-06-17 2017-01-11 阿里巴巴集团控股有限公司 B/S structure performance monitoring analysis system and method
CN107479907A (en) * 2016-06-07 2017-12-15 中兴通讯股份有限公司 The development approach of application program, apparatus and system
WO2018113385A1 (en) * 2016-12-24 2018-06-28 上海壹账通金融科技有限公司 Method and system for dynamically tracking application of client, client, and server
CN107783899A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 The method of testing of the H5 pages, device and computer equipment in application program
CN108345632A (en) * 2017-12-29 2018-07-31 中国平安财产保险股份有限公司 Call method, device, equipment and the computer readable storage medium of the H5 pages

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
腾讯移动品质中心TMQ: "从0到1:打造移动端H5性能测试平台", 《HTTPS://BLOG.CSDN.NET/TMQ1225/ARTICLE/DETAILS/53204476》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221954A (en) * 2019-05-29 2019-09-10 吉旗(成都)科技有限公司 Application program for mobile terminal page method for monitoring performance and device
CN110928767B (en) * 2019-10-12 2023-05-02 深圳赛安特技术服务有限公司 Webpage analysis method, device, equipment and storage medium
CN110928767A (en) * 2019-10-12 2020-03-27 平安国际智慧城市科技股份有限公司 Webpage analysis method, device, equipment and storage medium
CN110781437A (en) * 2019-10-28 2020-02-11 北京字节跳动网络技术有限公司 Method and device for acquiring webpage image loading duration and electronic equipment
US11886798B2 (en) 2019-10-28 2024-01-30 Beijing Bytedance Network Technology Co., Ltd. Method and apparatus for obtaining loading time length of image in webpage, and electronic device
CN111061606A (en) * 2019-11-04 2020-04-24 深圳震有科技股份有限公司 Monitoring and early warning method based on browser, terminal and storage medium
CN111371643A (en) * 2020-02-28 2020-07-03 京东数字科技控股有限公司 Authentication method, device and storage medium
CN111371643B (en) * 2020-02-28 2022-07-05 京东科技控股股份有限公司 Authentication method, device and storage medium
CN113449227A (en) * 2020-03-24 2021-09-28 北京新氧科技有限公司 Page information processing method and terminal equipment
CN113449227B (en) * 2020-03-24 2023-09-19 北京新氧科技有限公司 Page information processing method and terminal equipment
CN111444103A (en) * 2020-03-31 2020-07-24 腾讯音乐娱乐科技(深圳)有限公司 Automatic testing method for Web page and related equipment
CN111444103B (en) * 2020-03-31 2024-04-26 腾讯音乐娱乐科技(深圳)有限公司 Web page automatic testing method and related equipment
US11500758B2 (en) 2020-09-02 2022-11-15 Coupang Corp. Systems and methods for analyzing application loading times
CN112115057A (en) * 2020-09-24 2020-12-22 京东数字科技控股股份有限公司 Automatic test method, device and equipment for application program page building process
WO2022161047A1 (en) * 2021-01-29 2022-08-04 北京沃东天骏信息技术有限公司 Event tracking analysis method and apparatus for page
CN113741397A (en) * 2021-09-09 2021-12-03 四川虹美智能科技有限公司 Performance test method and system of intelligent household equipment

Also Published As

Publication number Publication date
CN109766256B (en) 2023-02-07

Similar Documents

Publication Publication Date Title
CN109766256A (en) H5 page performance test method, apparatus and computer equipment in application program
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
US9009222B2 (en) Verifying the transfer of a data file
CN109815089A (en) H5 page monitoring method, device, computer equipment and storage medium
US20190354690A1 (en) Systems, devices and methods for application and privacy compliance monitoring and security threat analysis processing
CN110008117A (en) Page test method, device, computer equipment and storage medium
US10536363B2 (en) Synthetic testing of web applications using instrumented monitoring agents
US10084637B2 (en) Automatic task tracking
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
US20160124832A1 (en) Monitoring and correlating a binary process in a distributed business transaction
CN110134612A (en) UI test data generating method, device, equipment and readable storage medium storing program for executing
CN110597709A (en) Interactive debugging method and device for mixed-mode mobile application and computer equipment
CN113377668A (en) Automatic testing method and device for service interface and computer equipment
CN106375866A (en) Page loading method and terminal
CN115543827A (en) Buried point data display method and device
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
US10191844B2 (en) Automatic garbage collection thrashing monitoring
CN109492144B (en) Association relation analysis method, device and storage medium for software system
CN112328333B (en) Built-in program operating method and device, computer equipment and storage medium
CN113987506A (en) Test method, device, test equipment and storage medium of authentication system
CN108595327B (en) Method for executing script by application, application testing method, device and computer equipment
US9858549B2 (en) Business transaction resource usage tracking
CN114039760A (en) Security testing method and device, computer equipment and storage medium
CN108108369B (en) Method and device for processing calling error of common interface library
CN112417533A (en) Anti-screenshot method and device, computer equipment and storage medium

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