CN108694115A - A kind of processing method, equipment and the system of webpage test - Google Patents

A kind of processing method, equipment and the system of webpage test Download PDF

Info

Publication number
CN108694115A
CN108694115A CN201710221334.5A CN201710221334A CN108694115A CN 108694115 A CN108694115 A CN 108694115A CN 201710221334 A CN201710221334 A CN 201710221334A CN 108694115 A CN108694115 A CN 108694115A
Authority
CN
China
Prior art keywords
anchor point
control
test
node
test anchor
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.)
Withdrawn
Application number
CN201710221334.5A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710221334.5A priority Critical patent/CN108694115A/en
Publication of CN108694115A publication Critical patent/CN108694115A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the present application discloses a kind of processing method, equipment and the system of webpage test, and wherein method includes:Terminal obtains the page source file of current web page first, then rule is inserted into according to test anchor point and determines the node location for needing to be inserted into test anchor point in the page source file, and the test anchor point of generation is inserted at the node location, the page source file to be measured with the test anchor point is ultimately produced, the search efficiency of webpage test can be improved.

Description

A kind of processing method, equipment and the system of webpage test
Technical field
The present invention relates to processing method, equipment and systems that web technologies field more particularly to a kind of webpage are tested.
Background technology
With the continuous development of web technologies, more and more webpages are devised, in order to ensure the normal fortune of webpage It goes and webpage is optimized, developer needs to carry out automatic test to these webpages.Automatic test refers to people It is changed into the process that machine executes automatically for the test process of driving force, in general, devising test case in developer Later, the regulation described in the test case step by step execute test, obtain actual result and desired result Comparison.
In the prior art, during executing automatic test, be required for page control in the webpage to operation into Row searchs and locates, and could build webpage automatic test cases according to the page control found.In general, developer needs manually Page control node is searched, to carry out the automatic test of webpage according to the result of lookup, this brings to developer Huge workload, thereby increases and it is possible to because of situations such as human factor the mistake of some page control nodes can be caused to look for, leak and look for, reduction Testing efficiency.
Invention content
The embodiment of the present application technical problem to be solved is, provide a kind of processing method of webpage test, equipment and System can improve the search efficiency of webpage test.
In a first aspect, the embodiment of the present application provides a kind of processing method, equipment and the system of webpage test, this method In, terminal obtains the page source file of current web page first, is then inserted into rule according to test anchor point and determines the page source document The node location for being inserted into test anchor point is needed in part, and the test anchor point of generation is inserted at the node location, is ultimately produced Page source file to be measured with the test anchor point.
As it can be seen that the method provided by implementing first aspect, can test anchor point by increasing in page source file, Foundation is searched using the test anchor point as control, improves the search efficiency of automatic test.
As an alternative embodiment, it can be specifically in the page source file that the test anchor point, which is inserted into rule, Basic control node and/or encapsulation control node are inserted into test anchor point, wherein at least one basis in the encapsulation control node Control node;This is inserted into rule according to test anchor point and determines the node position for needing to be inserted into test anchor point in the page source file It sets, can be specifically to determine basic control node and/or encapsulation control node from the page source file, and the basis is controlled Part node and/or the position for encapsulating control node are inserted into the node location of test anchor point as needs.
As it can be seen that by implementing this optional embodiment, terminal can be in the basic control node in page source file And/or encapsulation control node is inserted into test anchor point, and the specific location of control node is found based on the test anchor point, it improves The search efficiency of control.
It is surveyed as an alternative embodiment, the terminal can also be parsed from webpage source file to be measured The control of examination, selects according to the type of the control and binds the test anchor point of the control, at the same record the test anchor point of binding with The binding relationship of the control, it includes the binding relationship, the type of the control and the test with the control bundle then to generate The page object of anchor point.
As it can be seen that by implementing this optional embodiment, the test anchor point can be based on and build page object, exploit person Member can improve the structure effect of automatic test by calling the page object come the testing procedure of layout automatic test Rate.
As an alternative embodiment, the terminal parses control that needs to be tested from webpage source file to be measured Part can be the priority for obtaining each control first, then according to priority to determining to need to carry out in the webpage to be measured The control of test.
As an alternative embodiment, the terminal needs the test anchor for the control bound according to the selection of the type of control Point can be specifically that the test anchor point of the control own node position is preferentially selected to be bound.
As it can be seen that by implementing this optional embodiment, the test anchor of control own node position can be passed through Point quickly determines the location information and other information of the control, and it is right during building automatic test cases to improve The search efficiency of control.
As an alternative embodiment, the terminal preferentially selects the test anchor point of the control own node position It is bound, can be specifically when the type of the control is encapsulation control, which preferentially selects the control own node institute Test anchor point in position is bound, and in the control own node position there is no when test anchor point, which can be with The test anchor point of any one descendant nodes position in the control is selected to be bound;It is controlled based on the type of the control When part, the test anchor point which can directly select the control own node position is bound.
As it can be seen that by implementing this optional embodiment, can be selected different preferential according to the difference of control type The method of the test anchor point of bound control own node position, keeps the structure of page object easier.
As an alternative embodiment, the terminal generate test anchor point when, can be first on detection node position Basic control node and/or encapsulation control node whether there is mark ID attributes, if not having the ID attributes, the terminal is just An anchor point attribute value and anchor point attribute-name can be generated at random with autocoding, and generated comprising the anchor point attribute value and the anchor point The test anchor point of attribute-name;If having the ID attributes, which can set anchor point attribute value to the ID attributes, simultaneously An anchor point attribute-name is regenerated, and generates the test anchor point for including the anchor point attribute value and the anchor point attribute-name.
Wherein, which keeps unique in the page to be measured.
As it can be seen that by implementing this feasible embodiment, it can be when control node has ID attributes, by anchor point attribute Value is set as ID attributes, has both maintained anchor point attribute value in the uniqueness of the page to be measured, has also improved developer and passing through survey Accuracy when examination anchor point positions control.
Second aspect, provides a kind of test anchor point and a kind of page object device, the test anchor point and should Page object device has the function of realizing behavior in above-mentioned first aspect or the possible realization method of first aspect.The function can By hardware realization, corresponding software realization can also be executed by hardware.The hardware or software include it is one or more with The above-mentioned corresponding module of function.The module can be software and/or hardware.Based on same inventive concept, due to the terminal solution Certainly the principle of problem and advantageous effect may refer to each possible method embodiment of above-mentioned first aspect and first aspect And caused advantageous effect, therefore the implementation of the terminal may refer to each possible of above-mentioned first aspect and first aspect Method embodiment, overlaps will not be repeated.
The third aspect, provides a kind of webpage test system, which includes:Above-mentioned test anchor point and above-mentioned page Face object apparatus.The embodiment that the system solves the problems, such as may refer to each possible side of above-mentioned first aspect and first aspect The embodiment of method, overlaps will not be repeated.
Fourth aspect provides a kind of terminal, which includes:Memory, for storing one or more programs;Processing Device, the scheme in method design for calling the program being stored in the memory to realize above-mentioned first aspect, the terminal The embodiment and advantageous effect solved the problems, such as may refer to each possible method of above-mentioned first aspect and first aspect Embodiment and advantageous effect, overlaps will not be repeated.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of schematic diagram increasing test anchor point provided by the embodiments of the present application;
Fig. 2 is a kind of schematic diagram generating page object provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 4 is a kind of flow diagram of the processing method of webpage test provided by the embodiments of the present application;
Fig. 5 is the flow diagram of the processing method of another webpage test provided by the embodiments of the present application;
Fig. 6 is the flow diagram of the processing method of another webpage test provided by the embodiments of the present application;
Fig. 7 is a kind of structural schematic diagram of test anchor point provided by the embodiments of the present application;
Fig. 8 is a kind of structural schematic diagram of page object device provided by the embodiments of the present application;
Fig. 9 is a kind of structural schematic diagram of webpage test system provided by the embodiments of the present application.
Specific implementation mode
Below in conjunction with the attached drawing in the embodiment of the present application, the embodiment of the present application is illustrated.
The embodiment of the present application provides a kind of processing method, equipment and the system of webpage test, can improve webpage test Search efficiency.It is described in detail separately below.
In order to be best understood from processing method, equipment and the system of a kind of webpage test provided by the embodiments of the present application, below The processing scene of the embodiment of the present application is first described.
Referring to Fig. 1, being a kind of schematic diagram increasing test anchor point provided by the present application.Wherein, rule file 101 and page Input of the face source file 102 as test anchor point 103, by test anchor point 103 according to rule file 101 in page source Test anchor point is inserted into file 102, to which output includes the page source file 104 to be tested of test anchor point.Wherein, the test anchor Point device 103 can handle the terminal of page source file to realize by computer etc..
Since no matter developer uses any automated test frame, it is required for the webpage operated by terminal-pair Control in page source file is searched and located, then the control can be operated (such as click, double-click, input Deng), under normal circumstances, the lookup mode to control can be that mark ID is searched, title (Name) is searched, Css selectors (CssSelector) lookup and standard generalized markup language path (xpath) lookup etc..Wherein, most effective lookup side Formula is that ID is searched and Name is searched, and is followed by searched using xpath.
When developer wants the mode searched using ID lookups or Name, the control of the lookup must just have ID to belong to Property or Name attributes, this just needs developer when script is developed, and all controls are all increased to ID attributes or Name attributes, This brings huge additional workload to developer, and in order to consider dynamic page and automatically process, ID attributes or Name attributes, which must be also dynamic parameter, can not accomplish to fix.
Wherein, when the control of page source file lacks ID attributes or Name attributes, it can generally use xpath as control The lookup mode of part element, once however, the page source file of webpage is changed, the xpath built before changing is easy failure, leads Automation use-case is caused to execute failure or unstable, testing efficiency is low, and therefore, that there are workloads is huge for above-mentioned lookup mode, Search the vulnerable and low problem of testing efficiency.Increase test anchor point automatically in page source file by terminal, alleviates The workload of developer, and the test anchor point is exclusively used in automatic test, will not change structure and shape in page source file State, the test anchor point is not therefore vulnerable, when developer builds automation use-case, can improve the efficiency of control lookup.
In Fig. 1, rule file 101 is the file for defining test anchor point and being inserted into rule.It can be retouched in the rule file 101 State the position for being inserted into test anchor point.It may go out in the page source files 102 of all webpages for example, rule file 101 can cover The existing bases Html control node, including:The marks such as input, select, textarea, table, label, li, span, img, a Sign node.The node covered in rule file 101 is then the node for needing to be inserted into test anchor point.Page source file 102 can be The files such as the page source file, such as .html and .jsp and .uslx on the foreground webpage (Website, WEB).
Specifically, the processing procedure of the test anchor point 103 can be the test anchor being primarily based in rule file 101 Point is inserted into that institute in rule searching page source file 102 is in need to be inserted into the node location for testing anchor point, then carries out test anchor point Increase.Wherein, test anchor point may include anchor point attribute-name and anchor point attribute value.The test anchor point 103 then should The test anchor point of generation is inserted into the node location found.
Wherein, the ID attributes of node where anchor point attribute value can preferentially choose the node location, if the ID attributes are not In the presence of then an anchor point attribute value can be generated by autocoding, to ensure the anchor point attribute value generated in the entire page to be measured It is unique in source file 104.It is the dedicated category of WEB automatic tests that anchor point attribute-name, which can be used for identifying the test anchor point being inserted into, Property, the anchor point attribute-names of all test anchor points can be both configured to identical by test anchor point 103 when generating test anchor point Title, such as the anchor point attribute-name of the test anchor point can all be x-autoid.
Further, when having increased control newly in the page source file 104 to be measured, which can be right The page source file 104 to be measured is reprocessed, and at this moment, the node location of existing test anchor point will not be inserted into new test Anchor point, which only can be inserted into new test anchor point to the node location for being not inserted into test anchor point, and insert Enter to test after anchor point is fully completed, exports newest page source file to be measured.
It, can be according to all code steps of operation order layout, then when developer builds automatic test cases Lookup basis of the test anchor point as control for obtaining the control searched, is then assembled into the lookup sides xpath by the test anchor point Formula or CssSelector search mode, to position the corresponding control of test anchor point.
For example, the entitled x-autoid of anchor point attribute of user name input frame control, anchor point attribute value are The anchor point attribute-name x-autoid and anchor point attribute value logintext can be assembled by logintext, developer Xpath searches mode to obtain user name input frame control.
Further, referring to Fig. 2, being a kind of schematic diagram generating page object provided by the embodiments of the present application.The Fig. 2 It is based on the basis of Fig. 1, the test anchor point based on generation further generates the processing procedure of page object.Wherein, the generation The subject of implementation page object device 203 of page object can also can be handled the terminal of page source file Lai real by computer etc. It is existing.
The mode of the manual operation page+recording may be used in terminal, and ID attributes, the Name of the automatic operated control of crawl belong to Property, if without ID attributes or the control of Name attributes, the page behaviour of recording can be then based on automatic Mosaic at xpath Automatically generate page object.When developer builds automatic test cases, page object can be directly invoked and carry out layout Testing procedure.
Page object is generated by the way of recording can achieve the purpose that encapsulation reuses, relatively directly using ID or Name or Xpath is searched, and improves the search efficiency of automation use-case, but since there are dynamic I D or automatic Mosaics for control Xpath, the accuracy by ID, Name or xpath of the control that recording obtains automatically are relatively low.In fig. 2, pass through the page pair As test anchor point of the device 203 based on addition, input item all in Web page is automatically identified, according to the input identified , page object is automatically generated, page object includes that the attribute member and member of all Web controls on current page correspond to Operating method (inputXXX, clickXXX), then, automation use-case developer's five application page object builds Web UI Automation use-case, the accuracy of the orient control in page object can be improved.
In fig. 2, terminal obtains control and defines file 201 and page source file 202 to be measured first, which defines file Can include the definition to the bases html control and the definition to product encapsulation Web controls in 201.Wherein, which controls Part can refer to include input, select, textarea, table, label, li, span, the control of the nodes such as img, a, Product encapsulation Web controls, which can be derived from the design documentation of user interface development, retouches the definition of product page control It states, such as carries out the definition of control using Class types, CSS formatted files carry out the rendering of control, specifically, the terminal can With Class=" Droplist " is combobox defined in product encapsulation Web controls, Class=" oc-date " is button etc..
Product encapsulation Web controls can be formed by the bases html control combination, and carry out rendering exhibition plus CSS Class Show.Since product encapsulation Web controls are based on made of the control combination of the bases html, and being inserted into rule based on test anchor point can All bases html controls will be covered so that anchor point will be tested on the page, so Web controls at least one html each encapsulated Basic control and a test anchor point, the position of encapsulation Web controls can be controlled by the bases html in its any one Web control The test anchor point of part uniquely confirms.
Further, which can define file 201 to the page source file to be measured according to the control 202 are parsed, and the priority of control in file 201 is defined according to control, and identify in the page source file 202 to be measured can be with As the test control of independent test object, then (i.e. Name belongs to test control title all on automatic identification page-out Property), test control type (Web Control Type) tests the corresponding test anchor point of control and test control and test anchor The binding relationship of point.And then the page object device 203 can generate page object based on all identification items of above-mentioned identification 204, can include in the page object 204 all identification items and the corresponding operating method of each Web controls (such as InputXXX, clickXXX etc.).
Developer can be by directly invoking page object 204 and based on the manual volume of automation use-case test frame progress Code builds automatic test cases.
For example, which is entitled XXXLoginPageObject, and developer first logs into this Then XXXLoginPageObject inputs username and password, finally clicks login button, so that it may to develop login page Automatic test cases.
Referring to Fig. 3, being a kind of structural schematic diagram of terminal provided by the embodiments of the present application.Described in the present embodiment Terminal, including:User interface 301, display screen 302, processor 303, communication interface 304, memory 305, above-mentioned user interface 301, display screen 302, processor 303, communication interface 304 and memory 305 can be connected by bus, can also be with other Mode connects.
Processor 303 can be central processing unit (English:Central processing unit, abbreviation:CPU), network Processor (English:Network processor, abbreviation:) or the combination of CPU and NP NP.Processor 303 can also be multinuclear For realizing the core of communication identifier binding in CPU or multinuclear NP.
Above-mentioned processor 303 can be hardware chip.Above-mentioned hardware chip can be application-specific integrated circuit (English: Application-specific integrated circuit, abbreviation:ASIC), programmable logic device (English: Programmable logic device, abbreviation:PLD) or combinations thereof.Above-mentioned PLD can be Complex Programmable Logic Devices (English:Complex programmable logic device, abbreviation:CPLD), field programmable gate array (English: Field-programmable gate array, abbreviation:FPGA), Universal Array Logic (English:generic array Logic, abbreviation:GAL) or it is arbitrarily combined.
Communication interface 304 can be used for receiving and sending messages or the interaction of signaling and signal send and receive, and particularly, lead to Believe that interface 304 can by radio communication or priority communication is communicated with network and other equipment.Above-mentioned wireless communication can To use any communication standard or agreement, including but not limited to adopting wireless fidelity technology (WIreless FIdelity, WiFi), GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..It is above-mentioned excellent First communication includes but not limited to preferential broadband, optical fiber etc..
User interface 931 can be used for receiving the number or character information of input, and generate the user setting with the terminal And the related key signals input of function control.Specifically, above-mentioned user interface 301 may include physical keyboard, function key (such as Volume control button, switch key etc.), trace ball, mouse, operating lever and other input equipments.
Display screen 302 can be used for showing information input by user or be supplied to user information and the terminal it is various Menu.LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic may be used in display screen 302 Light-Emitting Diode, Organic Light Emitting Diode) etc. forms configure.Touch panel can cover display screen 902, when tactile Control panel detection is on it or after neighbouring touch operation, sending processor 303 to determine the type of touch event, then Processor 303 provides corresponding visual output according to the type of touch event on display screen 302, and terminal can be by touch panel It is integrated with display screen 302 and that realizes terminal output and input function.
Above-mentioned memory 305 can include mainly storing program area and storage data field, wherein storing program area can store behaviour Make the storage program (such as word store function, image playing function etc.) needed for system, at least one function;Storage data field It can store and created data (such as audio data, lteral data) etc. are used according to terminal, and may include network communication Module, Subscriber Interface Module SIM, page object generation module, anchor point generation module etc..Wherein, which can be used for Store network communication program, the communication interface 304 can by call the network communication module network communication program realize pair Function that is outer or internally communicating.The Subscriber Interface Module SIM, which can be used for storing, realizes that user is man-machine to touch-control, the pressing of terminal etc. Interactive program, the user interface 301 can be by calling the human-computer interaction program of the Subscriber Interface Module SIM to realize subscriber signal Input function.In addition, memory may include high-speed random access memory, can also include nonvolatile memory, such as At least one disk memory, flush memory device or other volatile solid-state parts.
Above-mentioned memory 305 is additionally operable to storage program instruction.Above-mentioned processor 303 can call above-mentioned memory 305 to deposit The program instruction of storage realizes the processing method that the webpage as shown in the embodiment of the present application is tested.
Specifically, above-mentioned processor 303 calls the program instruction for being stored in the storage of above-mentioned memory 305 to execute following step Suddenly:
Obtain the page source file of webpage;
It is inserted into the determining above-mentioned page source file of rule according to test anchor point and needs the node location for being inserted into test anchor point;
Test anchor point is generated, and above-mentioned test anchor point is inserted at corresponding node location, wherein above-mentioned test anchor point Indicate the attribute for searching control in automatic test;
Generate the page source file to be measured for including above-mentioned test anchor point.
The method that processor executes in the embodiment of the present application is described from the angle of processor, it is to be understood that this Processor will execute the cooperation that the above method needs other hardware configurations in application embodiment.For example, above-mentioned terminal is set with other Standby or server interaction, such as the page source file and test anchor point insertion rule of webpage are obtained, by above-mentioned processor 303 Above-mentioned communication interface 304 is controlled to send and receive related signaling, the test anchor point of above-mentioned generation and page source file to be measured, Above-mentioned memory 305 can be controlled by above-mentioned processor 303 to be stored, etc..The embodiment of the present application is to concrete implementation mistake Journey is not described in detail and limits.
Alternatively, above-mentioned test anchor point insertion rule includes:Above-mentioned page source file basic control node and/or It encapsulates control node and is inserted into test anchor point;Above-mentioned encapsulation control node is made of at least one basic control node.
Alternatively, above-mentioned processor 303, specifically for determining basic control node from above-mentioned page source file And/or encapsulation control node, it is to be inserted into test anchor point with the position where above-mentioned basic control node and/or encapsulation control node Node location.
Above-mentioned processor 303 is additionally operable to parse the control as independent test object from above-mentioned webpage source file to be measured Part, and bind according to the selection of the type of above-mentioned control the test anchor point of above-mentioned control, generate above-mentioned control with select it is above-mentioned The binding relationship of anchor point is tested, and generates page object.
Wherein, above-mentioned page object include above-mentioned binding relationship, above-mentioned control type and with above-mentioned control bundle Test any one or more of anchor point.
Alternatively, above-mentioned processor 303 is specifically used for obtaining the priority of pre-set different types of control, The control as independent test object is parsed from above-mentioned webpage source file to be measured according to above-mentioned priority.
Alternatively, above-mentioned processor 303, specifically for preferentially selecting the test of above-mentioned control own node position Anchor point is bound.
Alternatively, above-mentioned processor 303, it is preferential to select if the type specifically for above-mentioned control is encapsulation control The test anchor point of above-mentioned control own node position is bound, and in above-mentioned control own node position, there is no survey When trying anchor point, the test anchor point of any one descendant nodes position of above-mentioned control is selected to be bound, and if above-mentioned The type of control is basic control, then the test anchor point of above-mentioned control own node position is selected to be bound.
Alternatively, above-mentioned processor 303, be specifically used for detecting basic control node on above-mentioned node location and/or Encapsulate whether control node has mark ID attributes;If testing result be above-mentioned node location on basic control node and/or It encapsulates control node and does not have ID attributes, then anchor point attribute value is generated according to autocoding, and generate anchor point attribute-name, and generate Test anchor point including above-mentioned anchor point attribute value and above-mentioned anchor point attribute-name;If testing result is the basis on above-mentioned node location Control node and/or encapsulation control node have ID attributes, then it is above-mentioned that the anchor point attribute value on above-mentioned node location, which is arranged, ID attributes, and anchor point attribute-name is generated, and generation includes the test anchor point of above-mentioned anchor point attribute value and above-mentioned anchor point attribute-name;
Wherein, above-mentioned anchor point attribute value has uniquely for identifying above-mentioned test anchor point in above-mentioned webpage source file to be measured Property.
Based on same inventive concept, the principle and the method for the present invention that the terminal that is provided in the embodiment of the present application solves the problems, such as are real Apply that example is similar, therefore the implementation of the terminal may refer to the implementation of following methods.
Referring to Fig. 4, being a kind of flow diagram of the processing method of webpage test.Webpage test as shown in Figure 4 Processing method, including following steps:
S401, terminal obtain the page source file of webpage.
It should be noted that the page source file of the webpage can also be web page source code, refer to by programming language speech Method rule allows the contents such as picture, word, audio and video that code on a web browser is presented.In general, which can be with It is to be based on exploitation level, the file obtained is needed when developer needs Web- Designing or handles webpage.
Wherein, which can be search and webpage, shopping webpage, video web-pages, audio webpage or game webpage etc., This is not restricted.
In the specific implementation, the terminal is when obtaining the page source file of the webpage, can be specifically by opening the webpage Browser click the option of " checking source file " and be directly viewable the page source file, can also be used in the browser The mode of shortcut key (such as Ctrl+U) carries out checking the page source file etc..
S402, terminal, which are inserted into according to test anchor point in the determining page source file of rule, needs the node position for being inserted into test anchor point It sets.
It should be noted that it can refer to providing to need to be inserted into the page source file to test that the test anchor point, which is inserted into rule, The rule of the node location of anchor point.It can be looked into using CSS selector (CSSSelector) is this that the test anchor point, which is inserted into rule, Mode is looked for come all bases html control nodes in cover page, such as input, select, texarea, table, label, The label nodes such as li, span, img, a.Or the test anchor point is inserted into rule and can also be other rules, terminal can be according to this Test anchor point is inserted into rule and finds the node location for needing to be inserted into test anchor point in the page source file.
It can be stored in rule file in the specific implementation, the test anchor point is inserted into rule, terminal is by parsing the rule File is inserted into rule to obtain the test anchor point.Wherein, developer can be inserted into the test anchor point in rule file and advise Then modify, when the test anchor point, which is inserted into rule, to be changed, terminal can modified test anchor point to be inserted into rule true The node location for being inserted into test anchor point is needed in the fixed page source file.
Wherein, which can be basic control node or the position where encapsulation control node in page source file Set or page source file in position where other nodes.
S403, terminal generate test anchor point, and test anchor point is inserted at corresponding node location.
Wherein, which indicates the attribute for searching control in automatic test.Developer can be no longer Lookup foundation when ID the or Name attributes of control are as automatic test using in webpage, but by increasing test anchor automatically The mode of point searches foundation as control.The test anchor point can be used for automatic test, but not change page source file Any structure can not also be changed the attribute value and other values of control.
It should be noted that the test anchor point of the generation includes anchor point attribute value and anchor point attribute-name, the anchor point attribute Value can be employed to ensure that the test anchor point in the page there is uniqueness, the anchor point attribute-name can be used for identifying the test anchor point and be Special attribute for automatic test.
In the specific implementation, the terminal test anchor point can be inserted into according to test anchor point be inserted into rule find it is each At a node location, to ensure to have a test anchor point at the node location, also, be inserted at different node locations Test anchor point is all different, to ensure that, when developer builds automatic test cases, lookup and positioning node can be improved Accuracy.
In some feasible embodiments, when having increased control newly in the page source file, terminal can be to page text Part is reprocessed.The terminal can no longer carry out the node location for having increased test anchor point when being reprocessed It is inserted into the operation of test anchor point, but determines the position for being not inserted into test anchor point according to test anchor point insertion rule, and is generated Test anchor point is inserted into this and is not inserted at the position of test anchor point.
S404, terminal generate the page source file to be measured for including the test anchor point.
It should be noted that in the source file to be measured in addition to having increased test anchor point newly, structure and state can not be by It influences, when user opens the page to be measured, the content and state of the page to be measured can not change.
In the specific implementation, developer is when carrying out structure automatic test cases, it can be by searching for the page to be measured Test anchor point in source file finds the corresponding node of test anchor point.
In the specific implementation, the page source file to be measured can also be further processed in the terminal, generation includes to survey Try the page object of the binding relationship of anchor point and control, the type of control and the test anchor point of binding itself.Developer can With by calling the page object to build automatic test cases.
In some feasible embodiments, the page text to be measured can also be identified and assess in advance based on the test anchor point Influence of the modification of part to structure automatic test cases.For example, terminal has recorded a test anchor point A, sweeping again later When retouching the page source file to be measured, it is found that test anchor point A loses, so that it may with illustrate the page source file to be measured changed or Structure automation use-case is unstable, wherein the terminal can be found by test anchor point A and repair the part text of loss Part ensure that the integrality of the page source file to be measured.
In the embodiment of the present application, which obtains the page source file of current web page first, is then inserted according to test anchor point Enter rule and determine the node location for needing to be inserted into test anchor point in the page source file, and the test anchor point of generation is inserted into At the node location, the page source file to be measured with the test anchor point is ultimately produced, it can be by increasing in page source file Add test anchor point, searches foundation using the test anchor point as control, improve the search efficiency of automatic test.
Referring to Fig. 5, be the embodiment of the present application it is shown in Fig. 1 increase test anchor point schematic diagram on the basis of provide Another flow diagram of the processing method of webpage test.The processing method of webpage test described in the present embodiment, packet Include following steps:
S501, terminal obtain the page source file of webpage.
S502, terminal determine basic control node and/or encapsulation control node from page source file, with basic control Position where node and/or encapsulation control node is the node location for being inserted into test anchor point.
It should be noted that the terminal determines basic control node and/or encapsulation control node from page source file Rule is inserted into based on test anchor point to be executed, it can be on the basis of the page source file which, which is inserted into rule, Control node and/or encapsulation control node are inserted into test anchor point.Wherein, the encapsulation control node is by least one basic control section Point composition.
It should be noted that the basis control node can be the bases the html control in the page source file, the html Basic control can include but is not limited to lower node:input,select,textarea,table,label,li,span, img,a.The encapsulation control node can be made of at least one basic control node.
In some feasible embodiments, if it is the basis in the page source file that the test anchor point, which is inserted into rule, Control node is inserted into test anchor point, then the terminal rule can be inserted into according to the test anchor point will basis control node place Location determination come out, and using the position as be inserted into test anchor point node location, it is ensured that it is each in page source file A basis control node can all be inserted into test anchor point, improve the accuracy for searching basic control node.
In some feasible embodiments, if it is the basis in the page source file that the test anchor point, which is inserted into rule, Control node and encapsulation control node are inserted into test anchor point, then the terminal can first determine whether the preferential of the encapsulation control node The priority of the high or basic control node of grade is high, if the priority of the encapsulation control node is high, then the terminal can should Position where encapsulating control node tests the prior node position of anchor point as insertion, forms the basis of the encapsulation control node Control node location can not be determined as the node location of insertion test anchor point by terminal, and then, which can also incite somebody to action Basic control node other than the basic control node for forming the encapsulation control node is as the secondary of insertion test anchor point Node location.The terminal can be inserted into test anchor point in effective node location and the secondary nodes position.
Whether basic control node and/or encapsulation control node on S503, terminal detection node position have mark ID Attribute.
It should be noted that mark ID attributes are the node category that basic control node and/or encapsulation control node are had by oneself Property, developer can be found the basis control node by the ID attributes and/or encapsulate the accurate location of control node.
In the specific implementation, the terminal detects the basic control section on the node location first before generating test anchor point Point and/or encapsulation control node whether with the ID attributes.
If S504, terminal testing result be node location on basic control node and/or encapsulation control node have ID Attribute, then the anchor point attribute value being arranged on node location is ID attributes, and generates anchor point attribute-name.
In the specific implementation, the terminal detect the basis control node and/or encapsulation control node have ID attributes when, Anchor point attribute value on the node location can be set as identical with the ID attributes, and generate an anchor point attribute-name.This Sample can increase the degree of convenience of terminal setting anchor point attribute value, and also ensure the anchor point attribute value in the page source file With uniqueness.
Wherein, which can be the test anchor point all same of all generations, such as terminal is respectively provided with test anchor The entitled x-autoid of anchor point attribute of point, it is the special of automatic test which, which can be used for identifying the test anchor point, Attribute.Certainly, which can not also be identical, and this is not restricted.
Alternatively, if the terminal is detecting the basis control node and/or encapsulation control node without ID categories Property when, then can generate anchor point attribute value according to autocoding, and generate anchor point attribute-name.
It should be noted that a kind of coding that the autocoding can be terminal to be generated at random, the anchor for ensureing to generate Point attribute value keeps uniqueness in page source file.Wherein, the coding method of the type of the autocoding and the autocoding This is not restricted.
S505, terminal generation include anchor point attribute value and the test anchor point of anchor point attribute-name, and test anchor point is inserted into At corresponding node location.
It should be noted that the test anchor point is used to indicate the attribute in automatic test for searching control.
In the specific implementation, terminal can also will include the anchor point attribute value and the anchor after generating the test anchor point The test anchor point of point attribute-name is inserted into the node location.Terminal can navigate to the node location institute by the test anchor point Control.
Wherein, which can be basic control, can also be encapsulation control, or can also be other kinds of control Part, this is not restricted.
S206, terminal generate the page source file to be measured for including test anchor point.
It should be noted that the page source file to be measured that should include test anchor point can not be because increase the test anchor point And the attribute value and state value of itself are changed, for example, the dynamic effect in the page will not change, the control in the page Position will not change, and the information such as video, word, audio in the page will not change etc..
In some feasible embodiments, developer, can be suitable according to operating when building automatic test cases Then all code steps of sequence layout obtain lookup basis of the test anchor point in the control of lookup as control, then should Test anchor point is assembled into xpath and searches mode or CssSelector lookup modes, to position the corresponding control of test anchor point.
For example, the entitled x-autoid of anchor point attribute of user name input frame control, anchor point attribute value are The anchor point attribute-name x-autoid and anchor point attribute value logintext can be assembled by logintext, developer Xpath searches mode to obtain user name input frame control.
Again for example, the entitled x-autoid of anchor point attribute of Password Input frame control, anchor point attribute value are Passwordtext, developer can be assembled by the anchor point attribute-name x-autoid and anchor point attribute value passwordtext Mode is searched at CssSelector to obtain Password Input frame control.
In the embodiment of the present application, terminal obtains the page source file of webpage first, is then inserted into rule according to test anchor point Position where determining basic control node in page source file and/or encapsulating control node is the node for being inserted into test anchor point Position sets the anchor point attribute value for testing anchor point to the ID attributes, together when the node on the node location has ID attributes Shi Shengcheng test anchor point anchor point attribute-name, ultimately produce include the anchor point attribute value and anchor point attribute-name test anchor point Page source file to be measured can test anchor point by being inserted into the node location of basic control node and/or encapsulation control node, It ensure that the basic control node of each in page source file and/or encapsulation control node have at least one test anchor point, Keep the coverage area of the test anchor point wider, and the anchor point attribute value of the test anchor point is arranged to the ID attributes of the node, it can The degree of convenience of anchor point attribute value is set to increase terminal, and also ensures that the anchor point attribute value has in the page source file Uniqueness, and convenient for searching the control where the test anchor point, improve search efficiency when structure automation use-case.
Referring to Fig. 6, being the schematic diagram of the embodiment of the present application increase test anchor point shown in Fig. 1 and life shown in Fig. 2 It is including following at the flow diagram of the processing method of another webpage test provided on the basis of the schematic diagram of page object Step:
S601, terminal obtain the page source file of webpage.
S602, terminal, which are inserted into according to test anchor point in the determining page source file of rule, needs the node position for being inserted into test anchor point It sets.
Alternatively, it can be the basic control node and/or envelope in the page source file which, which is inserted into rule, It fills control node and is inserted into test anchor point.
Wherein, which can be made of at least one basic control node.
Alternatively, terminal is inserted into rule and is determined according to the test anchor point needs to be inserted into test anchor point in page source file Node location can be that basic control node and/or encapsulation control node are determined from the page source file, be controlled with the basis Position where part node and/or encapsulation control node is the node location for being inserted into test anchor point.
S603, terminal generate test anchor point, and test anchor point is inserted at corresponding node location.
Wherein, which indicates the attribute for searching control in automatic test.Also, the test anchor point can To include anchor point attribute value and anchor point attribute-name, the anchor point attribute value is for identifying the test anchor point in the webpage source file to be measured In have uniqueness.
S604, terminal generate the page source file to be measured for including test anchor point.
S605, terminal parse the control as independent test object from webpage source file to be measured.
It should be noted that the control of the independent test object refers to generating the necessary control of page object.Since this is waited for It includes any number of controls to survey in page source file, and some of which control is not the generation necessary control of page object, such as Control of common object etc., therefore terminal needs parse this as independent test object from the webpage source file to be measured Control.
Alternatively, which can obtain the priority of pre-set different types of control, according to the priority The control as independent test object is parsed from the webpage source file to be measured.
It should be noted that the priority can be the priority of terminal acquiescence, can also be that user is pre-set excellent First grade.Under normal circumstances, terminal can store the priority into a priority file, in the priority file on to Under, the priority of control reduces successively.For example, terminal can give tacit consent to the preferential of the encapsulation control in the priority file Grade is higher than the priority of the basis control.
It further, can also be according to the control after which parses the control as independent test object The test anchor point of the control is bound in type selection.
It should be noted that the type of the control can be type of foundation, it can also be encapsulated type, can also be other Type.The test anchor point of the control can refer to the test anchor point being located in the control on any one node location.
If the type of S606, terminal control is encapsulation control, the preferential test for selecting control own node position Anchor point is bound, and in control own node position there is no when test anchor point, any one descendants of control is selected to save The test anchor point of point position is bound.
Alternatively, if the type of the control is basic control, terminal can select the control own node institute in place The test anchor point set is bound.
In the specific implementation, the terminal can be first the control for encapsulating control according to priority align_type, then detect With the presence or absence of test anchor point on position where the encapsulation control own node, if there is testing anchor point, then by the test anchor point It is bound, if not testing anchor point, any one descendant nodes position in the encapsulation control can be obtained again Anchor point is tested, and the test anchor point of the descendant nodes position and the encapsulation control are bound.
It should be noted that the descendant nodes can be basic control node.Since the encapsulation control can be by multiple bases Plinth control forms, and test anchor point can be all inserted by each basic control node by being inserted into rule according to the test anchor point, therefore, The basic control node of any one in encapsulation control can correspond to a test anchor point, be corresponded to by the basis control node Test anchor point can be reversed search and orient the encapsulation control.
In some feasible embodiments, which can preferentially choose first descendant nodes institute in the encapsulation control Test anchor point in position is bound.Certainly, which can also be to choose in the encapsulation control where other descendant nodes The test anchor point of position is bound, and this is not restricted.
Further, terminal the test anchor point that the encapsulation control and the selection go out can be carried out binding and then according to Priority orients the control that type is basic control, may include base node in the basis control, which can be with A corresponding test anchor point is corresponded to, which can select the corresponding test anchor point, then again by the corresponding test Anchor point is bound with the basis control.
The binding relationship for testing anchor point that S607, terminal generate control and select.
It should be noted that correspondence of the binding relationship as control and the test anchor point selected, can be used for The test anchor point gone out according to the selection is searched and positions the control.
S608, terminal generate page object.
Wherein, the page object may include the binding relationship of test anchor point and the control of record, the control type, And the test anchor point with the control bundle, can also include the corresponding operating method of the control (such as inputXXX, ClickXXX etc.).
In the specific implementation, the page object of the generation can be stored in the memory module of terminal by the terminal, work as exploitation When personnel need to build automation use-case, the calling of page object can be carried out by the memory module.
Developer is when developing automatic test cases, it may not be necessary to search the ID of control again or be looked into using other Mode is looked for, but the page object can be directly invoked, and manual coding is carried out to build based on automation use-case test frame Automatic test cases.
For example, the entitled XXXLoginPageObject of the page object, developer first log into this Then XXXLoginPageObject inputs username and password, finally clicks login button, so that it may to develop login page Automatic test cases.
In the embodiment of the present application, which obtains the page source file of current web page first, is then inserted according to test anchor point Enter rule and determine the node location for needing to be inserted into test anchor point in the page source file, and the test anchor point of generation is inserted into At the node location, and the page source file to be measured with the test anchor point is generated, is then parsed from page source file to be measured Go out the control as independent test object, and preferentially select the test anchor point of the control own node position and the control into Row binding, records the binding relationship, and generate page object, can be by increasing test anchor point, and base in page source file Page object is built in the test anchor point, developer can be by calling the page object come the test of layout automatic test Step improves the structure efficiency of automatic test.
The above-mentioned method for illustrating the embodiment of the present application, following for convenient for preferably implementing the embodiment of the present application Said program is correspondingly also provided below for coordinating the equipment and system of implementing said program.
Referring to Fig. 7, for a kind of structural schematic diagram of test anchor point provided by the embodiments of the present application.In the present embodiment Described webpage test device, including:Acquisition module 701, determining module 702, generation module 703.
Specifically, acquisition module 701, the page source file for obtaining webpage.
Determining module 702 needs to be inserted into test anchor for being inserted into rule according to test anchor point and determining in the page source file The node location of point.
Generation module 703 for generating test anchor point, and the test anchor point is inserted at corresponding node location, raw At the page source file to be measured comprising the test anchor point.
Wherein, which indicates the attribute for searching control in webpage automatic test.
Optionally, which can realize the webpage in above-mentioned Fig. 4 and Fig. 5 corresponding embodiments by above-mentioned module The corresponding steps that terminal executes in the processing method of test.It should be understood that the embodiment of the present application is the device of corresponding method embodiment Embodiment, the description to embodiment of the method, is also applied for the embodiment of the present application.
It, can be by increasing test anchor point in page source file, using the test anchor point as control in the embodiment of the present application Part searches foundation, improves the search efficiency of automatic test.Also, the node is arranged in the anchor point attribute value of the test anchor point ID attributes can increase the degree of convenience of setting anchor point attribute value, ensure that the anchor point attribute value has in the page source file Uniqueness.
Referring to Fig. 8, being a kind of structural schematic diagram of page object device provided by the embodiments of the present application.In the present embodiment Described page object device, including:Parsing module 801, generation module 802.
Specifically, parsing module 801, for parsing the control as independent test object from webpage source file to be measured Part.
Generation module 802, for according to the type of the control select bind the control test anchor point, generate the control with The binding relationship for the test anchor point selected, and generate page object.
Wherein, which includes the binding relationship, the type of the control and the test anchor point with the control bundle Any one or more.
Wherein, which is used to indicate to search the control as independent test object in webpage source file to be measured Attribute.
Optionally, which can realize that the webpage in above-mentioned Fig. 6 corresponding embodiments is tested by above-mentioned module Processing method in terminal execute corresponding steps.It should be understood that the device that the embodiment of the present application is corresponding method embodiment is implemented Example, the description to embodiment of the method are also applied for the embodiment of the present application.
In the embodiment of the present application, test anchor point can be based on and build page object, developer can be by calling the page In face of the testing procedure as carrying out layout automatic test, the structure efficiency of automatic test is improved.
Fig. 9 is referred to, is a kind of structural schematic diagram of webpage test system provided by the embodiments of the present application.In the present embodiment Described webpage tests system, including:Test anchor point 901, page object device 902.
Wherein, the structure of the test anchor point 901 can be found in the concrete structure of test anchor point as shown in Figure 7, And the test anchor point 901 can be used for executing the processing method for realizing the test of the webpage in above-mentioned Fig. 4 and Fig. 5 corresponding embodiments The corresponding steps that middle terminal executes;The structure of the page object device 902 can be found in the tool of test anchor point as shown in Figure 8 Body structure, and the page object device 902 can be used for executing the processing side for realizing the test of the webpage in above-mentioned Fig. 6 corresponding embodiments The corresponding steps that terminal executes in method, therefore not to repeat here.
In the embodiment of the present application, foundation can be searched by regarding the test anchor point as control, improve automatic test Search efficiency, and page object is built based on test anchor point, developer can be by calling the page object automatic come layout The testing procedure for changing test, improves the structure efficiency of automatic test.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..

Claims (16)

1. a kind of processing method of webpage test, which is characterized in that including:
Obtain the page source file of webpage;
It is inserted into the determining page source file of rule according to test anchor point and needs the node location for being inserted into test anchor point;
Test anchor point is generated, and the test anchor point is inserted at corresponding node location, wherein the test anchor point indicates Attribute in webpage automatic test for searching control;
Generate the page source file to be measured for including the test anchor point.
2. the method as described in claim 1, which is characterized in that the test anchor point is inserted into rule and includes:In the page source The basic control node and/or encapsulation control node of file are inserted into test anchor point;The encapsulation control node is by least one base Plinth control node forms;
Described be inserted into the determining page source file of rule according to test anchor point needs the node location for being inserted into test anchor point, tool Body includes:
Basic control node and/or encapsulation control node are determined from the page source file, with the basic control node And/or the position where encapsulation control node is the node location for being inserted into test anchor point.
3. method as claimed in claim 1 or 2, which is characterized in that further include:
The control as independent test object is parsed from the webpage source file to be measured;
The test anchor point of the control, the survey for generating the control and selecting are bound according to the selection of the type of the control Try the binding relationship of anchor point;
Page object is generated, the page object includes the binding relationship, the type of the control and tied up with the control Any one or more of fixed test anchor point.
4. method as claimed in claim 3, which is characterized in that described to be parsed as only from the webpage source file to be measured The control of vertical test object, specifically includes:
The priority for obtaining pre-set different types of control, according to the priority from the webpage source file to be measured Parse the control as independent test object.
5. method as claimed in claim 3, which is characterized in that described to bind the control according to the selection of the type of the control Test anchor point, specifically include:
The test anchor point of control own node position is preferentially selected to be bound.
6. method as claimed in claim 5, which is characterized in that the control own node position of preferentially selecting Test anchor point is bound, and is specifically included:
If the type of the control is encapsulation control, preferentially select the test anchor point of control own node position into Row binding selects any one descendants of the control in control own node position there is no when test anchor point The test anchor point of node position is bound;
If the type of the control is basic control, the test anchor point of control own node position is selected to be tied up It is fixed.
7. method as claimed in claim 2, which is characterized in that anchor point is tested in the generation, including:
Whether basic control node and/or encapsulation the control node detected on the node location has mark ID attributes;
If testing result be the node location on basic control node and/or encapsulation control node do not have ID attributes, Anchor point attribute value is generated according to autocoding, and generates anchor point attribute-name;Generation includes the anchor point attribute value and the anchor point The test anchor point of attribute-name.
If testing result be the node location on basic control node and/or encapsulation control node have ID attributes, set The anchor point attribute value set on the node location is the ID attributes, and generates anchor point attribute-name;Generation includes the anchor point The test anchor point of attribute value and the anchor point attribute-name;
Wherein, the anchor point attribute value has uniqueness for identifying the test anchor point in the webpage source file to be measured.
8. a kind of test anchor point, which is characterized in that including:
Acquisition module, the page source file for obtaining webpage;
Determining module needs the section for being inserted into test anchor point for being inserted into the determining page source file of rule according to test anchor point Point position;
Generation module for generating test anchor point, and the test anchor point is inserted at corresponding node location, and generation includes The page source file to be measured of the test anchor point;Wherein, the test anchor point indicates in webpage automatic test for searching The attribute of control.
9. device as claimed in claim 8, which is characterized in that the test anchor point is inserted into rule and includes:In the page source The basic control node and/or encapsulation control node of file are inserted into test anchor point;The encapsulation control node is by least one base Plinth control node forms;
The determining module, specifically for determining basic control node and/or encapsulation control section from the page source file Point is the node location for being inserted into test anchor point with the position where the basic control node and/or encapsulation control node.
10. device as claimed in claim 9, which is characterized in that the generation module generates test anchor point, including:
The generation module is used to detect the basic control node on the node location and/or encapsulates whether control node has Identify ID attributes;If testing result be the node location on basic control node and/or encapsulation control node do not have ID Attribute then generates anchor point attribute value according to autocoding, and generates anchor point attribute-name, and generate include the anchor point attribute value with The test anchor point of the anchor point attribute-name;If testing result is basic control node and/or encapsulation control on the node location Part node has ID attributes, then the anchor point attribute value being arranged on the node location is the ID attributes, and generates anchor point category Property name, and generate include the anchor point attribute value and the anchor point attribute-name test anchor point;
Wherein, the anchor point attribute value has uniqueness for identifying the test anchor point in the webpage source file to be measured.
11. a kind of page object device, which is characterized in that including:
Parsing module, for parsing the control as independent test object from webpage source file to be measured;
Generation module, the test anchor point for binding the control according to the selection of the type of the control, generate the control with The binding relationship for the test anchor point selected, and page object is generated, the page object includes the binding relationship, the control The type of part and with the control bundle test anchor point any one or more;
Wherein, the test anchor point is used to indicate to search the category of the control as independent test object in webpage source file to be measured Property.
12. device as claimed in claim 11, which is characterized in that
The parsing module is specifically used for obtaining the priority of pre-set different types of control, according to the priority The control as independent test object is parsed from the webpage source file to be measured.
13. device as claimed in claim 11, which is characterized in that the generation module is tied up according to the selection of the type of the control The test anchor point of the fixed control, specifically includes:The generation module is in place for preferentially selecting the control own node institute The test anchor point set is bound.
14. device as claimed in claim 13, which is characterized in that generation module is for preferentially selecting the control own node The test anchor point of position is bound, including:
If the type that the generation module is specifically used for the control is encapsulation control, the control own node is preferentially selected The test anchor point of position is bound, and in control own node position there is no when test anchor point, selects institute The test anchor point for stating any one descendant nodes position of control is bound;If being controlled based on the type of the control Part then selects the test anchor point of control own node position to be bound.
15. a kind of webpage tests system, which is characterized in that including:Anchor point dress is tested as shown in claim any one of 8-10 It sets, the page object device as shown in claim 11-14.
16. a kind of terminal, which is characterized in that the terminal includes:
Memory, for storing one or more programs;
Processor, for calling the program in the memory to execute the method as described in claim 1~7 any one.
CN201710221334.5A 2017-04-06 2017-04-06 A kind of processing method, equipment and the system of webpage test Withdrawn CN108694115A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710221334.5A CN108694115A (en) 2017-04-06 2017-04-06 A kind of processing method, equipment and the system of webpage test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710221334.5A CN108694115A (en) 2017-04-06 2017-04-06 A kind of processing method, equipment and the system of webpage test

Publications (1)

Publication Number Publication Date
CN108694115A true CN108694115A (en) 2018-10-23

Family

ID=63842508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710221334.5A Withdrawn CN108694115A (en) 2017-04-06 2017-04-06 A kind of processing method, equipment and the system of webpage test

Country Status (1)

Country Link
CN (1) CN108694115A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159028A (en) * 2019-12-23 2020-05-15 望海康信(北京)科技股份公司 Webpage testing method and device
CN113051514A (en) * 2021-03-26 2021-06-29 挂号网(杭州)科技有限公司 Element positioning method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159028A (en) * 2019-12-23 2020-05-15 望海康信(北京)科技股份公司 Webpage testing method and device
CN111159028B (en) * 2019-12-23 2023-08-01 望海康信(北京)科技股份公司 Webpage testing method and device
CN113051514A (en) * 2021-03-26 2021-06-29 挂号网(杭州)科技有限公司 Element positioning method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US8413061B2 (en) Synchronous to asynchronous web page conversion
CN104346153B (en) Method and system for the text message of translation application
US8370750B2 (en) Technology for generating service program
US20090133000A1 (en) System, program product, and methods to enable visual recording and editing of test automation scenarios for web application
CN101587441B (en) Apparatus, method, and system of assisting software development
US10275266B1 (en) Language acceptance testing
CN106354483B (en) Data processing method and device and electronic equipment
CN111274781A (en) Table display method and device, storage medium and electronic equipment
KR20080048454A (en) Building finite state machine model
CN105868096A (en) Methods and apparatuses used for displaying web page test result in browser and device
US20220374339A1 (en) Techniques for visual software test automation management
CN111949522A (en) User interface automatic testing method and device
CN104320793B (en) A kind of Automated testing method of cell phone short messages and system
CN107783786A (en) A kind of method and apparatus for creating device resource
CN109684571A (en) A kind of collecting method and device, storage medium
US20150007145A1 (en) Computing system with instrumentation mechanism and capture mechanism and method of operation thereof
CN108694115A (en) A kind of processing method, equipment and the system of webpage test
CN105740242A (en) Information search device and method based on two-dimension code, and mobile terminal
US20220374338A1 (en) Techniques for visual software test automation management
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN105245622A (en) Configurable data processing method and system and mobile platform
CN111414168B (en) Web application development method and device based on mind map and electronic equipment
CN103970773B (en) A kind of method for updating pages and device of webpage
CN113468050A (en) Canvas-based testing method and device, computer equipment and storage medium
CN112463639A (en) Test script editing method, device and equipment

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20181023