CN106161133B - Method and device for testing webpage loading time - Google Patents

Method and device for testing webpage loading time Download PDF

Info

Publication number
CN106161133B
CN106161133B CN201510190350.3A CN201510190350A CN106161133B CN 106161133 B CN106161133 B CN 106161133B CN 201510190350 A CN201510190350 A CN 201510190350A CN 106161133 B CN106161133 B CN 106161133B
Authority
CN
China
Prior art keywords
webpage
tested
loading
screenshot
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510190350.3A
Other languages
Chinese (zh)
Other versions
CN106161133A (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.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510190350.3A priority Critical patent/CN106161133B/en
Publication of CN106161133A publication Critical patent/CN106161133A/en
Application granted granted Critical
Publication of CN106161133B publication Critical patent/CN106161133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for testing webpage loading time, wherein the method comprises the steps of obtaining information of a webpage to be tested; loading a webpage to be tested according to the information; from the beginning of loading a webpage to be tested, screen capturing is carried out on the webpage to be tested according to a preset time interval to obtain at least one screenshot, and the screenshot is labeled until the webpage to be tested is completely loaded within a preset time range; and traversing all screenshots, and obtaining a test result of the webpage loading time according to the labels corresponding to the screenshots and the preset time interval. In the embodiment of the invention, the webpage information is collected at regular time by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.

Description

Method and device for testing webpage loading time
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a device for testing webpage loading time.
Background
With the rapid development of internet technology, the speed requirement of a user on loading a webpage by a browser is higher and higher, and generally, when the browser loads the webpage, the time when a first non-white pixel point appears in the webpage is commonly referred to as first loading time or first appearance time. Through the test of the first word loading time, the speed of displaying the webpage by different browsers to a user on the first sense can be contrastively analyzed.
The existing speed test method for loading the first word of the web page generally needs to cycle through all pixel points in the whole visible area of the web page by an automatic test program. Before testing, an automatic testing program needs to open a blank page, circularly traverse all pixel points in a webpage area in the whole screen from the completion of website input on a browser and the loading of the webpage, stop timing until the color value of a certain pixel point is not white, use the period of time as the first word loading time of the browser, and evaluate the speed of the first word loading of the webpage.
In the course of research and practice on the prior art, the inventors of the present invention found that errors in time calculation may be caused by the time taken to traverse to the position where the first character appears. Or, when the position where the first character appears is not traversed, a plurality of pixel points in the page are also loaded with colors, and the color is found by the test program, so that the time calculation error is caused, and therefore, the time is tested by traversing all the pixel points in the visible area on the webpage, which causes the problems of long time consumption and inaccurate test conclusion.
Disclosure of Invention
The invention aims to provide a method and a device for testing webpage loading time, and aims to shorten the time for testing the first word loading speed of a webpage, reduce testing errors and improve the accuracy of a testing result.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
a method for testing webpage loading time comprises the following steps:
acquiring information of a webpage to be tested;
loading the webpage to be tested according to the information;
from the beginning of loading the webpage to be tested, screen capturing is carried out on the webpage to be tested according to a preset time interval to obtain at least one screenshot, and the screenshot is labeled until the webpage to be tested is completely loaded within a preset time range;
and traversing all screenshots, and generating a test result of the webpage loading time according to the labels corresponding to the screenshots and the preset time interval.
In order to solve the above technical problems, embodiments of the present invention further provide the following technical solutions:
a testing device for webpage loading time comprises:
the acquisition module is used for acquiring the information of the webpage to be tested;
the loading module is used for loading the webpage to be tested according to the information;
the screen capture labeling module is used for capturing a screen of the webpage to be tested according to a preset time interval from the beginning of loading the webpage to be tested to obtain at least one captured screen, and labeling the captured screen until the webpage to be tested is completely loaded within a preset time range;
and the generating module is used for traversing all screenshots and generating a test result of the webpage loading time according to the labels corresponding to the screenshots and the preset time interval.
Compared with the prior art, the webpage loading method has the advantages that the webpage is loaded according to the information of the webpage to be tested; in the loading process, screen capturing is carried out on the webpage to be tested according to a preset time interval, at least one screenshot is obtained and marked until the webpage to be tested is completely loaded within a preset time range; traversing all screenshots after loading, and generating a test result of webpage loading time according to the labels corresponding to the screenshots and a preset time interval; in the embodiment of the invention, the webpage information is regularly acquired by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.
Drawings
The technical solution and other advantages of the present invention will become apparent from the following detailed description of specific embodiments of the present invention, which is to be read in connection with the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for testing webpage loading time according to a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for testing webpage loading time according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for testing webpage loading time according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for testing webpage loading time according to a fourth embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
First embodiment
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for testing webpage loading time according to a first embodiment of the present invention. The method comprises the following steps:
in step S101, information of a web page to be tested is acquired.
In step S102, the web page to be tested is loaded according to the information.
The steps S101 and S102 may specifically be:
it is understood that the method for testing the webpage loading time may be implemented on a mobile terminal, and the mobile terminal may be a terminal with computing capability, such as a notebook computer, a tablet pc (personal computer), a mobile phone, and the like, which has a storage unit and is equipped with a microprocessor, and the invention is not limited thereto.
In addition, the information of the web page to be tested in the embodiment of the present invention may specifically refer to an identifier of the web page, such as a link address of the web page to be accessed; it is easy to think that the information can be triggered to be sent by the user clicking or touching the screen of the mobile terminal, and is not limited in particular here.
In step S103, from the beginning of loading the web page to be tested, screen capturing is performed on the web page to be tested according to a preset time interval to obtain at least one screenshot, and the screenshot is labeled until it is determined that the loading of the web page to be tested is completed within a preset time range.
It can be understood that, in step S103, a process of loading a web page to be tested is further performed, where the web page to be tested is loaded based on a browser of a Windows operating system, and the web page loading is a process of opening a web page by the browser.
It is easily conceivable that the preset time interval and the preset time range may be preset in the mobile terminal; the preset time interval is screenshot interval time, and the size of the screenshot interval time can be adjusted according to an actual scene so as to adjust an error range; the preset time range can be set according to an empirical value, and the specific values of the preset time interval and the preset time range are not limited in the embodiment.
In step S104, traversing all screenshots, and generating a test result of the webpage loading time according to the labels corresponding to the screenshots and the preset time interval.
It can be understood that the reference number may refer to a number sorted according to a front-back order of a screen capture to indicate a corresponding screen capture, and a loading time of each screen capture may be obtained according to the preset time interval and the reference number, so that test results such as a loading time of the first word of the web page and a total loading time of the web page may be obtained, which are not specifically described herein.
As can be seen from the above, the method for testing webpage loading time provided by this embodiment loads a webpage according to information of the webpage to be tested; in the loading process, screen capturing is carried out on the webpage to be tested according to a preset time interval, at least one screenshot is obtained and marked until the webpage to be tested is completely loaded within a preset time range; traversing all screenshots after loading, and generating a test result of webpage loading time according to the labels corresponding to the screenshots and a preset time interval; in the embodiment of the invention, the webpage information is regularly acquired by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.
Second embodiment
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for testing webpage loading time according to a second embodiment of the present invention. The method for testing the webpage loading time is based on operation on a mobile terminal, and the mobile terminal can be a terminal with computing capability, such as a notebook computer, a tablet PC, a mobile phone and the like, which is provided with a storage unit and a microprocessor; for convenience of understanding, the following embodiments are mainly described by taking the mobile terminal as an example, which is not to be construed as limiting the invention.
Different from the first embodiment, the present embodiment mainly aims at web page loading and a detailed description of how to generate a test result. The method comprises the following steps:
in step S201, a test trigger instruction is acquired.
In step S202, a blank page is accessed within a preset time threshold according to the test trigger instruction.
The steps S201 and S202 may specifically be:
it can be understood that, before testing the web page to be tested, the browser is started, where the web page to be tested may be loaded by the browser based on the Windows operating system, and the web page loading is a process in which the browser opens the web page. After the browser is started, firstly, a blank page needs to be accessed within a preset time threshold, namely, the webpage to be tested is accessed after the blank page is determined to be accessed, so that the starting time for loading the webpage to be tested is conveniently determined.
It is easy to think that the time for accessing the blank page (i.e. the preset time threshold) can be preset in the terminal, specifically, can be set to several seconds, such as 2 seconds, 3 seconds, etc., and is not limited in detail here.
In step S203, information of a web page to be tested is acquired.
In step S204, the web page to be tested is loaded according to the information.
The steps S203 and S204 may specifically be:
in the embodiment of the present invention, the information of the to-be-tested web page may specifically refer to an identifier of the web page, such as a link address of the to-be-accessed web page; it is easy to think that the information may be triggered and sent by the user clicking or touching the screen of the mobile terminal, or the automated testing system may automatically obtain the information after detecting that the blank page access is finished, which is not specifically limited herein.
In step S205, from the beginning of loading the web page to be tested, screen capturing is performed on the web page to be tested according to a preset time interval to obtain at least one screenshot, and the screenshot is labeled;
it can be understood that, starting timing when the webpage to be tested is loaded, the webpage to be tested is captured once every preset time interval, and the screenshots are labeled in sequence according to the sequence of the screenshots.
If the preset time interval is M seconds, screenshot is performed for the browser (namely the current webpage to be tested) once every M seconds, sequence numbers are marked for the screenshots, and 1 is sequentially added according to the sequence of the screenshots from 1 until the webpage loading is completed.
It is easily conceivable that the preset time interval and the preset time range may be preset in the mobile terminal; the preset time interval is screenshot interval time, and the size of the screenshot interval time can be adjusted according to an actual scene so as to adjust an error range; the preset time range can be set according to an empirical value, and the specific values of the preset time interval and the preset time range are not limited in the embodiment.
In step S206, it is determined whether the loading of the web page to be tested is completed within a preset time range;
in the process of loading the web page to be tested, step S207a or step S207b is executed according to the judgment result of step S206;
in step S207a, if it is determined that the loading of the web page to be tested is completed within the preset time range, traversing all screenshots from the first screenshot according to the order of the screenshot, and acquiring the screenshot in which the first non-white pixel point in the web page to be tested appears and the corresponding label;
and after acquiring the screenshot appearing on the first non-white pixel point in the webpage to be tested and the corresponding label, executing the step S208.
In step S208, the time when the first non-white pixel appears is calculated according to the label of the screenshot when the first non-white pixel appears and the time interval, and the calculation result is used as the test result of the webpage loading time.
It can be understood that, the steps S207a and S208 are specific implementations of the mobile terminal needing to traverse all screenshots until it is determined that the loading of the web page to be tested is completed within the preset time range, and generating a test result of the web page loading time according to the labels corresponding to the screenshots and the preset time interval;
if the preset time interval is M seconds, all screenshots of the webpage to be tested are traversed from the first screenshot, and the sequence number of the screenshot in which the first character appears is found. And calculating the time of the first character of the website by using a formula t-n-M according to the sequence number of the screenshot in which the first character appears. Wherein n is the screenshot sequence number, M is the time interval (i.e. the preset time interval) between every two screenshots, and the interval time is constant.
That is, according to the label corresponding to the screenshot and the preset time interval, the loading time of each screenshot can be calculated, so that test results such as the loading time of the first character of the webpage and the total loading time of the webpage can be obtained.
In step S207b, if it is determined that the web page to be tested is not completely loaded within the preset time range, stopping screenshot of the web page to be tested, and closing the corresponding web page to be tested.
Namely, if the set timeout time is reached, the website is not loaded completely, the screenshot of the browser is not timed, and the website is closed.
As can be seen from the above, the method for testing webpage loading time provided by this embodiment loads a webpage according to information of the webpage to be tested; in the loading process, screen capturing is carried out on the webpage to be tested according to a preset time interval, at least one screenshot is obtained and marked until the webpage to be tested is completely loaded within a preset time range; traversing all screenshots after loading, and generating a test result of webpage loading time according to the labels corresponding to the screenshots and a preset time interval; in the embodiment of the invention, the webpage information is regularly acquired by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.
Third embodiment
In order to better implement the method for testing the webpage loading time provided by the embodiment of the invention, the embodiment of the invention also provides a device for testing the method based on the webpage loading time. The meaning of the noun is the same as that in the method for testing the webpage loading time, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a device for testing webpage loading time according to an embodiment of the present invention, where the device for testing webpage loading time can be operated on the basis of a mobile terminal, and the mobile terminal can be a terminal with computing capability, such as a notebook computer, a tablet PC, and a mobile phone, and the terminal has a storage unit and is equipped with a microprocessor, and the present invention is not limited thereto.
As shown in fig. 3, the apparatus for testing webpage loading time according to the present invention may include an information obtaining module 301, a loading module 302, a screen capture label module 303, and a generating module 304.
The information acquisition module 301 is configured to acquire information of a webpage to be tested; the loading module 302 is configured to load the webpage to be tested according to the information;
it can be understood that, in the embodiment of the present invention, the information of the to-be-tested web page may specifically refer to an identifier of the web page, such as a link address of the to-be-accessed web page; it is easy to think that the information can be triggered and sent by the user clicking or touching the screen of the mobile terminal, and the information is not limited in detail here
The screen capture labeling module 303 is configured to capture a screen of the webpage to be tested at a preset time interval from the beginning of loading the webpage to be tested to obtain at least one screenshot, and label the screenshot until it is determined that the loading of the webpage to be tested is completed within a preset time range; the generating module 304 is configured to traverse all the screenshots, and generate a test result of the webpage loading time according to the labels corresponding to the screenshots and the preset time interval.
It can be understood that the screenshot label module 303 is used for loading a web page to be accessed, and further, the web page to be tested is loaded based on a browser of a Windows operating system, where the web page loading is a process of opening the web page by the browser.
It is easily conceivable that the preset time interval and the preset time range may be preset in the mobile terminal; the preset time interval is screenshot interval time, and the size of the screenshot interval time can be adjusted according to an actual scene so as to adjust an error range; the preset time range can be set according to an empirical value, and the specific values of the preset time interval and the preset time range are not limited in the embodiment.
The label may refer to a number sorted according to a sequence of screen shots to indicate the corresponding screen shots, and the time for loading each screen shot may be obtained according to the preset time interval and the label, so that the test results such as the time for loading the first word of the web page and the total time for loading the web page may be obtained, which is not described in detail herein.
As can be seen from the above, the testing apparatus for webpage loading time provided by this embodiment loads a webpage according to information of the webpage to be tested; in the loading process, screen capturing is carried out on the webpage to be tested according to a preset time interval, at least one screenshot is obtained and marked until the webpage to be tested is completely loaded within a preset time range; traversing all screenshots after loading, and generating a test result of webpage loading time according to the labels corresponding to the screenshots and a preset time interval; in the embodiment of the invention, the webpage information is regularly acquired by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.
Fourth embodiment
Referring to fig. 4, fig. 4 is a schematic structural diagram of a device for testing webpage loading time according to an embodiment of the present invention, where the device for testing webpage loading time includes: the information obtaining module 401, the loading module 402, the screen capture labeling module 403, and the generating module 404, wherein the functional functions of the functional modules in this embodiment may refer to the related descriptions of the information obtaining module 301, the loading module 302, the screen capture labeling module 303, and the generating module 304 in the fourth embodiment, which are not described herein again.
Preferably, the device for testing webpage loading time may further include: an instruction obtaining module 405, configured to obtain a test trigger instruction; and the access module 406 is configured to access a blank page within a preset time threshold according to the test trigger instruction, so as to determine that access to the webpage to be tested is triggered after the access to the blank page is finished.
It can be understood that, before testing the web page to be tested, the browser is started, where the web page to be tested may be loaded by the browser based on the Windows operating system, and the web page loading is a process in which the browser opens the web page. After the browser is started, firstly, a blank page needs to be accessed within a preset time threshold, namely, the webpage to be tested is accessed after the blank page is determined to be accessed, so that the starting time for loading the webpage to be tested is conveniently determined.
The device for testing webpage loading time may further include: and the control module 407 is configured to control the screen capture labeling module to stop capturing the web page to be tested and close the corresponding web page to be tested if it is determined that the web page to be tested is not loaded within a preset time range.
Namely, if the set timeout time is reached, the website is not loaded completely, the screenshot of the browser is not timed, and the website is closed.
The screen shot number module 403 may also be configured to: and labeling the screenshots in sequence according to the sequence of the screenshots.
Based on this, the generating module 404 may include an obtaining unit 4041 and a calculation generating unit 4042, where the obtaining unit 4041 is configured to traverse all screenshots from the first screenshot according to the screen capturing sequence, and obtain a screenshot in which a first non-white pixel point in the webpage to be tested appears and a corresponding label; the calculation generating unit 4042 is configured to calculate the time when the first non-white pixel appears according to the label of the screenshot when the first non-white pixel appears and the time interval, and use the calculation result as a test result of the webpage loading time.
It is understood that, in the embodiment, the parts that are not described in detail may refer to the above detailed description of the test method for webpage loading time, and are not described herein again.
As can be seen from the above, the testing apparatus for webpage loading time provided by this embodiment loads a webpage according to information of the webpage to be tested; in the loading process, screen capturing is carried out on the webpage to be tested according to a preset time interval, at least one screenshot is obtained and marked until the webpage to be tested is completely loaded within a preset time range; traversing all screenshots after loading, and generating a test result of webpage loading time according to the labels corresponding to the screenshots and a preset time interval; in the embodiment of the invention, the webpage information is regularly acquired by screen capture in the webpage loading process, and the data is analyzed after the webpage loading is finished to count the appearance time of the first character of the webpage loaded by the browser.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and a part which is not described in detail in a certain embodiment may refer to the above detailed description of the test method for webpage loading time, and is not described herein again.
The web page loading time testing device provided by the embodiment of the present invention is, for example, a computer, a tablet computer, a mobile phone with a touch function, and the like, and belongs to the same concept as the web page loading time testing method in the above embodiment.
It should be noted that, for the method for testing web page loading time according to the present invention, it can be understood by a person skilled in the art that all or part of the process of the method for testing web page loading time according to the embodiment of the present invention can be completed by controlling related hardware through a computer program, where the computer program can be stored in a computer readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and the process of the embodiment of the method for testing web page loading time can be included in the execution process. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the device for testing webpage loading time in the embodiment of the present invention, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The method and the device for testing the webpage loading time provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A method for testing webpage loading time is characterized by comprising the following steps:
acquiring a test trigger instruction;
accessing a blank page within a preset time threshold according to the test trigger instruction so as to determine that the access to the webpage to be tested is triggered after the access to the blank page is finished;
acquiring information of a webpage to be tested after the blank page access is checked out;
loading the webpage to be tested according to the information;
from the beginning of loading the webpage to be tested, screen capturing is carried out on the webpage to be tested according to a preset time interval to obtain at least one screenshot, and the screenshots are sequentially marked according to the screen capturing sequence until the webpage to be tested is completely loaded within a preset time range;
according to the sequence of screen capture, traversing all screen captures from a first screen capture to obtain the screen capture and the corresponding label appearing on the first non-white pixel point in the webpage to be tested; and calculating the time of the first non-white pixel point according to the mark of the screenshot of the first non-white pixel point and the time interval, and taking the calculation result as the test result of the webpage loading time.
2. The method for testing webpage loading time according to claim 1, wherein before traversing all screenshots, the method further comprises:
and if the webpage to be tested is determined not to be loaded in the preset time range, stopping screenshot of the webpage to be tested, and closing the corresponding webpage to be tested.
3. A testing device for webpage loading time is characterized by comprising:
the instruction acquisition module is used for acquiring a test trigger instruction;
the access module is used for accessing a blank page within a preset time threshold according to the test triggering instruction so as to determine that the access to the webpage to be tested is triggered after the access to the blank page is finished;
the information acquisition module is used for acquiring the information of the webpage to be tested after the blank page access is checked out;
the loading module is used for loading the webpage to be tested according to the information;
the screen capture labeling module is used for capturing the screen of the webpage to be tested according to a preset time interval from the beginning of loading the webpage to be tested to obtain at least one screenshot, and sequentially labeling the screenshot according to the screen capture sequence until the webpage to be tested is completely loaded within a preset time range;
the generating module is used for traversing all screenshots from the first screenshot according to the sequence of the screenshots, and acquiring the screenshot of the first non-white pixel point in the webpage to be tested and the corresponding label; and calculating the time of the first non-white pixel point according to the mark of the screenshot of the first non-white pixel point and the time interval, and taking the calculation result as the test result of the webpage loading time.
4. The apparatus for testing webpage loading time according to claim 3, wherein the apparatus further comprises:
and the control module is used for controlling the screen capture labeling module to stop capturing the webpage to be tested and closing the corresponding webpage to be tested if the webpage to be tested is determined not to be loaded in the preset time range.
5. The apparatus for testing webpage loading time according to claim 3, wherein the generating module comprises:
the acquisition unit is used for traversing all screenshots from the first screenshot according to the sequence of the screenshots, and acquiring the screenshot of the first non-white pixel point in the webpage to be tested and the corresponding label;
and the calculation generating unit is used for calculating the time of the first non-white pixel point according to the mark of the screenshot of the first non-white pixel point and the time interval, and taking the calculation result as the test result of the webpage loading time.
6. A computer-readable storage medium storing a computer program, wherein the computer program causes a computer to perform the method according to any one of claims 1 to 2.
7. A terminal, characterized in that it comprises a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 2.
CN201510190350.3A 2015-04-21 2015-04-21 Method and device for testing webpage loading time Active CN106161133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510190350.3A CN106161133B (en) 2015-04-21 2015-04-21 Method and device for testing webpage loading time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510190350.3A CN106161133B (en) 2015-04-21 2015-04-21 Method and device for testing webpage loading time

Publications (2)

Publication Number Publication Date
CN106161133A CN106161133A (en) 2016-11-23
CN106161133B true CN106161133B (en) 2020-08-04

Family

ID=58058467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510190350.3A Active CN106161133B (en) 2015-04-21 2015-04-21 Method and device for testing webpage loading time

Country Status (1)

Country Link
CN (1) CN106161133B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562610B (en) * 2017-09-21 2021-04-27 北京字节跳动网络技术有限公司 Method, device, terminal and medium for acquiring page loading time
CN108196904A (en) * 2017-12-27 2018-06-22 广州品唯软件有限公司 Calculate the method, apparatus and computer storage media of page response duration
CN109299000A (en) * 2018-08-22 2019-02-01 中国平安人寿保险股份有限公司 A kind of webpage response test method, computer readable storage medium and terminal device
CN109446095A (en) * 2018-11-07 2019-03-08 北京奇艺世纪科技有限公司 A kind of test method, device and the electronic equipment of page presentation speed
CN109710529A (en) * 2018-12-27 2019-05-03 江苏满运软件科技有限公司 Web project operation detection method, device, electronic equipment, storage medium
CN110688602A (en) * 2019-09-25 2020-01-14 杭州安恒信息技术股份有限公司 Method, device and system for testing webpage loading speed
CN111026989B (en) * 2019-11-15 2023-06-27 汉海信息技术(上海)有限公司 Page loading time detection method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624576A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for automatically testing webpage downloading time of browser and system thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581987B (en) * 2012-07-31 2018-07-06 腾讯科技(深圳)有限公司 The test method and device of the page download speed of mobile terminal device
CN103729285B (en) * 2012-10-11 2018-06-05 腾讯科技(深圳)有限公司 A kind of webpage test method, equipment and system
US9021438B2 (en) * 2013-06-20 2015-04-28 Sap Portals Israel Ltd Automatic framework for parallel testing on multiple testing environments

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624576A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for automatically testing webpage downloading time of browser and system thereof

Also Published As

Publication number Publication date
CN106161133A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN106161133B (en) Method and device for testing webpage loading time
CN107783898B (en) Test method and test equipment for mobile application
US9135151B2 (en) Automatic verification by comparing user interface images
CN110704304B (en) Application program testing method and device, storage medium and server
US9342237B2 (en) Automated testing of gesture-based applications
KR20140091555A (en) Measuring web page rendering time
US20180329565A1 (en) Touch gesture detection assessment
CN105320602B (en) A kind of test method and device of application starting speed
CN107678937A (en) Page compatibility detection method, device, server and medium
CN104866416B (en) The method and apparatus for realizing application program capacity analysis
CN104115097B (en) The automation perceived quality assessment of touch panel device
EP3232312A1 (en) Method, apparatus and terminal device for setting interrupt threshold for fingerprint identification device
US11436188B2 (en) Resource optimization and update method, server, and device
CN103955428A (en) Method and equipment for testing response speed of application
WO2014154033A1 (en) Method and apparatus for extracting web page content
CN106959919B (en) Software testing method and device based on testing path diagram
CN107797922B (en) Application page testing method, electronic device and electronic equipment
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN115686961A (en) Processor testing method and device and electronic equipment
US9378109B1 (en) Testing tools for devices
CN111125704B (en) Webpage Trojan horse recognition method and system
CN110209572A (en) Ui testing method, ui testing system and terminal
CN115687146A (en) BIOS (basic input output System) test method and device, computer equipment and storage medium
CN110990558B (en) Electronic book content display method, computing equipment and computer storage medium
CN111026657B (en) Method, computing device and medium for testing application in mobile terminal

Legal Events

Date Code Title Description
C06 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
TR01 Transfer of patent right

Effective date of registration: 20221205

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518,101

Patentee after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right