CN103514090A - Method and device for testing browser - Google Patents

Method and device for testing browser Download PDF

Info

Publication number
CN103514090A
CN103514090A CN201210213735.3A CN201210213735A CN103514090A CN 103514090 A CN103514090 A CN 103514090A CN 201210213735 A CN201210213735 A CN 201210213735A CN 103514090 A CN103514090 A CN 103514090A
Authority
CN
China
Prior art keywords
test
webpage
picture
browser
test webpage
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
CN201210213735.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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210213735.3A priority Critical patent/CN103514090A/en
Publication of CN103514090A publication Critical patent/CN103514090A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and device for testing a browser, and belongs to the technical field of computers. The method includes the steps of rendering a tested webpage on the browser to be tested, capturing a picture of the rendered tested webpage, comparing the captured picture of the tested webpage with a corresponding expected picture, and obtaining the rendering capacity of the browser to be tested according to comparison results. The device comprises a rendering module, a capturing module, a comparison module and an obtaining module. According to the method and device, the tested webpage is rendered on the webpage to be tested, the picture of the rendered tested webpage is cut, the cut picture of the tested webpage is compared with the corresponding expected picture, and the rendering capacity of the browser to be tested is obtained according to comparison results. Therefore, the rendering capacity of the browser can be automatically obtained, the testing efficiency is greatly improved, and human errors of a testing person can be avoided.

Description

The method and apparatus of test browser
Technical field
The present invention relates to field of computer technology, particularly a kind of method and apparatus of testing browser.
Background technology
Along with popularizing of mobile communication technology, surfing Internet with cell phone is more and more general, the thing followed is the increase of crowd's usable range and the increase of Time Density of mobile phone browser, this just browses mobile phone to mobile phone browser and has higher requirement towards the webpage of mobile phone and the display capabilities of conventional webpage, just needs particularly the ability of playing up of testing mobile phone browser.
The method of existing testing mobile phone browser is that tester manually inputs tested network address in Web address field, then by the network address page info of opening, carries out naked eyes judgement and comparison.
In realizing process of the present invention, inventor finds that prior art at least exists following problem:
The efficiency of input judgement is manually very low, and time efficiency is difficult to ensure card.Artificial error in judgement rate is high, if kernel has small change, such as the variation of font size, the variation of shade is difficult to be discovered by naked eyes.
Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of method and apparatus of testing browser.Described technical scheme is as follows:
On the one hand, provide a kind of method of testing browser, described method comprises:
On browser to be measured, test webpage is played up;
The picture of the described test webpage after intercepting is played up;
The picture of the described test webpage of intercepting is compared with corresponding expection picture;
According to comparison result, obtain the ability of playing up of described browser to be measured.
Preferably, describedly on browser to be measured, test webpage is also comprised before playing up:
Pre-stored described expection picture, described expection picture is corresponding with the network address of described test webpage, and described test webpage and corresponding expection picture are one to multiple right;
Described on browser to be measured to test webpage play up, specifically comprise:
Obtain the network address of the described test webpage corresponding with described expection picture, according to the network address of described test webpage, on browser to be measured, play up described test webpage.
Preferably, the picture of the described test webpage of intercepting is compared and is specifically comprised with corresponding expection picture:
The picture of the described test webpage of intercepting and corresponding expection picture are divided into respectively to the grid of formed objects and quantity;
Whether pattern and the color of comparing each grid corresponding between two pictures be identical;
If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully;
If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
Preferably, the described picture by the described test webpage of intercepting also comprises after comparing with corresponding expection picture:
According to comparison result generate and show detecting information, described detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
Preferably, after described demonstration detecting information, also comprise:
Show failed test result details, described test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
On the other hand, provide a kind of device of testing browser, described device comprises:
Rendering module, for playing up test webpage on browser to be measured;
Interception module, for the picture of the test webpage after intercepting described rendering module and playing up;
Comparing module, for comparing the picture of the described test webpage of described interception module intercepting with corresponding expection picture;
Acquisition module, obtains the ability of playing up of described browser to be measured for the comparison result obtaining according to described comparing module.
Preferably, described device also comprises:
Memory module, for pre-stored described expection picture, described expection picture is corresponding with the network address of described test webpage, and described test webpage and corresponding expection picture are one to multiple right;
Described rendering module, specifically comprises:
Acquiring unit, for obtaining the network address of the described test webpage corresponding with described expection picture;
Rendering unit is played up described test webpage for the network address of the test webpage that gets according to described acquiring unit on browser to be measured.
Preferably, described comparing module specifically comprises:
Division unit, for being divided into the picture of the described test webpage of intercepting and corresponding expection picture respectively the grid of formed objects and quantity;
Whether comparing unit is identical for comparing between two pictures pattern and the color of each corresponding grid; If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully; If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
Preferably, described device also comprises:
Display module, for according to comparison result, generate and show detecting information, described detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
Preferably, described display module, also for showing failed test result details, described test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
The present embodiment by playing up test webpage on browser to be measured, the picture of this test webpage after intercepting is played up, the picture of this test webpage of intercepting is compared with corresponding expection picture, according to comparison result, obtain the ability of playing up of this browser to be measured, greatly improved testing efficiency, and the human error that can evade tester, realizes the ability of playing up accurate, careful, that automatically test efficiently browser.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is a kind of method flow diagram of testing browser that the embodiment of the present invention one provides;
Fig. 2 is a kind of method flow diagram of testing browser that the embodiment of the present invention two provides;
Fig. 3 is a kind of interface schematic diagram of testing browser that the embodiment of the present invention two provides;
Fig. 4 is the interface schematic diagram of the another kind test browser that provides of the embodiment of the present invention two;
Fig. 5 is a kind of apparatus structure schematic diagram of testing browser that the embodiment of the present invention three provides;
Fig. 6 is the apparatus structure schematic diagram of the another kind test browser that provides of the embodiment of the present invention three;
Fig. 7 is the structural representation of a kind of rendering module of providing of the embodiment of the present invention three;
Fig. 8 is the structural representation of a kind of comparing module of providing of the embodiment of the present invention three;
Fig. 9 be the embodiment of the present invention three provide another test browser apparatus structure schematic diagram.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
Referring to Fig. 1, the present embodiment provides a kind of method of testing browser, and method is as follows:
Step 110: on browser to be measured, test webpage is played up;
Further, before test webpage being played up on browser to be measured, also comprise:
Pre-stored expection picture, expection picture is corresponding with the network address of test webpage, and test webpage and corresponding expection picture are one to multiple right;
On browser to be measured, test webpage is played up, is specifically comprised:
Obtain and expect the network address of the test webpage that picture is corresponding, according to the network address of test webpage, on browser to be measured, playing up test webpage.
Step 120: the picture of this test webpage after intercepting is played up;
Step 130: the picture of this test webpage of intercepting is compared with corresponding expection picture;
Particularly, the picture of the test webpage of intercepting is compared with corresponding expection picture, specifically comprises:
The picture of the test webpage of intercepting and corresponding expection picture are divided into respectively to the grid of formed objects and quantity;
Whether pattern and the color of comparing each grid corresponding between two pictures be identical;
If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully;
If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
Step 140: the ability of playing up that obtains this browser to be measured according to comparison result.
Further, after the picture of the test webpage of intercepting is compared with corresponding expection picture, also comprise:
According to comparison result generate and show detecting information, detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
Further, after showing detecting information, also comprise:
Show failed test result details, test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
The method that the present embodiment provides, by test webpage being played up on browser to be measured, the picture of this test webpage after intercepting is played up, the picture of this test webpage of intercepting is compared with corresponding expection picture, according to comparison result, obtain the ability of playing up of this browser to be measured, realize and automatically the ability of playing up of browser being tested, greatly improved testing efficiency, and can evade tester's human error.
Embodiment bis-
Referring to Fig. 2, the present embodiment provides a kind of method of testing browser, and method is as follows:
Step 210: pre-stored expection picture, this expection picture is corresponding with the network address of test webpage, and this test webpage and corresponding expection picture are one to multiple right;
In the embodiment of the present invention, in advance each different webpage is provided with to corresponding expection picture; Expection picture is the picture to the webpage in requisition for test in test, and what the pattern table on this picture revealed is the effect that this webpage of the default hope of tester is played up out, namely a kind of default normal pictures.
Particularly, during expection picture in pre-stored test plan, this expection picture is corresponding with the network address of testing webpage, therefore, test webpage and expection picture are relation one to one, with in a test plan, the test webpage of employing with expect that picture is one to multiple right.Correspondingly, the network address URL(Uniform/Universal Resource Locator of test webpage, URL(uniform resource locator)) and expect that picture is also one to multiple right; The network address URL of test webpage is considered as the test item in test with this mapping relations of expection picture.Carry out test item and make the whole test both can be towards the content of all webpages, also can be towards the content that needs several isolation pages of test in browser, mode is flexible, saves time.
Step 220: obtain and expect the network address of the test webpage that picture is corresponding, play up test webpage according to the network address of this test webpage on browser to be measured;
For this step, in order to play up to browser the test of ability, can simulate in advance a processing environment, this processing environment can reproduce the demonstration situation of browser, for example on a computer, mobile phone simulator software is installed, by the demonstration situation of this mobile phone simulator software analogue mobile phone browser.It should be noted that, the present embodiment herein browser execution used in symbian(Saipan) on platform, correspondingly can also run on Android, IOS(IPhone Operating System, i Phone operating platform) platform such as, the present embodiment does not limit the platform specific of browser execution, during concrete enforcement, only need to predict the kernel interface of different browsers, just can call the test that this Interface realization different browsers is played up ability, thereby can change flexibly platform according to the change of processing environment, and required processing environment only needs a PC(Personal Computer, PC) just can provide, so the applicable surface of the browser type of whole processing environment and its test is wider, condition is simple, can meet different demands.
When test webpage is played up, the load(that this processing environment first provides via browser kernel reads) interface, obtain the network address URL of the test webpage corresponding with pre-stored expection picture, and after reading this URL, with browser program to be measured, open this URL, to realize on browser to be measured according to the URL of this test webpage, test webpage is played up.
Wherein, play up the URL agreement and the destination that refer to according to webpage, log in destination station for acquiring and describe resource, this is described resource and is downloaded to after processing environment, by browser, load and resolve this and describe resource, realize the contents such as corresponding picture, word, effect are transformed in current display interface.
Step 230: the picture of this test webpage after intercepting is played up;
Particularly, after 220 pairs of test webpages of above-mentioned steps have been played up, by the sectional drawing function of browser kernel, the displaying contents that is presented at the current web page of corresponding this Test Network page address in processing environment is carried out to sectional drawing, obtain the picture of this test webpage of intercepting.Wherein, the mode of the picture of intercepting test webpage can adopt existing sectional drawing technology to realize while specifically implementing, and the present embodiment is not specifically limited this.
Step 240: the picture of this test webpage of intercepting is compared with corresponding expection picture;
For this step, before the picture of the test webpage of intercepting is compared with corresponding expection picture, obtain the pre-stored corresponding expection picture of the network address URL with test webpage.In comparison process, first the picture of the test webpage of intercepting is divided with the same manner with the identical grid of specification size and number respectively with corresponding expection picture; Picture and corresponding total grid number of expection picture that this division makes to test webpage are identical with the position size of each grid, guarantee that comparison process is not subject to the error effect of grid nature and laying method, carry out same standard.
Then whether identically, compare between two pictures pattern and the color of each corresponding grid; If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully; If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.By pattern and color in comparison same position grid, guaranteed accurately not omit, considerably beyond the comparison ability of artificial naked eyes, can directly find out the test webpage that the ability of playing up is not passed through, thereby test result is more accurate compared with the mode of artificial judgment.
Wherein, compare two patterns in picture mesh, what compare here is size and the size of pattern; If exist the pattern in the grid of certain a pair of same position not identical, comparison result failure; If all identical to the pattern comparison in the grid of same position, continue to compare the color of the pattern comprising in every pair of grid of two pictures, the pattern color comprising in the grid of certain a pair of same position if exist is different, comparing result failure, if all colors to pattern in same position grid are also identical, comparing result success.
Color comparison is to judge that whether the gray-scale value of pattern in this grid is identical in black white image, and 0 expression is black, and maximal value represents white; And color comparison is to judge that in this grid, whether image intensity red green blue value (RGB) is identical in coloured image, the numerical range of the corresponding 0-255 of three kinds of color components of RGB, whether intensity red green blue value is identical is exactly whether the numerical value that compares these three colors all equates.In reality, except gray-scale value and these two kinds of color expression waies of intensity red green blue value, also there are other color standards in processing in image, and the present embodiment is only enumerated wherein these two kinds, but this is not made concrete restriction.
In addition, in comparison process, in order to reduce to greatest extent the error of test automatically, can take following measures further to promote the stability of test browser renders ability:
In all comparison processes, due to the leak of test procedure itself and the unstable reason of relevant environment, if comparison result shows as failure for the first time, can directly not judge that test result is as failure.But retest once, if still show as for the second time failure, test result can be judged to be to failure so, and if show as for the second time successfully, can think test for the first time wrong, need many tests several times again result of determination whether for successfully.
Step 250: the ability of playing up that obtains this browser to be measured according to comparison result;
Wherein, the ability of playing up of this browser refers to the ability of resolving resource, be exactly specifically the ability of the correct display effect of label body existing network page in resolving resource, for example whether the label effect of the shade of font, solid, depression is consistent with expection, and do not relate to the test of resolution speed.
This step is before drawing the conclusion of the ability of playing up; if the test of certain webpage causes program crashing in playing up or automatically exits and wait extremely; record this webpage test for abnormal (rather than not passing through); extremely can as a result of be shown in final reporting the result here; that is to say that abnormal results can record; and at once it is not played up to ability, not concluding, is that this program problem or the problems such as stability of browser itself cause by tester's abnormal occurrence that further research is this time tested after being completed.Then autoboot, skips this abnormality test and carries out follow-up test.Correspondingly, can make browser for example, every certain number of times (30 times) autoboot.To reduce memory consumption, reduce to greatest extent the frequency that unusual condition occurs.According to above-mentioned steps 210 to step 240 pair all test items, carry out after test, if exist picture and the expection picture of testing webpage in a certain test item to compare unsuccessfully, judge that the test result of browser is not for passing through.If do not having test item to compare under this two failed condition, picture and the comparison of expection picture of in a certain test item, testing webpage are abnormal, judge that the test result of browser is for abnormal; If the picture of all test webpages and expection picture are all compared successfully, judge that the test result of browser is for passing through.
According to comparison result, obtain this browser to be measured play up ability time, the ability of playing up can with test result pass through represent with obstructed coming, also can represent with different brackets.With a plurality of test webpages, treat and survey after browser tests, according to comparison result be successfully or failed ratio the ability of playing up of browser to be measured is divided into excellent, good, in, differing from four grades is example, if all test webpages are successfully with the comparison result that corresponding expection picture is compared, by the tier definition of the ability of playing up of this browser, be excellent, if having the comparison result that 10% test webpage is compared with corresponding expection picture is unsuccessfully, by the tier definition of the ability of playing up of this browser, be good, if having the comparison result that 20% test webpage is compared with corresponding expection picture is unsuccessfully, in by the tier definition of the ability of playing up of this browser being, if had, to be greater than the comparison result that 20% test webpage compares with corresponding expection picture be unsuccessfully, by the tier definition of the ability of playing up of this browser, be poor.Certainly, except the grade of the ability of playing up of the ratio definition browser according to above, can also select other ratios, or select other grade classification modes, the present embodiment is all not specifically limited this.
So far, the process of test browser finishes, and alternatively, for the ease of test result is checked, the method that the present embodiment provides also comprises the process of follow-up demonstration detecting information, refers to the specific descriptions of subsequent step.
Step 260: according to comparison result generate and show detecting information, this detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
For this step, when generating according to comparison result and showing detecting information, the present embodiment is to showing that the concrete mode of detecting information does not limit, and for example, form that can list in practical application shows detecting information, take the display mode shown in Fig. 3 as example.In Fig. 3, the test name of demonstration is that browser symbian tests automatically, with different colours, shows test mode, for example, with green, represents extremely to be represented different conditions, and gone out in test result one field mark with Chinese character by, yellow expression by, red represent not.In addition, utilize the grid column of Fig. 3 to enumerate the quantity of testing webpage, carry out the quantity of test webpage, by the quantity of test and not by the quantity of test, if Test Network number of pages is 632, carrying out test quantity is 632, by test quantity, be 627, by test quantity, be not 5, can reflect test result details thus, in addition, Fig. 3 has also demonstrated tested program version, the version of the browser of testing, and the last test time, the specifying informations such as test owner, and the fineness of test and the terse degree of report summary have been taken into account by the above-mentioned information reporting shown in Fig. 3.
Further, for detecting information, the method that the present embodiment provides is also supported to check and executable operations, for example, while showing detecting information by Fig. 3, also provide and check and carry out option, by the execution option in Fig. 3, re-execute test process, by checking that option specifically checks each test result and corresponding detecting information, make test automatically and artificial expection need to organically combine, realize effective Feedback and the control of test process.For failed test result, the present embodiment also provides the step of the details that show test results, and concrete display mode can realize as follows.
Step 270: show failed test result details, these test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram;
Particularly, the detecting information showing for above-mentioned steps 260, only needs to show test results successfully or abnormal printed words for successful and abnormal test result, and failed test result can also obtain following extend information:
If test result failure, the details of checking test webpage are provided, comprise in Test Network page information this expection picture that subsidiary remarks show the URL address that prestores, test consuming time, and the picture grid coverage of expection picture and failed address test compare schematic diagram; That is to say, an approach that failure testing result listization is shown need to be provided, at this, make the underproof test webpage in test automatically by comparison schematic diagram visualize out, to provide the platform of artificial and intelligent behavior interaction simultaneously.When showing failed test result details, the present embodiment does not limit the content of concrete display mode and demonstration, take the display mode shown in Fig. 4 as example, and concrete displaying contents can comprise:
Check test details: in test run process, check in real time picture comparison process and code ruuning situation.
Download the picture of log(test webpage) information: download the log of test crash corresponding write code, make engineering test personnel be convenient to further from write code the test webpage that failure is traced in accurate location.
Download annex: annex comprises test crash log and QiURL address, if needed, test maintaining personnel download decompress(ion) after annex, can cover on local management software, next time, " comparison result is the picture of failed test webpage " directly covered as new expectation picture the expection picture prestoring just from employing.For example, certain " in " font size of word in test webpage, be shown as No. 4 words in No. 5 words and expection picture " in " contrast inconsistent, and need at present to be made into word No. 5, download comparison result and be the picture of failed test webpage and its address information after management software, can realize take " comparison result is the picture of failed test webpage " cover former expection picture and generate new expection picture, to have improved the efficiency of test, the further accuracy of test result and the dirigibility of change have been realized.
Check test item: by take the date, define test initial time and the end time as unit, and the information such as execution time of checking executed test item, be equivalent to the record of test, make to test whole train of thought clear, perfect in shape and function, has improved the automatization level of test.
Further, except showing above-mentioned information, on conclusion mutual, be not only by artificial record or computer system, to give a mark, but the comparison schematic diagram of failure testing item is intuitively shown separately, being convenient to engineering test personnel directly carries out targetedly replacement operation and revises operation, finding intuitively comparison result by comparison schematic diagram, it is failed test webpage, and need to not go in the code of whole webpage, be that test webpage has occurred that the interaction on problem , interface has realized the artificial and combination of test automatically on earth.
The method that the present embodiment provides, by test webpage being played up on browser to be measured, the picture of this test webpage after intercepting is played up, the picture of this test webpage of intercepting is compared with corresponding expection picture, according to comparison result, obtain the ability of playing up of this browser to be measured, greatly improve testing efficiency, and can evade tester's human error; In addition, by generating and showing detecting information, and show the schematic diagram of comparing of test webpage and expection picture, thereby show intuitively the picture of the test webpage that the ability of playing up is not passed through, realize accurate, careful, the ability of playing up of test browser automatically efficiently.
Embodiment tri-
Shown in Fig. 5, the present embodiment provides a kind of device of testing browser, and this device is for the method for the test browser carrying out above-described embodiment one and embodiment bis-and provide.The device of this test browser specifically comprises:
Rendering module 310, for playing up test webpage on browser to be measured;
Interception module 320, for the picture of the test webpage after intercepting rendering module 310 and playing up;
Comparing module 330, for comparing the picture of the test webpage of interception module 320 interceptings with corresponding expection picture;
Acquisition module 340, obtains the ability of playing up of browser to be measured for the comparison result obtaining according to comparing module 330.
Further, as Fig. 6, this device also comprises:
Memory module 300, for pre-stored expection picture, this expection picture is corresponding with the network address of test webpage, and this test webpage and corresponding expection picture are one to multiple right.
As Fig. 7, rendering module 310 specifically comprises:
Acquiring unit 311, for obtaining and expecting the network address of the test webpage that picture is corresponding;
Rendering unit 312 is played up test webpage for the network address of the test webpage that gets according to acquiring unit on browser to be measured.
Wherein, the mode of memory module 300 storage expection pictures refers to the associated description of step 210 in above-described embodiment two, repeats no more herein; The mode that rendering module 310 is played up test webpage refers to the associated description of step 220 in above-described embodiment two, repeats no more herein.
Further, the process in conjunction with step 240 contrastive test webpage in above-described embodiment two with expection picture, as Fig. 8, comparing module 320, specifically comprises:
Division unit 321, for being divided into the picture of this test webpage of intercepting and corresponding expection picture respectively the grid of formed objects and quantity;
Whether comparing unit 322 is identical for comparing between two pictures pattern and the color of each corresponding grid; If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully; If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
Further, referring to Fig. 9, this device also comprises:
Display module 350, for according to comparison result, generate and show detecting information, this detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
Further, display module 350, also for showing failed test result details, these test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
Wherein, display module 350 shows that the mode of detecting information refers to the associated description of step 260 in above-described embodiment two, display module 350 shows that the mode of failed test result details refers to the associated description of step 270 in above-described embodiment two, repeats no longer one by one herein.
The device that the present embodiment provides, by test webpage being played up on browser to be measured, the picture of this test webpage after intercepting is played up, the picture of this test webpage of intercepting is compared with corresponding expection picture, according to comparison result, obtain the ability of playing up of this browser to be measured, greatly improve testing efficiency, and can evade tester's human error; In addition, by the information of showing test results, and generate the schematic diagram of comparing of testing webpage and expection picture, to show intuitively the picture of the test webpage that the ability of playing up is not passed through by schematic diagram, realize the ability of playing up accurate, careful, that automatically test efficiently browser.
It should be noted that: the device of the test browser that above-described embodiment provides is when test browser, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure that is about to device is divided into different functional modules, to complete all or part of function described above.In addition, the embodiment of the method for the device of the test browser that above-described embodiment provides and test browser belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that the Overall Steps of realizing above-described embodiment can complete by computing machine and background server environment, also can all by background server environment, complete, simulator program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
These are only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a method of testing browser, is characterized in that, described method comprises:
On browser to be measured, test webpage is played up;
The picture of the described test webpage after intercepting is played up;
The picture of the described test webpage of intercepting is compared with corresponding expection picture;
According to comparison result, obtain the ability of playing up of described browser to be measured.
2. method according to claim 1, is characterized in that, described before on browser to be measured, to test, webpage plays up, and also comprises:
Pre-stored described expection picture, described expection picture is corresponding with the network address of described test webpage, and described test webpage and corresponding expection picture are one to multiple right;
Described on browser to be measured to test webpage play up, specifically comprise:
Obtain the network address of the described test webpage corresponding with described expection picture, according to the network address of described test webpage, on browser to be measured, play up described test webpage.
3. method according to claim 1, is characterized in that, the described picture by the described test webpage of intercepting is compared with corresponding expection picture, specifically comprises:
The picture of the described test webpage of intercepting and corresponding expection picture are divided into respectively to the grid of formed objects and quantity;
Whether pattern and the color of comparing each grid corresponding between two pictures be identical;
If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully;
If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
4. method according to claim 1, is characterized in that, the described picture by the described test webpage of intercepting also comprises after comparing with corresponding expection picture:
According to comparison result generate and show detecting information, described detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
5. method according to claim 4, is characterized in that, after described demonstration detecting information, also comprises:
Show failed test result details, described test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
6. a device of testing browser, is characterized in that, described device comprises:
Rendering module, for playing up test webpage on browser to be measured;
Interception module, for the picture of the test webpage after intercepting described rendering module and playing up;
Comparing module, for comparing the picture of the described test webpage of described interception module intercepting with corresponding expection picture;
Acquisition module, obtains the ability of playing up of described browser to be measured for the comparison result obtaining according to described comparing module.
7. device according to claim 6, is characterized in that, described device also comprises:
Memory module, for pre-stored described expection picture, described expection picture is corresponding with the network address of described test webpage, and described test webpage and corresponding expection picture are one to multiple right;
Described rendering module, specifically comprises:
Acquiring unit, for obtaining the network address of the described test webpage corresponding with described expection picture;
Rendering unit is played up described test webpage for the network address of the test webpage that gets according to described acquiring unit on browser to be measured.
8. device according to claim 6, is characterized in that, described comparing module specifically comprises:
Division unit, for being divided into the picture of the described test webpage of intercepting and corresponding expection picture respectively the grid of formed objects and quantity;
Whether comparing unit is identical for comparing between two pictures pattern and the color of each corresponding grid; If pattern and the color of each corresponding grid are all identical between two pictures, comparison result is successfully; If exist the pattern of at least one corresponding grid or color different between two pictures, comparison result is unsuccessfully.
9. device according to claim 6, is characterized in that, described device also comprises:
Display module, for according to comparison result, generate and show detecting information, described detecting information comprise test name, test result, test webpage quantity, successfully test the quantity of webpage, the quantity of failed test webpage, at least one in the test duration.
10. device according to claim 9, it is characterized in that, described display module, also for showing failed test result details, described test result details comprise test webpage information, test consuming time, expection picture with test webpage picture compare at least one information in schematic diagram.
CN201210213735.3A 2012-06-26 2012-06-26 Method and device for testing browser Pending CN103514090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210213735.3A CN103514090A (en) 2012-06-26 2012-06-26 Method and device for testing browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210213735.3A CN103514090A (en) 2012-06-26 2012-06-26 Method and device for testing browser

Publications (1)

Publication Number Publication Date
CN103514090A true CN103514090A (en) 2014-01-15

Family

ID=49896848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210213735.3A Pending CN103514090A (en) 2012-06-26 2012-06-26 Method and device for testing browser

Country Status (1)

Country Link
CN (1) CN103514090A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156461A (en) * 2014-08-20 2014-11-19 深圳市共进电子股份有限公司 Method and device for testing pressure of gateway products
CN105550112A (en) * 2015-12-17 2016-05-04 北京海泰方圆科技股份有限公司 Browser rendering capability test method
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN106598846A (en) * 2016-11-29 2017-04-26 上海亿账通互联网科技有限公司 Application interface test method and apparatus
CN107315682A (en) * 2017-06-22 2017-11-03 北京凤凰理理它信息技术有限公司 Test browser-safe method, device, storage medium and electronic equipment
CN107391714A (en) * 2017-07-27 2017-11-24 北京锐安科技有限公司 A kind of screenshot method, capture server, sectional drawing service system and medium
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN108121647A (en) * 2016-11-26 2018-06-05 上海亿账通互联网科技有限公司 The browser compatibility test method and device of the HTML5 pages
CN108255726A (en) * 2018-01-18 2018-07-06 北京网信云服信息科技有限公司 A kind of application program page adaptation test method and device
CN108595304A (en) * 2018-04-19 2018-09-28 腾讯科技(深圳)有限公司 Web monitor method and device
CN109471805A (en) * 2018-11-14 2019-03-15 网易(杭州)网络有限公司 Resource testing method and device, storage medium, electronic equipment
CN109697164A (en) * 2018-12-17 2019-04-30 北京城市网邻信息技术有限公司 Test method, device, storage medium and the terminal of App have been adjusted in browser
CN110018920A (en) * 2018-12-25 2019-07-16 阿里巴巴集团控股有限公司 A kind of detection method, device and the equipment of page presentation exception
CN111626021A (en) * 2020-04-20 2020-09-04 腾讯科技(深圳)有限公司 Presentation generation method and device
CN112306793A (en) * 2020-04-07 2021-02-02 北京沃东天骏信息技术有限公司 Method and device for monitoring webpage

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071438A (en) * 2007-03-26 2007-11-14 腾讯科技(深圳)有限公司 Capture server, distribution server, method and system for generating webpage capture
CN101964062A (en) * 2010-09-14 2011-02-02 北京神州泰岳软件股份有限公司 Image searching method based on user interface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071438A (en) * 2007-03-26 2007-11-14 腾讯科技(深圳)有限公司 Capture server, distribution server, method and system for generating webpage capture
CN101964062A (en) * 2010-09-14 2011-02-02 北京神州泰岳软件股份有限公司 Image searching method based on user interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
百度技术: "多浏览器测试对比工具", 《51CT0博客》 *
萧萧: "浏览器文本渲染测试:IE9轻松夺冠", 《驱动之家》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156461B (en) * 2014-08-20 2017-12-19 深圳市共进电子股份有限公司 A kind of gateway product method for testing pressure and device
CN104156461A (en) * 2014-08-20 2014-11-19 深圳市共进电子股份有限公司 Method and device for testing pressure of gateway products
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN105550112A (en) * 2015-12-17 2016-05-04 北京海泰方圆科技股份有限公司 Browser rendering capability test method
CN108121647A (en) * 2016-11-26 2018-06-05 上海亿账通互联网科技有限公司 The browser compatibility test method and device of the HTML5 pages
CN106598846A (en) * 2016-11-29 2017-04-26 上海亿账通互联网科技有限公司 Application interface test method and apparatus
CN106598846B (en) * 2016-11-29 2018-03-16 上海壹账通金融科技有限公司 Application interface method of testing and device
CN107315682A (en) * 2017-06-22 2017-11-03 北京凤凰理理它信息技术有限公司 Test browser-safe method, device, storage medium and electronic equipment
WO2019019358A1 (en) * 2017-07-26 2019-01-31 上海壹账通金融科技有限公司 Page compatibility detection method and apparatus, server, and storage medium
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN107391714A (en) * 2017-07-27 2017-11-24 北京锐安科技有限公司 A kind of screenshot method, capture server, sectional drawing service system and medium
CN108255726A (en) * 2018-01-18 2018-07-06 北京网信云服信息科技有限公司 A kind of application program page adaptation test method and device
CN108595304A (en) * 2018-04-19 2018-09-28 腾讯科技(深圳)有限公司 Web monitor method and device
CN109471805A (en) * 2018-11-14 2019-03-15 网易(杭州)网络有限公司 Resource testing method and device, storage medium, electronic equipment
CN109471805B (en) * 2018-11-14 2022-09-30 网易(杭州)网络有限公司 Resource testing method and device, storage medium and electronic equipment
CN109697164A (en) * 2018-12-17 2019-04-30 北京城市网邻信息技术有限公司 Test method, device, storage medium and the terminal of App have been adjusted in browser
CN110018920A (en) * 2018-12-25 2019-07-16 阿里巴巴集团控股有限公司 A kind of detection method, device and the equipment of page presentation exception
CN112306793A (en) * 2020-04-07 2021-02-02 北京沃东天骏信息技术有限公司 Method and device for monitoring webpage
CN111626021A (en) * 2020-04-20 2020-09-04 腾讯科技(深圳)有限公司 Presentation generation method and device
CN111626021B (en) * 2020-04-20 2022-08-12 腾讯科技(深圳)有限公司 Presentation generation method and device

Similar Documents

Publication Publication Date Title
CN103514090A (en) Method and device for testing browser
CN105787364B (en) Automatic testing method, device and system for tasks
CN107678937A (en) Page compatibility detection method, device, server and medium
CN107783899A (en) The method of testing of the H5 pages, device and computer equipment in application program
CN109901968A (en) A kind of automation page data method of calibration and device
CN105912473A (en) BDD-based mobile APP automatic testing platform and testing method
CN108459850B (en) Method, device and system for generating test script
CN107451112B (en) Form tool data checking method, device, terminal equipment and storage medium
CN105573902A (en) Application testing method and system
US10823782B2 (en) Ensuring completeness of interface signal checking in functional verification
CN101777023B (en) Method and device for generating test cases
CN113535567B (en) Software testing method, device, equipment and medium
CN111966580A (en) Automatic testing method, device, equipment and storage medium based on artificial intelligence
Ran et al. Automated visual testing for mobile apps in an industrial seting
CN108111369A (en) The test method and device of a kind of webpage performance of mobile terminal
CN110554956B (en) BDMS automatic test method
CN105632270A (en) Data processing method and data processing device based on exam
CN107145689A (en) A kind of method that words direction is checked in PCB design
US9501390B1 (en) Enhancing automated mobile application testing
CN102981956A (en) Method, and device for establishing overlay symbol table, method and device and program modulation system for establishing and searching overlay symbol table, and program modulation system
CN107239405B (en) Automatic testing method based on Android multi-browser kernel
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN104572454A (en) Method and device for positioning resource
US20230055523A1 (en) Method, apparatus, and storage medium for generating test cases
CN105653445A (en) Implementation method capable of meeting DO-178C test result

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140115

RJ01 Rejection of invention patent application after publication