CN107678937A - Page compatibility detection method, device, server and medium - Google Patents

Page compatibility detection method, device, server and medium Download PDF

Info

Publication number
CN107678937A
CN107678937A CN201710619747.9A CN201710619747A CN107678937A CN 107678937 A CN107678937 A CN 107678937A CN 201710619747 A CN201710619747 A CN 201710619747A CN 107678937 A CN107678937 A CN 107678937A
Authority
CN
China
Prior art keywords
measured
browser
page
reference interface
pagefile
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
CN201710619747.9A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201710619747.9A priority Critical patent/CN107678937A/en
Priority to PCT/CN2017/104204 priority patent/WO2019019358A1/en
Publication of CN107678937A publication Critical patent/CN107678937A/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/3668Software testing

Abstract

The present invention relates to a kind of page compatibility detection method, device, server and medium, method to include:The running environment of pseudo-terminal;Browser to be measured is run under the runtime environment;Page address is obtained, pagefile to be measured is obtained in page address by browser to be measured;Pagefile to be measured is loaded by browser to be measured, the page corresponding to pagefile to be measured is shown on browser to be measured;Obtain reference interface;Reference interface is contrasted with the page shown in browser to be measured, obtains contrast similarity;When contrast similarity is more than or equal to predetermined threshold value, compatible prompt message is exported.By in dry run browser to be measured and loading pagefile to be measured, the page of the pagefile to be measured on browser to be measured is contrasted with reference interface, it whether there is mistake so as to detect the page shown in browser to be measured, detect the whether compatible browser to be measured of pagefile to be measured, detection efficiency is effectively improved, and effectively reduces testing cost.

Description

Page compatibility detection method, device, server and medium
Technical field
The present invention relates to field of computer technology, more particularly to a kind of page compatibility detection method, device, server And medium.
Background technology
Pagefile needs browser execution and opening in terminal in the completed, and same pagefile is different Terminal, open on different browsers, display effect can slightly have difference, or even partial view device has the page after loading and shown Infull situation.
In order that the display effect opened in each terminal or each browser of pagefile is preferable, and display effect tends to Unanimously, to improve user's perception, it is necessary to test pagefile after the completion of pagefile, on different terminals, operation Different browsers, the pagefile is loaded by different browsers, and then detect the effect of the display after the pagefile is loaded Fruit, due to being related to multiple terminals, and need the multiple browsers of repeated loading operation over multiple terminals so that detection work Need to take more human resources, cause testing cost higher, and detection efficiency is low.
The content of the invention
Based on this, it is necessary to for above-mentioned technical problem, there is provided one kind being capable of inexpensive, efficient and quick page compatibility Property detection method, device, server and medium.
A kind of page compatibility detection method, methods described include:
The running environment of pseudo-terminal;
Browser to be measured is run under the running environment;
Page address is obtained, pagefile to be measured is obtained in the page address by the browser to be measured;
The pagefile to be measured is loaded by the browser to be measured, shown on the browser to be measured described to be measured The page corresponding to pagefile;
Obtain reference interface;
The reference interface is contrasted with the page shown in the browser to be measured, obtains contrast similarity;
Detect whether the contrast similarity is more than predetermined threshold value, when the contrast similarity is more than or equal to predetermined threshold value When, export compatible prompt message.
In one of the embodiments, it is described that the pagefile to be measured is loaded by the browser to be measured, described The step of page corresponding to the pagefile to be measured is shown on browser to be measured includes:
Obtain default display parameters;
The display parameters are based on by the browser to be measured and load the pagefile to be measured, to be measured are browsed described The page corresponding to the pagefile to be measured is shown on device;
The step of acquisition reference interface, includes:
Obtain the reference interface based on display parameters generation.
In one of the embodiments, it is described to carry out the page shown in the reference interface and the browser to be measured Contrast, obtaining the step of contrasting similarity includes:
Parse the color lump parameter that the reference interface obtains the reference interface;
The page shown in the browser to be measured is parsed, obtains the color lump ginseng of the page shown in the browser to be measured Number;
The color lump parameter of the page shown in the color lump parameter of the reference interface and the browser to be measured is carried out pair Than obtaining the contrast similarity;
Export the contrast similarity.
In one of the embodiments, it is described to carry out the page shown in the reference interface and the browser to be measured Contrast, obtaining the step of contrasting similarity includes:
Obtain interior several of the reference interface and refer to the color lump parameter of color lump, and obtain each reference color lump described Relative position in reference interface;
Based on relative position described in identical, several page color lumps in the page shown in the browser to be measured are obtained Color lump parameter;
Based on same relative position, contrast respectively the reference interface several described color lump parameters with reference to color lump and The color lump parameter of several page color lumps, obtain the contrast similarity;
Export the contrast similarity.
In one of the embodiments, methods described also includes:
When the contrast similarity is less than predetermined threshold value, the page shown in the browser to be measured and the ginseng are obtained Examine the positional information of the dissimilar parts at interface;
According to the page generation contrast picture shown in the browser to be measured, and according to the positional information described right Than adding preset mark on picture.
A kind of page compatibility detection means, described device include:
Analog module, the running environment for pseudo-terminal;
Browser execution module, for running browser to be measured under the running environment;
Page acquisition module, for obtaining page address, obtained and treated in the page address by the browser to be measured Survey pagefile;
Page display module, for loading the pagefile to be measured by the browser to be measured, described to be measured clear Look on device and show the page corresponding to the pagefile to be measured;
Reference interface acquisition module, for obtaining reference interface;
Contrast module, for the reference interface to be contrasted with the page shown in the browser to be measured, obtain Contrast similarity;
Detection module, for detecting whether the contrast similarity is more than predetermined threshold value, when the contrast similarity is more than Or during equal to predetermined threshold value, export compatible prompt message.
In one of the embodiments, the page display module includes:
Display parameters acquiring unit, for obtaining default display parameters;
Display unit, the pagefile to be measured is loaded for being based on the display parameters by the browser to be measured, The page corresponding to the pagefile to be measured is shown on the browser to be measured;
Reference interface acquisition module is additionally operable to obtain the reference interface based on display parameters generation.
In one of the embodiments, the contrast module includes:
First resolution unit, the color lump parameter of the reference interface is obtained for parsing the reference interface;
Second resolution unit, for parsing the page shown in the browser to be measured, obtain in the browser to be measured The color lump parameter of the page of display;
Comparison unit, for the color for the page that will be shown in the color lump parameter of the reference interface and the browser to be measured Block parameter is contrasted, and obtains the contrast similarity;
Similarity output unit, for exporting the contrast similarity.
A kind of server, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, the step of realizing above-mentioned any one methods described during the computing device described program.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor The step of above-mentioned any one methods described is realized during row.
Above-mentioned page compatibility detection method, device, server and medium, by dry run browser to be measured, and Pagefile to be measured is loaded by browser to be measured, the page of the pagefile to be measured on browser to be measured is entered with reference interface Row contrast, it whether there is mistake so as to detect the page shown in browser to be measured, and then whether detect pagefile to be measured simultaneous Hold browser to be measured, without manually repeatedly being detected over multiple terminals, effectively improve detection efficiency, and effectively Reduce testing cost.
Brief description of the drawings
Fig. 1 is the applied environment figure of page compatibility detection method in one embodiment;
Fig. 2 is the flow chart of page compatibility detection method in one embodiment;
Fig. 3 is the structural representation of page compatibility detection means in one embodiment;
Fig. 4 is the structural representation of server in one embodiment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, not For limiting the present invention.
Page compatibility detection method provided in the embodiment of the present invention can apply to application environment as shown in Figure 1 In.Wherein, multiple test servers 102 are attached with pagefile server 104 respectively by network.Each testing service Simulator is separately installed with device 102, the simulator is used for the running environment of simulating mobile terminal, and each test server Browser to be measured is run in the running environment of 102 simulation generation, the browser to be measured of test server 102 passes through page address The address that pagefile server 104 stores pagefile to be measured is got, and is obtained from pagefile server 104 to be measured Pagefile.The browser to be measured of test server 102 loads pagefile to be measured, and the page to be measured is shown on browser to be measured The page corresponding to file, and reference interface is obtained, reference interface is contrasted with the page shown in browser to be measured, obtained Similarity must be contrasted, whether detection contrast similarity is more than predetermined threshold value, when contrast similarity is more than or equal to predetermined threshold value, Then show the compatible browser to be measured of the pagefile to be measured, export compatible prompt message.
In one embodiment, as shown in Figure 2, there is provided a kind of page compatibility detection method, be applied in this way Illustrated exemplified by server in Fig. 1, specifically include following steps:
Step 202, the running environment of pseudo-terminal.
Specifically, the terminal in the present embodiment is mobile terminal, and the mobile terminal is intelligent terminal, it should be understood that Operation has different Mobile operating systems on different intelligent terminals, in order to run on the server based on different moving operations The browser of system, in this step, the Mobile operating system of mobile terminal is run by simulator, then fortune is simulated on the simulator Capable Mobile operating system is then the running environment of browser to be measured, it should be understood that the mobile behaviour of simulator dry run Make system can be Android system, the Mobile operating system of Apple Inc., Windows Mobile forms Mobile operating systems with And the operating system of other mobile terminals.
It is noted that the dry run principle of the simulator and simulator is prior art, in the present embodiment not To this work burden description.
Step 204, browser to be measured is run under the runtime environment.
In this step, browser to be measured is run on the Mobile operating system of simulation, the browser to be measured is the compatible shifting The browser of dynamic operating system.
Step 206, page address is obtained, pagefile to be measured is obtained in page address by browser to be measured.
Specifically, the page address is the address of the page to be measured on the server, to be measured clear on server in this step The address field of device look at gets page address, and then accesses server, so as to obtain pagefile to be measured from server.
In the present embodiment, the pagefile to be measured is HTML (HyperText Markup Language, hypertext markup Language) 5 pagefiles.
Step 208, pagefile to be measured is loaded by browser to be measured, pagefile to be measured is shown on browser to be measured The corresponding page.
In this step, server loads pagefile to be measured by browser to be measured, is generated on browser to be measured to be measured The page corresponding to pagefile is simultaneously shown so that the page of the pagefile to be measured is shown on browser to be measured.
Step 210, reference interface is obtained.
Specifically, the reference interface is that a display interface, the reference interface corresponding to pagefile to be measured can be one The page shown on individual browser or a picture, for example, the picture is the sectional drawing of the page shown on browser. The reference interface is appreciated that to be generated by pagefile to be measured, for example is by test and the compatible page to be measured by one The browser of file is loaded and generated, and the reference interface provides the standard of a contrast reference.That is, the reference interface It is the browser loading of the compatible pagefile to be measured and the interface of the page generated or the compatible pagefile to be measured Browser loading and generate the page interface sectional drawing.
It should be understood that the reference interface prestores, for example, reference interface is pre-stored in the memory of server, Either prestore on the server, server can obtain the reference interface from the memory of itself or be obtained from server Take reference interface.
Step 212, reference interface is contrasted with the page shown in browser to be measured, obtains contrast similarity.
In this step, server is after reference interface is obtained, by reference interface and the page shown in browser to be measured Contrasted, contrast similarity is generated according to comparing result.The method of the contrast can use image comparison method, will refer to boundary Face and the page shown in browser to be measured are contrasted, and whether both detections are similar.
Step 214, whether detection contrast similarity is more than predetermined threshold value, when contrast similarity is more than or equal to predetermined threshold value When, export compatible prompt message.
Specifically, contrast that the value of similarity is bigger, then show that reference interface and the page shown in browser to be measured are got over Close, then the page for showing to show in browser to be measured is closer to the display effect of standard, then browser to be measured is to the page to be measured The compatibility of file is higher.
That is, when contrast similarity is more than or equal to predetermined threshold value, show the page shown in browser to be measured Display effect is preferable, has no too many display mistake, then it is compatible to pagefile to be measured to show browser to be measured, then exports Compatible prompt message;Conversely, when contrast it is similar be less than predetermined threshold value when, then the page display for showing to show in browser to be measured is imitated Fruit is poor, more display mistake be present, then shows that browser to be measured is incompatible to pagefile to be measured.
The above method, it is right by loading pagefile to be measured in dry run browser to be measured, and by browser to be measured The page of the pagefile to be measured on browser to be measured is contrasted with reference interface, so as to detect what is shown in browser to be measured The page whether there is mistake, and then detect the whether compatible browser to be measured of pagefile to be measured, without manually repeatedly existing Detected in multiple terminals, effectively improve detection efficiency, and effectively reduce testing cost.
In one embodiment, pagefile to be measured is loaded by browser to be measured, shown on browser to be measured to be measured Include corresponding to pagefile the step of the page:Obtain default display parameters;Added by browser to be measured based on display parameters Pagefile to be measured is carried, the page corresponding to pagefile to be measured is shown on browser to be measured.The step of obtaining reference interface is wrapped Include:Obtain the reference interface based on display parameters generation.
In the present embodiment, the display parameters can be resolution ratio, i.e., the page of pagefile to be measured in browser to be measured On resolution ratio or the page the display size on browser to be measured, the display parameters include display width and aobvious Show height, display width that the display width and display width are the page of pagefile to be measured on browser to be measured and aobvious Show width.
It should be understood that the display parameters are default, i.e., the display parameters can be pre-stored in server or pre- In the memory of presence server, the display parameters are capable of the display size of the display screen of reflexless terminal so that this is to be measured to browse Device can be shown according to the display size of the display screen of terminal to the page of pagefile to be measured.
In order to adapt to the display screen of different terminals, default multiple display parameters can be with the display of the mobile terminal of main flow Size, for example, default display parameters are multiple, in the present embodiment, one of them is obtained from multiple default display parameters, So, you can the browser to be measured under different resolution or different display sizes is detected, in other words, to difference point Pagefile to be measured under resolution or different display sizes is detected in the page of the display of browser to be measured.
And when being obtained to reference interface, then obtain and reference interface, the i.e. reference interface under same display parameters It is to be based on same display parameters with pagefile to be measured to generate in browser loading, by being carried out based on same display parameters Contrast so that the page of the pagefile to be measured shown on browser to be measured can be based on same display parameters with reference interface, And then make it that testing result is more accurate.
In one embodiment, reference interface is contrasted with the page shown in browser to be measured, obtains contrast phase The step of seemingly spending includes:Parse the color lump parameter that reference interface obtains reference interface;The page shown in browser to be measured is parsed, Obtain the color lump parameter of the page shown in browser to be measured;By what is shown in the color lump parameter of reference interface and browser to be measured The color lump parameter of the page is contrasted, and obtains contrast similarity;Output contrast similarity.
In the present embodiment, by the way of the contrast to the page that is shown in reference interface and browser to be measured is contrasted using color lump Contrasted.Specifically, reference interface is divided into several color lumps, and the page shown in browser to be measured is also divided into Some color lumps, under same display size, based on same position to being shown in the color lump of reference interface and browser to be measured The color lump of the page be compared respectively, the color lump parameter includes the saturation degree of the form and aspect of color lump, the lightness of color lump and color lump, The form and aspect of color lump include red value, blue values and yellow numerical value, for example, by above-mentioned color lump parameter number value, calculate contrast The mode of similarity is, by the color lump of the color lump parameter of the color lump of the page shown in each browser to be measured and reference interface Color lump parameter makees ratio, will so obtain ratio of the work on multiple positions than gained, then will make to compare in each position acquired Ratio carries out mathematic interpolation with 1 respectively, obtains the difference of maximum absolute value, takes its absolute value, goes to subtract 1 with this absolute value, obtain The result obtained is to contrast similarity.
Such as show that the form and aspect of one of color lump of the page are 155 in browser to be measured, the reference in same position The form and aspect of one color lump at interface are 120, ratio between two 1.29;The color of another color lump of the page is shown in browser to be measured It is mutually 115, the form and aspect of another color lump of the reference interface in same position are 120, ratio between two 1.29, and ratio between two is 0.96, mathematic interpolation is carried out with 1 respectively, draws 0.29 and 0.04, maximum absolute value is 0.29 in both absolute values, is obtained 0.29, subsequent 1-0.29=0.71, that is, contrast similarity are 71%.
It should be understood that show that the object in each color lump of the page can be One function button in browser to be measured, Can also be a picture or an input frame, these are all the elements in the page, it should be understood that each element Between form and aspect, lightness and saturation degree difference it is larger, it is corresponding if function button offset by or not shown The contrast similarity of color lump on the position is smaller, and the page for correspondingly illustrating to show in browser to be measured shows incomplete or had By mistake, therefore, it is possible to judge that pagefile to be measured and the browser-incompatible to be measured.So, by calculating the ratio of each color lump respectively Value, and then the page shown in browser to be measured is obtained in same position, if the part inconsistent with reference interface be present, For example whether the function button on the page consistent with reference interface, such as, input frame on the page whether with reference interface one Cause.
In the present embodiment, contrast similarity is also outputed, and records the contrast similarity, and then causes each to be measured browse The testing result of device can be recorded and can consulted.
In one embodiment, before output contrasts similarity, in addition to step, the identification mark of browser to be measured is obtained Know, the identification marking of browser to be measured and contrast similarity are established into incidence relation, and store.The identification marking browses to be to be measured The unique identifying information of device, such as, the identification marking includes title and the version number of browser to be measured, and it is to be measured can also to include this The running environment of browser, so, after sensing, its testing result can be preserved each browser to be measured, and with Browser association to be measured, is easy to the access to testing result.
In one embodiment, reference interface is contrasted with the page shown in browser to be measured, obtains contrast phase The step of seemingly spending includes:Obtain interior several of reference interface and refer to the color lump parameter of color lump, and obtain each color lump that refers to and referring to Relative position on interface;Based on identical relative position, several page colors in the page shown in browser to be measured are obtained The color lump parameter of block;Based on same relative position, if respectively contrast reference interface several with reference to color lump color lump parameter and The color lump parameter of dry page color lump, obtain contrast similarity;Output contrast similarity.
In the present embodiment, the page shown in reference interface and browser to be measured is based on different display parameters generations , but the page shown in reference interface and browser to be measured has identical the ratio of width to height, ideally, in browser to be measured The page of display zooms in or out in certain proportion, can obtain and show figure with reference interface identical, that is to say, that this reality To apply in example, the page shown in reference interface and browser to be measured has different display widths and display highly, but both With identical the ratio of width to height.
Specifically, relative position is itself, the relative position is relative to display interface relative to a certain display interface It is itself fixed, without changing its position in display interface with zooming in or out for the display interface, such as, The relative position includes relative X-axis position and relative Y-axis position, and this is with respect to a certain reference point that X-axis position is on display interface On lateral coordinates value and the display interface width ratio, this with respect to Y-axis position for the reference point longitudinal coordinate value with The ratio of the height of the display interface, such as, the width and height of display interface are respectively 16 and 9, then, with display interface The left end of side be starting point, and a certain reference point coordinate value is (5,8) in display interface, then, the relative position of the reference point is (5/ 16,8/9), when display interface zooms in or out by equal proportion, the reference point is relative to display interface itself its position Will not change, that is to say, that the reference point can't be zoomed in or out relative to the position of the display interface with display interface and Change.
In the present embodiment, because the page shown in reference interface and browser to be measured has identical the ratio of width to height, therefore, On reference interface is obtained with reference to the relative position of color lump after, the page that can be shown according to the relative position in browser to be measured Page color lump corresponding to face, and then so that reference color lump and page color lump in same relative position are contrasted.
It is noted that in certain embodiments, without the page to being shown in reference interface and browser to be measured Carry out overall contrast, that is to say, that both local contrasts can be carried out, such as, position more important in reference interface is entered Row contrast, contrasts the color lump parameter of reference color lump and the color lump parameter of page color lump in several relative positions, without Each color lump for surveying in browser the page shown is compared, comparing calculation amount can be reduced, so as to effectively improve Detection efficiency.
The page shown in reference interface and browser to be measured in the present embodiment is shown based on different display parameters Show, but due to being to be based on same relative position in contrast, and then make it that both can be contrasted, that is, cause based on difference The page shown in the reference interface of display parameters and browser to be measured is achieved contrast, improves the efficiency of detection.
In one embodiment, method also includes step:When contrast similarity is less than predetermined threshold value, to be measured browses is obtained The page and the positional information of the dissimilar parts of reference interface shown in device;According to the page generation pair shown in browser to be measured Than picture, and according to positional information preset mark is added on contrast picture.
In the present embodiment, contrast similarity is when being less than predetermined threshold value, and the page shown in the browser to be measured exists more Mistake or display it is incomplete, it is therefore shown that the pagefile to be measured and the browser-incompatible to be measured, then obtain to be measured clear Look in device the positional informations of the page shown and the dissimilar parts of reference interface, that is, obtain pagefile display mistake to be measured or The positional information of incomplete part is shown, the positional information is the position on the page shown in the browser to be measured, such as, When a certain color lump of the page shown in browser to be measured and ratio of the work of the color lump in reference interface same position than acquisition It is larger, then obtain the positional information for the page that the color lump is shown in browser to be measured.
Then, according to the page generation contrast picture shown in browser to be measured, such as, to what is shown in browser to be measured The page carry out sectional drawing, generation contrast picture, and on the picture relevant position addition preset mark, and export with the addition of it is default The contrast picture of mark, and then the difference section of the page shown in the browser to be measured is highlighted, is easy to pair The mistake of the page or the incomplete part of display carry out quick obtaining.
It should be understood that to apply also for multiple browsers to be measured same for the page compatibility detection method in above-described embodiment When detect, in such manner, it is possible to effectively improve detection efficiency.In one embodiment, method includes simulating the operation ring of multiple terminals Border, browser to be measured is separately operable under multiple running environment, pagefile to be measured is loaded by each browser to be measured respectively, The page corresponding to pagefile to be measured, and the page that will be shown respectively on browser to be measured are shown on each browser to be measured respectively Detected while being contrasted with reference interface, and then realize multiple browsers to be measured.It is noted that simulates at the same time is multiple In running environment, each running environment can be separately operable one or more browsers to be measured, be transported under same running environment Capable browser to be measured can be the different editions of different types of browser or same browser, by multiple Running environment and multiple browsers to be measured are detected simultaneously, can effectively improve detection efficiency.
In one embodiment, as shown in Figure 3, there is provided a kind of page compatibility detection means, including:Analog module 302nd, browser execution module 304, page acquisition module 306, page display module 308, reference interface acquisition module 310, right Than module 312 and detection module 314, wherein:
Analog module 302 is used for the running environment of pseudo-terminal.
Browser execution module 304 is used to run browser to be measured under the runtime environment.
Page acquisition module 306 is used to obtain page address, and the page to be measured is obtained in page address by browser to be measured File.
Page display module 308 is used to load pagefile to be measured by browser to be measured, is shown on browser to be measured The page corresponding to pagefile to be measured.
Reference interface acquisition module 310 is used to obtain reference interface.
Contrast module 312 is used to be contrasted reference interface with the page shown in browser to be measured, obtains contrast phase Like degree.
Detection module 314 is used to detect whether contrast similarity is more than predetermined threshold value, when contrast similarity is more than or equal to During predetermined threshold value, compatible prompt message is exported.
In one embodiment, page display module 308 includes:
Display parameters acquiring unit, for obtaining default display parameters.
Display unit, pagefile to be measured is loaded for being based on display parameters by browser to be measured, in browser to be measured The page corresponding to upper display pagefile to be measured.
Reference interface acquisition module 310 is additionally operable to obtain the reference interface based on display parameters generation.
In one embodiment, contrast module 312 includes:
First resolution unit, the color lump parameter of reference interface is obtained for parsing reference interface.
Second resolution unit, for parsing the page shown in browser to be measured, obtain the page shown in browser to be measured The color lump parameter in face.
Comparison unit, for the color lump parameter of the page shown in the color lump parameter of reference interface and browser to be measured to be entered Row contrast, obtain contrast similarity.
Similarity output unit, similarity is contrasted for exporting.
In one embodiment, there is provided a kind of server, as shown in figure 4, the server includes connecting by system bus The processor that connects, memory, storage are on a memory and the computer program that can be run on a processor and network interface etc.. Wherein, processor is used to provide calculating and control ability.Memory provides environment for the operation of computer program.Memory includes Built-in storage and non-volatile memory medium.Network interface be used for according to this with outside survey terminal or Claims Resolution terminal pass through network Connection communication.Following steps are realized during computing device computer program:
The running environment of pseudo-terminal.
Browser to be measured is run under the runtime environment.
Page address is obtained, pagefile to be measured is obtained in page address by browser to be measured.
Pagefile to be measured is loaded by browser to be measured, page corresponding to pagefile to be measured is shown on browser to be measured Face;
Obtain reference interface.
Reference interface is contrasted with the page shown in browser to be measured, obtains contrast similarity.
Whether detection contrast similarity is more than predetermined threshold value, when contrast similarity is more than or equal to predetermined threshold value, output Compatible prompt message.
The server can with independent server either multiple server groups into server cluster realize.Ability Field technique personnel are appreciated that the structure shown in Fig. 4, only the block diagram of the part-structure related to application scheme, and Do not form the restriction for the server being applied thereon to application scheme, specific server can include than shown in figure more More or less parts, either combine some parts or arranged with different parts.
In one embodiment, following steps are also realized during computing device computer program:
Obtain default display parameters;
Display parameters are based on by browser to be measured and load pagefile to be measured, the page to be measured is shown on browser to be measured The page corresponding to file;
The step of obtaining reference interface includes:
Obtain the reference interface based on display parameters generation.
In one embodiment, following steps are also realized during computing device computer program:
Parse the color lump parameter that reference interface obtains reference interface;
The page shown in browser to be measured is parsed, obtains the color lump parameter of the page shown in browser to be measured;
The color lump parameter of the page shown in the color lump parameter of reference interface and browser to be measured is contrasted, acquisition pair Compare similarity;
Output contrast similarity.
In one embodiment, following steps are also realized during computing device computer program:
Obtain reference interface in several refer to color lump color lump parameter, and obtain it is each with reference to color lump in reference interface Relative position;
Based on identical relative position, the color lump for obtaining several page color lumps in the page shown in browser to be measured is joined Number;
Based on same relative position, contrast respectively reference interface several with reference to color lump color lump parameter and several pages The color lump parameter of complexion block, obtain contrast similarity;
Output contrast similarity.
In one embodiment, following steps are also realized during computing device computer program:
When contrasting similarity and being less than predetermined threshold value, the different of the page shown in browser to be measured and reference interface is obtained Partial positional information;
According to the page generation contrast picture shown in browser to be measured, and added according to positional information on contrast picture Preset mark.
In one embodiment, there is provided a kind of computer-readable recording medium, be stored thereon with computer program, calculate Machine program realizes following steps when being executed by processor:
The running environment of pseudo-terminal;
Browser to be measured is run under the runtime environment;
Page address is obtained, pagefile to be measured is obtained in page address by browser to be measured;
Pagefile to be measured is loaded by browser to be measured, page corresponding to pagefile to be measured is shown on browser to be measured Face;
Obtain reference interface;
Reference interface is contrasted with the page shown in browser to be measured, obtains contrast similarity;
Whether detection contrast similarity is more than predetermined threshold value, when contrast similarity is more than or equal to predetermined threshold value, output Compatible prompt message.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain default display parameters;
Display parameters are based on by browser to be measured and load pagefile to be measured, the page to be measured is shown on browser to be measured The page corresponding to file;
The step of obtaining reference interface includes:
Obtain the reference interface based on display parameters generation.
In one embodiment, following steps are also realized when computer program is executed by processor:
Parse the color lump parameter that reference interface obtains reference interface;
The page shown in browser to be measured is parsed, obtains the color lump parameter of the page shown in browser to be measured;
The color lump parameter of the page shown in the color lump parameter of reference interface and browser to be measured is contrasted, acquisition pair Compare similarity;
Output contrast similarity.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain reference interface in several refer to color lump color lump parameter, and obtain it is each with reference to color lump in reference interface Relative position;
Based on identical relative position, the color lump for obtaining several page color lumps in the page shown in browser to be measured is joined Number;
Based on same relative position, contrast respectively reference interface several with reference to color lump color lump parameter and several pages The color lump parameter of complexion block, obtain contrast similarity;
Output contrast similarity.
In one embodiment, following steps are also realized when computer program is executed by processor:
When contrasting similarity and being less than predetermined threshold value, the different of the page shown in browser to be measured and reference interface is obtained Partial positional information;
According to the page generation contrast picture shown in browser to be measured, and added according to positional information on contrast picture Preset mark.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can be read In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, the scope that this specification is recorded all is considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that come for one of ordinary skill in the art Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. a kind of page compatibility detection method, methods described include:
The running environment of pseudo-terminal;
Browser to be measured is run under the running environment;
Page address is obtained, pagefile to be measured is obtained in the page address by the browser to be measured;
The pagefile to be measured is loaded by the browser to be measured, the page to be measured is shown on the browser to be measured The page corresponding to file;
Obtain reference interface;
The reference interface is contrasted with the page shown in the browser to be measured, obtains contrast similarity;
Detect whether the contrast similarity is more than predetermined threshold value, when the contrast similarity is more than or equal to predetermined threshold value, Export compatible prompt message.
2. according to the method for claim 1, it is characterised in that described that the page to be measured is loaded by the browser to be measured Face file, include the page corresponding to the pagefile to be measured is shown on the browser to be measured the step of:
Obtain default display parameters;
The display parameters are based on by the browser to be measured and load the pagefile to be measured, on the browser to be measured Show the page corresponding to the pagefile to be measured;
The step of acquisition reference interface, includes:
Obtain the reference interface based on display parameters generation.
3. according to the method for claim 2, it is characterised in that described by the reference interface and the browser to be measured The page of display is contrasted, and obtaining the step of contrasting similarity includes:
Parse the color lump parameter that the reference interface obtains the reference interface;
The page shown in the browser to be measured is parsed, obtains the color lump parameter of the page shown in the browser to be measured;
The color lump parameter of the page shown in the color lump parameter of the reference interface and the browser to be measured is contrasted, obtained Obtain the contrast similarity;
Export the contrast similarity.
4. according to the method for claim 3, it is characterised in that described by the reference interface and the browser to be measured The page of display is contrasted, and obtaining the step of contrasting similarity includes:
Obtain interior several of the reference interface and refer to the color lump parameter of color lump, and obtain each reference color lump in the reference Relative position on interface;
Based on relative position described in identical, the color of several the interior page color lumps of the page shown in the acquisition browser to be measured Block parameter;
Based on same relative position, several described color lump parameters with reference to color lump of the reference interface and some are contrasted respectively The color lump parameter of the individual page color lump, obtains the contrast similarity;
Export the contrast similarity.
5. according to the method for claim 1, it is characterised in that methods described also includes:
When the contrast similarity is less than predetermined threshold value, obtains the page shown in the browser to be measured and refer to boundary with described The positional information of the dissimilar parts in face;
According to the page generation contrast picture shown in the browser to be measured, and according to the positional information in the comparison diagram Preset mark is added on piece.
6. a kind of page compatibility detection means, it is characterised in that described device includes:
Analog module, the running environment for pseudo-terminal;
Browser execution module, for running browser to be measured under the running environment;
Page acquisition module, for obtaining page address, page to be measured is obtained in the page address by the browser to be measured Face file;
Page display module, for loading the pagefile to be measured by the browser to be measured, in the browser to be measured The page corresponding to the upper display pagefile to be measured;
Reference interface acquisition module, for obtaining reference interface;
Contrast module, for the reference interface to be contrasted with the page shown in the browser to be measured, contrasted Similarity;
Detection module, for detecting whether the contrast similarity is more than predetermined threshold value, when the contrast similarity is more than or waits When predetermined threshold value, compatible prompt message is exported.
7. device according to claim 6, it is characterised in that the page display module includes:
Display parameters acquiring unit, for obtaining default display parameters;
Display unit, the pagefile to be measured is loaded for being based on the display parameters by the browser to be measured, in institute State and the page corresponding to the pagefile to be measured is shown on browser to be measured;
Reference interface acquisition module is additionally operable to obtain the reference interface based on display parameters generation.
8. device according to claim 7, it is characterised in that the contrast module includes:
First resolution unit, the color lump parameter of the reference interface is obtained for parsing the reference interface;
Second resolution unit, for parsing the page shown in the browser to be measured, obtain and shown in the browser to be measured The page color lump parameter;
Comparison unit, for the color lump ginseng for the page that will be shown in the color lump parameter of the reference interface and the browser to be measured Number is contrasted, and obtains the contrast similarity;
Similarity output unit, for exporting the contrast similarity.
9. a kind of server, including memory, processor and storage are on a memory and the computer that can run on a processor Program, it is characterised in that the step of any one methods described in claim 1-5 is realized during the computing device described program Suddenly.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program The step of any one methods described in claim 1-5 is realized when being executed by processor.
CN201710619747.9A 2017-07-26 2017-07-26 Page compatibility detection method, device, server and medium Pending CN107678937A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710619747.9A CN107678937A (en) 2017-07-26 2017-07-26 Page compatibility detection method, device, server and medium
PCT/CN2017/104204 WO2019019358A1 (en) 2017-07-26 2017-09-29 Page compatibility detection method and apparatus, server, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710619747.9A CN107678937A (en) 2017-07-26 2017-07-26 Page compatibility detection method, device, server and medium

Publications (1)

Publication Number Publication Date
CN107678937A true CN107678937A (en) 2018-02-09

Family

ID=61134096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710619747.9A Pending CN107678937A (en) 2017-07-26 2017-07-26 Page compatibility detection method, device, server and medium

Country Status (2)

Country Link
CN (1) CN107678937A (en)
WO (1) WO2019019358A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254908A (en) * 2018-08-03 2019-01-22 北京达佳互联信息技术有限公司 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing
CN109697164A (en) * 2018-12-17 2019-04-30 北京城市网邻信息技术有限公司 Test method, device, storage medium and the terminal of App have been adjusted in browser
CN109740096A (en) * 2018-12-28 2019-05-10 广州华多网络科技有限公司 A kind of implementation method of live preview, device, system and storage medium
CN109815426A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Page info detection method and device, terminal and computer readable storage medium
CN109949295A (en) * 2019-03-21 2019-06-28 中国工商银行股份有限公司 Otherness detection method, device and the computer storage medium of browsing device net page
CN109976854A (en) * 2019-03-22 2019-07-05 维沃移动通信有限公司 A kind of applied program processing method and terminal device
CN110046072A (en) * 2019-03-13 2019-07-23 平安城市建设科技(深圳)有限公司 Monitoring method, device, terminal and the readable storage medium storing program for executing of the page
CN110245068A (en) * 2019-04-25 2019-09-17 深圳壹账通智能科技有限公司 Automated testing method, device and the computer equipment of the H5 page
CN110609522A (en) * 2018-06-15 2019-12-24 虫洞科技股份有限公司 Machine parameter acquisition device
CN110896473A (en) * 2019-07-12 2020-03-20 研祥智能科技股份有限公司 Detection method and system for display interface switching function
CN111159607A (en) * 2018-11-07 2020-05-15 中国移动通信集团重庆有限公司 Website compatibility setting method, device, equipment and medium
CN112380116A (en) * 2020-11-10 2021-02-19 深圳市共进电子股份有限公司 Browser comparison test method and device and browser data forwarding method
CN113094287A (en) * 2021-05-12 2021-07-09 深圳市腾讯信息技术有限公司 Page compatibility detection method, device, equipment and storage medium
CN113220587A (en) * 2021-06-02 2021-08-06 中国农业银行股份有限公司 Web interface compatibility testing method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532181A (en) * 2019-08-19 2019-12-03 广州华旻信息科技有限公司 ES6 characteristic compatibility detection system and method
CN111324519B (en) * 2020-02-21 2022-06-17 浪潮电子信息产业股份有限公司 Compatibility testing method, system, device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514090A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and device for testing browser
CN103546907A (en) * 2012-07-11 2014-01-29 深圳市世纪光速信息技术有限公司 System and method for testing wireless application protocol webpage
CN106502891A (en) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 The automatic testing method and device of user interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598846B (en) * 2016-11-29 2018-03-16 上海壹账通金融科技有限公司 Application interface method of testing and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514090A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and device for testing browser
CN103546907A (en) * 2012-07-11 2014-01-29 深圳市世纪光速信息技术有限公司 System and method for testing wireless application protocol webpage
CN106502891A (en) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 The automatic testing method and device of user interface

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609522A (en) * 2018-06-15 2019-12-24 虫洞科技股份有限公司 Machine parameter acquisition device
CN109254908A (en) * 2018-08-03 2019-01-22 北京达佳互联信息技术有限公司 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing
CN111159607B (en) * 2018-11-07 2023-09-19 中国移动通信集团重庆有限公司 Website compatibility setting method, device, equipment and medium
CN111159607A (en) * 2018-11-07 2020-05-15 中国移动通信集团重庆有限公司 Website compatibility setting method, device, equipment and medium
CN109815426A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Page info detection method and device, terminal and computer readable storage medium
CN109697164A (en) * 2018-12-17 2019-04-30 北京城市网邻信息技术有限公司 Test method, device, storage medium and the terminal of App have been adjusted in browser
CN109740096B (en) * 2018-12-28 2021-04-20 广州华多网络科技有限公司 Method, device and system for realizing real-time preview and storage medium
CN109740096A (en) * 2018-12-28 2019-05-10 广州华多网络科技有限公司 A kind of implementation method of live preview, device, system and storage medium
CN110046072A (en) * 2019-03-13 2019-07-23 平安城市建设科技(深圳)有限公司 Monitoring method, device, terminal and the readable storage medium storing program for executing of the page
CN109949295A (en) * 2019-03-21 2019-06-28 中国工商银行股份有限公司 Otherness detection method, device and the computer storage medium of browsing device net page
CN109976854A (en) * 2019-03-22 2019-07-05 维沃移动通信有限公司 A kind of applied program processing method and terminal device
CN109976854B (en) * 2019-03-22 2023-02-24 维沃移动通信有限公司 Application processing method and terminal equipment
CN110245068A (en) * 2019-04-25 2019-09-17 深圳壹账通智能科技有限公司 Automated testing method, device and the computer equipment of the H5 page
CN110896473A (en) * 2019-07-12 2020-03-20 研祥智能科技股份有限公司 Detection method and system for display interface switching function
CN112380116A (en) * 2020-11-10 2021-02-19 深圳市共进电子股份有限公司 Browser comparison test method and device and browser data forwarding method
CN113094287A (en) * 2021-05-12 2021-07-09 深圳市腾讯信息技术有限公司 Page compatibility detection method, device, equipment and storage medium
CN113094287B (en) * 2021-05-12 2024-03-15 深圳市腾讯信息技术有限公司 Page compatibility detection method, device, equipment and storage medium
CN113220587A (en) * 2021-06-02 2021-08-06 中国农业银行股份有限公司 Web interface compatibility testing method and device

Also Published As

Publication number Publication date
WO2019019358A1 (en) 2019-01-31

Similar Documents

Publication Publication Date Title
CN107678937A (en) Page compatibility detection method, device, server and medium
CN107992427B (en) Method, device and equipment for creating service test scene and storage medium thereof
CA3018196C (en) Visual regresssion testing tool
WO2017005148A1 (en) Automatic software-testing method and device
US20060085132A1 (en) Method and system to reduce false positives within an automated software-testing environment
CN105868096B (en) For showing the method, device and equipment of web page test result in a browser
CN109471805B (en) Resource testing method and device, storage medium and electronic equipment
CN107133174A (en) Test case code automatically generating device and method
CN106897216A (en) The method and apparatus of test software
CN107562636A (en) Method and device for testing starting time of application software
CN104915297B (en) A kind of automated testing method of the APP power consumption of android equipment
CN108459850B (en) Method, device and system for generating test script
CN108734165A (en) Calligraphy quality determining method, device and electronic equipment based on artificial intelligence
CN103514090A (en) Method and device for testing browser
CN106598846B (en) Application interface method of testing and device
CN107729246A (en) For the auxiliary test methods of intended application, device, equipment and storage medium
CN107133165A (en) Browser compatibility detection method and device
CN108399119A (en) Browse serves kernel engine data processing, automatic test method and apparatus
CN107885662A (en) A kind of method of testing based on more browser multi-version compatibility sex chromosome mosaicisms
CN110096322A (en) The method and device of adaptive terminal screen, storage medium, electronic device
CN109614317A (en) Electronic device, ui testing method and storage medium
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN107797837A (en) Page display method, device, server and medium
CN104765630B (en) Software installation method and device
CN103955425B (en) Webpage (WEB) exploring testing device and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180525

Address after: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Applicant after: Shenzhen one ledger Intelligent Technology Co., Ltd.

Address before: 200000 Xuhui District, Shanghai Kai Bin Road 166, 9, 10 level.

Applicant before: Shanghai Financial Technologies Ltd

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20180209

RJ01 Rejection of invention patent application after publication