CN109783753A - The tree-shaped drawing generating method of web site url, device, equipment and storage medium - Google Patents

The tree-shaped drawing generating method of web site url, device, equipment and storage medium Download PDF

Info

Publication number
CN109783753A
CN109783753A CN201811538665.2A CN201811538665A CN109783753A CN 109783753 A CN109783753 A CN 109783753A CN 201811538665 A CN201811538665 A CN 201811538665A CN 109783753 A CN109783753 A CN 109783753A
Authority
CN
China
Prior art keywords
link
test
web site
site url
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
CN201811538665.2A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811538665.2A priority Critical patent/CN109783753A/en
Publication of CN109783753A publication Critical patent/CN109783753A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to UI design fields, and the invention discloses a kind of tree-shaped drawing generating method of web site url, device, equipment and storage mediums, by the web site url test script for obtaining webpage to be tested;Link test is carried out according to file destination of the web site url test script to the webpage to be tested, and generates test result;Test link table is established according to the test result, link rendering is carried out to the test link table, generate web site url dendrogram, web site url dendrogram can be automatically generated according to web site url test script, it avoids the occurrence of and omits more news, facilitate technical staff to carry out subsequent logic analysis, effectively increase the efficiency of logic analysis, and it ensure that web site url dendrogram matches in time with current application, the user experience is improved.

Description

The tree-shaped drawing generating method of web site url, device, equipment and storage medium
Technical field
The present invention relates to UI design field more particularly to a kind of tree-shaped drawing generating method of web site url, device, equipment and deposit Storage media.
Background technique
During routine office work, internal staff carries out using logic point website for convenience for general website and application Analysis, can artificially be arranged or paint in advance some application maps perhaps site maps but with website or the update of application Iteration often will appear omission and update using generation the case where map, and will lead to can not be timely with current application using map Match;Another situation, after the population size of application reaches certain scale, it may appear that by manually can not maintenance application again The case where map.
Summary of the invention
The main purpose of the present invention is to provide a kind of tree-shaped drawing generating method of web site url, device, equipment and storages to be situated between Matter, it is intended to solve in the prior art with website or the update of application, it may appear that omit more news, and manually can not be timely Maintenance application map leads to the technical issues of can not matching in time with current application using map.
To achieve the above object, the present invention provides a kind of tree-shaped drawing generating method of web site url, and the web site url is tree-shaped Drawing generating method the following steps are included:
Obtain the web site url test script of webpage to be tested;
Link test is carried out according to file destination of the web site url test script to the webpage to be tested, and is generated Test result;
Test link table is established according to the test result, link rendering is carried out to the test link table, generates website Link dendrogram.
Preferably, the step of web site url test script for obtaining webpage to be tested, comprising:
It treats test webpage to be analyzed, obtains web page analysis result;
The html tag quantity of the webpage to be tested is obtained according to the web page analysis result;
The html tag quantity is substituting to default script to generate in model, is obtained corresponding with the webpage to be tested Web site url test script.
Preferably, described to be linked according to file destination of the web site url test script to the webpage to be tested Test, and the step of generating test result, comprising:
The webpage to be tested is split as multiple file destinations;
The web site url test script is passed sequentially through according to default greedy algorithm, and link test is carried out to each file destination, Obtain the corresponding link set of each file destination;
Test result is generated according to the link set.
Preferably, the basis preset greedy algorithm pass sequentially through the web site url test script to each file destination into Row link test, the step of obtaining each file destination corresponding link set, comprising:
The web site url test script is passed sequentially through according to default greedy algorithm, and link test is carried out to each file destination;
The corresponding target block comprising hyperlink of each file destination is obtained, traversal is led to using each target block as jump-point All links crossed;
Each link is summarized, the corresponding link set of file destination is generated.
Preferably, described the step of test result is generated according to the link set, comprising:
Recurrence is carried out to the link in the link set according to default list of link so that link in the link set according to The secondary link adaptation with the default list of link, generates matching result;
Judge whether the link in the link set exists in the default list of link according to the matching result;
The link that would not exist in the default list of link is added in the default list of link, to be formed newly Default list of link;
Test result is generated according to new default list of link.
Preferably, described to be linked according to file destination of the web site url test script to the webpage to be tested Test, and before the step of generating test result, the method also includes:
Object code is chosen from the corresponding HTML code of the webpage to be tested according to default selection instruction;
Using the corresponding code file of the object code as file destination.
Preferably, described that test link table is established according to the test result, link wash with watercolours is carried out to the test link table The step of dye, generation web site url dendrogram, comprising:
Test link table is established according to the test result;
The corresponding target code of the test link table is obtained, the target code is parsed, obtains parsing result;
According to the parsing result construction logic node tree, constructed according to default cascading style sheets and the logical node tree Target render tree;
The target render tree is drawn, web site url dendrogram is generated.
In addition, to achieve the above object, the present invention also proposes a kind of web site url dendrogram generating device, the website chain Dendrogram generating device is connect to include: memory, processor and be stored on the memory and can run on the processor Web site url dendrogram generate program, the web site url dendrogram generates program and is arranged for carrying out website as described above The step of linking tree-shaped drawing generating method.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, website is stored on the storage medium It links dendrogram and generates program, the web site url dendrogram generates when program is executed by processor and realizes net as described above Stand link tree-shaped drawing generating method the step of.
In addition, to achieve the above object, the present invention also provides a kind of web site url dendrogram generating means, the website chain Connecing dendrogram generating means includes: that script obtains module, test module and generation module;
Wherein, the script obtains module, for obtaining the web site url test script of webpage to be tested;
The test module, for according to the web site url test script to the file destination of the webpage to be tested into Row link test, and generate test result;
The generation module carries out the test link table for establishing test link table according to the test result Link rendering, generates web site url dendrogram.
The tree-shaped drawing generating method of web site url proposed by the present invention, the web site url by obtaining webpage to be tested test foot This;Link test is carried out according to file destination of the web site url test script to the webpage to be tested, and generates test As a result;Test link table is established according to the test result, link rendering is carried out to the test link table, generates web site url Dendrogram can automatically generate web site url dendrogram according to web site url test script, avoid the occurrence of and omit more news, Facilitate technical staff to carry out subsequent logic analysis, effectively increases the efficiency of logic analysis, and ensure that web site url is tree-shaped Figure matches in time with current application, and the user experience is improved.
Detailed description of the invention
Fig. 1 is that the web site url dendrogram generating device structure for the hardware running environment that the embodiment of the present invention is related to is shown It is intended to;
Fig. 2 is the flow diagram of the tree-shaped drawing generating method first embodiment of web site url of the present invention;
Fig. 3 is the flow diagram of the tree-shaped drawing generating method second embodiment of web site url of the present invention;
Fig. 4 is the flow diagram of the tree-shaped drawing generating method 3rd embodiment of web site url of the present invention;
Fig. 5 is the functional block diagram of web site url dendrogram generating means first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The solution of the embodiment of the present invention is mainly: the present invention tests foot by obtaining the web site url of webpage to be tested This;Link test is carried out according to file destination of the web site url test script to the webpage to be tested, and generates test As a result;Test link table is established according to the test result, link rendering is carried out to the test link table, generates web site url Dendrogram can automatically generate web site url dendrogram according to web site url test script, avoid the occurrence of and omit more news, Facilitate technical staff to carry out subsequent logic analysis, effectively increases the efficiency of logic analysis, and ensure that web site url is tree-shaped Figure matches in time with current application, and the user experience is improved, solves the update in the prior art with website or application, can go out More news is now omitted, and manually maintenance application map can not cause not matching in time with current application using map in time The technical issues of.
Referring to Fig.1, Fig. 1 is that the web site url dendrogram generation for the hardware running environment that the embodiment of the present invention is related to is set Standby structural schematic diagram.
As shown in Figure 1, the web site url dendrogram generating device may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include standard Wireline interface, wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (as wirelessly Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random access memory of high speed (Random Access Memory, RAM) memory, be also possible to stable memory (Non-volatile Memory, ), such as magnetic disk storage NVM.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that web site url dendrogram generating device structure shown in Fig. 1 is not constituted Restriction to the web site url dendrogram generating device may include components more more or fewer than diagram, or combine certain Component or different component layouts.
As shown in Figure 1, as may include operating device, network communication mould in a kind of memory 1005 of storage medium Block, user terminal interface module and web site url dendrogram generate program, and the web site performance optimization program is executed by processor Operation in the above-mentioned each web site performance optimization method embodiment of Shi Shixian.
Based on above-mentioned hardware configuration, the tree-shaped drawing generating method embodiment of web site url of the present invention is proposed.
It is the flow diagram of the tree-shaped drawing generating method first embodiment of web site url of the present invention referring to Fig. 2, Fig. 2.
In the first embodiment, the tree-shaped drawing generating method of the web site url the following steps are included:
Step S10, the web site url test script of webpage to be tested is obtained.
It should be noted that the webpage to be tested is webpage in need of test, the web site url test script For it is pre-set it is corresponding with the webpage to be tested link test script, the web site url test script is used for described Webpage to be tested is tested into link, and different webpages to be tested corresponds to different web site url test scripts.
Further, the step S10 specifically includes the following steps:
It treats test webpage to be analyzed, obtains web page analysis result;
The html tag quantity of the webpage to be tested is obtained according to the web page analysis result;
The html tag quantity is substituting to default script to generate in model, is obtained corresponding with the webpage to be tested Web site url test script.
It should be understood that after analyzing the webpage to be tested, corresponding web page analysis can be obtained as a result, into And hypertext markup language label (the Hyper Text of the webpage to be analyzed can be obtained according to the web page analysis result Markup Language, HTML) number of labels, corresponding web site url can be obtained according to the html tag quantity and tested Script can generally be obtained, the default foot by that will be substituting to the html tag quantity in default script generation model This generation model is pre-set for reflecting the model of number of labels from the mapping relations of different test scripts, described default Script generates model and can be through lot of experimental data training acquisition, is also possible to the regular job experience according to technical staff The corresponding relationship of determining script and label, which is established, to be generated, naturally it is also possible to be that default script determining by other means generates Model, the present embodiment are without restriction to this;It is generated in model by the way that the html tag quantity is substituting to default script, it can To obtain web site url test script corresponding with the webpage to be tested.
Step S20, link survey is carried out according to file destination of the web site url test script to the webpage to be tested Examination, and generate test result.
It is understood that the file destination corresponds to for the link test code that carries out in the webpage to be tested File, link test can be carried out to the file destination of the webpage to be tested by the web site url test script, lead to The test of the link to the file destination is crossed, corresponding test result can be obtained, need to carry out net in the webpage to be tested Link test script of standing carries out the file destination more than one of link test, generally multiple.
Further, before the step S20, the tree-shaped drawing generating method of web site url is further comprising the steps of:
Object code is chosen from the corresponding HTML code of the webpage to be tested according to default selection instruction;
Using the corresponding code file of the object code as file destination.
It is understood that the default selection instruction is user or the pre-set selection instruction of technical staff, pass through The default selection instruction can choose corresponding code as target generation from the corresponding HTML code of the webpage to be tested Code, and then using the corresponding code file of the object code as file destination.
Step S30, test link table is established according to the test result, link rendering is carried out to the test link table, Generate web site url dendrogram.
It should be understood that can establish corresponding test link table by the test result, i.e., obtained by test The link test result of each file destination can establish corresponding link table, by carrying out link wash with watercolours to the test link table Dye, can be generated corresponding web site url dendrogram, by the web site url dendrogram, user and technical staff can be very Intuitively see the linking relationship of the webpage to be tested and other webpages, omits more news to avoid the occurrence of, it is convenient Technical staff carries out subsequent logic analysis, effectively increases the efficiency of logic analysis.
The present embodiment through the above scheme, passes through the web site url test script of acquisition webpage to be tested;According to the net Link test script of standing carries out link test to the file destination of the webpage to be tested, and generates test result;According to described Test result establishes test link table, carries out link rendering to the test link table, generates web site url dendrogram, Neng Gougen Web site url dendrogram is automatically generated according to web site url test script, avoids the occurrence of and omits more news, facilitate technical staff Subsequent logic analysis is carried out, effectively increases the efficiency of logic analysis, and ensure that web site url dendrogram and current application Matching in time, the user experience is improved.
Further, Fig. 3 is the flow diagram of the tree-shaped drawing generating method second embodiment of web site url of the present invention, is such as schemed Shown in 3, the tree-shaped drawing generating method second embodiment of web site url of the present invention is proposed based on first embodiment, in the present embodiment, The step S20, specifically includes the following steps:
Step S21, the webpage to be tested is split as multiple file destinations.
It should be noted that the webpage to be tested is split as multiple file destinations, i.e., by the webpage pair to be tested The HTML code answered is split according to different execution sequences and gap, splits into a section code, using each code as Multiple file destinations.
Step S22, the web site url test script is passed sequentially through according to default greedy algorithm to carry out each file destination Link test, obtains the corresponding link set of each file destination.
It is understood that the default greedy algorithm is pre-set greedy algorithm, for in each file destination Link retrieved, by the default greedy algorithm can by the web site url test script to each file destination into Row link test, and then the set of the corresponding link of each file destination can be obtained.
Further, the step S22 specifically includes the following steps:
The web site url test script is passed sequentially through according to default greedy algorithm, and link test is carried out to each file destination;
The corresponding target block comprising hyperlink of each file destination is obtained, traversal is led to using each target block as jump-point All links crossed;
Each link is summarized, the corresponding link set of file destination is generated.
It should be understood that can be by the web site url test script to each target by the default greedy algorithm File carries out link test, the corresponding target block comprising hyperlink of available each file destination passes through the target Block can jump to other websites, and then can obtain the link by each target block using each target block as jump-point, The corresponding link of each target block is carried out summarizing concentration, the corresponding link set of the file destination can be generated.
Step S23, test result is generated according to the link set.
It is understood that after obtaining the corresponding link set of each file destination, it can be according to the link and generation pair The test result answered is used as and carries out link Self -adaptive to the webpage to be tested by the web site url test script Test result.
Further, the step S23 specifically includes the following steps:
Recurrence is carried out to the link in the link set according to default list of link so that link in the link set according to The secondary link adaptation with the default list of link, generates matching result;
Judge whether the link in the link set exists in the default list of link according to the matching result;
The link that would not exist in the default list of link is added in the default list of link, to be formed newly Default list of link;
Test result is generated according to new default list of link.
It should be noted that the default list of link is the column of the pre-set link for recording the webpage to be tested Table carries out recursive search to the link in the link set by the default list of link, and corresponding matching knot can be generated Fruit, whether the process of recursive search can be successively judges link in the link set by the default list of link In the presence of, i.e., recurrence is carried out to the link in the link set according to presetting list of link so that link in the link set according to The secondary link adaptation with the default list of link, and then the chain in the link set may determine that according to the matching result Whether road exists in the default list of link;The link that would not exist in the default list of link is added to described pre- If in list of link, to form new default list of link;Test result is generated according to new default list of link, if recurrence is searched Rope is sent out link existing and is existed in the default list of link, then ignores, and terminate the recursive procedure of the link, pass through Recursive search is carried out to the link in the link set, the link having existed with the default list of link can be screened out, And retain the link being not present in the default link table, thus using updated default list of link as new default chain Road list.
The present embodiment through the above scheme, by the way that the webpage to be tested is split as multiple file destinations;According to default Greedy algorithm passes sequentially through the web site url test script and carries out link test to each file destination, obtains each file destination pair The link set answered;According to the link set generate test result, can screen out have existed in the default list of link Link avoids link data repetition bring data lengthy and jumbled, avoids the occurrence of and omit more news, after facilitating technical staff to carry out Continuous logic analysis, effectively increases the efficiency of logic analysis, and ensure that web site url dendrogram and current application timely Match, the user experience is improved.
Further, Fig. 4 is the flow diagram of the tree-shaped drawing generating method 3rd embodiment of web site url of the present invention, is such as schemed Shown in 4, the tree-shaped drawing generating method 3rd embodiment of web site url of the present invention is proposed based on second embodiment, in the present embodiment, The step S30 specifically includes the following steps:
Step S31, test link table is established according to the test result.
It is understood that corresponding test link table can establish by each link in the test result, it is different Test result can correspond to different test link tables.
Step S32, the corresponding target code of the test link table is obtained, the target code is parsed, is obtained Parsing result.
It should be understood that the test link table can have corresponding byte stream, i.e., corresponding target code, to described Target code is parsed, and corresponding parsing result can be obtained, generally by the default test link table Encoding goes in domain to parse the target code.
Step S33, according to the parsing result construction logic node tree, according to default cascading style sheets and the logic section Point tree building target render tree.
It is understood that can be with construction logic node tree dom tree, in construction logic node tree by the parsing result During, if encountering cascading style sheets (Cascading Style Sheets, the CSS) generation that style label is surrounded Code then saves the CSS code, and according to the default cascading style sheets and logical node tree building target rendering Tree, the i.e. book of the rectangle frame one by one by building for being rendered on the page, correspond to each in the target render tree Frame, it is thus necessary to determine that the attribute informations such as its XY coordinate, size, frame, font and form.Step S34, to the target render tree It is drawn, generates web site url dendrogram.
It is understood that the target render tree can be drawn after building the target render tree, into And generate web site url dendrogram.
The present embodiment tests link table through the above scheme, by establishing according to the test result;Obtain the test The corresponding target code of link table, parses the target code, obtains parsing result;It is constructed according to the parsing result Logical node tree constructs target render tree according to default cascading style sheets and the logical node tree;To the target render tree Parsing is drawn, and web site url dendrogram is generated, and is accelerated the speed and efficiency that generate web site url dendrogram, is avoided the occurrence of omission more News facilitates technical staff to carry out subsequent logic analysis, effectively increases the efficiency of logic analysis, and ensure that website Link dendrogram matches in time with current application, and the user experience is improved.
Based on the embodiment of the tree-shaped drawing generating method of above-mentioned web site url, the present invention further provides a kind of web site url trees Shape figure generating means.
It is the functional block diagram of web site url dendrogram generating means first embodiment of the present invention referring to Fig. 5, Fig. 5.
In web site url dendrogram generating means first embodiment of the present invention, the web site url dendrogram generating means packet Include: script obtains module 10, test module 20 and generation module 30;
Wherein, the script obtains module 10, for obtaining the web site url test script of webpage to be tested.
It should be noted that the webpage to be tested is webpage in need of test, the web site url test script For it is pre-set it is corresponding with the webpage to be tested link test script, the web site url test script is used for described Webpage to be tested is tested into link, and different webpages to be tested corresponds to different web site url test scripts.
Further, the script obtains module 10 and specifically includes:
Web page analysis module is analyzed for treating test webpage, obtains web page analysis result;
Number of labels obtains module, for obtaining the html tag of the webpage to be tested according to the web page analysis result Quantity;
Script generation module generates in model, acquisition and institute for the html tag quantity to be substituting to default script State the corresponding web site url test script of webpage to be tested.
It should be understood that after analyzing the webpage to be tested, corresponding web page analysis can be obtained as a result, into And hypertext markup language label (the Hyper Text of the webpage to be analyzed can be obtained according to the web page analysis result Markup Language, HTML) number of labels, corresponding web site url can be obtained according to the html tag quantity and tested Script can generally be obtained, the default foot by that will be substituting to the html tag quantity in default script generation model This generation model is pre-set for reflecting the model of number of labels from the mapping relations of different test scripts, described default Script generates model and can be through lot of experimental data training acquisition, is also possible to the regular job experience according to technical staff The corresponding relationship of determining script and label, which is established, to be generated, naturally it is also possible to be that default script determining by other means generates Model, the present embodiment are without restriction to this;It is generated in model by the way that the html tag quantity is substituting to default script, it can To obtain web site url test script corresponding with the webpage to be tested.
The test module 20, for the file destination according to the web site url test script to the webpage to be tested Link test is carried out, and generates test result.
It is understood that the file destination corresponds to for the link test code that carries out in the webpage to be tested File, link test can be carried out to the file destination of the webpage to be tested by the web site url test script, lead to The test of the link to the file destination is crossed, corresponding test result can be obtained, need to carry out net in the webpage to be tested Link test script of standing carries out the file destination more than one of link test, generally multiple.
Further, the test module 20 includes:
Module is split, for the webpage to be tested to be split as multiple file destinations.
It should be noted that the webpage to be tested is split as multiple file destinations, i.e., by the webpage pair to be tested The HTML code answered is split according to different execution sequences and gap, splits into a section code, using each code as Multiple file destinations.
Link set obtains module, for passing sequentially through the web site url test script to each mesh according to default greedy algorithm Mark file carries out link test, obtains the corresponding link set of each file destination.
It is understood that the default greedy algorithm is pre-set greedy algorithm, for in each file destination Link retrieved, by the default greedy algorithm can by the web site url test script to each file destination into Row link test, and then the set of the corresponding link of each file destination can be obtained.
Test result generation module, for generating test result according to the link set.
It is understood that after obtaining the corresponding link set of each file destination, it can be according to the link and generation pair The test result answered is used as and carries out link Self -adaptive to the webpage to be tested by the web site url test script Test result.
Further, the link set obtains module and specifically includes:
Greedy test module, for passing sequentially through the web site url test script to each target according to default greedy algorithm File carries out link test;
Spider module is traversed for obtaining the corresponding target block comprising hyperlink of each file destination with each target area All links that block passes through as jump-point;
Summarizing module generates the corresponding link set of file destination for summarizing each link.
It should be understood that can be by the web site url test script to each target by the default greedy algorithm File carries out link test, the corresponding target block comprising hyperlink of available each file destination passes through the target Block can jump to other websites, and then can obtain the link by each target block using each target block as jump-point, The corresponding link of each target block is carried out summarizing concentration, the corresponding link set of the file destination can be generated.
Further, the test result generation module includes:
Recursive search module, for carrying out recurrence to the link in the link set according to default list of link, so that institute The link in link set is stated successively with the link adaptation in the default list of link, generates matching result;
Judgment module, for being judged the link in the link set whether in the default link according to the matching result Exist in list;
Update module, the link for would not exist in the default list of link are added to the default list of link In, to form new default list of link;
Generation module, for generating test result according to new default list of link.
It should be noted that the default list of link is the column of the pre-set link for recording the webpage to be tested Table carries out recursive search to the link in the link set by the default list of link, and corresponding matching knot can be generated Fruit, the process of recursive search can be successively judge whether is link in the link set by the default list of link judgement It has existed, i.e., recurrence is carried out to the link in the link set according to default list of link, so that the chain in the link set Road successively with the link adaptation in the default list of link, and then may determine that in the link set according to the matching result Link whether exist in the default list of link;The link that would not exist in the default list of link is added to institute It states in default list of link, to form new default list of link;Test result is generated according to new default list of link, if passing Return search to send out link existing to exist in the default list of link, then ignore, and terminate the recursive procedure of the link, By carrying out recursive search to the link in the link set, the chain having existed with the default list of link can be screened out Road, and retain the link being not present in the default link table, thus using updated default list of link as newly pre- If list of link.
Further, the test module 20 is also used to corresponding from the webpage to be tested according to selection instruction is preset Object code is chosen in HTML code;Using the corresponding code file of the object code as file destination.
It is understood that the default selection instruction is user or the pre-set selection instruction of technical staff, pass through The default selection instruction can choose corresponding code as target generation from the corresponding HTML code of the webpage to be tested Code, and then using the corresponding code file of the object code as file destination.
The generation module 30, for according to the test result establish test link table, to the test link table into Line link rendering, generates web site url dendrogram.
It should be understood that can establish corresponding test link table by the test result, i.e., obtained by test The link test result of each file destination can establish corresponding link table, by carrying out link wash with watercolours to the test link table Dye, can be generated corresponding web site url dendrogram, by the web site url dendrogram, user and technical staff can be very Intuitively see the linking relationship of the webpage to be tested and other webpages, omits more news to avoid the occurrence of, it is convenient Technical staff carries out subsequent logic analysis, effectively increases the efficiency of logic analysis.
Further, the generation module 30 includes:
Link table establishes module, for establishing test link table according to the test result.
It is understood that corresponding test link table can establish by each link in the test result, it is different Test result can correspond to different test link tables.
Code parsing module carries out the target code for obtaining the corresponding target code of the test link table Parsing obtains parsing result.
It should be understood that the test link table can have corresponding byte stream, i.e., corresponding target code, to described Target code is parsed, and corresponding parsing result can be obtained, generally by the default test link table Encoding goes in domain to parse the target code.
Render tree constructs module, is used for according to the parsing result construction logic node tree, according to default cascading style sheets Target render tree is constructed with the logical node tree.
It is understood that can be with construction logic node tree dom tree, in construction logic node tree by the parsing result During, if encountering cascading style sheets (Cascading Style Sheets, the CSS) generation that style label is surrounded Code then saves the CSS code, and according to the default cascading style sheets and logical node tree building target rendering Tree, the i.e. book of the rectangle frame one by one by building for being rendered on the page, correspond to each in the target render tree Frame, it is thus necessary to determine that the attribute informations such as its XY coordinate, size, frame, font and form.Step S34, to the target render tree It is drawn, generates web site url dendrogram.
It is understood that the target render tree can be drawn after building the target render tree, into And generate web site url dendrogram.
The present embodiment through the above scheme, passes through the web site url test script of acquisition webpage to be tested;According to the net Link test script of standing carries out link test to the file destination of the webpage to be tested, and generates test result;According to described Test result establishes test link table, carries out link rendering to the test link table, generates web site url dendrogram, Neng Gougen Web site url dendrogram is automatically generated according to web site url test script, avoids the occurrence of and omits more news, facilitate technical staff Subsequent logic analysis is carried out, effectively increases the efficiency of logic analysis, and ensure that web site url dendrogram and current application Matching in time, the user experience is improved.
In addition, the embodiment of the present invention also proposes a kind of storage medium, it is tree-shaped to be stored with web site url on the storage medium Figure generates program, the web site performance optimization program realizes that above-mentioned each web site performance optimization method is implemented when being executed by processor Operation in example.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of tree-shaped drawing generating method of web site url, which is characterized in that the described method includes:
Obtain the web site url test script of webpage to be tested;
Link test is carried out according to file destination of the web site url test script to the webpage to be tested, and generates test As a result;
Test link table is established according to the test result, link rendering is carried out to the test link table, generates web site url Dendrogram.
2. the method as described in claim 1, which is characterized in that the web site url test script for obtaining webpage to be tested Step, comprising:
It treats test webpage to be analyzed, obtains web page analysis result;
The hypertext markup language html tag quantity of the webpage to be tested is obtained according to the web page analysis result;
The html tag quantity is substituting to default script to generate in model, obtains website corresponding with the webpage to be tested Test script is linked, the default script generates the mapping relations that model is used to reflect number of labels from different test scripts.
3. method according to claim 2, which is characterized in that it is described according to the web site url test script to described to be measured The file destination of examination webpage carries out link test, and the step of generating test result, comprising:
The webpage to be tested is split as multiple file destinations;
The web site url test script is passed sequentially through according to default greedy algorithm, link test is carried out to each file destination, obtain The corresponding link set of each file destination;
Test result is generated according to the link set.
4. method as claimed in claim 3, which is characterized in that the basis presets greedy algorithm and passes sequentially through the website chain The step of connecing test script and link test carried out to each file destination, obtaining each file destination corresponding link set, comprising:
The web site url test script is passed sequentially through according to default greedy algorithm, and link test is carried out to each file destination;
The corresponding target block comprising hyperlink of each file destination is obtained, what traversal was passed through using each target block as jump-point All links;
Each link is summarized, the corresponding link set of file destination is generated.
5. method as claimed in claim 4, which is characterized in that described the step of test result is generated according to the link set, Include:
Recurrence is carried out to the link in the link set according to default list of link so that link in the link set successively with Link adaptation in the default list of link generates matching result;
Judge whether the link in the link set exists in the default list of link according to the matching result;
The link that would not exist in the default list of link is added in the default list of link, to form new preset List of link;
Test result is generated according to new default list of link.
6. method according to any one of claims 1 to 5, which is characterized in that described according to the web site url test script Link test is carried out to the file destination of the webpage to be tested, and before the step of generating test result, the method is also wrapped It includes:
Object code is chosen from the corresponding HTML code of the webpage to be tested according to default selection instruction;
Using the corresponding code file of the object code as file destination.
7. method according to any one of claims 1 to 5, which is characterized in that described established according to the test result is tested Link table, the step of carrying out link rendering to the test link table, generate web site url dendrogram, comprising:
Test link table is established according to the test result;
The corresponding target code of the test link table is obtained, the target code is parsed, obtains parsing result;
According to the parsing result construction logic node tree, target is constructed according to default cascading style sheets and the logical node tree Render tree;
The target render tree is drawn, web site url dendrogram is generated.
8. a kind of web site url dendrogram generating means, which is characterized in that described device includes: that script obtains module, test mould Block and generation module;
Wherein, the script obtains module, for obtaining the web site url test script of webpage to be tested;
The test module, for carrying out chain according to file destination of the web site url test script to the webpage to be tested Test is connect, and generates test result;
The generation module carries out link to the test link table for establishing test link table according to the test result Rendering generates web site url dendrogram.
9. a kind of web site url dendrogram generating device, which is characterized in that the web site url dendrogram generating device includes: to deposit The web site url dendrogram that reservoir, processor and being stored in can be run on the memory and on the processor generates journey Sequence, the web site url dendrogram generate program and are arranged for carrying out the web site url tree as described in any one of claims 1 to 7 The step of shape drawing generating method.
10. a kind of storage medium, which is characterized in that be stored with web site url dendrogram on the storage medium and generate program, institute It states web site url dendrogram and generates the website chain realized as described in any one of claims 1 to 7 when program is executed by processor The step of connecing tree-shaped drawing generating method.
CN201811538665.2A 2018-12-14 2018-12-14 The tree-shaped drawing generating method of web site url, device, equipment and storage medium Pending CN109783753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811538665.2A CN109783753A (en) 2018-12-14 2018-12-14 The tree-shaped drawing generating method of web site url, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811538665.2A CN109783753A (en) 2018-12-14 2018-12-14 The tree-shaped drawing generating method of web site url, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109783753A true CN109783753A (en) 2019-05-21

Family

ID=66497170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811538665.2A Pending CN109783753A (en) 2018-12-14 2018-12-14 The tree-shaped drawing generating method of web site url, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109783753A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708967A (en) * 2020-06-11 2020-09-25 浙江浙大网新国际软件技术服务有限公司 Fingerprint identification method based on website map

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508779A (en) * 2011-11-17 2012-06-20 北京北纬点易信息技术有限公司 Automatic performance test script generating system based on web crawler logs and automatic performance test script generating method based on same
CN102890652A (en) * 2012-11-07 2013-01-23 武汉光迅信息技术有限公司 Method for constructing testing software and testing system employing method
CN103546498A (en) * 2012-07-09 2014-01-29 百度在线网络技术(北京)有限公司 Method and equipment for providing access webpage for mobile terminal
CN103885876A (en) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 Testing method and testing equipment
CN104376261A (en) * 2014-11-27 2015-02-25 南京大学 Method for automatically detecting malicious process under forensics scene
CN105760379A (en) * 2014-12-16 2016-07-13 中国移动通信集团公司 Webshell page detection method and device based on intra-domain page association
CN106649100A (en) * 2016-11-16 2017-05-10 福建天晴数码有限公司 Automatic test method and system
CN108255722A (en) * 2018-01-15 2018-07-06 厦门美图移动科技有限公司 Scenario generation method, script generation device and server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508779A (en) * 2011-11-17 2012-06-20 北京北纬点易信息技术有限公司 Automatic performance test script generating system based on web crawler logs and automatic performance test script generating method based on same
CN103546498A (en) * 2012-07-09 2014-01-29 百度在线网络技术(北京)有限公司 Method and equipment for providing access webpage for mobile terminal
CN102890652A (en) * 2012-11-07 2013-01-23 武汉光迅信息技术有限公司 Method for constructing testing software and testing system employing method
CN103885876A (en) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 Testing method and testing equipment
CN104376261A (en) * 2014-11-27 2015-02-25 南京大学 Method for automatically detecting malicious process under forensics scene
CN105760379A (en) * 2014-12-16 2016-07-13 中国移动通信集团公司 Webshell page detection method and device based on intra-domain page association
CN106649100A (en) * 2016-11-16 2017-05-10 福建天晴数码有限公司 Automatic test method and system
CN108255722A (en) * 2018-01-15 2018-07-06 厦门美图移动科技有限公司 Scenario generation method, script generation device and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谢觉: "网站链接自动化测试原理及工具介绍", 《科教文汇(中旬刊)》, pages 217 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708967A (en) * 2020-06-11 2020-09-25 浙江浙大网新国际软件技术服务有限公司 Fingerprint identification method based on website map

Similar Documents

Publication Publication Date Title
US10824691B2 (en) Page rendering method, device, and data storage medium
US20190243848A1 (en) Generating a structured document guiding view
CN103336690B (en) HTML (Hypertext Markup Language) 5-based text-element drawing method and device
CN109460279A (en) Forms pages development approach, device, equipment and storage medium based on small routine
CN105022803B (en) A kind of method and system for extracting Web page text content
CN104063401B (en) The method and apparatus that a kind of webpage pattern address merges
CN104239298A (en) Text message recommendation method, server, browser and system
CN104598232B (en) A kind of Web applications striding equipment catches back method
US9275018B2 (en) Techniques for analyzing web pages to determine font subsets
KR20140038459A (en) Live browser tooling in an integrated development environment
CN110286917A (en) File packing method, device, equipment and storage medium
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
CN107562600A (en) Page detection method, apparatus, computing device and storage medium
CN108205760A (en) Method, plug-in unit and the browser that advertisement is launched
CN109976840A (en) The method and system of multilingual automatic adaptation are realized under a kind of separation platform based on front and back
CN109408763B (en) Method and system for managing resume of different templates
CN107357817A (en) A kind of Web page module design and its Asynchronous loading method towards JSON
CN107436843A (en) Webpage performance test methods and device
CN110381363A (en) Video encoding/decoding method, device, server and storage medium
CN104267941B (en) The method and device of dynamic generation response type webpage
CN109657125A (en) Data processing method, device, equipment and storage medium based on web crawlers
KR101287371B1 (en) Method and Device for Collecting Web Contents and Computer-readable Recording Medium for the same
CN110032694A (en) Form of general use control implementation method suitable for network auditing system
CN112417338A (en) Page adaptation method, system and equipment
CN109783753A (en) The tree-shaped drawing generating method of web site url, device, equipment and storage medium

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