CN103873318B - A kind of website automation test method and automatization test system - Google Patents
A kind of website automation test method and automatization test system Download PDFInfo
- Publication number
- CN103873318B CN103873318B CN201210553732.4A CN201210553732A CN103873318B CN 103873318 B CN103873318 B CN 103873318B CN 201210553732 A CN201210553732 A CN 201210553732A CN 103873318 B CN103873318 B CN 103873318B
- Authority
- CN
- China
- Prior art keywords
- page elements
- middleware
- tested
- interface
- variable
- 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.)
- Expired - Fee Related
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 107
- 238000010998 test method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims description 41
- 238000004458 analytical method Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 description 15
- 230000008859 change Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000006399 behavior Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000029058 respiratory gaseous exchange Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 241001502122 Pyrrhocoris apterus Species 0.000 description 1
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 230000003466 anti-cipated effect Effects 0.000 description 1
- 238000009227 behaviour therapy Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 235000012054 meals Nutrition 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
This application provides a kind of website automation test method and automatization test system, to solve the problems, such as that current automatic test efficiency is low.Wherein, a kind of website automation test method includes:Webpage is parsed, and the page elements generation middleware variable in corresponding webpage;Middleware interface is generated according to the middleware variable;Page elements information to be tested is received, and searches the middleware interface with the page elements information match to be tested;The middleware interface matched is called to perform test operation to the page elements to be tested.The application improves the recognition efficiency of page elements, and then improves the efficiency of automatic test.
Description
Technical field
The application is related to automatization testing technique, more particularly to a kind of website automation test method and automatic test
System.
Background technology
Automatic test is a kind of process for the behavioral test taking human as driving being converted into machine execution.Generally by testing
Personnel perform test step by step according to the code described in test case, obtain the comparison of actual result and expected result.Herein
During, in order to save manpower, time or hardware resource, testing efficiency is improved, introduces the concept of automatic test.
In the automatic test of website, page elements ((are pressed i.e. in the page to the visible control of user, such as button
Button), form (form) etc.) identification be automatic test basis.In existing test process, tester passes through installation
The plug-in units such as firebug, iedeveloper, and selection page elements are clicked on manually to realize the identification to page elements.Work as test
When personnel manually select some page elements, these plug-in units can automatically identify selected page elements, and by recognition result
Show, so that tester uses in test process.
Although above-mentioned website automation test method can identify page elements using plug-in unit, but introduce more
Manual operation, need tester to carry out manual point one by one to the element that identifies of needs when page elements are identified
Hit, operation is comparatively laborious.And a website includes substantial amounts of webpage, each webpage also includes substantial amounts of page elements, above-mentioned need
Want more manually-operated recognition methods obviously can not meet the identification demand in automatic test, and recognition efficiency is low.
Because the identification of page elements is the basis of automatic test, thus the efficiency of page elements identification lowly also brings website certainly
The efficiency of dynamicization test is low.
The content of the invention
This application provides a kind of website automation test method and automatization test system, is surveyed with solving automation at present
Try the problem of efficiency is low.
In order to solve the above problems, this application discloses a kind of website automation test method, including:
Webpage is parsed, and the page elements generation middleware variable in corresponding webpage;
Middleware interface is generated according to the middleware variable;
Page elements information to be tested is received, and searches the centre with the page elements information match to be tested
Part interface;
The middleware interface matched is called to perform test operation to the page elements to be tested.
Alternatively, it is described that webpage is parsed, and the page elements generation middleware variable in corresponding webpage includes:
Web analysis into HTML dom trees and is traveled through into the HTML dom trees, a page elements of the webpage are corresponding
One node of the HTML dom trees;
Middleware variable is generated according to page elements corresponding to the node of the HTML dom trees, wherein, the page member
Property set of the attribute information of element as the middleware variable.
Alternatively, the attribute information of the page elements includes following any one or several:The address letter of place webpage
Breath, the classification of page elements, the title of page elements, the id of page elements and the value of page elements.
Alternatively, it is described to be included according to middleware variable generation middleware interface:
The property set of each middleware variable is traveled through, the middleware variable of same alike result in the property set is classified as one
Individual Hash table, and the Hash table is named with the same alike result, the middleware variable of the same alike result is classified as the Hash
The member of table;
According to the hierarchical relationship of the HTML dom trees, the Hash table in the Hash table with identical father node is generated
One middleware interface, the middleware interface are named with any attribute information of page elements corresponding to father node.
Alternatively, the lookup and the middleware interface of the page elements information match to be tested include:
Calculate the matching degree of the page elements information to be tested and each middleware interface;
Middleware interface with the page elements information match to be tested is searched according to the matching degree.
Alternatively, the matching degree for calculating the page elements information and each middleware interface to be tested includes:
The page elements title in the page elements information to be tested is obtained, and obtains the name of the middleware interface
Claim;
All characters of the page elements title to be tested and the middleware interface title are converted into small letter/big
Write characters;
Calculate the identical lowercase/uppercase character of the page elements title to be tested and the middleware interface title
Number, be designated as most growing matching string;
The number of the most long matching string and the lowercase/uppercase character of the middleware interface title is done into division arithmetic,
Using the business of the division arithmetic as the page elements information to be tested and the matching degree of the middleware interface.
Alternatively, it is described to be searched and the page elements information phase to be tested according to the matching degree of the middleware interface
The middleware interface of matching includes:
Judge whether the page elements information to be tested and maximum matching degree in the matching degree of each middleware interface are high
In or equal to default threshold value;
When the maximum matching degree is greater than or equal to default threshold value, middleware corresponding to the maximum matching degree is connect
The middleware interface that mouth obtains as the page elements information matches to be tested;
When the maximum matching degree is less than default threshold value, it fails to match.
Alternatively, it is described to call the middleware interface matched to perform test operation bag to the page elements to be tested
Include:
The test parameter for the page elements information to be tested is received, the test parameter is passed to the matching
The middleware interface arrived, the middleware interface matched is by middleware variable corresponding to calling to the page to be tested
Surface element performs test operation.
Alternatively, the website automation test method also includes:
The attribute information and the property set of the middleware interface matched for judging the page elements to be tested be
It is no consistent;
If the attribute information of the page elements to be tested is consistent with the property set of the middleware interface matched,
The middleware interface matched is then called to perform test operation to the page elements to be tested;
If the attribute information of the page elements to be tested and the property set of the middleware interface matched differ
Cause, then the property set of the middleware interface matched is repaiied according to the attribute information of the page elements to be tested
Just.
Present invention also provides a kind of website automatization test system, including:
Variable generating module, for being parsed to webpage, and the page elements generation middleware variable in corresponding webpage;
Interface generation module, for generating middleware interface according to the middleware variable;
Matching module, for receiving page elements information to be tested, and search and believe with the page elements to be tested
The middleware interface of manner of breathing matching;
Test module, for calling the middleware interface matched to perform test behaviour to the page elements to be tested
Make.
Alternatively, the variable generating module includes:
Analyzing sub-module, for into HTML dom trees and web analysis to be traveled through into the HTML dom trees, the webpage
One page elements corresponds to a node of the HTML dom trees;
Variable submodule, middleware variable is generated for page elements corresponding to the node according to the HTML dom trees,
Wherein, property set of the attribute information of the page elements as the middleware variable.
Alternatively, the attribute information of the page elements includes following any one or several:The address letter of place webpage
Breath, the classification of page elements, the title of page elements, the id of page elements and the value of page elements.
Alternatively, the interface generation module includes:
Submodule is traveled through, for traveling through the property set of each middleware variable, by same alike result in the property set
Middleware variable is classified as a Hash table, and the Hash table is named with the same alike result, by the centre of the same alike result
Part variable is classified as the member of the Hash table;
Interface sub-module, for the hierarchical relationship according to the HTML dom trees, will there is identical father in the Hash table
The Hash table of node generates a middleware interface, and the middleware interface is with any attribute of page elements corresponding to father node
Information is named.
Alternatively, the matching module includes:
Calculating sub module, for calculating the matching degree of the page elements information to be tested and each middleware interface;
Submodule is searched, for according in matching degree lookup and the page elements information match to be tested
Between part interface.
Alternatively, the website automatization test system also includes:
Judge module, for judging that the attribute information of the page elements to be tested connects with the middleware matched
Whether the property set of mouth is consistent;
The test module, it is additionally operable to the attribute information when the page elements to be tested and the centre matched
When the property set of part interface is consistent, the middleware interface matched is called to perform test behaviour to the page elements to be tested
Make;
Correcting module, for the attribute information when the page elements to be tested and the middleware interface matched
Property set it is inconsistent when, according to the attribute information of the page elements to be tested to the middleware interface matched
Property set is modified.
Compared with prior art, the application includes advantages below:
The method of testing that the embodiment of the present application provides, is parsed to webpage first, and machine energy is generated for web page element
Enough middleware interfaces (DSL, Domain Specific Language language) directly performed, these middleware interfaces can be certainly
Dynamic analog subscriber is operated to test web page element;In test process, tester can be by searching and the page to be tested member
Middleware interface that prime information matches simultaneously calls the middleware interface to perform automatic test operation.This method of testing
Middleware interface can be called to carry out automatic identification page elements in batches, it is not necessary to which tester manually selects page elements and entered one by one
Row identification, therefore the recognition efficiency of page elements is improved, and then improve the efficiency of automatic test.
Moreover, the embodiment of the present application after middleware interface is matched, continues to judge the category of page elements to be tested
Whether the property set of middleware interface of the property information with matching is consistent, if inconsistent, according to page elements to be tested
The property set of middleware interface of the attribute information to matching is modified.This process can be understood as a de-authentication mistake
Journey, it ensure that page elements to be tested and the accurate match of middleware interface.When the layout of page elements changes,
The property set of middleware interface of the attribute information of page elements to be tested with matching is inconsistent, according to the page to be tested
The property set of middleware interface of the attribute of an element information to matching is modified, so that the middleware interface matched
Property set information with change after page elements attribute information it is corresponding, can be with the change of dynamically adapting page layout
Change.
Certainly, any product for implementing the application is not necessarily required to reach all the above advantage simultaneously.
Brief description of the drawings
Fig. 1 is a kind of flow chart of website automation test method described in the embodiment of the present application;
Fig. 2 is the flow chart of another website automation test method described in the embodiment of the present application;
Fig. 3 is a kind of structured flowchart of website automatization test system described in the embodiment of the present application;
Fig. 4 is the structured flowchart of another website automation examining system described in the embodiment of the present application.
Embodiment
It is below in conjunction with the accompanying drawings and specific real to enable the above-mentioned purpose of the application, feature and advantage more obvious understandable
Mode is applied to be described in further detail the application.
The implementation process of herein described method is described in detail below by embodiment.
Reference picture 1, it illustrates a kind of flow chart of website automation test method described in the embodiment of the present application.This implementation
Example specifically may comprise steps of:
Step 100, webpage is parsed, and the page elements generation middleware variable in corresponding webpage;
It is above-mentioned in the present embodiment that webpage is parsed, and the page elements generation middleware variable in corresponding webpage is specific
Following sub-step can be included:
Sub-step 1001, web analysis into HTML dom trees and is traveled through into the HTML dom trees, one of the webpage
Page elements correspond to a node of the HTML dom trees;
HTML dom trees can be understood as the application programming interface of webpage, and HTML dom trees are by each member in webpage
Element all regards object one by one as, so that the element in webpage can also be obtained or edited by computer language.
Sub-step 1002, middleware variable is generated according to page elements corresponding to the node of the HTML dom trees, wherein,
Property set of the attribute information of the page elements as the middleware variable.
Specifically, the corresponding page elements of a node of HTML dom trees, the corresponding generation one of a page elements
Middleware variable.
The attribute information of page elements described in the present embodiment can specifically include following any one or several:Place net
Address information, the classification of page elements, the title of page elements, the id of page elements and the value of page elements of page, and DOM
Other attributes of the page elements in tree.For example, the address information (such as URL) of place webpage can be Alibaba.com,
Baidu.com or 163.com;The classification of page elements can be text (text), button (button) or form (form);Page
The title of surface element can be e_alibaba_searchbar, e_alibaba_search_button or e_alibaba_
search_result;The id of page elements can be SearchTextldx, searchsubmit, list-form.
It is corresponding due to the property set using the attribute information of the page elements as the middleware variable, it is described
The property set of middleware variable can equally include following any one or several:The address information of place webpage, page elements
Classification, the title of page elements, the id of page elements and the value of page elements.
Middleware variable can be defined according to the property set of the middleware variable in the present embodiment, for example, for having
Id page elements, it can be defined according to the classification of the page elements and the id of the page elements, be defined as e_#
{ pagename } _ # { classifications of page elements } _ { id of page elements }, can be expressed as e_# { pagename } _ # { type } _
{id};For denominative page elements, can be defined according to the classification of the page elements and the title of the page elements, it is fixed
Justice is e_# { pagename } _ # { classifications of page elements } { titles of page elements }, can be expressed as e_# { pagename } _ #
{type}_{name}。
For example, for search box, it is possible to the following three middleware variables of generation, respectively search in (searchbar)
Between part variable, button (button) middleware variable and result (result) middleware variable:
E_alibaba_searchbar=url=> Alibaba.com, text_field, (:Id, "
SearchTextIdx "), (value, " "), (:Class, xpath, parent, sibling }
E_alibaba_search_button=url=> Alibaba.com, button, (:Id, "
SearchSubmit "), (:Type, " button "), (:Hidefocus, " true ") (:Value, " Search ") }
E_alibaba_search_result=url=> Alibaba.com, form, (:Id, " list-form "),
(value, " "), (:Class, " images-lazyload "), (:Name, " form "), xpath }
Illustrated below with above-mentioned search middleware variable, in the search between in part variable, url=>
Alibaba.com is the address of place webpage, and text_field is the classification of page elements,:Id, " SearchTextIdx " table
The id for showing page elements is " SearchTextIdx ".
Can be with the entitled keyword of the middleware variable, and with the attribute of the middleware variable in the present embodiment
Collection is used as cryptographic Hash corresponding to keyword, creates Hash table, thus establishes the title and middleware variable of middleware variable
Property set mapping.
For example, a Hash table is created for some middleware variable, comprising with properties:
URL:The url of current page;
Type:The classification of control;
Other attributes:Other attributes that page elements have in html codes, such as id, name.
Step 102, middleware interface (DSL, Domain SpecificLanguage is generated according to the middleware variable
Language);
Following sub-step can specifically be included by generating middleware interface according to middleware variable described in the present embodiment:
Sub-step 1021, the property set of each middleware variable is traveled through, by the centre of same alike result in the property set
Part variable is classified as a Hash table, and the Hash table is named with the same alike result, and the middleware of the same alike result is become
Amount is classified as the member of the Hash table;
For example, middleware variable's attribute is concentrated into the middleware variable with same page element category (i.e. identical Type)
A Hash table is classified as, is named with the classification of the page elements, Type can be named as.Specifically, it is assumed that have on webpage more
Individual button (button) middleware variable, such as search_button, input_button and output_button, then by these
Middleware variable is classified as a Hash table, is named as Button, at the same by search_button, input_button and
Output_button is classified as Hash table Button member.Moreover, the method for specific variable can use " " operator additive attribute
Value is directly obtained, as Button.id can be directly obtained id property values.
Sub-step 1022, according to the hierarchical relationship of the HTML dom trees, will there is identical father node in the Hash table
Hash table generate a middleware interface, the middleware interface is with any attribute information of page elements corresponding to father node
Name.
For example, corresponded to when e_alibaba_searchbar and e_alibaba_search_button belongs to a father node together
Page elements e_alibaba_Search when, e_alibaba_searchbar and e_alibaba_search_button are given birth to
Into a middleware interface, e_albaba_search is named as.So, by e_alibaba_search.searchbar just
Above-mentioned e_alibaba_searchbar can be had access to.
It should be noted that in the present embodiment can also other rules generate middleware interface, the present embodiment do not do to this
Limitation.
It should be noted that the above-mentioned middleware variable by same alike result in the property set is classified as one in this step 102
Individual " Hash table ", the entitled keyword with the middleware variable that Hash table herein is mentioned with step 100, and with described
The property set of middleware variable creates " Hash table ", the two Hash tables simultaneously differ, and walk as cryptographic Hash corresponding to keyword
Each Hash of Hash table in rapid 100 is one-to-one with the node of HTML dom trees, and this step is by the attribute
And the intermediate variable of middle same alike result regenerates a Hash table, do not closed correspondingly with the node of HTML dom trees
System.
Step 104, page elements information to be tested is received, and is searched and the page elements information phase to be tested
The middleware interface matched somebody with somebody;
The method for expressing of page elements information has a lot, can be identified with the title of page elements, such as
Alibaba.search;It can also be represented with the id of page elements, as long as be able to can be made with identified page attribute of an element
For page elements information, the present embodiment is not restricted to this.
Search has much with the method for the middleware interface of the page elements information match to be tested, the present embodiment
By by being illustrated exemplified by calculating matching degree of the page elements information to be tested with each middleware interface.The lookup
It can specifically include following sub-step with the middleware interface of the page elements information match to be tested:
Sub-step 1041, calculate the matching degree of the page elements information to be tested and each middleware interface;
The matching degree for calculating the page elements information to be tested and each middleware interface can pass through following step
It is rapid to realize:
Step 1, the page elements title in the page elements information to be tested is obtained, and obtain the middleware
The title of interface;
For example, in page elements information to be tested page elements entitled search_bar, the name of middleware interface
Title is respectively:Search, click and input.
Step 2, all characters of the page elements title to be tested and the middleware interface title are converted to
Lowercase/uppercase character;
It should be noted that " lowercase/uppercase character " described in the present embodiment, means lowercase character or capital letter
Symbol.Specifically, all characters of the page elements title to be tested and the middleware interface title are all converted to small
Write characters, or, all characters of the page elements title to be tested and the middleware interface title are all converted to
Upper case character.Also anticipated in following step three and step 4 for this.
Illustrated exemplified by being converted to lowercase character, the entitled search_bar of page elements to be tested, middleware
The title of interface is respectively:Search, click and input.
The identical small letter of step 3, the calculating page elements title to be tested and the middleware interface title/
The number of upper case character, it is designated as most growing matching string;
Equally illustrated exemplified by calculating identical lowercase character, search_bar lowercase characters identical with search's
Number is 6, and search_bar lowercase character numbers identical with click's are 1, search_bar small letters identical with input's
Character number is 0.
Most long matching string is most numbers with identical lowercase character, is in the present embodiment 6, also just says, 6
For most long matching string.
Step 4, the number of the most long matching string and the lowercase/uppercase character of the middleware interface title is removed
Method computing, the matching using the business of the division arithmetic as page elements information Yu the middleware interface to be tested
Degree.
By most 6 and corresponding middleware interface title Search_bar of long matching string lowercase character search_bar
Number 9 is division arithmetic, Shang WeiMatching as page elements search_bar Yu middleware interface Search_bar to be tested
Degree.
Sub-step 1042, the middleware with the page elements information match to be tested is searched according to the matching degree
Interface.
Searched according to the matching degree of the middleware interface described in the present embodiment and believed with the page elements to be tested
The middleware interface of manner of breathing matching can specifically be realized by following steps:
Judge whether the page elements information to be tested and maximum matching degree in the matching degree of each middleware interface are high
In or equal to default threshold value;
For example, default threshold value can be 0.3, naturally it is also possible to other numerical value are arranged to, as long as less than 1.
When the maximum matching degree is greater than or equal to default threshold value, middleware corresponding to the maximum matching degree is connect
The middleware interface that mouth obtains as the page elements information matches to be tested;When the maximum matching degree is less than default
During threshold value, it fails to match.
Above-mentioned page elements search_bar and middleware interface Searchr to be tested matching degree are in the present embodimentIt is more than default threshold value 0.3, therefore with the page elements search_bar to be tested middleware interface to match
Search。
Step 106, the middleware interface matched is called to perform test operation to the page elements to be tested.
The present embodiment can perform test operation in the following manner:
The test parameter for the page elements information to be tested is received, the test parameter is passed to the matching
The middleware interface arrived, the middleware interface matched is by middleware variable corresponding to calling to the page to be tested
Surface element performs test operation.
The example that following " search box " can be combined understands the execution of above-mentioned test operation:
First, the middleware interface that matches call corresponding to search middleware, and by the survey of the page elements information
Examination parameter passes to the search middleware;
Middleware interface Search passes to the test parameter mp3 of page elements information to be tested among corresponding search
Part e_alibaba_searchbar, the operation that the search middleware e_alibaba_searchbar is performed automatically are used for simulation
Family input test parameter mp3 in search box.
Secondly, after the search middleware receives the test parameter of the page elements to be tested, the button is called
Middleware;
Button middleware is e_alibaba_search_button in the present embodiment, and the operation performed automatically is used for simulation
Click on button control in family.
Again, the button middleware, which performs, clicks on push-botton operation, and will be searched corresponding to the page elements to be tested
Hitch fruit is sent to result middleware;
Button middleware e_alibaba_search_button, which is performed, clicks on push-botton operation, and search result meal is delivered into knot
Fruit middleware e_alibaba_search_result.
Finally, the result middleware shows the search result.
As a result middleware e_alibaba_search_result performs the operation of display search result automatically.
The present embodiment can call the middleware interface Search of generation to perform test automatically it can be seen from above-mentioned example
Operation, middleware interface Search input the word to be searched for " mp3 " first in e_alibaba_searchbar, then called
E_alibaba_search_button performs the operation for clicking on button automatically, finally by e_alibaba_search_result
Search result is received, this series of tests process all performs, realizes automatic test and do not need a large amount of people automatically
Work operates, and improves the efficiency of website automatic test.
In summary, the method for testing that the embodiment of the present application provides, is parsed to webpage first, is given birth to for web page element
The middleware interface (DSL, Domain SpecificLanguage language) that can be directly performed into machine, these middlewares connect
Mouth can be operated with automatic imitation user to test web page element;In test process, tester can by search with it is to be measured
Try the middleware interface of page elements information match and call the middleware interface to perform automatic test operation.It is this
Method of testing can call middleware interface to carry out automatic identification page elements in batches, it is not necessary to which tester manually selects page member
Element is identified one by one, therefore improves the recognition efficiency of page elements, and then improves the efficiency of automatic test.
Reference picture 2, it illustrates a kind of flow chart of website automation test method described in the embodiment of the present application.This implementation
Example specifically may comprise steps of:
Step 200, webpage is parsed, and the page elements generation middleware variable in corresponding webpage;
Specifically web analysis into HTML dom trees and can be traveled through into the HTML dom trees first in the present embodiment, it is described
One page elements of webpage correspond to a node of the HTML dom trees, and wherein HTML dom trees can be understood as webpage
Application programming interface, HTMLDOM trees all regard each element in webpage as one by one object, so that the member in webpage
Element can also be obtained or edited by computer language.
Then middleware variable is generated according to page elements corresponding to the node of the HTML dom trees, wherein, the page
Property set of the attribute information of surface element as the middleware variable.
The process of specific generation middleware variable is referred to the related content of the embodiment shown in Fig. 1, and the present embodiment exists
This is not repeated.
Step 202, middleware interface is generated according to the middleware variable;
The property set of each middleware variable can be traveled through in the present embodiment first, by same alike result in the property set
Middleware variable be classified as a Hash table, and the Hash table is named with the same alike result, by the same alike result
Between part variable be classified as the member of the Hash table;Then, the hierarchical relationship according to the HTML dom trees, will have in the Hash table
The Hash table for having identical father node generates a middleware interface, and the middleware interface is with page elements corresponding to father node
Any attribute information is named.
The example for having become generation middleware interface with specific reference to middleware is referred to phase described in Fig. 1 embodiments inside the Pass
Hold, the present embodiment will not be described here.
It should be noted that in the present embodiment can also other rules generate middleware interface, the present embodiment do not do to this
Limitation.
Step 204, page elements information to be tested is received, and is searched and the page elements information phase to be tested
The middleware interface matched somebody with somebody;
Search has much with the method for the middleware interface of the page elements information match to be tested, such as can be with
By calculating the matching degree of the page elements information to be tested and each middleware interface, then searched according to the matching degree
With the middleware interface of the page elements information match to be tested.
Sub-step 2041, calculate the matching degree of the page elements information to be tested and each middleware interface;
The matching degree for calculating the page elements information to be tested and each middleware interface can pass through following step
It is rapid to realize:
Step 1, the page elements title in the page elements information to be tested is obtained, and obtain the middleware
The title of interface;
For example, in page elements information to be tested page elements entitled search_bar, the name of middleware interface
Title is respectively:Search, click and input.
Step 2, all characters of the page elements title to be tested and the middleware interface title are converted to
Lowercase/uppercase character;
Illustrated exemplified by being converted to lowercase character, the entitled search_bar of page elements to be tested, middleware
The title of interface is respectively:Search, click and input.
The identical small letter of step 3, the calculating page elements title to be tested and the middleware interface title/
The number of upper case character, it is designated as most growing matching string;
Equally illustrated exemplified by calculating identical lowercase character, search_bar lowercase characters identical with search's
Number is 6, and search_bar lowercase character numbers identical with click's are 1, search_bar small letters identical with input's
Character number is 0.
Most long matching string is most numbers with identical lowercase character, is in the present embodiment 6, also just says, 6
For most long matching string.
Step 4, the number of the most long matching string and the lowercase/uppercase character of the middleware interface title is removed
Method computing, the matching using the business of the division arithmetic as page elements information Yu the middleware interface to be tested
Degree.
By most 6 and corresponding middleware interface title Search_bar of long matching string lowercase character search_bar
Number 9 is division arithmetic, Shang WeiMatching as page elements search_bar Yu middleware interface Search_bar to be tested
Degree.
Sub-step 2042, the middleware with the page elements information match to be tested is searched according to the matching degree
Interface.
Searched according to the matching degree of the middleware interface described in the present embodiment and believed with the page elements to be tested
The middleware interface of manner of breathing matching can specifically be realized by following steps:
Judge whether the page elements information to be tested and maximum matching degree in the matching degree of each middleware interface are high
In or equal to default threshold value;
For example, default threshold value can be 0.3, naturally it is also possible to other numerical value are arranged to, as long as less than 1.
When the maximum matching degree is greater than or equal to default threshold value, middleware corresponding to the maximum matching degree is connect
The middleware interface that mouth obtains as the page elements information matches to be tested;When the maximum matching degree is less than default
During threshold value, it fails to match.
Above-mentioned page elements search_bar and middleware interface Searchr to be tested matching degree are in the present embodimentIt is more than default threshold value 0.3, therefore with the page elements search_bar to be tested middleware interface to match
Search。
Step 206, the attribute information of the page elements to be tested and the middleware interface matched are judged
Whether property set is consistent;
If the attribute information of the page elements to be tested is consistent with the property set of the middleware interface matched,
The middleware interface matched is then called to perform test operation to the page elements to be tested;
If the attribute information of the page elements to be tested and the property set of the middleware interface matched differ
Cause, then the property set of the middleware interface matched is repaiied according to the attribute information of the page elements to be tested
Just.
It should be noted that only when the attribute information of page elements to be tested and the category of the middleware interface matched
Property collection it is completely the same when, be just determined as it is consistent, as long as the attribute information of page elements to be tested connects with the middleware matched
Mouthful attribute be concentrated with an attribute it is inconsistent when, be all determined as inconsistent.For example, the attribute information of the page to be tested is
{ the title name=e_alibaba_search of page elements, the address information url=Alibaba.com of place webpage, the page
The classification type=text_field of element }, the property set of the middleware interface matched is { the title name of page elements
=e_alibaba_search, the address information url=Alibaba.com of place webpage, the classification type=of page elements
Button }, in the attribute information of the above-mentioned page to be tested and the property set of middleware interface matched, page elements
Title, the address information of place webpage are consistent, but the classification of page elements is inconsistent, be now still determined as it is inconsistent, it is necessary to
The classification of page elements in the property set of the middleware interface matched is revised as believing with the attribute of the page to be tested
The classification of page elements in breath is consistent, will " the classification type=button " of page elements is revised as " type=text_
field”。
When this step is to prevent that page layout from changing, attribute information corresponding to middleware interface is not repaiied in time
Change, and the situation for erroneous matching middleware interface occur occurs.After middleware interface is matched, continue to judge described to be measured
Whether the attribute information of the page elements of examination is consistent with the property set of the middleware interface matched, it can be understood as one
De-authentication process, to ensure that matched middleware interface accurately corresponds to the page elements to be tested.
Step 208, when the attribute information and the category of the middleware interface matched of the page elements to be tested
Property collection it is consistent when, call the middleware interface that matches to perform test operation to the page elements to be tested.
The present embodiment can perform test operation in the following manner:
The test parameter for the page elements information to be tested is received, the test parameter is passed to the matching
The middleware interface arrived, the middleware interface matched is by middleware variable corresponding to calling to the page to be tested
Surface element performs test operation.
In summary, the embodiment of above-mentioned addition de-authentication process, not only knowledge can be improved with automatic identification page elements
The efficiency of other page elements and automatic test.Moreover, after middleware interface is matched, continue to judge the page to be tested
Whether the property set of middleware interface of the attribute of an element information with matching is consistent, if inconsistent, according to page to be tested
The property set of middleware interface of the attribute information of surface element to matching is modified, and ensure that page elements to be tested with
Between part interface accurate match.Further, when the layout of page elements changes, page elements to be tested
The property set of middleware interface of the attribute information with matching is inconsistent, according to the attribute information of page elements to be tested to
The property set for the middleware interface being fitted on is modified, so that the property set information of the middleware interface matched and generation
The attribute information of page elements after change is corresponding, can be with the change of dynamically adapting page layout.
It should be noted that for foregoing embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the application is not limited by described sequence of movement, because according to
According to the application, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know,
Embodiment described in this description belongs to preferred embodiment, necessary to involved action not necessarily the application.
Based on the explanation of above method embodiment, present invention also provides the implementation of the system of corresponding website automatic test
Example, to realize the content described in above method embodiment.
Reference picture 3, it illustrates a kind of structured flowchart of website automatization test system, this reality described in the embodiment of the present application
Applying example can specifically include with lower module:
Variable generating module 11, interface generation module 12, matching module 13 and test module 14, wherein:
Variable generating module 11, for being parsed to webpage, and the page elements generation middleware in corresponding webpage becomes
Amount;
Variable generating module 11 can specifically include following submodule in the present embodiment:
Analyzing sub-module 111, for into HTML dom trees and web analysis to be traveled through into the HTMLDOM trees, the webpage
A page elements correspond to a node of the HTML dom trees;
HTML dom trees can be understood as the application programming interface of webpage, and HTML dom trees are by each member in webpage
Element all regards object one by one as, so that the element in webpage can also be obtained or edited by computer language.
Variable submodule 112, become for page elements generation middleware corresponding to the node according to the HTML dom trees
Amount, wherein, the property set of the attribute informations of the page elements as the middleware variable.
The attribute information of page elements described in the present embodiment can specifically include following any one or several:Place net
Address information, the classification of page elements, the title of page elements, the id of page elements and the value of page elements of page.For example, institute
Can be Alibaba.com, baidu.com or 163.com in the address information of webpage;The classification of page elements can be
Text, button or form;The title of page elements can be e_alibaba_searchbar, e_alibaba_search_
Button or e_alibaba_search_result;The id of page elements can be SearchTextldx, searchsubmit,
list-form。
It is corresponding due to the property set using the attribute information of the page elements as the middleware variable, it is described
The property set of middleware variable can equally include following any one or several:The address information of place webpage, page elements
Classification, the title of page elements, the id of page elements and the value of page elements.
Interface generation module 12, for generating middleware interface according to the middleware variable;
Interface generation module 12 can specifically include following submodule in the present embodiment:
Submodule 121 is traveled through, for traveling through the property set of each middleware variable, by same alike result in the property set
Middleware variable be classified as a Hash table, and the Hash table is named with the same alike result, by the same alike result
Between part variable be classified as the member of the Hash table;
For example, middleware variable's attribute can be concentrated the centre with same page element category by traversal submodule 121
Part variable is classified as a Hash table, is named with the classification of the page elements, can be named as Type.Specifically, it is assumed that webpage
On have multiple buttons (button) middleware variable, such as search_button, input_button and output_button, then
These middleware variables are classified as a Hash table, are named as Button, while by search_button, input_button
The member of Hash table is classified as with output_button.
Interface sub-module 122 is identical by having in the Hash table for the hierarchical relationship according to the HTML dom trees
The Hash table of father node generates a middleware interface, and the middleware interface is with any category of page elements corresponding to father node
Property information name.
For example, corresponded to when e_alibaba_searchbar and e_alibaba_search_button belongs to a father node together
Page elements e_alibaba_Search when, interface sub-module 122 is by e_alibaba_searchbar and e_alibaba_
Search_button generates a middleware interface, is named as e_albaba_search.So, e_alibaba_ is passed through
Search.searchbar cans have access to above-mentioned e_alibaba_searchbar.
Matching module 13, for receiving page elements information to be tested, and search and the page elements to be tested
The middleware interface of information match;
Matching module 13 can specifically include following submodule in the present embodiment:
Calculating sub module 131, for calculating the matching degree of the page elements information to be tested and each middleware interface;
Specifically, calculating sub module 131 obtains the page elements title in the page elements information to be tested first,
And obtain the title of the middleware interface;
For example, in page elements information to be tested page elements entitled search_bar, the name of middleware interface
Title is respectively:Search, click and input.
Calculating sub module 131 is secondly by all of the page elements title to be tested and the middleware interface title
Character is converted to lowercase/uppercase character;
Illustrated exemplified by being converted to lowercase character, the entitled search_bar of page elements to be tested, middleware
The title of interface is respectively:Search, click and input.
Calculating sub module 131 calculates the identical of the page elements title to be tested and the middleware interface title
The number of lowercase/uppercase character, it is designated as most growing matching string;
Equally illustrated exemplified by calculating identical lowercase character, search_bar lowercase characters identical with search's
Number is 6, and search_bar lowercase character numbers identical with click's are 1, search_bar small letters identical with input's
Character number is 0.
Most long matching string is most numbers with identical lowercase character, is in the present embodiment 6, also just says, 6
For most long matching string.
That calculating sub module 131 goes here and there the most long matching with the lowercase/uppercase character of the middleware interface title
Number does division arithmetic, using the business of the division arithmetic as the page elements information to be tested and the middleware interface
Matching degree.
Calculating sub module 13 by most it is long matching go here and there 6 and corresponding middleware interface title Search_bar lowercase character
Search_bar number 9 is division arithmetic, Shang WeiAs page elements search_bar to be tested and middleware interface
Search_bar matching degree.
Submodule 132 is searched, for being searched and the page elements information match to be tested according to the matching degree
Middleware interface.
Specifically, the matching that submodule 132 judges the page elements information to be tested and each middleware interface is searched
Whether maximum matching degree is greater than or equal to default threshold value in degree;
For example, default threshold value can be 0.3, naturally it is also possible to other numerical value are arranged to, as long as less than 1.
When the maximum matching degree is greater than or equal to default threshold value, submodule 132 is searched by the maximum matching degree
The middleware interface that corresponding middleware interface obtains as the page elements information matches to be tested;When described maximum
When being less than default threshold value with degree, it fails to match.
Above-mentioned page elements search_bar and middleware interface Searchr to be tested matching degree are in the present embodimentIt is more than default threshold value 0.3, therefore with the page elements search_bar to be tested middleware interface to match
Search。
Test module 14, for calling the middleware interface matched to perform test behaviour to the page elements to be tested
Make.
Specifically, test module 14 can be used for receiving the test parameter for the page elements information to be tested,
By the incoming middleware interface matched of the test parameter, the middleware interface matched passes through corresponding to calling
Middleware variable performs test operation to the page elements to be tested.
Variable generating module identifies page elements by analyzing web page in the present embodiment, it is not necessary to manual identification, and
Page elements of the variable generating module in webpage automatically generate middleware variable, and then interface generation module is according to middleware
Variable automatically generates middleware interface, and then matching module is by searching the centre with the western information match of page elements to be tested
Part interface, test module call the middleware interface matched to perform test operation to the page elements to be tested.Therefore,
Above-mentioned website automatization test system can be with automatic identification page elements, it is not necessary to which tester manually selects page elements one by one
It is identified, therefore improves the recognition efficiency of page elements, and then improves the efficiency of automatic test.
For the system embodiment of above-mentioned website automatic test, because it is substantially similar to embodiment of the method, institute
With the fairly simple of description, the part explanation of related part embodiment of the method shown in Figure 1.
Reference picture 4, it illustrates a kind of structured flowchart of website automatization test system, this reality described in the embodiment of the present application
Applying example can specifically include with lower module:
Variable generating module 21, interface generation module 22, matching module 23, judge module 24, test module 25 and amendment
Module 26, wherein:
Variable generating module 21, for being parsed to webpage, and the page elements generation middleware in corresponding webpage becomes
Amount;
Web analysis specifically into HTML dom trees and can be traveled through the HTML by variable generating module 21 in the present embodiment
Dom tree, a page elements of the webpage correspond to a node of the HTML dom trees, and wherein HTML dom trees can be managed
The application programming interface for webpage is solved, HTML dom trees all regard each element in webpage as one by one object, so as to
The element in webpage is set to be obtained or be edited by computer language.
Variable generating module 21 can also generate middleware according to page elements corresponding to the node of the HTML dom trees
Variable, wherein, the property set of the attribute informations of the page elements as the middleware variable.
The process that variable generating module 21 specifically generates middleware variable is referred to the phase of embodiment shown in Fig. 3 inside the Pass
Hold, the present embodiment will not be described here.
Interface generation module 22, for generating middleware interface according to the middleware variable;
Interface generation module 22 can travel through the property set of each middleware variable first in the present embodiment, by the category
Property concentrate the middleware variable of same alike result to be classified as a Hash table, and the Hash table is named with the same alike result, by institute
The middleware variable for stating same alike result is classified as the member of the Hash table;Then, interface generation module 22 is according to the HTML DOM
The hierarchical relationship of tree, the Hash table in the Hash table with identical father node is generated into a middleware interface, the centre
Part interface is named with any attribute information of page elements corresponding to father node.
The example that interface generation module 22 has become generation middleware interface with specific reference to middleware is referred to Fig. 3 embodiments
Described related content, the present embodiment will not be described here.
It should be noted that in the present embodiment interface generation module 22 can also other rules generate middleware interface, this
Embodiment is without limitation.
Matching module 23, for receiving page elements information to be tested, and search and the page elements to be tested
The middleware interface of information match;
Matching module 23 can be used for calculating the page elements information to be tested in the present embodiment connects with each middleware
The matching degree of mouth, then searched according to the matching degree and the middleware of the page elements information match to be tested connects
Mouthful.
Judge module 24, for the attribute information for judging the page elements to be tested and the middleware matched
Whether the property set of interface is consistent;
When judge module 24 is to prevent that page layout from changing, attribute information corresponding to middleware interface without and
Shi Xiugai, and the situation for erroneous matching middleware interface occur occurs.Matching module 23 is sentenced after middleware interface is matched
Disconnected module 24 continues to judge attribute of the attribute information with the middleware interface matched of the page elements to be tested
Whether collection is consistent, it can be understood as a de-authentication process, to ensure that matched middleware interface is treated described in accurately corresponding to
The page elements of test.
Test module 25, connect for the attribute information when the page elements to be tested with the middleware matched
When the property set of mouth is consistent, the middleware interface matched is called to perform test operation to the page elements to be tested;
Test module 25 specifically can be used for receiving the test parameter for the page elements information to be tested, by institute
The incoming middleware interface matched of test parameter is stated, the middleware interface matched passes through middle corresponding to calling
Part variable performs test operation to the page elements to be tested.
Correcting module 26, connect for the attribute information when the page elements to be tested with the middleware matched
When the property set of mouth is inconsistent, according to the attribute information of the page elements to be tested to the middleware interface matched
Property set be modified.
Specifically, when the attribute information and the attribute of the middleware interface matched of the page elements to be tested
When collecting inconsistent, correcting module 26 is by category of the property set of the middleware interface matched according to page elements to be tested
Property information be modified, ensure the attribute information of the property set of the middleware interface and page elements to be tested matched
Unanimously.
The present embodiment identifies page elements by variable generating module analyzing web page, it is not necessary to manual identification, Er Qiebian
Measure page elements of the generation module in webpage and automatically generate middleware variable, then interface generation module becomes according to middleware
Amount automatically generates middleware interface, finally can be by matching module lookup and the western information match of page elements to be tested
Between part interface, test module call described in the middleware interface that matches perform test operation.Above-mentioned website automatic test
System can be with automatic identification page elements, it is not necessary to which tester manually selects page elements and is identified one by one, therefore improves
The recognition efficiency of page elements, and then improve the efficiency of automatic test.Moreover, the present embodiment adds correcting module,
The page elements to be tested and the accurate match of the middleware interface are ensure that, can be with the change of dynamically adapting page layout
Change.
For the system embodiment of above-mentioned website automatic test, because it is substantially similar to embodiment of the method, institute
With the fairly simple of description, the part explanation of related part embodiment of the method shown in Figure 2.
Each embodiment in this specification is described by the way of progressive, what each embodiment stressed be with
The difference of other embodiment, between each embodiment identical similar part mutually referring to.
It would have readily occurred to a person skilled in the art that be:Any combination application of above-mentioned each embodiment is all feasible, therefore
Any combination between above-mentioned each embodiment is all the embodiment of the application, but this specification exists as space is limited,
This is not just detailed one by one.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program
Product.Therefore, the application can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the application can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The application is with reference to the flow according to the method for the embodiment of the present application, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know basic creation
Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent
Select embodiment and fall into having altered and changing for the application scope.
Above to a kind of website automation test method and automatization test system provided herein, carry out in detail
Introduce, specific case used herein is set forth to the principle and embodiment of the application, the explanation of above example
It is only intended to help and understands the present processes and its core concept;Meanwhile for those of ordinary skill in the art, according to this
The thought of application, there will be changes in specific embodiments and applications, in summary, this specification content should
It is interpreted as the limitation to the application.
Claims (14)
- A kind of 1. website automation test method, it is characterised in that including:Webpage is parsed, and the page elements generation middleware variable in corresponding webpage;Middleware interface is generated according to the middleware variable;Page elements information to be tested is received, and searches and is connect with the middleware of the page elements information match to be tested Mouthful;The middleware interface matched is called to perform test operation to the page elements to be tested;Further comprise:Receive For the test parameter of the page elements information to be tested, the incoming middleware matched of the test parameter is connect Mouthful, the middleware interface matched performs survey by middleware variable corresponding to calling to the page elements to be tested Examination operation.
- 2. according to the method for claim 1, it is characterised in that it is described that webpage is parsed, and the page in corresponding webpage Surface element generation middleware variable includes:Web analysis into HTML dom trees and is traveled through into the HTML dom trees, described in the page elements correspondence of the webpage One node of HTML dom trees;Middleware variable is generated according to page elements corresponding to the node of the HTML dom trees, wherein, the page elements Property set of the attribute information as the middleware variable.
- 3. according to the method for claim 2, it is characterised in that the attribute information of the page elements includes following any one Or several:The address information of place webpage, the classification of page elements, the title of page elements, the id and the page of page elements The value of element.
- 4. according to the method for claim 2, it is characterised in that described that middleware interface bag is generated according to middleware variable Include:The property set of each middleware variable is traveled through, the middleware variable of same alike result in the property set is classified as a Kazakhstan Uncommon table, and the Hash table is named with the same alike result, the middleware variable of the same alike result is classified as the Hash table Member;According to the hierarchical relationship of the HTML dom trees, the Hash table in the Hash table with identical father node is generated one Middleware interface, the middleware interface are named with any attribute information of page elements corresponding to father node.
- 5. according to the method for claim 1, it is characterised in that the lookup and the page elements information phase to be tested The middleware interface of matching includes:Calculate the matching degree of the page elements information to be tested and each middleware interface;Middleware interface with the page elements information match to be tested is searched according to the matching degree.
- 6. according to the method for claim 5, it is characterised in that it is described calculate the page elements information to be tested with it is each The matching degree of middleware interface includes:The page elements title in the page elements information to be tested is obtained, and obtains the title of the middleware interface;All characters of the page elements title to be tested and the middleware interface title are converted into lowercase/uppercase word Symbol;Calculate of the identical lowercase/uppercase character of the page elements title to be tested and the middleware interface title Number, it is designated as most growing matching string;The number of the most long matching string and the lowercase/uppercase character of the middleware interface title is done into division arithmetic, by institute The business of division arithmetic is stated as the page elements information to be tested and the matching degree of the middleware interface.
- 7. according to the method for claim 6, it is characterised in that it is described according to the matching degree of the middleware interface search with The middleware interface of the page elements information match to be tested includes:Judge in the matching degree of the page elements information to be tested and each middleware interface maximum matching degree whether be higher than or Equal to default threshold value;When the maximum matching degree is greater than or equal to default threshold value, middleware interface corresponding to the maximum matching degree is made The middleware interface obtained for the page elements information matches to be tested;When the maximum matching degree is less than default threshold value, it fails to match.
- 8. according to the method for claim 2, it is characterised in that also include:Judge the attribute informations of the page elements to be tested and the middleware interface matched property set whether one Cause;If the attribute information of the page elements to be tested is consistent with the property set of the middleware interface matched, adjust Test operation is performed to the page elements to be tested with the middleware interface matched;If the attribute information of the page elements to be tested and the property set of the middleware interface matched are inconsistent, The property set of the middleware interface matched is modified according to the attribute information of the page elements to be tested.
- A kind of 9. website automatization test system, it is characterised in that including:Variable generating module, for being parsed to webpage, and the page elements generation middleware variable in corresponding webpage;Interface generation module, for generating middleware interface according to the middleware variable;Matching module, for receiving page elements information to be tested, and search and the page elements information phase to be tested The middleware interface of matching;Test module, for calling the middleware interface matched to perform test operation to the page elements to be tested;Institute State test module to be specifically used for receiving the test parameter for the page elements information to be tested, the test parameter is passed Enter the middleware interface matched, the middleware interface matched is by middleware variable corresponding to calling to described Page elements to be tested perform test operation.
- 10. system according to claim 9, it is characterised in that the variable generating module includes:Analyzing sub-module, for into HTML dom trees and web analysis to be traveled through into the HTML dom trees, one of the webpage Page elements correspond to a node of the HTML dom trees;Variable submodule, middleware variable is generated for page elements corresponding to the node according to the HTML dom trees, wherein, Property set of the attribute information of the page elements as the middleware variable.
- 11. system according to claim 10, it is characterised in that the attribute information of the page elements includes following any One or several:The address information of place webpage, the classification of page elements, the title of page elements, the id and page of page elements The value of surface element.
- 12. system according to claim 10, it is characterised in that the interface generation module includes:Submodule is traveled through, for traveling through the property set of each middleware variable, by the centre of same alike result in the property set Part variable is classified as a Hash table, and the Hash table is named with the same alike result, and the middleware of the same alike result is become Amount is classified as the member of the Hash table;Interface sub-module, for the hierarchical relationship according to the HTML dom trees, will there is identical father node in the Hash table Hash table generate a middleware interface, the middleware interface is with any attribute information of page elements corresponding to father node Name.
- 13. system according to claim 9, it is characterised in that the matching module includes:Calculating sub module, for calculating the matching degree of the page elements information to be tested and each middleware interface;Submodule is searched, for searching the middleware with the page elements information match to be tested according to the matching degree Interface.
- 14. system according to claim 10, it is characterised in that also include:Judge module, for the attribute information for judging the page elements to be tested and the middleware interface matched Whether property set is consistent;The test module, it is additionally operable to when the attribute information of the page elements to be tested connects with the middleware matched When the property set of mouth is consistent, the middleware interface matched is called to perform test operation to the page elements to be tested;Correcting module, for when the attribute information and the category of the middleware interface matched of the page elements to be tested When property collection is inconsistent, the attribute according to the attribute information of the page elements to be tested to the middleware interface matched Collection is modified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210553732.4A CN103873318B (en) | 2012-12-18 | 2012-12-18 | A kind of website automation test method and automatization test system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210553732.4A CN103873318B (en) | 2012-12-18 | 2012-12-18 | A kind of website automation test method and automatization test system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103873318A CN103873318A (en) | 2014-06-18 |
CN103873318B true CN103873318B (en) | 2018-02-13 |
Family
ID=50911464
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210553732.4A Expired - Fee Related CN103873318B (en) | 2012-12-18 | 2012-12-18 | A kind of website automation test method and automatization test system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103873318B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373468B (en) * | 2014-06-20 | 2018-08-07 | 阿里巴巴集团控股有限公司 | A kind of detection method and system of WEB automations measurability |
EP3179370A4 (en) * | 2014-09-03 | 2017-09-13 | Huawei Technologies Co. Ltd. | Webpage automatic test method and apparatus |
CN105512128B (en) * | 2014-09-24 | 2019-06-28 | 阿里巴巴集团控股有限公司 | The processing method and processing device of the ID attribute of page elements |
CN105610926B (en) * | 2015-12-22 | 2019-01-11 | 广州品唯软件有限公司 | Message delivery method, system and message-oriented middleware system |
CN109032936B (en) * | 2018-07-13 | 2021-11-05 | 陈希 | Desktop automation test development method and system |
CN109471793B (en) * | 2018-09-29 | 2021-08-13 | 天津大学 | Webpage automatic test defect positioning method based on deep learning |
CN111190574B (en) * | 2018-11-14 | 2023-03-10 | 广东万丈金数信息技术股份有限公司 | Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly |
CN109828900A (en) * | 2018-12-14 | 2019-05-31 | 深圳壹账通智能科技有限公司 | Test script automatic generation method, device, electronic equipment and storage medium |
CN111949510B (en) * | 2019-05-17 | 2024-05-14 | 百度在线网络技术(北京)有限公司 | Test processing method, device, electronic equipment and readable storage medium |
CN110262903B (en) * | 2019-05-17 | 2021-09-03 | 北京恒赢智航科技有限公司 | Middleware framework and method based on aviation reservation system |
CN110399586B (en) * | 2019-07-31 | 2024-07-09 | 深圳前海微众银行股份有限公司 | Automatic processing method, device, equipment and medium for web interface element |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521121A (en) * | 2011-11-18 | 2012-06-27 | 华为技术有限公司 | Page testing method and page testing device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110191676A1 (en) * | 2010-01-29 | 2011-08-04 | Microsoft Corporation | Cross-Browser Interactivity Recording, Playback, and Editing |
-
2012
- 2012-12-18 CN CN201210553732.4A patent/CN103873318B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521121A (en) * | 2011-11-18 | 2012-06-27 | 华为技术有限公司 | Page testing method and page testing device |
Also Published As
Publication number | Publication date |
---|---|
CN103873318A (en) | 2014-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103873318B (en) | A kind of website automation test method and automatization test system | |
US11507732B1 (en) | Web browsing | |
US9396262B2 (en) | System and method for enhancing search relevancy using semantic keys | |
US20070078889A1 (en) | Method and system for automated knowledge extraction and organization | |
US8972440B2 (en) | Method and process for semantic or faceted search over unstructured and annotated data | |
US7895595B2 (en) | Automatic method and system for formulating and transforming representations of context used by information services | |
US8775930B2 (en) | Generic frequency weighted visualization component | |
US20140108418A1 (en) | Searching code by specifying its behavior | |
EP2881868A1 (en) | Search interface | |
US20150113388A1 (en) | Method and apparatus for performing topic-relevance highlighting of electronic text | |
US10572566B2 (en) | Image quality independent searching of screenshots of web content | |
CN110286967A (en) | Interactive tutorial is integrated | |
CN105512285A (en) | Self-adaption web crawler method based on machine learning | |
CN112417338B (en) | Page adaptation method, system and equipment | |
CN107220250A (en) | A kind of template configuration method and system | |
CN104881428A (en) | Information graph extracting and retrieving method and device for information graph webpages | |
CN105117434A (en) | Webpage classification method and webpage classification system | |
CN109240903A (en) | A kind of method and apparatus assessed automatically | |
Csuvik et al. | Evaluation of textual similarity techniques in code level traceability | |
US8799791B2 (en) | System for use in editorial review of stored information | |
US20230139720A1 (en) | Method and system for performing product matching on an e-commerce platform | |
Kumar et al. | A systematic review of semantic clone detection techniques in software systems | |
CN104268246B (en) | Generation accesses the method and access method and device of internet sites command script | |
US20090157645A1 (en) | Relating similar terms for information retrieval | |
CN108491423B (en) | Sorting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180213 |
|
CF01 | Termination of patent right due to non-payment of annual fee |