CN109947637A - Webpage compatibility automated test method, device, equipment and medium - Google Patents
Webpage compatibility automated test method, device, equipment and medium Download PDFInfo
- Publication number
- CN109947637A CN109947637A CN201711395005.9A CN201711395005A CN109947637A CN 109947637 A CN109947637 A CN 109947637A CN 201711395005 A CN201711395005 A CN 201711395005A CN 109947637 A CN109947637 A CN 109947637A
- Authority
- CN
- China
- Prior art keywords
- test
- webpage
- module
- compatibility
- test cell
- 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.)
- Granted
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to webpage compatibility automated test method, device, equipment and media.The compatibility automated test of webpage includes: configuration step, the test configurations information of configuration test webpage compatibility;Webpage disassembles step, and the web page element for testing webpage is treated based on the test configurations information and Web page module level is disassembled to constitute multiple test cells;Rendering step renders each test cell based on the browser of test configurations information setting, and rendering result screenshot is saved;Compatibility determination step is automatically judged the compatibility of the test cell based on screenshot described in multiple, and recorded for the incompatible test cell generation error;And location of mistake step, the code for being judged as the incompatible test cell is obtained based on the error logging, includes the test result report of test result and error code to user's output.
Description
Technical field
The present invention relates to the automatization testing technique field of the front end of software application system exploitation more particularly to a kind of webpages
Compatibility automated test method, device, equipment and medium
Background technique
Current application system is based on B/S (browser/server, browsing/server) framework.User passes through browsing
The upper information of device browser server, browser download from a server html (Hypertext Markup Language, it is super literary
This markup language), script, flash (animation), the information such as picture, and according to certain standard to the code on server in user
It is parsed and is rendered on browser, to be assembled into for the interface of user's browsing.
The browser type being mounted in operating system of user has many selections, and user can voluntarily select installation browser
Product and version.Current main 4 kinds of main browser kernel, mainly are as follows: Trident kernel representative products Internet
Explorer, and it is called IE kernel, Trident (also known as MSHTML) is a kind of typesetting engine of Microsoft's exploitation;Gecko
The webpage layout engine that kernel representative works Mozilla FirefoxGecko is a set of open source code, is write with C++;
WebKit kernel representative works Safari, Chromewebkit are an open source projects, its feature be source code it is clear in structure,
Rendering speed is exceedingly fast, the disadvantage is that the compatibility to web page code is not high, causes some to write non-type webpage and can not normally show
Show;Presto kernel representative works OperaPresto is the browser typesetting engine developed by Opera Software, is supplied
Opera 7.0 and used above, the Elektra typesetting engine that it is used instead of 4 to 6 version of old edition Opera, including be added
Dynamic function, such as webpage or part thereof can with DOM (Document Object Model, DOM Document Object Model) and
The event of Script (script) grammer and typesetting again.
There is only a variety of browsers, even the same product, also have multiple versions, and difference is also very between version
Greatly.Such as the current most commonly used IE browser of user, primary version is just from IE6 to IE11, totally 6 versions, especially IE8 edition
After this, great change is carried out to the rendering program of browser, has supported W3C standard, and IE8 or less version is not support
W3C standard.Therefore an application system may show imperfect, cloth on the product of different navigator product or different editions
Office is unreasonable, and function is not available.
In conclusion to solve the compatibility issue of web browser, guarantee user on various browsers, various versions
Can normal use application service, in addition to the familiarity that the developer of dependence renders each browser, needing will be in webpage
It is tested comprehensively in various browsers, various versions, this is undoubtedly the work of an extremely complex time-consuming.
Summary of the invention
The embodiment of the invention provides webpage compatibility automated test method, device, equipment and media.Can efficiently,
The automatic test for carrying out webpage compatibility in high quality, improves testing efficiency.
In a first aspect, method includes: configuration the embodiment of the invention provides a kind of webpage compatibility automated test method
Step, the test configurations information of configuration test webpage compatibility;Webpage disassembles step, based on the test configurations information to be measured
The web page element and Web page module level for trying webpage are disassembled to constitute multiple test cells;Rendering step, based on described
The browser of test configurations information setting renders each test cell, and rendering result screenshot is saved;It is simultaneous
Capacitive judgment step automatically judges the compatibility of the test cell based on screenshot described in multiple, and for incompatible
The test cell generation error record;And location of mistake step, it is judged as incompatible based on error logging acquisition
The code of the test cell includes the test result report of test result and error code to user's output.
Second aspect, the embodiment of the invention provides a kind of compatibility automated test device of webpage, device includes: configuration
Module, the test configurations information of configuration test webpage compatibility;Webpage disassembles module, based on the test configurations information to be measured
The web page element and Web page module level for trying webpage are disassembled to constitute multiple test cells;Rendering module, based on described
The browser of test configurations information setting renders each test cell, and rendering result screenshot is saved;It is simultaneous
Capacitive judgment module automatically judges the compatibility of the test cell based on screenshot described in multiple, and for incompatible
The test cell generation error record;And location of mistake module, it is judged as incompatible based on error logging acquisition
The code of the test cell includes the test result report of test result and error code to user's output.
The embodiment of the invention provides a kind of compatibility automated test equipments of webpage, comprising: at least one processor, extremely
A few memory and computer program instructions stored in memory, when computer program instructions are executed by processor
Realize the method such as first aspect in above embodiment.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey
The method such as first aspect in above embodiment is realized in sequence instruction when computer program instructions are executed by processor.
It is simultaneous to improve webpage for webpage compatibility automated test method, device, equipment and medium provided in an embodiment of the present invention
The efficiency of the test of capacitive and modified efficiency.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention
Attached drawing is briefly described, for those of ordinary skill in the art, without creative efforts, also
Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 shows the flow chart of the webpage compatibility automated test method of the embodiment of the present invention;
Fig. 2 shows the block diagrams of the compatibility automated test device of the webpage of the embodiment of the present invention;
Fig. 3 shows the work flow diagram of an example of the compatibility automated test device of webpage of the embodiment of the present invention;
Fig. 4 is to show the hardware structural diagram of the compatible automated test device of webpage provided in an embodiment of the present invention.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention
, technical solution and advantage be more clearly understood, with reference to the accompanying drawings and embodiments, the present invention is further retouched in detail
It states.It should be understood that specific embodiment described herein is only configured to explain the present invention, it is not configured as limiting the present invention.
To those skilled in the art, the present invention can be real in the case where not needing some details in these details
It applies.Below the description of embodiment is used for the purpose of better understanding the present invention to provide by showing example of the invention.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including
There is also other identical elements in the process, method, article or equipment of the element.
It was found by the inventors of the present invention that, since the compatibility of webpage is complex, generally going out in webpage compatibility test
The reason of existing compatibility issue mainly includes the following: each browser is inconsistent to the design language explanation of webpage, causes to show
It is inconsistent to reveal the display interface come;Developer does not account for the difference between each browser, it is also possible to be due to opening
Hair personnel experience is insufficient, does not carry out distinctiveness processing for the specific properties of every kind of browser;Page grammer is wrong.It is some
The tolerance of browser is preferable, can neglect these mistakes, and the tolerance of some browsers is bad, cannot preferably handle mistake
Accidentally cause using abnormal.
There are two types of the main test methods for carrying out compatibility test at present.
A kind of test mode is manual testing.For some middle-size and small-size application systems, the main method for using manual testing.
Manually open simultaneously identical webpage in more browsers, the difference that the observation comparison page is shown, such as be laid out whether entanglement, generation
Whether code is wrong etc..Another test mode is image comparison techniques, same web page is opened on multiple browsers, to entire
Webpage carries out screenshot, then passes through image comparison techniques, the difference of more each image, thus the difference of rough calculating image
Probability, then obtain compatibility result.
But present inventor has further discovered that: when using the test mode of manual testing, need browser to be tested
On one by one open test webpage, by manually comparing the compatibility implementations of each webpage, heavy workload, low efficiency.If simultaneously
There is incompatible problem, can not also judge which module specific compatibility issue goes out in, which level can only be by developer
Modification is checked one by one, corrects low efficiency.And when using the test mode of image comparison techniques, entire webpage can only be cut
It takes, the figure of the entire webpage after interception is compared with benchmark image.Element, module, level on general webpage compare
It is more, the figure of entire webpage is compared, accuracy rate is not high, it is easy to appear wrong report, while when compatibility goes wrong,
Also it can not know which specific module goes wrong, it can not orientation problem.
The present inventor to solve the above-mentioned problems, makes up drawbacks described above, proposes that a kind of webpage is compatibility automated
The method and apparatus of test, device independent operating as an independent software or module, it is only necessary to which input needs to test
Web page address, it can in each element of webpage, each built-in row, webpage div (divisions), combination div, integrally into
Row test, is positioned simultaneously for the specific location for compatibility issue occur, larger can improve test and positioning problems
Efficiency and accuracy.
In the following, the compatible automated testing method of webpage for coming that the present invention will be described in detail in conjunction with Fig. 1 embodiment being related to.Fig. 1 shows
The flow chart of the webpage compatibility automated test method of the embodiment of the present invention is gone out.Webpage compatibility automated test method packet
S1 containing configuration step, webpage dismantling step S2, rendering step S3, compatibility determination step S4 and location of mistake step S5.?
When being received externally need webpage network address to be tested, start each step for executing webpage compatibility automated test method.
Each step is described in detail below.
Step S1, configuration step, the test configurations information of configuration test webpage compatibility.
Test configurations information also can indicate that needs carry out compatibility test in which browser, which version.
In addition, test configurations information also can indicate that benchmark browser and version, to be used for base when follow-up test
Standard is compared.
In addition, test configurations information also can indicate that the configuration whether compared for web page element, such as whether in webpage
Picture tested, whether font size tested, whether font type being tested, whether to background color into
The efficiency of row test etc., different configurations, test is different.Here, web page element refers to the basic element of composition web page contents, example
Such as text, picture, table, flash, button.
Test configurations information also can indicate that the fault-tolerant threshold value of compatibility test, as Web page module or level displacement are being more than
How many whens report an error, element reports an error in which error levels, can make webpage when carrying out webpage compatibility test in this way
Compatibility can receive in certain error range.
Here, Web page module and level are, for example, div (block grade element), span (inline element), body (content element),
Module or level can be regarded as a kind of container, for placing web page element in container, and control the layout of the Container elements, show
Show effect etc..If container text is shown between two parties, picture size etc..Module or level can be embedded and be combined, as can be in module
Nested WFTA module or level, a module can also be composed of multiple modules or level.
Step S2: webpage disassembles step, and the web page element and net of test webpage are treated based on the test configurations information
Page module layer grade is disassembled to constitute multiple test cells.
The test configurations information being arranged in step sl is obtained first, and test configurations information indicates carries out for which part
Compatibility test forms each test cell for needing the part for carrying out compatibility test to be disassembled.
Webpage dismantling step includes element dismantling step and Web page module level dismantling step.
Element disassembles step test content according to indicated by test configurations information to web page element in need of test
It is disassembled, is disassembled into independent element.Each element constitutes a test cell.
In addition, being disassembled in Web page module level dismantling step to Web page module and level.
Optionally, it when using inline mode in the Web page module level, is passed in webpage dismantling step
Return dismantling, the recurrence disassembles mode are as follows: the module dismantling of innermost layer is formed into test cell, and successively extends to the outside superposition
Module, superposition forms a test cell each time.Such as in a module or level embedded module or level, (outside from upper layer
Module) it is represented sequentially as to lower layer's (internal module): 3 layers, 2 layers, 1 layer, then the test cell formed after disassembling and be superimposed is respectively 1
Layer, 1+2 layers, 1+2+3 layers.
Further optionally, it when Web page module uses combination, is torn open in parallel in webpage dismantling step
Solution, the parallel dismantling are as follows: combined module is disassembled respectively and is independent test cell, and successively extends to the outside and carrys out superposition mould
Block, superposition forms a test cell each time.Such as there are two parallel module (1 layer, 1 layer) groups under a module (2 layers)
It closes, is 2 layers, 1 layer, 1 layer, then the test cell formed after disassembling and be superimposed is 1 layer, 1 layer, 1+1+2 layers.
Further optionally, the page description language of the additional former webpage of the test cell come out for above-mentioned dismantling come
Fully functional sub-pages are formed to be tested.Such as the test cell come out for dismantling increases the css of former webpage
A kind of description of the webpages such as (Cascading Style Sheets, cascading style sheets), javascript (literal translation formula scripting language)
Language forms an independent fully functional sub-pages, that is, a complete test cell.
Step S3: rendering step, based on the browser of test configurations information setting come to each test cell
It is rendered, and rendering result screenshot is saved.
When carrying out webpage test, need to be tested in multiple browsers.According to test configurations information, determines and carry out
The browser of test and version etc. render test cell in multiple browsers specified by test configurations information.
In the test browser of the needs of each configuration, each test cell is rendered, and rendering result is cut
Scheme and saves.
In addition, test configurations information instruction benchmark browser and version, are rendered based on the browser and version, as
The benchmark compared.
Step S4: compatibility determination step automatically judges the compatibility of the test cell based on screenshot described in multiple
Property, and recorded for the incompatible test cell generation error.
In compatibility determination step, the same test unit that can will be generated in each browser using figure comparing method
Screenshot and benchmark browser in the screenshot that generates be compared to judgement compatibility.
Optionally, compatibility determination step includes figure displacement comparison step and element comparison step.
In figure displacement comparison step, the screenshot for the test cell that Web page module or level are constituted in benchmark
The screenshot generated in browser is compared, and the displacement errors indicated based on comparison result and test configurations information allow threshold
Value, come judge image in screenshot relative displacement whether mistake.Here, benchmark browser is preparatory by test configurations information
It is specified.Such as indicate that module displacement allows in 10px pixel in test configurations information, in this case just for small deviation
It is not counted in the error listing of test report.When module displacement is greater than 10px pixel, error logging is formed.
By being displaced figure comparison step, can judgment module or level with the presence or absence of layout is abnormal or the feelings of dislocation
Condition.Due to indicating that the displacement errors of compatibility test allow threshold value in test configurations information, in the feelings for being judged as mistake
Under condition, test result is recorded in error logging.
In element comparison step, the screenshot to the test cell of web page element composition and the life in being based on benchmark browser
At screenshot be compared, based on comparison result and test configurations information instruction displacement errors allow threshold value, to judge net
Whether page element is normally displayed.
In element comparison step, based on the test content in test configurations information to the rendering result of each test cell
The image generated with benchmark browser is compared, such as the size of more each element, word content, background color, picture
Content etc., thus to judge whether element normally shows.
Step S5: location of mistake step obtains the code for being judged as the incompatible test cell based on error logging,
It include the test result report of test result and error code to user's output.
In location of mistake step, according to the error logging of test, the original code for forming the test cell is found simultaneously
Label.Finally, forming test result report according to the error code of test result and mark, user is provided.
Webpage compatibility automated test method according to an embodiment of the present invention, is fully automated webpage compatibility
Test, improves the efficiency of test.Furthermore it is possible to comprehensively be tested by multiple dimensions such as element, module, level, entirety.It is right
In compatibility issue, can accurately navigate to is which element, which module or which level, for developer's modification point
Analysis improves amendment efficiency.
Fig. 2 shows the block diagrams of the compatibility automated test device of the webpage of the embodiment of the present invention, and the webpage compatibility is certainly
Dynamicization test device executes above-mentioned webpage compatibility automated test method.The webpage that Fig. 3 shows the embodiment of the present invention is simultaneous
The work flow diagram of an example of capacitive automatic test device.It is described in detail below with reference to Fig. 2 and Fig. 3.
The compatible automatic test device 1 of webpage includes configuration module 10, webpage dismantling module 11, rendering module 12, compatibility
Property judgment module 13 and location of mistake module 14.
The web page address for needing to test automatically is inputted to the compatible automatic test device 1 of webpage first.Configuration module 10 is matched
The test configurations information of test webpage compatibility, the test configurations information such as front are set in the compatible automated testing method of webpage
Like that, which is not described herein again for description.
Webpage disassembles the read test configuration information from configuration module 10 of module 11, is treated based on the test configurations information
The web page element and Web page module level for testing webpage are disassembled to constitute multiple test cells.The instruction of test configurations information
Compatibility test is carried out to which part and forms each test for needing the part for carrying out compatibility test to be disassembled
Unit.
Webpage disassembles module 11 and disassembles module including element dismantling module and Web page module level, and will be each after dismantling
A test cell submits to rendering module.
Element disassembles module test content according to indicated by test configurations information to web page element in need of test
It is disassembled, is disassembled into independent element.Each element constitutes a test cell.
In addition, Web page module level dismantling module disassembles the module and level of webpage.
Optionally, when the Web page module level uses inline mode, in the Web page module of webpage dismantling module
Level is disassembled and carries out recurrence dismantling in module, and the recurrence disassembles mode are as follows: it is single that the module dismantling of innermost layer is formed test
Member, and laminating module is successively extended to the outside, superposition forms a test cell each time.Such as a module or level embed mould
Block or level are represented sequentially as from upper layer (outer mold piece) to lower layer's (internal module): 3 layers, 2 layers, 1 layer, then shape after disassembling and being superimposed
At test cell be respectively 1 layer, 1+2 layers, 1+2+3 layers.
Further optionally, when Web page module uses combination, in the Web page module level of webpage dismantling module
It is disassembled in parallel in dismantling module, the parallel dismantling are as follows: combined module is disassembled respectively and is independent test cell, and
It successively extends to the outside and carrys out laminating module, superposition forms a test cell each time.Such as there are two flat under a module (2 layers)
Capable module (1 layer, 1 layer) is composed, and is 2 layers, 1 layer, 1 layer, then the test cell formed after disassembling and be superimposed is 1 layer, 1
Layer, 1+1+2 layers.
Further optionally, the page of the additional former webpage of the test cell that webpage dismantling module comes out for above-mentioned dismantling
Face description language is tested to form fully functional sub-pages.Such as the test cell come out for dismantling increases original
Css (Cascading Style Sheets, cascading style sheets), javascript (a kind of literal translation formula scripting language) of webpage etc.
Page description language forms an independent fully functional sub-pages, that is, a complete test cell.
Rendering module 12 carries out wash with watercolours to each test cell based on the browser that the test configurations information is arranged
Dye, and rendering result screenshot is saved.
When carrying out webpage test, need to be tested in multiple browsers.In the compatible automatic test device 1 of webpage
In multiple browsers are installed, rendering module 12 obtains test configurations information from configuration module 10, determines the browsing tested
Device and version etc. render test cell in multiple browsers specified by test configurations information.Match at each
In the test browser for the needs set, each test cell is rendered, and screenshot is carried out to rendering result and is saved.
In addition, test configurations information instruction benchmark browser and version, are rendered based on the browser and version, as
The benchmark compared below.
Compatibility determination module 13 automatically judges the compatibility of each test cell, and needle based on screenshot described in multiple
Incompatible test cell generation error is recorded.
Compatibility determination module can be using figure comparing method cutting the same test unit generated in each browser
The screenshot generated in figure and benchmark browser is compared to judgement compatibility.
Optionally, compatibility determination module includes figure displacement comparison module and element comparison module.
Figure displacement comparison module in, the screenshot for the test cell that Web page module level is constituted with it is clear in benchmark
The screenshot generated of looking in device is compared, the displacement errors of result and test configurations information instruction based on the comparison
Allow threshold value, come judge image in screenshot relative displacement whether mistake.Here, benchmark browser is believed by the test configurations
It ceases and is previously designated.Figure is displaced comparison module from 10 read test configuration information of configuration module.Such as test configurations information
Middle instruction module displacement allows in 10px pixel, and the mistake for being just not counted in test report for small deviation in this case arranges
In table.When module displacement is greater than 10px pixel, the error code of error logging and positioning is formed, and to location of mistake module 16
It is exported.
By being displaced figure comparison module, can judgment module or level with the presence or absence of layout is abnormal or the feelings of dislocation
Condition.Due to indicating that the displacement errors of compatibility test allow threshold value in test configurations information, in the feelings for being judged as mistake
Under condition, error logging is recorded in test result, and be sent to location of mistake module 14.
In element comparison module, to the web page element constitute test cell screenshot be based on benchmark browser
The screenshot of middle generation is compared, and allows threshold value to judge based on the displacement errors that comparison result is indicated with test configurations information
Whether the web page element is normally displayed.
Element comparison module compares configuration information from the element in 10 read test configuration information of configuration module, based on test
Test content in configuration information is compared the rendering result of each test cell with the image that benchmark browser generates, example
The size of such as more each element, word content, background color, image content, thus to judge whether element normally shows.
Element error based on comparison result and the instruction of test configurations information allows threshold value, to judge the web page element
Whether it is normally displayed.Be judged as be not normally displayed in the case where, be recorded in error logging, and be sent to location of mistake
Module 14.
Location of mistake module 14 obtains the code for being judged as the incompatible test cell based on the error logging, to
User's output includes the test result report of test result and error code.
In location of mistake module, according to the error logging of test, the original code for forming the test cell is found simultaneously
Label.Finally, forming test report according to the error code of test result and mark, and provide user.
The compatibility automated test device of webpage according to an embodiment of the present invention, is fully automated webpage compatibility
Test, improves the efficiency of test.Furthermore it is possible to comprehensively be tested by multiple dimensions such as element, module, level, entirety.It is right
In compatibility issue, can accurately navigate to is which element, which module or which level, for developer's modification point
Analysis improves amendment efficiency.
In addition, the compatible automated testing method of webpage in conjunction with Fig. 1 embodiment of the present invention described can be compatible with by webpage
Automated test device is realized.Fig. 4 shows the hardware of the compatible automated test device of webpage provided in an embodiment of the present invention
Structural schematic diagram.
The compatible automated test device of webpage may include processor 401 and the storage for being stored with computer program instructions
Device 402.
Specifically, above-mentioned processor 401 may include central processing unit (CPU) or specific integrated circuit
(Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention
One or more integrated circuits of example.
Memory 402 may include the mass storage for data or instruction.For example it rather than limits, memory
402 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or logical
With the combination of universal serial bus (Universal Serial Bus, USB) driver or two or more the above.It is closing
In the case where suitable, memory 402 may include the medium of removable or non-removable (or fixed).In a suitable case, it stores
Device 402 can be inside or outside data processing equipment.In a particular embodiment, memory 402 is nonvolatile solid state storage
Device.In a particular embodiment, memory 402 includes read-only memory (ROM).In a suitable case, which can be mask
ROM, programming ROM (PROM), erasable PROM (EPROM), the electric erasable PROM (EEPROM), electrically-alterable ROM of programming
(EAROM) or the combination of flash memory or two or more the above.
Processor 401 is by reading and executing the computer program instructions stored in memory 402, to realize above-mentioned implementation
The compatible automated testing method of any one webpage in example.
In one example, the compatible automated test device of webpage may also include communication interface 403 and bus 410.Wherein,
As shown in figure 4, processor 401, memory 402, communication interface 403 connect by bus 410 and complete mutual communication.
Communication interface 403 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment
Communication.
Bus 410 includes hardware, software or both, and the component of the compatible automated test device of webpage is coupled to each other one
It rises.For example it rather than limits, bus may include accelerated graphics port (AGP) or other graphics bus, enhancing industrial standard frame
Structure (EISA) bus, front side bus (FSB), super transmission (HT) interconnection, Industry Standard Architecture (ISA) bus, infinite bandwidth interconnection,
Low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-
Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association part (VLB) bus or
The combination of other suitable buses or two or more the above.In a suitable case, bus 410 may include one
Or multiple buses.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention considers any suitable bus
Or interconnection.
In addition, in conjunction with the compatible automated testing method of webpage in above-described embodiment, the embodiment of the present invention can provide one kind
Computer readable storage medium is realized.Computer program instructions are stored on the computer readable storage medium;The computer
Any one webpage compatible automated testing method in above-described embodiment is realized when program instruction is executed by processor.
It should be clear that the invention is not limited to specific configuration described above and shown in figure and processing.
For brevity, it is omitted here the detailed description to known method.In the above-described embodiments, several tools have been described and illustrated
The step of body, is as example.But method process of the invention is not limited to described and illustrated specific steps, this field
Technical staff can be variously modified, modification and addition after understanding spirit of the invention, or suitable between changing the step
Sequence.
Functional block shown in structures described above block diagram can be implemented as hardware, software, firmware or their group
It closes.When realizing in hardware, it may, for example, be electronic circuit, specific integrated circuit (ASIC), firmware appropriate, insert
Part, function card etc..When being realized with software mode, element of the invention is used to execute program or the generation of required task
Code section.Perhaps code segment can store in machine readable media program or the data-signal by carrying in carrier wave is passing
Defeated medium or communication links are sent." machine readable media " may include any medium for capableing of storage or transmission information.
The example of machine readable media includes electronic circuit, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), soft
Disk, CD-ROM, CD, hard disk, fiber medium, radio frequency (RF) link, etc..Code segment can be via such as internet, inline
The computer network of net etc. is downloaded.
It should also be noted that, the exemplary embodiment referred in the present invention, is retouched based on a series of step or device
State certain methods or system.But the present invention is not limited to the sequence of above-mentioned steps, that is to say, that can be according in embodiment
The sequence referred to executes step, may also be distinct from that the sequence in embodiment or several steps are performed simultaneously.
The above description is merely a specific embodiment, it is apparent to those skilled in the art that,
For convenience of description and succinctly, the 5 body running process of tool of the system, module of foregoing description and unit can refer to aforementioned side
Corresponding process in method embodiment, details are not described herein.It should be understood that scope of protection of the present invention is not limited thereto, it is any ripe
It knows those skilled in the art in the technical scope disclosed by the present invention, various equivalent modifications can be readily occurred in or replaces
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.
Claims (12)
1. a kind of method of the compatibility automated test of webpage, which is characterized in that the described method includes:
Configuration step, the test configurations information of configuration test webpage compatibility;
Webpage disassemble step, based on the test configurations information treat test webpage web page element and Web page module level into
Row dismantling is to constitute multiple test cells;
Rendering step renders each test cell based on the browser of test configurations information setting, and
Rendering result screenshot is saved;
Compatibility determination step automatically judges the compatibility of the test cell based on screenshot described in multiple, and for not
Compatible test cell generation error record;And
Location of mistake step obtains the code for being judged as the incompatible test cell based on the error logging, to user
Output includes the test result report of test result and error code.
2. the method according to claim 1, wherein
The compatibility determination step includes:
Figure is displaced comparison step, by the screenshot of the test cell of Web page module level composition and in benchmark browser
The screenshot of middle generation is compared, and the displacement errors of result and test configurations information instruction based on the comparison allow
Threshold value, come judge image in screenshot relative displacement whether mistake, the benchmark browser passes through the test configurations information
It is previously designated;
Element comparison step, the screenshot to the test cell of web page element composition and the life in the benchmark browser
At screenshot be compared, the element error of result based on the comparison and test configurations information instruction allows threshold value
Judge whether the web page element is normally displayed.
3. method according to claim 1 or 2, which is characterized in that further include:
When the Web page module level uses inline mode, recurrence dismantling is carried out in webpage dismantling step, it is described to pass
Return dismantling are as follows: disassemble out by the module of innermost layer and form test cell, and successively extend to the outside laminating module, be superimposed each time
Form a test cell.
4. method according to claim 1 or 2, which is characterized in that further include:
When the Web page module level uses combination, disassembled in parallel in webpage dismantling step, it is described flat
Row dismantling are as follows: combined module is disassembled respectively and is independent test cell, and successively extends to the outside and carrys out laminating module, each time
Superposition forms a test cell.
5. method according to any one of claims 1 to 4, which is characterized in that
In webpage dismantling step, the page description language for the additional former webpage of the test cell that dismantling comes out is carried out into shape
Success can completely sub-pages are tested.
6. a kind of compatibility automated test device of webpage, which is characterized in that described device includes:
Configuration module, the test configurations information of configuration test webpage compatibility;
Webpage disassemble module, based on the test configurations information treat test webpage web page element and Web page module level into
Row dismantling is to constitute multiple test cells;
Rendering module renders each test cell based on the browser of test configurations information setting, and
Rendering result screenshot is saved;
Compatibility determination module automatically judges the compatibility of the test cell based on screenshot described in multiple, and for not
Compatible test cell generation error record;And
Location of mistake module obtains the code for being judged as the incompatible test cell based on the error logging, to user
Output includes the test result report of test result and error code.
7. device according to claim 6, which is characterized in that
The compatibility determination module includes:
Figure is displaced comparison module, by the screenshot of the test cell of Web page module level composition and in benchmark browser
The screenshot of middle generation is compared, and the displacement errors of result and test configurations information instruction based on the comparison allow
Threshold value, come judge image in screenshot relative displacement whether mistake, the benchmark browser passes through the test configurations information
It is previously designated;
Element comparison module, the screenshot to the test cell of web page element composition and the life in the benchmark browser
At screenshot be compared, the element error of result based on the comparison and test configurations information instruction allows threshold value
Judge whether the web page element is normally displayed.
8. device according to claim 6 or 7, which is characterized in that further include:
When the Web page module level uses inline mode, recurrence dismantling is carried out in webpage dismantling module, it is described to pass
Return dismantling are as follows: disassemble out by the module of innermost layer and form test cell, and successively extend to the outside laminating module, be superimposed each time
Form a test cell.
9. device according to claim 6 or 7, which is characterized in that further include:
When the Web page module level uses combination, disassembled in parallel in webpage dismantling module, it is described flat
Row dismantling are as follows: combined module is disassembled respectively and is independent test cell, and successively extends to the outside and carrys out laminating module, each time
Superposition forms a test cell.
10. the device as described in any one of claim 6 to 9, which is characterized in that
The page description language for the additional former webpage of the test cell that dismantling comes out is formed function by the webpage dismantling module
Can completely sub-pages are tested.
11. a kind of compatibility automated test equipment of webpage characterized by comprising at least one processor, at least one deposits
The computer program instructions of reservoir and storage in the memory, when the computer program instructions are held by the processor
Method according to any one of claims 1 to 5 is realized when row.
12. a kind of computer readable storage medium, is stored thereon with computer program instructions, which is characterized in that when the calculating
Machine program instruction realizes method according to any one of claims 1 to 5 when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711395005.9A CN109947637B (en) | 2017-12-21 | 2017-12-21 | Automatic testing method, device, equipment and medium for webpage compatibility |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711395005.9A CN109947637B (en) | 2017-12-21 | 2017-12-21 | Automatic testing method, device, equipment and medium for webpage compatibility |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109947637A true CN109947637A (en) | 2019-06-28 |
CN109947637B CN109947637B (en) | 2022-10-14 |
Family
ID=67005963
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711395005.9A Active CN109947637B (en) | 2017-12-21 | 2017-12-21 | Automatic testing method, device, equipment and medium for webpage compatibility |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109947637B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111026638A (en) * | 2019-10-29 | 2020-04-17 | 贝壳技术有限公司 | Webpage automatic testing method and device, electronic equipment and storage medium |
CN111431767A (en) * | 2020-03-26 | 2020-07-17 | 深圳壹账通智能科技有限公司 | Multi-browser resource synchronization method and device, computer equipment and storage medium |
CN111666204A (en) * | 2020-04-17 | 2020-09-15 | 北京新意互动数字技术有限公司 | Method and equipment for constructing webpage incompatible code knowledge base |
CN111737105A (en) * | 2020-02-17 | 2020-10-02 | 北京京东尚科信息技术有限公司 | Display interface compatibility testing method and device, electronic equipment and medium |
CN112306793A (en) * | 2020-04-07 | 2021-02-02 | 北京沃东天骏信息技术有限公司 | Method and device for monitoring webpage |
CN113268407A (en) * | 2020-02-17 | 2021-08-17 | 北京沃东天骏信息技术有限公司 | Page testing method and device, computer storage medium and electronic equipment |
CN115470127A (en) * | 2022-09-06 | 2022-12-13 | 北京海泰方圆科技股份有限公司 | Page compatibility processing method and device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103729285A (en) * | 2012-10-11 | 2014-04-16 | 腾讯科技(深圳)有限公司 | Method, device and system for testing web page |
CN104636251A (en) * | 2014-12-30 | 2015-05-20 | 安科智慧城市技术(中国)有限公司 | Testing method and system for compatibility of multiple browsers |
WO2016075552A1 (en) * | 2014-11-14 | 2016-05-19 | Yandex Europe Ag | Method of testing webpage layout |
CN106326091A (en) * | 2015-06-24 | 2017-01-11 | 深圳市腾讯计算机系统有限公司 | Browser webpage compatibility detection method and system |
-
2017
- 2017-12-21 CN CN201711395005.9A patent/CN109947637B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103729285A (en) * | 2012-10-11 | 2014-04-16 | 腾讯科技(深圳)有限公司 | Method, device and system for testing web page |
WO2016075552A1 (en) * | 2014-11-14 | 2016-05-19 | Yandex Europe Ag | Method of testing webpage layout |
CN104636251A (en) * | 2014-12-30 | 2015-05-20 | 安科智慧城市技术(中国)有限公司 | Testing method and system for compatibility of multiple browsers |
CN106326091A (en) * | 2015-06-24 | 2017-01-11 | 深圳市腾讯计算机系统有限公司 | Browser webpage compatibility detection method and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111026638A (en) * | 2019-10-29 | 2020-04-17 | 贝壳技术有限公司 | Webpage automatic testing method and device, electronic equipment and storage medium |
CN111737105A (en) * | 2020-02-17 | 2020-10-02 | 北京京东尚科信息技术有限公司 | Display interface compatibility testing method and device, electronic equipment and medium |
CN113268407A (en) * | 2020-02-17 | 2021-08-17 | 北京沃东天骏信息技术有限公司 | Page testing method and device, computer storage medium and electronic equipment |
CN111431767A (en) * | 2020-03-26 | 2020-07-17 | 深圳壹账通智能科技有限公司 | Multi-browser resource synchronization method and device, computer equipment and storage medium |
CN112306793A (en) * | 2020-04-07 | 2021-02-02 | 北京沃东天骏信息技术有限公司 | Method and device for monitoring webpage |
CN111666204A (en) * | 2020-04-17 | 2020-09-15 | 北京新意互动数字技术有限公司 | Method and equipment for constructing webpage incompatible code knowledge base |
CN115470127A (en) * | 2022-09-06 | 2022-12-13 | 北京海泰方圆科技股份有限公司 | Page compatibility processing method and device, computer equipment and storage medium |
CN115470127B (en) * | 2022-09-06 | 2023-08-15 | 北京海泰方圆科技股份有限公司 | Page compatibility processing method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109947637B (en) | 2022-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109947637A (en) | Webpage compatibility automated test method, device, equipment and medium | |
US9983984B2 (en) | Automated modularization of graphical user interface test cases | |
EP3557423B1 (en) | System and method for testing electronic visual user interface outputs | |
US9064057B2 (en) | Processing automation scripts of software | |
CN109710508A (en) | Test method, test device, test equipment and computer readable storage medium | |
US20140147051A1 (en) | Method and system for webpage regression testing | |
CN104239206B (en) | Webpage method of testing and device | |
US10303760B2 (en) | Cascading style sheet meta language performance | |
CN111522741A (en) | Interface test code generation method and device, electronic equipment and readable storage medium | |
CN106919624B (en) | Method and device for improving webpage loading speed | |
CN106708704A (en) | Method and device for classifying crash logs | |
CN111966580A (en) | Automatic testing method, device, equipment and storage medium based on artificial intelligence | |
CN112241370B (en) | API interface class checking method, system and device | |
CN105224465B (en) | Webpage adjustment method and device | |
CN114860531B (en) | Fault detection method and device for security chip, electronic equipment and medium | |
CN112925524A (en) | Method and device for detecting unsafe direct memory access in driver | |
US9563541B2 (en) | Software defect detection identifying location of diverging paths | |
CN110908907A (en) | Web page testing method, device, equipment and storage medium | |
Yang et al. | UIS-hunter: Detecting UI design smells in Android apps | |
US9684748B1 (en) | System and method for identifying an electrical short in an electronic design | |
US20150199183A1 (en) | Program analysis apparatus and program analysis method | |
CN113807049A (en) | Labeling component, labeling method, device, equipment and storage medium | |
CN104572429B (en) | Page method of testing and device for gathering dvielement | |
CN113238953A (en) | UI automation test method and device, electronic equipment and storage medium | |
CN112486802A (en) | Flutter test auxiliary method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |