CN106897210A - A kind of interface load time computational methods, device and system - Google Patents

A kind of interface load time computational methods, device and system Download PDF

Info

Publication number
CN106897210A
CN106897210A CN201510960301.3A CN201510960301A CN106897210A CN 106897210 A CN106897210 A CN 106897210A CN 201510960301 A CN201510960301 A CN 201510960301A CN 106897210 A CN106897210 A CN 106897210A
Authority
CN
China
Prior art keywords
terminal
tested
interface
synchronized links
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510960301.3A
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 Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510960301.3A priority Critical patent/CN106897210A/en
Publication of CN106897210A publication Critical patent/CN106897210A/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/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the invention provides a kind of interface load time computational methods and system.Methods described includes:The first synchronized links are set up into test terminal and testing service device;Testing service device sets up the second synchronized links based on first synchronized links with terminal to be tested;By test terminal by first synchronized links and the second synchronized links, the synchronous screen picture for obtaining terminal to be tested;Triggering is operated for the loading at an interface in the screen picture of test terminal, and records the first time point of the triggering loading operation;Terminal to be tested is by loading operation described in the first synchronized links and the second synchronized links synchronization process;During terminal to be tested is processed according to the loading operation, calculate whether synchronous screen picture matches with the first preset image by test terminal;Screen picture when described first image is interface loaded;If it does, then the second time point of recording synchronism;By test terminal according to first time point and the second time point, the load time at interface is calculated.The accurate test result of acquisition is achieved, reduce test use time, it is to avoid the beneficial effect of the troublesome operation of user.

Description

A kind of interface load time computational methods, device and system
Technical field
The present invention relates to software technology field, more particularly to a kind of interface load time computational methods side Method and a kind of interface load time computing device and a kind of interface load time computing system.
Background technology
With the development of the mobile terminals such as smart mobile phone, increasing user begins through mobile phone etc. and sets It is standby to browse webpage, to obtain the information needed for user.
User using mobile phone access website is realized based on the webpage acquired in mobile phone browser.Generally In the case of, when user accesses the page whole loaded of website, total page height may have a screen to arrive Multi-screen, total page load time is more long much than the head screen load times, but during first screen loading Between be user to an important factors of experience for browser loading performance, the head screen load times refer to mobile phone Etc. the full frame region of the browser of equipment full of the time needed for Website page.When Website page shields full of first Behind region, user it is seen that web page contents and clicked on accordingly, the operation such as screen scroll, Without waiting all webpages to website all to load completion.Thus, since user initiates access, arrive Head screen content loadings complete this period, and the experience to user is most important.
And the measurement of screen load time first for mobile phone browser webpage also it is critical that, first skill In art, whole web-page requests process is taken pictures using high-speed camera generally, and record every photograph The shooting time of piece, then it is artificial contrasted in the photo for shooting search has shot in advance it is initial with Terminate picture, finally subtract each other the shooting time of this two photos, during with the first screen loading for obtaining webpage Between.But high-speed camera is influenceed by extraneous factor (such as distance, luminosity) so that shooting is obtained Photo there is certain time interval, and then cause the result of test inaccurate, also, use people The starting and ending picture for having shot in advance is searched in work contrast, and the time for causing test process to expend compares Long, whole testing procedure is cumbersome.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes above mentioned problem or at least portion to provide one kind The interface load time computational methods and corresponding interface load time for solving the above problems with dividing calculate dress Put.
According to one aspect of the present invention, there is provided a kind of interface load time computational methods, including: The first synchronized links are set up into test terminal and testing service device;The testing service device is based on described the One synchronized links set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
Preferably, it is with the first preset image in the screen picture that synchronization is calculated by test terminal Before the step of no matching, also include:
The son of at least one of the described first image at interface to be tested position is obtained by test terminal Image.
Preferably, it is described that whether synchronous screen picture and the first preset image are calculated by test terminal The step of matching, including:
The subgraph with each precalculated position is obtained from the synchronous screen picture by test terminal;Institute State at least one of screen picture after precalculated position and the loaded at interface position phase Together;
Judge the subgraph in each precalculated position and whether complete of the same position subgraph of the first image Match somebody with somebody.
Preferably, it is described the step of test terminal and testing service device are set up into the first synchronized links, bag Include:
By the STF remote control tables in the browser connecting test server of test terminal, To set up the first synchronized links;STF remote control tables are to be tested with described in the testing service device Terminal sets up the second synchronized links.
Preferably, it is described terminal to be tested according to it is described loading operation processed during, Also include:
At least one performance for obtaining the terminal to be tested in the interface loading procedure by test terminal refers to Mark.
Preferably, the performance indications include:CPU occupation rates, internal memory occupation rate, terminal to be tested Flow, terminal power wherein at least to be tested.
Preferably, first synchronized links and the second synchronized links are being passed through by test terminal, it is synchronous Before the step of obtaining the screen picture of terminal to be tested, also include:
The STF remote control tables for passing through testing service device by test terminal, install to terminal to be tested Test installation kit;The interface belongs to the interface of the application after the test installation kit is installed.
Preferably, it is described by test terminal according to first time point and the second time point, calculate described After the step of load time at interface, also include:
Judge whether that the interface detection of the application to the test installation kit is completed;
Judge whether also to exist the test installation kit do not tested;
If it is present continue to install the test installation kit do not tested to terminal to be tested, into logical The step of crossing the synchronized links, the screen picture of synchronous terminal to be tested.
Preferably, it is described by test terminal according to first time point and the second time point, calculate described After the step of load time at interface, also include:
The load time is recorded with the interface identification at the correspondence interface.
Preferably, the loading operation for being directed to an interface includes:Generation webpage for a webpage please The loading asked is operated;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
The terminal to be tested synchronously obtains the loading operation, and according to the loading operation to web Server sends web-page requests.
Preferably, the interface identification at the interface includes:The website information of webpage.
Preferably, the load time is recorded with the interface identification at the correspondence interface described The step of after, also include:
The load time of the interface identification is compared with predetermined time threshold;
When the load time be less than or equal to predetermined time threshold, it is determined that the interface identification plus The load time meets the requirements;
It is more than predetermined time threshold when the load time, it is determined that during the loading of the interface identification Between it is undesirable, and generate warning message.
According to another aspect of the present invention, there is provided a kind of interface load time computing system, including:
Test terminal, testing service device, terminal to be tested
The test terminal includes:
First synchronized links set up module, are suitable to set up the first synchronized links with testing service device;
Screen picture synchronization module, is suitable to by first synchronized links and the second synchronized links, together Step obtains the screen picture of terminal to be tested;
First time point logging modle, is suitable to loading of the triggering for an interface in the screen picture Operation, and record the first time point of the triggering loading operation;
Images match computing module, is suitable to what is processed according to the loading operation in terminal to be tested During, calculate whether synchronous screen picture matches with the first preset image;Described first image Screen picture during for interface loaded;
Second time point logging modle, is suitable in synchronous screen picture and the first preset images match When, the second time point of recording synchronism;
Load time computing module, is suitable to, according to first time point and the second time point, calculate the boundary The load time in face;
The testing service device includes:
Second synchronized links set up module, are suitable to be built with terminal to be tested based on first synchronized links Vertical second synchronized links;
The terminal to be tested includes:
Processing module, is suitable to pass through the first synchronized links and the second synchronized links by the terminal to be tested Operation is loaded described in synchronization process.
Preferably, before described image matching primitives module, also include:
Subgraph acquisition module, is suitable to be obtained by test terminal the described first image at interface to be tested At least one of position subgraph.
Preferably, described image matching primitives module includes:
The subgraph acquisition submodule in precalculated position, is suitable to by test terminal from the synchronous screen map The subgraph with each precalculated position is obtained as in;The loaded at the precalculated position and the interface it At least one of screen picture afterwards position is identical;
Same position subgraph matching judgment module, is suitable to judge the subgraph and first in each precalculated position Whether the same position subgraph of image matches completely.
Preferably, first synchronized links set up module includes:
First synchronized links setting up submodule, is suitable to by the browser connecting test of test terminal STF remote control tables in server, to set up the first synchronized links;In the testing service device STF remote control tables set up the second synchronized links with the terminal to be tested.
Preferably, it is described terminal to be tested according to it is described loading operation processed during, Also include:
Acquiring performance index submodule, is suitable to obtain treating in the interface loading procedure by test terminal At least one performance indications of test terminal.
Preferably, the performance indications include:CPU occupation rates, internal memory occupation rate, terminal to be tested Flow, terminal power wherein at least to be tested.
Preferably, before the screen picture synchronization module, also include:
Test installation kit installs module, is suitable to remotely be controlled by the STF of testing service device by test terminal Platform processed, test installation kit is installed to terminal to be tested;The interface belongs to the test installation kit peace The interface of the application after dress.
Preferably, after the load time computing module, also include:
Test completes judge module, is suitable to judge whether that the interface of the application to the test installation kit is surveyed Examination is completed;
Test installation kit judge module, is suitable to judge whether also there is the test installation kit do not tested;
Not testing installation kit and module is installed, being suitable to, when there is the test installation kit do not tested, continue to pacify A test installation kit do not tested is filled to terminal to be tested, the synchronized links are entered through, synchronously treated The step of screen picture of test terminal.
Preferably, after the load time computing module, also include:
Interface identification logging modle, is suitable to the load time with the interface identification at the correspondence interface Recorded.
Preferably, the loading operation for being directed to an interface includes:Generation webpage for a webpage please The loading asked is operated;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
The terminal to be tested synchronously obtains the loading operation, and according to the loading operation to web Server sends web-page requests.
Preferably, the interface identification at the interface includes:The website information of webpage.
Preferably, after the interface identification logging modle, also include:
Comparison module, is suitable to be compared the load time of the interface identification with predetermined time threshold Compared with;
Load time meets the requirements determining module, be suitable to when the load time less than or equal to it is predetermined when Between threshold value, it is determined that the load time of the interface identification meets the requirements;
Warning message generation module, is suitable to be more than predetermined time threshold when the load time, then really The load time of the fixed interface identification is undesirable, and generates warning message.
According to one aspect of the present invention, there is provided a kind of interface load time computing device, including:
Memory, is loaded with a plurality of executable instruction;
Processor, performs a plurality of executable instruction;The a plurality of instruction includes performing following steps Method:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;
If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
Interface load time numerical procedure according to embodiments of the present invention, by by test terminal with test Server sets up the first synchronized links, and testing service device is based on first synchronized links in terminal to be tested The second synchronized links are set up, with the screen picture of synchronous terminal to be tested, pin is triggered in screen picture When loading to an interface is operated, record triggers the first time point of loading operation, and by test eventually End calculates whether synchronous screen picture matches with the first preset image, and first image adds for interface Screen picture of load when finishing, in matching, then the second time point of recording synchronism, then according to the One time point and the second time point, calculate the load time at the interface.In relatively first technology, this hair The testing scheme of bright embodiment is not influenceed by extraneous factor, and searches bat in advance without artificial contrast The starting and ending picture taken the photograph, can cause that the first screen load time for obtaining is more accurate, and save The time of test process, in thus solving first technology test result is inaccurate, test process consumption When the cumbersome problem of more long, testing procedure, achieve the accurate test result of acquisition, reduce test Use time, it is to avoid the beneficial effect of the troublesome operation of user.
Described above is only the general introduction of technical solution of the present invention, of the invention in order to better understand Technological means, and being practiced according to the content of specification, and in order to allow it is of the invention above-mentioned and Other objects, features and advantages can become apparent, below especially exemplified by specific embodiment party of the invention Formula.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantage and benefit for Those of ordinary skill in the art will be clear understanding.Accompanying drawing is only used for showing the mesh of preferred embodiment , and it is not considered as limitation of the present invention.And in whole accompanying drawing, with identical with reference to symbol Number represent identical part.In the accompanying drawings:
The step of Fig. 1 shows interface load time computational methods according to an embodiment of the invention flow Figure;
The step of Fig. 2 shows interface load time computational methods according to an embodiment of the invention flow Figure;
Fig. 3 shows the structural frames of interface load time computing system according to an embodiment of the invention Figure;
Fig. 4 shows the structural frames of interface load time computing system according to an embodiment of the invention Figure;And
Fig. 5 shows the structural frames of interface load time computing device according to an embodiment of the invention Figure.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing The exemplary embodiment of the disclosure is shown, it being understood, however, that may be realized in various forms the disclosure Without that should be limited by embodiments set forth here.Conversely, there is provided these embodiments are able to more Thoroughly understand the disclosure, and can be by the complete technology for conveying to this area of the scope of the present disclosure Personnel.
Embodiment one
Reference picture 1, shows a kind of interface load time computational methods according to an embodiment of the invention The step of embodiment flow chart, specifically may include steps of:
Step S100:The first synchronized links are set up into test terminal and testing service device;The test clothes Business device sets up the second synchronized links based on first synchronized links with terminal to be tested.
In the embodiment of the present invention, terminal to be tested can be the terminals such as mobile phone, pad, need to be measured When the first screen load time of examination terminal is tested, can first set up synchronous with the first of testing service device Connection, the testing service device can based on the first synchronized links and terminal to be tested set up second synchronously connect Connect, test terminal can be by the screen of the synchronous terminal to be tested of the first synchronized links and the second synchronized links Curtain image.
In embodiments of the present invention, test terminal can be including PC, notebook computer etc. eventually End.
In actual applications, terminal to be tested and testing service device can be connected by data wire, then Terminal to be tested can set up the second synchronized links by the data wire.Certainly, connect mentioned by netting twine Connect, can by data wire connecting test terminal and testing service device, can by terminal to be tested and USB (Universal Serial Bus, USB) interface of testing service device.Mentioned by Netting twine connection can also be attached using other modes, and the present invention is not any limitation as to this.Accordingly , test terminal and testing service device can also be connected by netting twine, and then test terminal can pass through The netting twine sets up the first synchronized links.Certainly, connected mentioned by netting twine, can be connected by netting twine Test terminal and the serial line interface (Serial of testing service device, terminal to be tested and testing service device Interface).Can also be attached using other modes mentioned by netting twine connection, the present invention is to this It is not any limitation as, such as test terminal is connected to survey by wifi (WIrelessFIdelity Wireless Fidelitys) Examination server, the first synchronized links are set up with same testing service device.
Step S110:It is synchronous by test terminal by first synchronized links and the second synchronized links Obtain the screen picture of terminal to be tested.
Set up the first synchronized links in test terminal and testing service device, and testing service device with it is to be tested Terminal is set up after the second synchronized links, and testing service device can synchronously be obtained by the second synchronized links To the screen picture of terminal to be tested, and then test terminal can be by the first synchronized links, same to pacing The screen picture of the terminal to be tested synchronously obtained in examination server, that is, test terminal can be synchronous The screen picture of terminal to be tested.
When the screen picture of terminal to be tested changes, the screen picture that test terminal shows also with The screen picture change for terminal to be tested synchronously changes.
In embodiments of the present invention, the data form synchronization that testing service device is specified with the second synchronized links After obtaining the screen picture of terminal to be tested, the data form that can specify according to the first synchronized links By from the synchronous screen picture of terminal to be tested, the corresponding data form of the first synchronized links is encapsulated as Screen picture, is then synchronized to test terminal.
In test terminal by the first synchronized links and the second synchronized links, the screen of synchronous terminal to be tested After curtain image, into step S120.
Step S120:Triggering is grasped for the loading at an interface in the screen picture of test terminal Make, and record the first time point of the triggering loading operation;The terminal to be tested is same by first Operation is loaded described in step connection and the second synchronized links synchronization process.
In the embodiment of the present invention, test terminal, can be with after the screen picture of synchronous terminal to be tested Triggering is operated for the loading at interface in the screen picture of test terminal, for example, clicking on screen " NBA " button on image, to show the related pages corresponding to NBA.Trigger loading operation When corresponding time point be first time point, and the time point is recorded.The first time point It is the system time of test terminal.
Due to terminal to be tested and test terminal synchronously carry out, thus when triggering institute in test terminal The loading operation for an interface in the screen picture of display, then terminal to be tested can synchronously be somebody's turn to do Loading operation, then terminal to be tested can jump to during the loading operates the corresponding page.
And because terminal to be tested and test terminal establish synchronized links, then terminal to be tested is worked as Forth screen image is then synchronized to test terminal, thus the process at terminal loads interface to be tested all screens Curtain image is also synchronized to test terminal.
In actual applications, the screen picture of test terminal is synchronized due to terminal to be tested, then Certain button is clicked in test terminal, then the clicking operation can be synchronized to survey by the first synchronized links Server is tried, then be synchronized to for the clicking operation by the second synchronized links to be tested by testing service device Terminal, it is achieved thereby that process of the triggering for the loading operation at an interface in test terminal.Such as The screen picture of the terminal to be tested of test terminal current sync is system main interface, when in test terminal In click an APP (application), then the clicking operation is synchronized to terminal to be tested, to be measured Examination terminal then receives the request for starting the APP, then terminal to be tested starts the APP.Then treat The screen picture of the start-up course of the APP of test terminal can be synchronized in test terminal.Certainly, it is right Other operations of the APP are similar, such as after APP startups.In APP being clicked in test terminal Certain control, then synchronous clicking operation of terminal to be tested, so that the corresponding page of the control is loaded, The loading procedure of the page can then be synchronized to test terminal.
Certainly, the loading procedure for testing which interface can be pre-configured with embodiments of the present invention, so Test terminal performs automatically according to the configuration afterwards.
Preferably, the loading operation for being directed to an interface can include:For the generation net of a webpage The loading operation of page request;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
Sub-step A11:The terminal to be tested synchronously obtains the loading operation, and is added according to described Carry operation and send web-page requests to web server.
In the embodiment of the present invention, when the loading operation for an interface is for a loading behaviour for webpage When making, accordingly, when the loading that the webpage is triggered in test terminal is operated, loading operation passes through first Synchronized links are synchronized to testing service device, and then testing service device is loaded this by the second synchronized links Operation is synchronized to terminal to be tested, and terminal to be tested is synchronously located after loading operation is received Manage the loading operation, such as terminal to be tested APP (such as browser APP) according to the loading operate to Web server sends web-page requests, and then the APP of terminal to be tested then enters the loading to webpage Process.
In actual applications, the embodiment of the present invention can be loaded to mobile phone browser or flat board browser The load time of the first screen of one webpage is tested.The above-mentioned webpage of being directed to so in test terminal Loading operation includes:
1st, URL (the Uniform Resource of the webpage are input into the address field of browser Locator, URL);
2nd, confirming button is clicked on.
So loading operation is then synchronized in the browser of terminal to be tested, and the browser then generates net Page request, is loaded to Web server request web page contents.The above-mentioned page of terminal to be tested On-screen data in loading procedure is then synchronized to test terminal.
Step S130:During terminal to be tested is processed according to the loading operation, by surveying Examination terminal calculates whether synchronous screen picture matches with the first preset image;Described first image is The screen picture during loaded of interface;If it does, then performing step S140.
In the embodiment of the present invention, the first image refer to according to triggering for an interface loading operation after, The loading at terminal-pair interface to be tested.
Because the screen picture of terminal to be tested can connect by the way that foregoing second synchronized links and first are synchronous Connect and be synchronized in test terminal always, then screen of the terminal to be tested in the loading procedure to an interface Image can be also synchronized in test terminal.So for test terminal, it can be obtained to synchronous Screen picture, then intercept the screen picture, the first figure during with the preset interface loaded As being matched, if both images are identical, into step 140;If it does not match, explanation is treated Test terminal by the interface loaded, does not then proceed images match.
Preferably, before the step S130, can also include:
Step S128:At least one in the described first image at interface to be tested is obtained by test terminal The subgraph of individual position.
For an interface, the screen picture after the interface loaded, Ran Houcong can be in advance obtained The subgraph of one or more positions is selected in the screen picture as index point.The subgraph such as adds Some of the interface that load is finished button, component etc..
For the accuracy of the matching of screen picture, multiple subgraphs can be selected as index point.
Such as interface A, in the image of its loaded select position A1 subgraph M1, The subgraph M2 of position A1, the subgraph M3 of position M3, the subgraph M4 of position A4, to make It is index point.
Preferably, the step S130 can include:
Sub-step S1302:By test terminal each precalculated position is obtained from the synchronous screen picture Subgraph;After the precalculated position and the loaded at the interface in screen picture at least one Individual position is identical;
Sub-step S1304:Judge the subgraph in each precalculated position and the same position subgraph of the first image Whether match completely.
In the embodiment of the present invention, for the loading operation at an interface, tested interface can be got The subgraph of one or more position in corresponding first image, and then, from synchronous screen map Subgraph image position identical subgraph with each precalculated position is obtained as in, wherein, the precalculated position with At least one of screen picture after the loaded of interface position is identical.
Such as previous example, the screen picture that synchronization can be obtained, in position A1 interception image B1, In position A2 interception image B2, in position A3 interception images B3, in position A4 interception images B4.
Then subgraph M1 with preset position A1, the subgraph M2 of position A1, position M3 Subgraph M3, the subgraph M4 of position A4.The subgraph of same position is matched, will B1 is matched with M1, and B2 is matched with M2, and B3 is matched with M3, and B4 is matched with M4. If matched completely, description flags point is matched completely, further relates to interface A loaded. Do not matched if there is at least one, then the also non-loaded of specification interface A, continued in position A1, A2, A3, A4 interception image are matched.The time for intercepting twice in embodiments of the present invention Interval can be set with required precision, such as be set as 2ms.
In embodiments of the present invention, preferably can be corresponding with each component in selection interface for subgraph Image, image recognition program is write such that it is able to convenient with sikuli.In embodiments of the present invention for figure The interception of picture and matching logic can write image recognition program with sikuli, and provide image recognition interface, After loading operation of the triggering for an interface, the image recognition interface is called to perform step S130-S160。
One sikuli image recognition program fragment samples is as follows:
So as to the subgraph of the subgraph same position in the first image according to each precalculated position for getting As being compared, to determine whether to match completely, if matched completely, step S140 is performed.
Preferably, it is described terminal to be tested according to it is described loading operation processed during, Also include:
Sub-step B11, terminal to be tested in the interface loading procedure is obtained at least by test terminal One performance indications.
In the embodiment of the present invention, what STF remote control tables can also be write using Python obtains Program fetch, to obtain each performance indications of the terminal to be tested during head screens interface loads, its In, the performance indications of terminal to be tested can include:It is CPU occupation rates, internal memory occupation rate, to be tested The one or mores therein such as terminal flow, terminal power to be tested.
Test terminal obtains each performance of terminal to be tested by the first synchronized links and the second synchronized links Index, can be while the screen load time first to test, and each performance for treating test terminal is surveyed Examination.
In embodiments of the present invention, it is possible to use acquisition mobile phone is each during Python writes first screen loading procedure The program of item performance indications.And acquiring performance index interface is provided, it is directed to the loading at an interface in triggering After operation, the acquiring performance index interface is called to perform B11.
One Python performance monitoring usability of program fragments example is as follows:
Var=os.popen (' adb shell top-n 1 | findstr'+package) .read ()
Adb shell-commands are called to return to the performance indications set of mobile phone by the method.
CpuRate=list [2] .strip (" % ") .strip ()
MemRate=list [6] .strip (" K ") .strip ()
Then taken respectively from set the 3rd row and the 6th row, they it is corresponding value be cpu utilization rates and Memory usage.
Step S140:Second time point of recording synchronism.
In step s 130, if it is determined that the screen picture of synchronization and first image at the preset interface It is identical, show the terminal-pair to be measured interface loaded, then the embodiment of the present invention can then obtain survey Examination terminal the second time point now.Second time point can be the system time of test terminal.
Step S150:By test terminal according to first time point and the second time point, the interface is calculated Load time.
In the embodiment of the present invention, in the case of using an interface loading test load time, test Terminal can be according to the first time point of record and the second time point, when the second time point was subtracted into first Between point, then can calculate the corresponding interface load time, for example, certain interface loading process In, corresponding first time point is 09:00:02, the second time point was 09:00:06, then can calculate The load time at interface is 4 seconds, and the load time at the interface, namely the first of the interface shielded the load time.
Preferably, after the step S150, can also include:
Step S160:The load time is recorded with the interface identification at the correspondence interface.
In the embodiment of the present invention, when the interface identification at interface is directed to the website information of webpage, survey Examination terminal will can be recorded for the load time of the webpage in the website information of the webpage.It is easy to Technical staff carries out subsequent treatment to the load time at interface.
Preferably, after the step S160, can also include:
Step S170:The load time of the interface identification is compared with predetermined time threshold;
Step S180:Predetermined time threshold is less than or equal to when the load time, it is determined that the boundary The load time of face mark meets the requirements;
Step S190:It is more than predetermined time threshold when the load time, it is determined that the interface mark The load time of knowledge is undesirable, and generates warning message.
In the embodiment of the present invention, because the load time for different interfaces corresponding to it is probably not Identical, therefore, it is possible to be directed to different types of interface set the type interface load time it is pre- Fix time threshold value.For example, could be arranged to 1s for the scheduled time threshold value of the load time of web page class Etc..
In actual applications, those skilled in the art can set according to actual conditions and be directed to all types of boundaries The predetermined time threshold in face, the present invention is not any limitation as to this.
And test terminal is all carried out for the load time at all types of interfaces with the interface identification at the interface Record, therefore, it is possible to according to interface interface identification obtain to should interface identification load time, And compared the predetermined time threshold of the load time of interface identification type corresponding with the interface Compared with, when the load time predetermined time threshold is less than or equal to, illustrate the interface identification plus The load time meets the requirements.If the load time at interface identification correspondence interface is more than predetermined time threshold During value, then the load time at interface identification correspondence interface is undesirable, it may be possible to interface identification Corresponding interface occurs abnormal, it is also possible to network appearance exception of test terminal etc., and then according to Exceeded interface identification generates corresponding warning message, after warning message is generated, can be according to report Alert information carries out corresponding abnormality detection.
The first synchronized links are set up by by test terminal and testing service device in the embodiment of the present invention, is surveyed Examination server sets up the second synchronized links with terminal to be tested, and the first synchronized links are passed through by test terminal With the screen picture of the synchronous terminal to be tested of the second synchronized links, triggering is directed to a boundary in screen picture When the loading in face is operated, record triggers the first time point of loading operation, and is calculated by test terminal Whether synchronous screen picture matches with the first preset image, and first image is interface loaded When screen picture, in matching, then the second time point of recording synchronism, then according to the very first time Point and the second time point, calculate the load time at the interface.Test result is not in solving first technology Accurately, test process takes the cumbersome problem of more long, testing procedure, achieves acquisition accurately test As a result, test use time is reduced, it is to avoid the beneficial effect of the troublesome operation of user.
Embodiment two
Reference picture 2, shows a kind of interface load time computational methods according to an embodiment of the invention The step of embodiment flow chart, specifically may include steps of:
Step S200:It is long-range by the STF in the browser connecting test server of test terminal Control platform, to set up the first synchronized links;In the testing service device STF remote control tables with The terminal to be tested sets up the second synchronized links.
STF (Smartphone Test Farm) can be installed in the embodiment of the present invention in testing service device Remote control table, then sets up second synchronous by terminal to be tested and the STF platforms of testing service device Connection, sets up test terminal the first synchronized links and is attached with the STF of testing service device, then Terminal to be tested and operate terminal to be tested by testing service device.
STF remote control tables are a remote control tables, for waiting test terminal to mobile phone, Remote control is carried out on the browsing device net page of test terminal.After STF installations, Ke Yitong Console operation order is crossed to start STF remote control tables, when STF remote control tables start it Afterwards, then can be input into the testing service device being connected with terminal to be tested, test terminal long-range to be measured Examination terminal and the corresponding port numbers in test terminal, test terminal, terminal to be tested and survey are realized to set up Try the synchronized links of server.
Test terminal can be by the STF remote control tables in local browser connecting test server To set up the first synchronized links, STF remote control tables and terminal to be tested set up second synchronously connect Connect, the Minicap instruments that STF remote control tables are carried can provide a socket (socket) Interface, by the real-time data transmission of the screen picture of terminal to be tested to testing service device, and passes through Testing service device is transferred to test terminal, to treat the screen picture number of test terminal in test terminal According to being recorded and preserved.Operation in test terminal to screen picture can also be transmitted by browser To the STF platforms of testing service device, then STF platforms are synchronized to end to be tested by above-mentioned socket In end, terminal to be tested is set to realize simultaneously operating.
Certainly, in the embodiment of the present invention, testing service device can connect multiple terminals to be tested.And survey Examination terminal can send link order to testing service device, it is determined which terminal to be tested connected.Should Link order may include the information such as the implementor name of terminal to be tested.
Step S210:The STF remote control tables that testing service device is passed through by test terminal, to be measured Examination terminal installs test installation kit;The interface belongs to the boundary of the application after the test installation kit is installed Face.
In the embodiment of the present invention, test terminal manipulates the STF remote control tables of testing service device, to Terminal to be tested installs test installation kit, can include in each test installation kit multiple for testing Interface, satisfactory interface to be tested can be selected to make as test from the test installation kit With.Wherein, the APK (Android Package, Android bag) of the test installation kit such as APP is installed Bag.
Accordingly, subsequently the boundary to be loaded is operated for the loading at an interface in terminal to be tested triggering Face, as corresponding to the interface applied in the test installation kit after test installation kit installation.
Step S220:It is synchronous by test terminal by first synchronized links and the second synchronized links Obtain the screen picture of terminal to be tested.
Step S230:Triggering is grasped for the loading at an interface in the screen picture of test terminal Make, and record the first time point of the triggering loading operation;The terminal to be tested is same by first Operation is loaded described in step connection and the second synchronized links synchronization process.
Step S240:During terminal to be tested is processed according to the loading operation, by surveying Examination terminal calculates whether synchronous screen picture matches with the first preset image;Described first image is The screen picture during loaded of interface;If it does, then performing step S240.
In the embodiment of the present invention, test terminal can be same by the first synchronized links and the second synchronized links The screen picture of terminal to be tested is walked, and triggering is directed to one in the screen picture for manipulating terminal to be tested After the loading operation at interface, record triggers the first time point of loading operation.
During terminal to be tested loads operation treatment according to interface, can be by test terminal synchronization Screen picture compare with the first preset image, with determine the two whether match, if Match somebody with somebody, then perform step S250.
Preferably, it is described terminal to be tested according to it is described loading operation processed during, Can also include:
Sub-step B11:Terminal to be tested in the interface loading procedure is obtained at least by test terminal One performance indications.
In the embodiment of the present invention, the STF remote control tables in testing service device can also be utilized The acquisition program that Python is write, to obtain the end to be tested during head screens interface loads Each performance indications at end, wherein, the performance indications of terminal to be tested can include:CPU occupation rates, The one or mores therein such as internal memory occupation rate, terminal flow to be tested, terminal power to be tested.
By obtaining each performance indications of terminal to be tested, the same of load time can shielded to test is first When, each performance for treating test terminal is tested.
In embodiments of the present invention, it is possible to use acquisition mobile phone is each during Python writes first screen loading procedure The program of item performance indications.
Step S250:Second time point of recording synchronism.
In the embodiment of the present invention, corresponding to after terminal to be tested installs test installation kit, the test is pacified The interface of the application in dress bag corresponds to the interface that loads operation corresponding to of the triggering for an interface, Specific interface can be selected as head screens interface, and be the interface of these applications in installation kit is tested Addition index point.Afterwards can be by the image to head screen loadings and the application corresponding to selected mark Interface contrasted, if do not matched, loaded;If selected index point has been loaded Into, then it represents that the loading for the loading operation at the interface is completed, time point when interface loading is completed As the second time point.
Accordingly, test terminal synchronously can grasp in the screen picture of terminal to be tested and corresponding loading Make, and with terminal to be tested synchronously carry out same interface loading operation, interface loading operation In whole process, the first time point and the second time point that test terminal can load the interface are carried out Record.
Step S260:By test terminal according to first time point and the second time point, the interface is calculated Load time.
First time point is subtracted according to the second time point that test terminal records, to calculate screen interface of informing against Load time.
Certainly, in embodiments of the present invention, for the sikuli image recognition programs in embodiment one and Python performance monitoring programs, can start to call the corresponding interface, in step S260 in step S220 Then stop calling the corresponding interface after being finished.Avoid the waste of system resource.
Step S270:Judge whether that the interface detection of the application to the test installation kit is completed;If Test is completed, then perform step S280.
It is to be loaded successively one by one for the specific interface for being used to test in certain test installation kit , after current interface loading to be tested is completed, can be to all addition marks in the test installation kit Whether the interface of will point application all loads and tests completion and judged, if installing test bag selection Application interface in also have the interface of application do not tested, then the interface of the application to being tested Carry out loading test;If the interface all loading tests to installing the application selected in test bag Finish, then perform step S280.
Step S280:Judge whether also to exist the test installation kit do not tested;If it is present performing Step S290.
In the embodiment of the present invention, the interface of the application selected in a test installation kit loads test After completion, then can treat in test terminal and be sentenced with the presence or absence of the test installation kit do not tested Disconnected, all test installation kits test of such as terminal excessively to be tested is completed, then for the terminal to be tested The test of head screen load times is completed.If there is the test do not tested to install in terminal to be tested Bag, then perform step S290.
Step S290:Continue to install a test installation kit do not tested to terminal to be tested, into step S220。
When test terminal judges the test installation kit that terminal to be tested is not tested also, then by test The STF platforms of server install the test installation kit do not tested in terminal to be tested, and enter step S220 is tested with continuing to treat the first screen load time of test terminal.
The first synchronized links are set up by by test terminal and testing service device in the embodiment of the present invention, is surveyed Examination server sets up the second synchronized links with terminal to be tested, and same by the first synchronized links and second Connection is walked with the screen picture of synchronous terminal to be tested, triggering the adding for an interface in screen picture During load operation, the first time point of record triggering loading operation, and synchronous by test terminal calculating Whether screen picture matches with the first preset image, screen when first image is interface loaded Curtain image, in matching, then the second time point of recording synchronism, then according to first time point and the At two time points, calculate the load time at the interface.Accurate test result is obtained, reducing test makes With the time, it is to avoid the beneficial effect of the troublesome operation of user.
Also, in the test process of the first screen load time for treating test terminal in the embodiment of the present invention In, each performance indications for also treating test terminal are tested, to ensure the operation of terminal to be tested Environment does not interfere with test result.And test is loaded by multiple interface, can cause what is obtained The head screen load times are more accurate.
Meanwhile, load time that can be automatically to the interface of multiple test installation kit tests, and reduces The operating process of user.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of action group Close, but those skilled in the art should know, and the embodiment of the present invention is not suitable by described action The limitation of sequence, because according to the embodiment of the present invention, some steps can using other orders or simultaneously Carry out.Secondly, those skilled in the art should also know, embodiment described in this description belongs to Necessary to preferred embodiment, the involved action not necessarily embodiment of the present invention.
Embodiment three
Reference picture 3, shows a kind of interface load time computing system according to an embodiment of the invention The structured flowchart of embodiment, can specifically include:
Test terminal 310, testing service device 320, terminal to be tested 330;
The test terminal 310 can include:
First synchronized links set up module 3100, are suitable to for test terminal and testing service device to set up first Synchronized links;The testing service device sets up second based on first synchronized links with terminal to be tested Synchronized links;
Screen picture synchronization module 3101, is suitable to by test terminal by first synchronized links and the Two synchronized links, the synchronous screen picture for obtaining terminal to be tested;
First time point logging modle 3102, is suitable to trigger pin in the screen picture of test terminal Loading operation to an interface, and record the first time point of the triggering loading operation;It is described to be measured Examination terminal is by loading operation described in the first synchronized links and the second synchronized links synchronization process;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
Step S31022:The terminal to be tested synchronously obtains the loading operation, and is added according to described Carry operation and send web-page requests to web server.
Images match computing module 3103, is suitable at terminal to be tested is according to the loading operation During reason, by test terminal calculate synchronous screen picture and the first preset image whether Match somebody with somebody;Screen picture when described first image is interface loaded;
Preferably, before described image matching primitives module 3103, also include:
Subgraph acquisition module 31028, is suitable to obtain described the first of interface to be tested by test terminal The subgraph of at least one of image position.
Preferably, described image matching primitives module 3103 includes:
The subgraph acquisition submodule 31032 in precalculated position, is suitable to by test terminal from the synchronous screen The subgraph with each precalculated position is obtained in curtain image;The precalculated position is complete with the loading at the interface At least one of screen picture after finishing position is identical;
Same position subgraph matching judgment module 31034, be suitable to judge the subgraph in each precalculated position with Whether the same position subgraph of the first image matches completely.
Second time point logging modle 3104, is suitable in synchronous screen picture and the first preset image During matching, the second time point of recording synchronism;
Load time computing module 3105, is suitable to by test terminal according to first time point and the second time Point, calculates the load time at the interface.
Preferably, after the load time computing module 3105, can also include:
Interface identification logging modle 3106, is suitable to the load time with the interface at the correspondence interface Mark is recorded.
Preferably, the interface identification at the interface can include:The website information of webpage.
Preferably, after the interface identification logging modle 3105, also include:
Comparison module 3107, is suitable to enter the load time of the interface identification with predetermined time threshold Row compares;
Load time meets the requirements determining module 3108, is suitable to when the load time is less than or equal to predetermined Time threshold, it is determined that the load time of the interface identification meets the requirements;
Warning message generation module 3109, is suitable to when the load time is more than predetermined time threshold, Then determine that the load time of the interface identification is undesirable, and generate warning message.
The testing service device 320 can include:
Second synchronized links set up module 3202, are suitable to based on first synchronized links and end to be tested The second synchronized links are set up at end.
The terminal to be tested 330 can include:
Processing module 3302, is suitable to synchronous by the first synchronized links and second by the terminal to be tested Operation is loaded described in connection synchronization process.
Example IV
Reference picture 4, shows a kind of interface load time computing system according to an embodiment of the invention The structured flowchart of embodiment, can specifically include:
Test terminal 410, testing service device 420, terminal to be tested 430;
The test terminal 410 can include:
First synchronized links set up module 400, and being suitable to test terminal, to set up first with testing service device synchronous Connection;It is synchronous that the testing service device sets up second based on first synchronized links with terminal to be tested Connection;
Preferably, first synchronized links are set up module 400 and can be included:
First synchronized links setting up submodule 4002, is suitable to be connected by the browser of test terminal STF remote control tables in testing service device, to set up the first synchronized links;The testing service STF remote control tables set up the second synchronized links with the terminal to be tested in device.
Test installation kit installs module 410, is suitable to long-range by the STF of testing service device by test terminal Control platform, test installation kit is installed to terminal to be tested;The interface belongs to the test installation kit The interface of the application after installation;
Screen picture synchronization module 420, is suitable to pass through first synchronized links and second by test terminal Synchronized links, the synchronous screen picture for obtaining terminal to be tested;
First time point logging modle 430, is suitable to be triggered in the screen picture of test terminal being directed to The loading operation at one interface, and record the first time point of the triggering loading operation;It is described to be tested Terminal is by loading operation described in the first synchronized links and the second synchronized links synchronization process;
Images match computing module 440, is suitable to be processed according to the loading operation in terminal to be tested During, calculate whether synchronous screen picture matches with the first preset image by test terminal; Screen picture when described first image is interface loaded;
Preferably, it is described terminal to be tested according to it is described loading operation processed during, Also include:
Acquiring performance index submodule 4402, in being suitable to obtain the interface loading procedure by test terminal Terminal to be tested at least one performance indications.
Preferably, the performance indications include:CPU occupation rates, internal memory occupation rate, terminal to be tested Flow, terminal power wherein at least to be tested.
Second time point logging modle 450, is suitable in synchronous screen picture and the first preset image Timing, the second time point of recording synchronism;
Load time computing module 460, is suitable to by test terminal according to first time point and the second time Point, calculates the load time at the interface;
Test completes judge module 470, is suitable to judge whether the interface of the application to the test installation kit Test is completed;
Test installation kit judge module 480, is suitable to judge whether also there is the test installation kit do not tested;
Not testing installation kit and module 490 is installed, being suitable to, when there is the test installation kit do not tested, continue The one test installation kit do not tested is installed to terminal to be tested, the synchronized links are entered through, it is synchronous The step of screen picture of terminal to be tested.
The testing service device 420 can include:
Second synchronized links set up module 4202, are suitable to based on first synchronized links and end to be tested The second synchronized links are set up at end;
The terminal to be tested 430 can include:
Processing module 4302, is suitable to synchronous by the first synchronized links and second by the terminal to be tested Operation is loaded described in connection synchronization process.
For device embodiment, because it is substantially similar to embodiment of the method, so the ratio of description Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
Embodiment five
Reference picture 5, shows a kind of interface load time computing device according to an embodiment of the invention The structured flowchart of 500 embodiments, can specifically include:
Memory 510, is loaded with a plurality of executable instruction;
Processor 520, performs a plurality of executable instruction;The a plurality of instruction includes performing following step Rapid method:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;
If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
Preferably, a plurality of executable instruction of the embodiment of the present invention may also include the side of foregoing each step Method, the embodiment of the present invention is not limited to it.
Provided herein algorithm and display not with any certain computer, virtual system or miscellaneous equipment It is intrinsic related.Various general-purpose systems can also be used together with based on teaching in this.According to above Description, the structure constructed required by this kind of system is obvious.Additionally, the present invention is not also directed to Any certain programmed language.It is understood that, it is possible to use various programming languages realize described here The content of invention, and the description done to language-specific above is to disclose optimal reality of the invention Apply mode.
In specification mentioned herein, numerous specific details are set forth.It is to be appreciated, however, that Embodiments of the invention can be put into practice in the case of without these details.In some instances, Known method, structure and technology is not been shown in detail, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and helping understand in each inventive aspect one Individual or multiple, in above to the description of exemplary embodiment of the invention, each feature of the invention Sometimes it is grouped together into single embodiment, figure or descriptions thereof.However, should be by The method of the disclosure is construed to reflect following intention:I.e. the present invention for required protection requirement ratio is at each The more features of feature being expressly recited in claim.More precisely, as following right will As asking book to reflect, inventive aspect is all spies less than single embodiment disclosed above Levy.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment party Formula, wherein each claim are in itself as separate embodiments of the invention.
Those skilled in the art are appreciated that can be carried out to the module in the equipment in embodiment Adaptively change and they are arranged in one or more equipment different from the embodiment. Module or unit or component in embodiment can be combined into a module or unit or component, and In addition multiple submodule or subelement or sub-component can be divided into.Except such feature and/or Outside at least some in process or unit exclude each other, can be using any combinations to this explanation All features disclosed in book (including adjoint claim, summary and accompanying drawing) and so disclosed All processes or unit of any method or equipment are combined.Unless expressly stated otherwise, this theory Each feature disclosed in bright book (including adjoint claim, summary and accompanying drawing) can be by offer phase The alternative features of same, equivalent or similar purpose replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include Some included features are rather than further feature, but the feature of different embodiments in other embodiments Combination mean to be within the scope of the present invention and formed different embodiments.For example, under In the claims in face, the one of any of embodiment required for protection can be in any combination Mode is used.
All parts embodiment of the invention can realize with hardware, or with one or more The software module run on reason device is realized, or is realized with combinations thereof.Those skilled in the art It should be appreciated that can be realized using microprocessor or digital signal processor (DSP) in practice Some of some or all parts in interface load time computing device according to embodiments of the present invention Or repertoire.The present invention is also implemented as the part for performing method as described herein Or the equipment or program of device (for example, computer program and computer program product) of whole.This Sample realizes that program of the invention can be stored on a computer-readable medium, or can have one Or the form of multiple signals.Such signal can be downloaded from internet website and obtained, Huo Zhe There is provided on carrier signal, or provided in any other form.
It should be noted that above-described embodiment the present invention will be described is limited rather than to the present invention Make, and those skilled in the art can design without departing from the scope of the appended claims Alternative embodiment.In the claims, any reference symbol being located between bracket should not be configured to Limitations on claims.Word "comprising" do not exclude the presence of element not listed in the claims or Step.Word "a" or "an" before element does not exclude the presence of unit as multiple Part.The present invention can be by means of the hardware for including some different elements and by means of properly programmed Computer is realized.If some in these devices in the unit claim for listing equipment for drying Individual can be embodied by same hardware branch.Word first, second, and third Using not indicating that any order.These words can be construed to title.
The invention discloses A1, a kind of interface load time computational methods, including:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
A2, the method as described in A1, it is described by test terminal calculate synchronous screen picture with it is preset The first image the step of whether match before, also include:
The son of at least one of the described first image at interface to be tested position is obtained by test terminal Image.
A3, the method as described in A2, it is described by test terminal calculate synchronous screen picture with it is preset The step of whether the first image matches, including:
The subgraph with each precalculated position is obtained from the synchronous screen picture by test terminal;Institute State at least one of screen picture after precalculated position and the loaded at interface position phase Together;
Judge the subgraph in each precalculated position and whether complete of the same position subgraph of the first image Match somebody with somebody.
A4, the method as described in A1, it is described by test terminal and testing service device set up first synchronously connect The step of connecing, including:
By the STF remote control tables in the browser connecting test server of test terminal, To set up the first synchronized links;STF remote control tables are to be tested with described in the testing service device Terminal sets up the second synchronized links.
A5, the method as described in A1, described at terminal to be tested is according to the loading operation During reason, also include:
At least one performance for obtaining the terminal to be tested in the interface loading procedure by test terminal refers to Mark.
A6, the method as described in A5, the performance indications include:CPU occupation rates, internal memory occupy Rate, terminal flow to be tested, terminal power wherein at least to be tested.
A7, the method as described in A5, same by first synchronized links and second by test terminal Before the step of step connection, screen picture of synchronous acquisition terminal to be tested, also include:
The STF remote control tables for passing through testing service device by test terminal, install to terminal to be tested Test installation kit;The interface belongs to the interface of the application after the test installation kit is installed.
A8, the method as described in A7, it is described by test terminal according to first time point and the second time After the step of point, load time at the calculating interface, also include:
Judge whether that the interface detection of the application to the test installation kit is completed;
Judge whether also to exist the test installation kit do not tested;
If it is present continue to install the test installation kit do not tested to terminal to be tested, into logical The step of crossing the synchronized links, the screen picture of synchronous terminal to be tested.
A9, the method as described in one of A1-A8, it is described by test terminal according to the very first time After the step of point and the second time point, load time at the calculating interface, also include:
The load time is recorded with the interface identification at the correspondence interface.
A10, the method as described in A9, the loading operation for being directed to an interface include:For a net The loading operation of the generation web-page requests of page;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
The terminal to be tested synchronously obtains the loading operation, and according to the loading operation to web Server sends web-page requests.
A11, the method as described in A9, the interface identification at the interface include:The network address letter of webpage Breath.
A12, the method as described in A9, it is described by the load time with the boundary at the correspondence interface After the step of face mark is recorded, also include:
The load time of the interface identification is compared with predetermined time threshold;
When the load time be less than or equal to predetermined time threshold, it is determined that the interface identification plus The load time meets the requirements;
It is more than predetermined time threshold when the load time, it is determined that during the loading of the interface identification Between it is undesirable, and generate warning message.
The invention also discloses B13, a kind of interface load time computing system, including:
Test terminal, testing service device, terminal to be tested
The test terminal includes:
First synchronized links set up module, are suitable to set up the first synchronized links with testing service device;
Screen picture synchronization module, is suitable to by first synchronized links and the second synchronized links, together Step obtains the screen picture of terminal to be tested;
First time point logging modle, is suitable to loading of the triggering for an interface in the screen picture Operation, and record the first time point of the triggering loading operation;
Images match computing module, is suitable to what is processed according to the loading operation in terminal to be tested During, calculate whether synchronous screen picture matches with the first preset image;Described first image Screen picture during for interface loaded;
Second time point logging modle, is suitable in synchronous screen picture and the first preset images match When, the second time point of recording synchronism;
Load time computing module, is suitable to, according to first time point and the second time point, calculate the boundary The load time in face;
The testing service device includes:
Second synchronized links set up module, are suitable to be built with terminal to be tested based on first synchronized links Vertical second synchronized links;
The terminal to be tested includes:
Processing module, is suitable to pass through the first synchronized links and the second synchronized links by the terminal to be tested Operation is loaded described in synchronization process.
B14, the system as described in B13, before described image matching primitives module, also include:
Subgraph acquisition module, is suitable to be obtained by test terminal the described first image at interface to be tested At least one of position subgraph.
B15, the system as described in B14, described image matching primitives module include:
The subgraph acquisition submodule in precalculated position, is suitable to by test terminal from the synchronous screen map The subgraph with each precalculated position is obtained as in;The loaded at the precalculated position and the interface it At least one of screen picture afterwards position is identical;
Same position subgraph matching judgment module, is suitable to judge the subgraph and first in each precalculated position Whether the same position subgraph of image matches completely.
B16, the system as described in B13, first synchronized links set up module to be included:
First synchronized links setting up submodule, is suitable to by the browser connecting test of test terminal STF remote control tables in server, to set up the first synchronized links;In the testing service device STF remote control tables set up the second synchronized links with the terminal to be tested.
B17, the system as described in B13, are carried out in terminal to be tested described according to the loading operation During treatment, also include:
Acquiring performance index submodule, is suitable to obtain treating in the interface loading procedure by test terminal At least one performance indications of test terminal.
B18, the system as described in B17, the performance indications include:CPU occupation rates, internal memory occupy Rate, terminal flow to be tested, terminal power wherein at least to be tested.
B19, the system as described in B17, before the screen picture synchronization module, also include:
Test installation kit installs module, is suitable to remotely be controlled by the STF of testing service device by test terminal Platform processed, test installation kit is installed to terminal to be tested;The interface belongs to the test installation kit peace The interface of the application after dress.
B20, the system as described in B19, after the load time computing module, also include:
Test completes judge module, is suitable to judge whether that the interface of the application to the test installation kit is surveyed Examination is completed;
Test installation kit judge module, is suitable to judge whether also there is the test installation kit do not tested;
Not testing installation kit and module is installed, being suitable to, when there is the test installation kit do not tested, continue to pacify A test installation kit do not tested is filled to terminal to be tested, the synchronized links are entered through, synchronously treated The step of screen picture of test terminal.
B21, the system as described in one of B13-B20, the load time computing module it Afterwards, also include:
Interface identification logging modle, is suitable to the load time with the interface identification at the correspondence interface Recorded.
B22, the system as described in B21, the loading operation for being directed to an interface include:For a net The loading operation of the generation web-page requests of page;
Further, the terminal to be tested passes through at the first synchronized links and the synchronization of the second synchronized links The reason loading operation includes:
The terminal to be tested synchronously obtains the loading operation, and according to the loading operation to web Server sends web-page requests.
B23, the system as described in B21, the interface identification at the interface include:The network address letter of webpage Breath.
B24, the system as described in B21, after the interface identification logging modle, also include:
Comparison module, is suitable to be compared the load time of the interface identification with predetermined time threshold Compared with;
Load time meets the requirements determining module, be suitable to when the load time less than or equal to it is predetermined when Between threshold value, it is determined that the load time of the interface identification meets the requirements;
Warning message generation module, is suitable to be more than predetermined time threshold when the load time, then really The load time of the fixed interface identification is undesirable, and generates warning message.
The invention also discloses C25, a kind of interface load time computing device, including:
Memory, is loaded with a plurality of executable instruction;
Processor, performs a plurality of executable instruction;The a plurality of instruction includes performing following steps Method:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;
If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.

Claims (10)

1. a kind of interface load time computational methods, including:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
2. method according to claim 1, it is characterised in that calculated by test terminal described Before the step of whether synchronous screen picture matches with the first preset image, also include:
The son of at least one of the described first image at interface to be tested position is obtained by test terminal Image.
3. method according to claim 2, it is characterised in that described to calculate same by test terminal The step of whether screen picture of step matches with the first preset image, including:
The subgraph with each precalculated position is obtained from the synchronous screen picture by test terminal;Institute State at least one of screen picture after precalculated position and the loaded at interface position phase Together;
Judge the subgraph in each precalculated position and whether complete of the same position subgraph of the first image Match somebody with somebody.
4. method according to claim 1, it is characterised in that described by test terminal and test The step of server sets up the first synchronized links, including:
By the STF remote control tables in the browser connecting test server of test terminal, To set up the first synchronized links;STF remote control tables are to be tested with described in the testing service device Terminal sets up the second synchronized links.
5. method according to claim 1, it is characterised in that described in terminal root to be tested During being processed according to the loading operation, also include:
At least one performance for obtaining the terminal to be tested in the interface loading procedure by test terminal refers to Mark.
6. method according to claim 5, it is characterised in that the performance indications include: CPU occupation rates, internal memory occupation rate, terminal flow to be tested, terminal power wherein at least one to be tested .
7. method according to claim 5, it is characterised in that by test terminal by described First synchronized links and the second synchronized links, it is synchronous obtain terminal to be tested screen picture the step of it Before, also include:
The STF remote control tables for passing through testing service device by test terminal, install to terminal to be tested Test installation kit;The interface belongs to the interface of the application after the test installation kit is installed.
8. method according to claim 7, it is characterised in that it is described by test terminal according to After the step of first time point and the second time point, load time at the calculating interface, also wrap Include:
Judge whether that the interface detection of the application to the test installation kit is completed;
Judge whether also to exist the test installation kit do not tested;
If it is present continue to install the test installation kit do not tested to terminal to be tested, into logical The step of crossing the synchronized links, the screen picture of synchronous terminal to be tested.
9. a kind of interface load time computing system, including:
Test terminal, testing service device, terminal to be tested
The test terminal includes:
First synchronized links set up module, are suitable to set up the first synchronized links with testing service device;
Screen picture synchronization module, is suitable to by first synchronized links and the second synchronized links, together Step obtains the screen picture of terminal to be tested;
First time point logging modle, is suitable to loading of the triggering for an interface in the screen picture Operation, and record the first time point of the triggering loading operation;
Images match computing module, is suitable to what is processed according to the loading operation in terminal to be tested During, calculate whether synchronous screen picture matches with the first preset image;Described first image Screen picture during for interface loaded;
Second time point logging modle, is suitable in synchronous screen picture and the first preset images match When, the second time point of recording synchronism;
Load time computing module, is suitable to, according to first time point and the second time point, calculate the boundary The load time in face;
The testing service device includes:
Second synchronized links set up module, are suitable to be built with terminal to be tested based on first synchronized links Vertical second synchronized links;
The terminal to be tested includes:
Processing module, is suitable to pass through the first synchronized links and the second synchronized links by the terminal to be tested Operation is loaded described in synchronization process.
10. a kind of interface load time computing device, including:
Memory, is loaded with a plurality of executable instruction;
Processor, performs a plurality of executable instruction;The a plurality of instruction includes performing following steps Method:
The first synchronized links are set up into test terminal and testing service device;The testing service device is based on institute State the first synchronized links and set up the second synchronized links with terminal to be tested;
It is synchronous to obtain to be tested by test terminal by first synchronized links and the second synchronized links The screen picture of terminal;
Triggering is operated for the loading at an interface in the screen picture of test terminal, and records tactile Send out described and load the first time point for operating;The terminal to be tested passes through the first synchronized links and second Operation is loaded described in synchronized links synchronization process;
During terminal to be tested is processed according to the loading operation, calculated by test terminal Whether synchronous screen picture matches with the first preset image;Described first image has been loaded for interface Screen picture when finishing;
If it does, then the second time point of recording synchronism;
By test terminal according to first time point and the second time point, when calculating the loading at the interface Between.
CN201510960301.3A 2015-12-18 2015-12-18 A kind of interface load time computational methods, device and system Pending CN106897210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510960301.3A CN106897210A (en) 2015-12-18 2015-12-18 A kind of interface load time computational methods, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510960301.3A CN106897210A (en) 2015-12-18 2015-12-18 A kind of interface load time computational methods, device and system

Publications (1)

Publication Number Publication Date
CN106897210A true CN106897210A (en) 2017-06-27

Family

ID=59190735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510960301.3A Pending CN106897210A (en) 2015-12-18 2015-12-18 A kind of interface load time computational methods, device and system

Country Status (1)

Country Link
CN (1) CN106897210A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737568A (en) * 2018-07-18 2020-01-31 优信拍(北京)信息科技有限公司 application program starting time testing method and system
CN111158925A (en) * 2019-12-05 2020-05-15 中移(杭州)信息技术有限公司 Remote terminal debugging method, terminal, server and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737568A (en) * 2018-07-18 2020-01-31 优信拍(北京)信息科技有限公司 application program starting time testing method and system
CN111158925A (en) * 2019-12-05 2020-05-15 中移(杭州)信息技术有限公司 Remote terminal debugging method, terminal, server and storage medium
CN111158925B (en) * 2019-12-05 2024-02-23 中移(杭州)信息技术有限公司 Remote terminal debugging method, terminal, server and storage medium

Similar Documents

Publication Publication Date Title
CN106897209A (en) A kind of interface load time computational methods and device
US9922260B2 (en) Scrapped information providing method and apparatus
US10067848B2 (en) Methods and systems for benchmarking web browser performance
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN106030546B (en) The method of computer program
Netravali et al. Vesper: Measuring {Time-to-Interactivity} for Web Pages
CN109992498B (en) Test case generation method and system and computer system
WO2019169757A1 (en) Test control and test execution device and method, and computer storage medium
WO2019085598A1 (en) Method and apparatus for calculating above-the-fold rendering duration of page, and electronic device
WO2016008398A1 (en) Program performance test method and device
CN109783351A (en) Interface detection method, apparatus and computer readable storage medium
CN106161133B (en) Method and device for testing webpage loading time
CN106021101B (en) The method and device that mobile terminal is tested
CN107798064B (en) Page processing method, electronic device and computer readable storage medium
CN109344044A (en) Calculate the method and system of page head screen render time
US9507693B2 (en) Method, device and computer-readable storage medium for closure testing
CN106708528A (en) Script generating method and device
CN106897210A (en) A kind of interface load time computational methods, device and system
CN103955425B (en) Webpage (WEB) exploring testing device and method
CN108958855A (en) The method, apparatus and system of page jump
CN109524103A (en) Analyzer resurveys method, apparatus, computer equipment and storage medium automatically
CN109656625A (en) Recognition methods, device, computer equipment and the storage medium of mobile device model
US11403209B2 (en) Rendering GUI test object of application under test to reflect test information
CN105243134B (en) A kind of method and apparatus handling browser of being held as a hostage
US9058184B2 (en) Run time generation and functionality validation of device drivers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170627