CN107436843A - Webpage performance test methods and device - Google Patents

Webpage performance test methods and device Download PDF

Info

Publication number
CN107436843A
CN107436843A CN201610366252.5A CN201610366252A CN107436843A CN 107436843 A CN107436843 A CN 107436843A CN 201610366252 A CN201610366252 A CN 201610366252A CN 107436843 A CN107436843 A CN 107436843A
Authority
CN
China
Prior art keywords
webpage
tested
performance
subclass
condition
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.)
Pending
Application number
CN201610366252.5A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610366252.5A priority Critical patent/CN107436843A/en
Publication of CN107436843A publication Critical patent/CN107436843A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Abstract

This application discloses webpage performance test methods and device.One embodiment of methods described includes:Receive the performance test request of webpage to be tested;Obtain the related data of the webpage to be tested;Using each condition in predefined set of circumstances, the related data of the webpage to be tested is tested, to judge whether each condition is satisfied respectively;According to judged result, test report is generated;The test report is presented to user.The embodiment realizes targetedly carries out test analysis according to business demand to the performance of webpage.

Description

Webpage performance test methods and device
Technical field
The application is related to field of computer technology, and in particular to Internet technical field, more particularly to webpage performance test Method and apparatus.
Background technology
At present, with the development of Internet technology, the content of webpage is more and more huger, webpage becomes all the more complicated so that The analysis of performance test or performance to Webpage application is more difficult.Currently, the page performance point of browser is mainly utilized Analyse plug-in unit and carry out page performance evaluation, it is to be based on some rules to carry out performance evaluation using the page performance evaluation plug-in unit of browser The optimization analysis page, dependent on browser, lacks to the mobile terminal page and preferably supports, it is impossible to very comprehensively and according to business Need to provide the conclusion of current site performance, it has not been convenient to which extension is more suitable for the rule of business.
The content of the invention
The purpose of the application is to propose a kind of improved webpage performance test methods and device, to solve background above skill The technical problem that art part is mentioned.
In a first aspect, this application provides a kind of webpage performance test methods, methods described includes:Receive webpage to be tested Performance test request;Obtain the related data of the webpage to be tested;Using each condition in predefined set of circumstances, The related data of the webpage to be tested is tested, to judge whether each condition is satisfied respectively;According to judged result, Generate test report;The test report is presented to user.
In certain embodiments, the performance test request for receiving webpage to be tested, including:Receive user and pass through terminal The webpage performance test request that equipment is sent;The page obtained by user in the URL that terminal device is inputted As webpage to be tested;Or the page from default data storage area in acquisition specified list is as webpage to be tested.
In certain embodiments, the related data for obtaining the webpage to be tested, including:Analyze the net to be tested Page, generates the characteristic information for identifying HTTP http request information characteristics or http response message features;Point The webpage to be tested is analysed, generates the text message for webpage performance analysis data;Obtain the characteristic information and text envelope Related data of the data of breath as the webpage to be tested.
In certain embodiments, the predefined set of circumstances includes self-defined testing conditions subclass and webpage performance Analysis condition subclass, wherein, the self-defined testing conditions subclass be by no less than one be used for judge webpage performance Customized testing conditions composition set, the webpage performance evaluation condition subclass is by for the webpage performance point The set of the Rule of judgment composition of analysis.
In certain embodiments, each condition using in predefined set of circumstances, to the webpage to be tested Related data tested, to judge whether each condition is satisfied respectively, including:Judge whether the characteristic information meets Testing conditions in the self-defined testing conditions subclass, and the judged result of the characteristic information is recorded successively, by described in The judged result of characteristic information is as autonomous analysis result;Judge whether the text message meets the page performance evaluation bar Rule of judgment in part subclass, and the judged result of the text message is recorded successively, by the judgement knot of the text message Fruit is as report extraction result.
In certain embodiments, it is described according to judged result, test report is generated, including:Receive the autonomous analysis knot Fruit and the report extraction result;Merge the autonomous analysis result and the report extraction result, generate test report.
In certain embodiments, methods described also includes:Add or delete in the self-defined testing conditions subclass Condition is to update the testing conditions set;Condition is deleted to update the inspection in the webpage performance evaluation condition subclass Survey set of circumstances.
Second aspect, this application provides a kind of webpage performance testing device, described device includes:Receiving unit, configuration Performance test for receiving webpage to be tested is asked;Data capture unit, it is configured to obtain the phase of the webpage to be tested Close data;Test cell, it is configured to utilize each condition in predefined set of circumstances, to the phase of the webpage to be tested Close data to be tested, to judge whether each condition is satisfied respectively;Generation unit, it is configured to be generated according to judged result Test report;Display unit, it is configured to the test report being presented to user.
In certain embodiments, the receiving unit is further configured to:Receive what user was sent by terminal device Webpage performance test is asked;The page of the URL acquisition inputted by user in terminal device is used as to be tested Webpage;Or the page from default data storage area in acquisition specified list is as webpage to be tested.
In certain embodiments, the data capture unit is further configured to:The webpage to be tested is analyzed, is generated For identifying the characteristic information of HTTP http request information characteristics or http response message features;Treated described in analysis Webpage is tested, generates the text message that page data analysis is carried out for the browser plug-in of webpage performance evaluation;Described in acquisition The related data of characteristic information and text message as the webpage to be tested.
In certain embodiments, the predefined set of circumstances includes self-defined testing conditions subclass and webpage performance Analysis condition subclass, wherein, the self-defined testing conditions subclass be by no less than one be used for judge webpage performance Self-defined testing conditions composition set, the webpage performance evaluation condition subclass is by being browsed for the webpage performance Device plug-in unit carries out the set of the Rule of judgment composition of webpage performance evaluation.
In certain embodiments, the test cell is further configured to:Judge whether the characteristic information meets institute The testing conditions in self-defined testing conditions subclass are stated, and record the judged result of the characteristic information successively, by the spy The judged result of reference breath is as autonomous analysis result;Judge whether the text message meets the page performance evaluation condition Rule of judgment in subclass, and the judged result of the text message is recorded successively, by the judged result of the text message Result is extracted as report.
In certain embodiments, the generation unit is further configured to:Receive the autonomous analysis result and described Report extraction result;Merge the autonomous analysis result and the report extraction result, generate test report.
In certain embodiments, described device also includes updating block, is configured to:In self-defined testing conditions Condition is added or deleted in set to update the testing conditions set;Deleted in the webpage performance evaluation condition subclass Condition is to update the testing conditions set.
The application provide webpage performance test methods and device, by by the related data of webpage to be tested with it is default Testing conditions in set of circumstances compare, and the test report of webpage performance indications is formed according to comparative result, is realized to webpage Performance Analysis.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the webpage performance test methods of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the webpage performance test methods of the application;
Fig. 4 is the flow chart according to another embodiment of the webpage performance test methods of the application;
Fig. 5 is the structural representation according to one embodiment of the webpage performance testing device of the application;
Fig. 6 is adapted for the structural representation of the computer system of the server for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the embodiment of the webpage performance test methods that can apply the application or webpage performance testing device Exemplary system architecture 100.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with server 105, to receive or send out Send message etc..Various client applications can be installed, such as page performance evaluation class should on terminal device 101,102,103 With, web browser applications, the application of shopping class, searching class application, JICQ, mailbox client, social platform software Deng.
Terminal device 101,102,103 can be with display screen and supported web page browses and telecommunication customer end application Various electronic equipments, including but not limited to smart mobile phone, tablet personal computer, E-book reader pocket computer on knee and platform Formula computer etc..
Server 105 can be to provide the server of various services, such as to being shown on terminal device 101,102,103 Webpage provides the server of Performance Analysis.Server can carry out analysis judgement to the webpage performance evaluation request received Deng processing, result (such as performance indications data of the page) is fed back into terminal device.
It should be noted that the webpage performance test methods that the embodiment of the present application is provided typically are performed by server 105, Correspondingly, webpage performance testing device is generally positioned in server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow 200 of one embodiment of webpage performance test methods according to the application is shown. Described webpage performance test methods, comprise the following steps:
Step 201, the performance test request of webpage to be tested is received.
In the present embodiment, electronic equipment (such as the service shown in Fig. 1 of webpage performance test methods operation thereon Device) web page browsing or webpage performance test can be carried out using it from user by wired connection mode or radio connection Terminal obtain the performance test request of webpage to be tested, or can locally obtain the performance test request of webpage to be tested; The content of pages of above-mentioned webpage to be tested is extracted from the performance test of above-mentioned webpage to be tested request as being used for webpage performance The source data of test.Here, above-mentioned content of pages can be word, picture, audio files, embedded content, for producing dynamic Script file of content etc.;The form of the page can be html forms, xhtml forms, asp forms, php forms, jsp lattice Formula, shtml forms, nsp forms, xml forms, or other following forms by exploitation are (as long as the pagefile of this form The content of pages of the page to be tested can be got, e.g., the content such as word, picture, animation, audio).Above-mentioned source data can be Above-mentioned electronic equipment directly from content of pages extraction data as source data, e.g., the size of page pictures, the form of picture Deng;It can also be that the page of webpage extracts the characteristic of the page when carrying out page request or page response as source data, Such as, can be extracted during page request or page response white screen time of the above-mentioned page, initial screen time, user it is operable when Between, the page total download time, page source, operating system of user, total download time etc. of the page be used as source data.Wherein, Since the above-mentioned white screen time refer to user begin with the time untill content is presented to the page opening the page, and initial screen time refers to All the elements all show the spent time in the first screen of user browser, and user's operable time refers to that user can be carried out The time of the operations such as normal click, input, page source refers to can be total with the refer of the page of positioning webpage entrance, the page Download time refers to that all resources of the page all load the time spent in completing and showing, i.e. page onload time.
In some optional implementations of the present embodiment, receive the webpage performance that user is sent by terminal device and survey Examination request, above-mentioned webpage to be tested can be obtained by URL that the user of terminal device is inputted, can be with Obtained by obtaining the page in specified list from default data storage area.Here, URL (Uniform Resource Locator, URL) can be represented using network address, to be measured by inputting network address acquisition in designated area Try webpage;Default data storage area can be the database that server is specified, and can also be the caching in above-mentioned electronic equipment Region, above-mentioned electronic equipment can obtain webpage to be tested by major key ID from database or buffer zone.
Step 202, the related data of above-mentioned webpage to be tested is obtained.
In the present embodiment, based on the source data obtained in step 201, above-mentioned electronic equipment (such as the service shown in Fig. 1 Device) related data of above-mentioned webpage to be tested can be obtained from above-mentioned source data.As an example, the correlation of above-mentioned webpage to be tested Data can be data existing in the form of HAR (HTTP Archive) file format, wherein, HAR file formats are one For storing the file format of http request information or http response messages.
As an example, the related data of above-mentioned acquisition webpage to be tested can be by using PhantomJS software analysis Method obtains, and gets the related data of above-mentioned webpage to be tested from above-mentioned source data by Windows order lines, wherein, PhantomJS softwares are the WebKit script type softwares for having JavaScript API, are supported at various Web standards Reason, such as DOM (Document Object Model, DOM Document Object Model) processing, CSS (Cascading Stylesheet, layer Stacking style table) selector, JSON (JavaScript Object Notation, a kind of data interchange format of lightweight), draw Cloth and SVG (Scalable Vector Graphics, saleable vector graphics).JavaScript is a kind of regime type, weak Type, the literal translation formula script based on prototype, for increasing dynamic function to html web page.
Step 203, using each condition in predefined set of circumstances, the related data for treating test webpage is surveyed Examination, to judge whether each condition is satisfied respectively.
In the present embodiment, a plurality of inspection can be prestored on the electronic equipment of webpage performance test methods operation thereon Survey condition, these testing conditions can be used for testing the related data of above-mentioned webpage to be tested, judge above-mentioned to be tested Whether the related data of webpage meets above-mentioned testing conditions.
In the present embodiment, predefined set of circumstances is set in the buffer zone of above-mentioned electronic equipment, wherein, it is above-mentioned Set of circumstances is by the set that is formed no less than the testing conditions of one.Above-mentioned electronic equipment is successively by above-mentioned webpage to be tested Related data is contrasted with the testing conditions in above-mentioned condition set, by the related data of above-mentioned webpage to be tested and above-mentioned bar The comparing result of testing conditions is stored in the page indication information of above-mentioned webpage to be tested in part set, wherein, page index Information is to default in being tied for recording above-mentioned webpage to be tested compared with above-mentioned testing conditions for above-mentioned electronic equipment buffer zone The characteristic information of fruit.For example, the testing conditions in above-mentioned condition set be in website file cache-time length whether meet it is pre- Phase, such as in the case where setting certain domain name, the file of html, htm, shtml type, cache-time wants 3 minutes, then according to above-mentioned to be tested The related data of webpage judges whether the page cache time of above-mentioned webpage to be tested exceeds 3 minutes, such as exceeds, then in above-mentioned page Recorded in the indication information of face corresponding with above-mentioned testing conditions in the related data of above-mentioned testing conditions and above-mentioned webpage to be tested Data.Such as testing conditions be whether response after web site requests is 5xx, 4xx, 3xx or aborted, if response be 5xx, It is one of any in 4xx, 3xx or aborted, then above-mentioned testing conditions and response knot are recorded in above-mentioned page indication information Fruit.
Step 204, according to judged result, test report is generated.
In the present embodiment, above-mentioned electronic equipment can be according to the test result in above-mentioned steps 203 and the above-mentioned page Indication information generates the test report of the page performance indications of webpage to be tested.Here, above-mentioned judged result is as above-mentioned test The component of report, also, the testing conditions in the related data and above-mentioned condition set of above-mentioned webpage to be tested are corresponding Test, will determine that result is added in the test report that above-mentioned component is formed, wherein, the component of test report with The quantity of testing conditions in above-mentioned condition set is consistent, and corresponds.As an example, 5 are provided with above-mentioned condition set Testing conditions, it is respectively:Whether file cache-time length meets whether reference document size in expected, website meets in website It is expected that, in website with the presence or absence of the picture format whether used in repetitive requests, website in Keep-Alive and website whether be GIF (Graphics Interchange Format, graphic interchange format);The quantity of the component of above-mentioned test report For 5, and component is:The file cache time, reference document size, whether repetitive requests, whether used Keep- Whether Alive and picture format are GIF.The related data of above-mentioned webpage to be tested is compared with above-mentioned testing conditions respectively, and It will determine that object information is added in the component of above-mentioned test report, generate the test report of the above-mentioned page to be tested.This In, also known as persistently connection or connection reuse, Keep-Alive functions hold the connection of client to server end to Keep-Alive Continuous effective, when there are the subsequent requests to server, Keep-Alive functions avoid foundation or re-establish connection.
Step 205, above-mentioned test report is presented to user.
In the present embodiment, the test report generated in above-mentioned steps 204 can be sent to user by above-mentioned electronic equipment, Here, above-mentioned test report can be sent to user in the form of a web page by above-mentioned server, or can report above-mentioned test Announcement is sent to user in the form of mail.Above-mentioned electronic equipment can be by checking the URL sources of webpage to be tested, and selection will survey Examination report is in the form of web pages or mail he is sent to user.Carried out as an example, if user's selection is page input URL Above-mentioned test report can be sent to user in the form of a web page by page analysis, above-mentioned server, and user can be directly in the page On check report;If the URL in default storage carries out page analysis, above-mentioned server can be by above-mentioned test report with postal The form of part is sent to user.Here, it can be that timing carries out page analysis to preset the URL in storage.
With continued reference to Fig. 3, Fig. 3 is a signal according to the application scenarios of the webpage performance test methods of the present embodiment Figure.In Fig. 3 application scenarios, user is sent by the page performance indications application class software of installing terminal equipment and treated to above-mentioned The performance test request of webpage is tested, as shown in hand meaning in Fig. 3-A, above-mentioned treat is inputted in specified address input box The network address of webpage is tested, or the address in specified list is selected from the combobox of the above-mentioned address input box specified, so as to Select webpage to be tested;Afterwards, above-mentioned server obtains the related data of the webpage to be tested, then, by above-mentioned net to be tested Testing conditions in the related data and default set of circumstances of page compare, and result of the comparison information is added to the survey of the webpage In the component for trying report, the test report of the page performance indications to be tested is formd, the test report is set in terminal Standby display, as shown in Fig. 3-B, webpage performance indications testing conditions to be measured, performance indications number are listed in page capabilities list According to and test result, here, test result is shown using the mode of prompting to user, the index for that may influence webpage performance Warning is provided, can be identified using red font, can also be shown using character, e.g., character is used in this implementation columnShow.
The method that above-described embodiment of the application provides is by by the related data of webpage to be tested and default detector bar Testing conditions in part set compare, in the component for the test report that comparative result is added to the performance indications of webpage, The test report of webpage performance indications is formed, realizes the analysis according to demand to page performance.
With further reference to Fig. 4, it illustrates the flow 400 of another embodiment of webpage performance test methods.The webpage The flow 400 of performance test methods, comprises the following steps:
Step 401, the performance test request of webpage to be tested is received.
In the present embodiment, electronic equipment (such as the service shown in Fig. 1 of webpage performance test methods operation thereon Device) web page browsing or webpage performance test can be carried out using it from user by wired connection mode or radio connection Terminal obtain the performance test request of webpage to be tested, or the property of webpage to be tested can be obtained in local data storage area Can test request;The content of pages of webpage is extracted from the performance test request of above-mentioned webpage to be tested as source data, or is carried Take above-mentioned webpage page request or page response process characteristic as source data.
Step 402, the related data of above-mentioned webpage to be tested is obtained.
In the present embodiment, based on the source data obtained in step 401, above-mentioned electronic equipment (such as the service shown in Fig. 1 Device) related data of above-mentioned webpage to be tested can be obtained from above-mentioned source data.
In some optional implementations of the present embodiment, above-mentioned electronic equipment is analyzed above-mentioned using web testing tools Source data, generate the characteristic information for identifying http request information characteristics or http response message features;Work is tested using web Tool analyzes above-mentioned source data, can also generate the text message for webpage performance evaluation.Obtain features described above information and text Related data of the information as webpage to be tested.Wherein, above-mentioned web testing tools can be PhantomJS analysis tools;It is above-mentioned The related data of webpage to be tested can be data existing in the form of HAR file formats, can also be and deposit in the form of text Data.As an example, row page data analysis generation text message can be the form of browser plug-in, it can also be logical Windows input order lines are crossed, yslow is run, gets the performance data of the page.
Step 403, using each condition in predefined set of circumstances, the related data for treating test webpage is surveyed Examination, to judge whether each condition is satisfied respectively.
In the present embodiment, a plurality of inspection can be prestored on the electronic equipment of webpage performance test methods operation thereon Survey condition, these testing conditions can be used for testing the related data of above-mentioned webpage to be tested, judge above-mentioned to be tested Whether the related data of webpage meets above-mentioned testing conditions.
In some optional implementations of the present embodiment, above-mentioned default set of circumstances includes self-defined testing conditions Subclass and webpage performance evaluation condition subclass.Wherein, above-mentioned self-defined testing conditions subclass is by no less than one The set that customized testing conditions for judging page performance form, webpage performance evaluation condition subclass is by for net The browser plug-in of page performance evaluation carries out the set of the Rule of judgment composition of page performance evaluation.Here, above-mentioned self-defined inspection Survey condition subclass is the set that the testing conditions that user independently drafts are formed according to business needs;Webpage performance evaluation bar The set that part subclass is made up of the Rule of judgment formed for the rule that page performance indications are quoted, as an example, User can quote YSlow according to business demand, autonomous regular conduct of the selection no less than one in YSlow-23 rules Rule of judgment in above-mentioned webpage performance evaluation condition subclass, wherein, YSlow-23 is designed to improve webpage performance Optimization the page some rule, occupation mode can have following two:The pattern of browser plug-in, windows order lines are defeated Enter the pattern of script command.
In some optional implementations of the present embodiment, judge whether the related data of above-mentioned webpage to be tested meets Testing conditions in default testing conditions set can be realized in the following way:Judge whether features described above information meets certainly The testing conditions in testing conditions subclass are defined, and record the judged result of features described above information successively, above-mentioned judgement is tied Fruit is as autonomous analysis result;Judge whether above-mentioned text message meets the judgement bar in page performance evaluation condition subclass Part, and the judged result of above-mentioned text message is recorded successively, extract result using above-mentioned judged result as report.
Step 404, according to judged result, test report is generated.
In the present embodiment, above-mentioned electronic equipment can be according to the test result in above-mentioned steps 403 and the above-mentioned page Indication information generates the test report of the page performance indications of webpage to be tested.Here, above-mentioned judged result is as above-mentioned test The component of report, also, the testing conditions in the related data and above-mentioned condition set of above-mentioned webpage to be tested are corresponding Test, will determine that result is added in the test report that above-mentioned component is formed, wherein, the component of test report with The quantity of testing conditions in above-mentioned condition set is consistent, and corresponds.
In some optional implementations of the present embodiment, based on the multilevel iudge result in step 403, receive above-mentioned Autonomous analysis result and above-mentioned report extraction result, generated after above-mentioned autonomous analysis result and above-mentioned report extraction result are merged The test report of webpage to be tested.
Step 405, above-mentioned test report is presented to user.
In the present embodiment, the test report generated in above-mentioned steps 404 can be presented and give use by above-mentioned electronic equipment Family.Wherein, above-mentioned test report can be sent to user in the form of a web page by above-mentioned server, or can be by above-mentioned test Report is sent to user in the form of mail.Here, above-mentioned electronic equipment can by checking the URL sources of webpage to be tested, Selection by test report in the form of web pages or mail he is sent to user.
Step 406, update condition set.
In the present embodiment, above-mentioned default set of circumstances can be updated according to the demand of business.Can be upper State and add or delete condition in self-defined testing conditions subclass to update above-mentioned condition set;Can also be in above-mentioned webpage performance Condition is deleted in analysis condition subclass to update above-mentioned condition set.Wherein, in above-mentioned self-defined testing conditions subclass It can be that customized testing conditions are added to above-mentioned self-defined testing conditions by user according to demand to add or delete condition In set, or, one or more testing conditions in above-mentioned self-defined testing conditions subclass are deleted according to business demand; It can will be used for webpage performance according to business demand to add or delete condition in above-mentioned webpage performance evaluation condition subclass One or more rule in rule cited in the browser plug-in analysis page performance indications of analysis adds as testing conditions It is added in webpage performance evaluation condition subclass, or, according to business demand by one in webpage performance evaluation condition subclass Bar or a plurality of testing conditions are deleted.As an example, according to business demand, can by one in above-mentioned YSlow-23 rules or More rules are added in above-mentioned webpage performance evaluation condition subclass with update condition set as testing conditions.
Figure 4, it is seen that compared with embodiment corresponding to Fig. 2, webpage performance test methods in the present embodiment Flow 400 highlights the combination of the custom condition and browser plug-in reference condition in set of circumstances, can readily extend Testing conditions, needed to carry out Performance Analysis to webpage according to business, so as to realize, comprehensively, targetedly webpage performance is surveyed Examination.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of survey of webpage performance One embodiment that trial assembly is put, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and the device can specifically be applied In various electronic equipments.
As shown in figure 5, the webpage performance testing device 500 described in the present embodiment includes:Receiving unit 501, data acquisition Unit 502, test cell 503, generation unit 504 and display unit 505.Receiving unit 501 is configured to receive net to be tested The performance test request of page;Data capture unit 502 is configured to obtain the related data of webpage to be tested;Test cell 503 It is configured to utilize each condition in predefined set of circumstances, the related data of above-mentioned webpage to be tested is tested, To judge whether each condition is satisfied respectively;Generation unit 504 is configured to generate test report according to judged result;Present Unit 505 is configured to above-mentioned test report being presented to user.
In the present embodiment, the receiving unit 501 of webpage performance testing device 500 can by wired connection mode or Radio connection carries out the performance of the terminal acquisition webpage to be tested of web page browsing or webpage performance test from user using it Test request, or can locally obtain the performance test request of webpage to be tested.From the performance test of above-mentioned webpage to be tested Source data is extracted in request, or, above-mentioned webpage is extracted in the characteristic of request or response process as source data.
In the present embodiment, can be first based on the source data obtained in receiving unit 501, above-mentioned data capture unit 502 Data analysis first is carried out to above-mentioned source data so as to generate the related data of the webpage to be tested for webpage performance test.This In, the related data of above-mentioned webpage to be tested can be data existing in the form of HAR file formats.It can use PhantomJS softwares are analyzed above-mentioned data source, and the correlation of above-mentioned webpage to be tested is got by Windows order lines Data.
In the present embodiment, webpage performance can be provided on webpage performance testing device 500 in buffer zone in advance The set of circumstances of test, wherein, set of circumstances is by the set that is formed no less than the testing conditions of one.Above-mentioned test cell 503 are successively contrasted the related data of above-mentioned webpage to be tested with the testing conditions in above-mentioned condition set, and record compares As a result.
In the present embodiment, above-mentioned generation unit 504 can generate the survey of webpage performance indications according to above-mentioned comparative result Examination report.
In the present embodiment, the test report generated in above-mentioned generation unit 504 can be sent to by display unit 505 Above-mentioned test report can be sent to user in the form of a web page by user, here, display unit 505, or can will be above-mentioned Test report is sent to user in the form of mail.
In some optional implementations of the present embodiment, receiving unit 501 can be further configured to:Receive and use The webpage performance test that family is sent by terminal device is asked;The URL inputted by user in terminal device The page of acquisition is as webpage to be tested;Or the page from default data storage area in acquisition specified list is as to be measured Try webpage., can also be by major key ID from database wherein it is possible to obtain the page to be tested by inputting network address in designated area Or the page to be tested is obtained in buffer zone.
In some optional implementations of the present embodiment, data capture unit can be further configured to 502:Make Source data is analyzed with web testing tools, is generated for identifying HTTP http request information characteristics or http responses The characteristic information of information characteristics, and, the browser plug-in for webpage performance evaluation carries out the text envelope of page data analysis Breath.Obtain the related data of features described above information and text message as webpage to be tested.
In some optional implementations of the present embodiment, above-mentioned testing conditions set includes self-defined testing conditions Set and webpage performance evaluation condition subclass;Wherein, self-defined testing conditions subclass is by being used to sentence no less than one The set of the self-defined testing conditions composition of disconnected page performance, webpage performance evaluation condition subclass is to be used for webpage performance evaluation Browser plug-in carry out page performance evaluation Rule of judgment composition set.Here, can be certainly according to business demand user Define testing conditions and judge page performance indications for analyzing, YSlow technologies can also be quoted from webpage performance browser plug-in Analyze and extracted in the rule of page performance indications, combine some rules and be used as Rule of judgment.
In some optional implementations of the present embodiment, above-mentioned test cell 503 is further configured in judgement State whether characteristic information meets testing conditions in self-defined testing conditions subclass, and the judgement knot of recording feature information successively Fruit, using the judged result of features described above information as autonomous analysis result;Judge whether above-mentioned text message meets page performance Rule of judgment in analysis condition subclass, and the judged result of recording text information successively, by the judgement of above-mentioned text message As a result as report extraction result.
In some optional implementations of the present embodiment, above-mentioned generation unit 504 is further configured to:In reception State autonomous analysis result and report extraction result;Merge above-mentioned autonomous analysis result and report extraction result, generate report file.
In some optional implementations of the present embodiment, above-mentioned webpage performance testing device 500 can also be included more New unit, is configured to:In above-mentioned self-defined testing conditions subclass condition is added or deleted to update above-mentioned condition set; In above-mentioned webpage performance evaluation condition subclass condition is added or deleted to update above-mentioned condition set.
Below with reference to Fig. 6, it illustrates suitable for for realizing the computer system 600 of the server of the embodiment of the present application Structural representation.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into program in random access storage device (RAM) 603 from storage part 608 and Perform various appropriate actions and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 608 including hard disk etc.; And the communications portion 609 of the NIC including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 610, in order to read from it Computer program be mounted into as needed storage part 608.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being tangibly embodied in machine readable Computer program on medium, the computer program include the program code for being used for the method shown in execution flow chart.At this In the embodiment of sample, the computer program can be downloaded and installed by communications portion 609 from network, and/or from removable Medium 611 is unloaded to be mounted.When the computer program is performed by CPU (CPU) 601, perform in the present processes The above-mentioned function of limiting.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for the module, program segment or code include one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, Ke Yiyong Function as defined in execution or the special hardware based system of operation are realized, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag Include receiving unit, data capture unit, test cell, generation unit and display unit.Wherein, the title of these units is at certain In the case of do not form restriction to the unit in itself, for example, receiving unit is also described as " receiving webpage to be tested The unit of performance test request ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating Machine storage medium can be the nonvolatile computer storage media included in device described in above-described embodiment;Can also be Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited One or more program is contained, when one or more of programs are performed by an equipment so that the equipment:Receive The performance test request of webpage to be tested;Obtain the related data of above-mentioned webpage to be tested;Using in predefined set of circumstances Each condition, the related data of above-mentioned webpage to be tested is tested, to judge whether each condition is satisfied respectively;Root It is judged that result, generates test report;Above-mentioned test report is presented to user.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature The other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical scheme that the technical characteristic of energy is replaced mutually and formed.

Claims (14)

  1. A kind of 1. webpage performance test methods, it is characterised in that including:
    Receive the performance test request of webpage to be tested;
    Obtain the related data of the webpage to be tested;
    Using each condition in predefined set of circumstances, the related data of the webpage to be tested is tested, to divide Do not judge whether each condition is satisfied;
    According to judged result, test report is generated;
    The test report is presented to user.
  2. 2. webpage performance test methods according to claim 1, it is characterised in that the performance for receiving webpage to be tested Test request, including:
    The webpage performance test that user is sent by terminal device is received to ask;
    Webpage to be tested is used as in the page that the URL that terminal device is inputted obtains by user;Or
    The page in specified list is obtained from default data storage area as webpage to be tested.
  3. 3. webpage performance test methods according to claim 1, it is characterised in that the acquisition webpage to be tested Related data, including:
    The webpage to be tested is analyzed, is generated for identifying HTTP http request information characteristics or http response letters Cease the characteristic information of feature;
    The webpage to be tested is analyzed, generates the page data text message for webpage performance evaluation;
    Obtain related data of the data of the characteristic information and text message as the webpage to be tested.
  4. 4. webpage performance test methods according to claim 3, it is characterised in that the predefined set of circumstances includes Self-defined testing conditions subclass and webpage performance evaluation condition subclass, wherein, the self-defined testing conditions subclass is By the set for judging that the customized testing conditions of webpage performance form that is used for no less than one, the webpage performance evaluation bar Part subclass is by the set that is formed for the Rule of judgment of the webpage performance evaluation.
  5. 5. webpage performance test methods according to claim 4, it is characterised in that described to utilize predefined set of circumstances In each condition, the related data of the webpage to be tested is tested, to judge whether each condition is satisfied respectively, Including:
    Judge whether the characteristic information meets the testing conditions in the self-defined testing conditions subclass, and record institute successively The judged result of characteristic information is stated, using the judged result of the characteristic information as autonomous analysis result;
    Judge whether the text message meets the Rule of judgment in the page performance evaluation condition subclass, and record successively The judged result of the text message, result is extracted using the judged result of the text message as report.
  6. 6. webpage performance test methods according to claim 5, it is characterised in that described to be surveyed according to judged result, generation Examination report, including:
    Receive the autonomous analysis result and the report extraction result;
    Merge the autonomous analysis result and the report extraction result, generate test report.
  7. 7. webpage performance test methods according to claim 4, it is characterised in that methods described also includes:
    Condition is added or deletes in the self-defined testing conditions subclass to update the testing conditions set;
    Condition is deleted in the webpage performance evaluation condition subclass to update the testing conditions set.
  8. 8. a kind of webpage performance testing device, it is characterised in that described device includes:
    Receiving unit, it is configured to receive the performance test request of webpage to be tested;
    Data capture unit, it is configured to obtain the related data of the webpage to be tested;
    Test cell, it is configured to utilize each condition in predefined set of circumstances, to the correlation of the webpage to be tested Data are tested, to judge whether each condition is satisfied respectively;
    Generation unit, it is configured to generate test report according to judged result;
    Display unit, it is configured to the test report being presented to user.
  9. 9. webpage performance testing device according to claim 8, it is characterised in that the receiving unit further configures use In:
    The webpage performance test that user is sent by terminal device is received to ask;
    Webpage to be tested is used as in the page that the URL that terminal device is inputted obtains by user;Or
    The page in specified list is obtained from default data storage area as webpage to be tested.
  10. 10. webpage performance testing device according to claim 8, it is characterised in that the data capture unit is further It is configured to:
    The webpage to be tested is analyzed, is generated for identifying HTTP http request information characteristics or http response letters Cease the characteristic information of feature;
    The webpage to be tested is analyzed, generates the page data text message for webpage performance evaluation;
    Obtain related data of the data of the characteristic information and text message as the webpage to be tested.
  11. 11. webpage performance testing device according to claim 10, it is characterised in that the predefined set of circumstances bag Self-defined testing conditions subclass and webpage performance evaluation condition subclass is included, wherein, the self-defined testing conditions subclass By the set for judging that the self-defined testing conditions of webpage performance form that is used for no less than one, the webpage performance evaluation bar The set that part subclass is made up of the Rule of judgment that webpage performance evaluation is carried out for the webpage performance browser plug-in.
  12. 12. webpage performance testing device according to claim 11, it is characterised in that the test cell further configures For:
    Judge whether the characteristic information meets the testing conditions in the self-defined testing conditions subclass, and record institute successively The judged result of characteristic information is stated, using the judged result of the characteristic information as autonomous analysis result;
    Judge whether the text message meets the Rule of judgment in the page performance evaluation condition subclass, and record successively The judged result of the text message, result is extracted using the judged result of the text message as report.
  13. 13. webpage performance testing device according to claim 12, it is characterised in that the generation unit further configures For:
    Receive the autonomous analysis result and the report extraction result;
    Merge the autonomous analysis result and the report extraction result, generate test report.
  14. 14. webpage performance testing device according to claim 11, it is characterised in that it is single that described device also includes renewal Member, it is configured to:
    Condition is added or deletes in the self-defined testing conditions subclass to update the testing conditions set;
    Condition is deleted in the webpage performance evaluation condition subclass to update the testing conditions set.
CN201610366252.5A 2016-05-27 2016-05-27 Webpage performance test methods and device Pending CN107436843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610366252.5A CN107436843A (en) 2016-05-27 2016-05-27 Webpage performance test methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610366252.5A CN107436843A (en) 2016-05-27 2016-05-27 Webpage performance test methods and device

Publications (1)

Publication Number Publication Date
CN107436843A true CN107436843A (en) 2017-12-05

Family

ID=60454532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610366252.5A Pending CN107436843A (en) 2016-05-27 2016-05-27 Webpage performance test methods and device

Country Status (1)

Country Link
CN (1) CN107436843A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733571A (en) * 2018-05-28 2018-11-02 北京五八信息技术有限公司 A kind of test method, device, equipment and computer readable storage medium
CN108845929A (en) * 2018-05-07 2018-11-20 北京三快在线科技有限公司 Page performance test method and apparatus
CN109408387A (en) * 2018-10-24 2019-03-01 天津字节跳动科技有限公司 Page test method and device
CN109510738A (en) * 2018-12-14 2019-03-22 平安壹钱包电子商务有限公司 A kind of test method and equipment of communication link
CN110134609A (en) * 2019-05-20 2019-08-16 广东电网有限责任公司 Enterprise-level web application system page method for testing performance, device and medium
CN113918439A (en) * 2021-12-15 2022-01-11 云账户技术(天津)有限公司 Method and device for detecting performance of webpage
CN116737522A (en) * 2023-06-21 2023-09-12 山东日照发电有限公司 System performance optimization method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030037314A1 (en) * 2001-08-01 2003-02-20 International Business Machines Corporation Method and apparatus for testing and evaluating a software component using an abstraction matrix
CN104572427A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Page testing method, server and system
CN104750471A (en) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 WEB page performance detection and analysis plug-in and method based on browser
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030037314A1 (en) * 2001-08-01 2003-02-20 International Business Machines Corporation Method and apparatus for testing and evaluating a software component using an abstraction matrix
CN104572427A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Page testing method, server and system
CN104750471A (en) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 WEB page performance detection and analysis plug-in and method based on browser
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845929A (en) * 2018-05-07 2018-11-20 北京三快在线科技有限公司 Page performance test method and apparatus
CN108733571A (en) * 2018-05-28 2018-11-02 北京五八信息技术有限公司 A kind of test method, device, equipment and computer readable storage medium
CN109408387A (en) * 2018-10-24 2019-03-01 天津字节跳动科技有限公司 Page test method and device
CN109408387B (en) * 2018-10-24 2022-03-22 天津字节跳动科技有限公司 Page testing method and device
CN109510738A (en) * 2018-12-14 2019-03-22 平安壹钱包电子商务有限公司 A kind of test method and equipment of communication link
CN110134609A (en) * 2019-05-20 2019-08-16 广东电网有限责任公司 Enterprise-level web application system page method for testing performance, device and medium
CN113918439A (en) * 2021-12-15 2022-01-11 云账户技术(天津)有限公司 Method and device for detecting performance of webpage
CN116737522A (en) * 2023-06-21 2023-09-12 山东日照发电有限公司 System performance optimization method

Similar Documents

Publication Publication Date Title
CN107436843A (en) Webpage performance test methods and device
CN104766014B (en) For detecting the method and system of malice network address
CN102932197B (en) Testing method and system
US10915828B2 (en) Website address identification method and apparatus
CN108804707B (en) Page processing method and device and related equipment
US8413044B2 (en) Method and system of retrieving Ajax web page content
US20140137006A1 (en) Graphical Overlay Related To Data Mining And Analytics
US8745341B2 (en) Web server cache pre-fetching
US9275018B2 (en) Techniques for analyzing web pages to determine font subsets
CN107066609A (en) Image display method and device
CN107797911A (en) Method and apparatus for testing HTTP interface
US20140281859A1 (en) Enhanced mobilization of existing web sites
CN108038134A (en) The method, apparatus and storage medium and electronic equipment of page presentation
CN110362304A (en) The method and apparatus of web displaying
US8332821B2 (en) Using encoding to detect security bugs
CN107153716A (en) Webpage content extracting method and device
US20120079361A1 (en) System, method, and program for generating web page
CN103136259B (en) A kind of method and apparatus based on content block identification processing web page contents
CN113382083B (en) Webpage screenshot method and device
CN107562600A (en) Page detection method, apparatus, computing device and storage medium
CN108090104A (en) For obtaining the method and apparatus of webpage information
US20170031882A1 (en) Web Page Profiler
Schubotz et al. Mathoid: Robust, scalable, fast and accessible math rendering for wikipedia
CN107368484A (en) Compression method and device, the acquisition methods and device of the static resource file of webpage
US20040078362A1 (en) System and method for extracting an index for web contents transcoding in a wireless terminal

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171205

RJ01 Rejection of invention patent application after publication