CN104423961B - A kind of method and system for generating test script - Google Patents

A kind of method and system for generating test script Download PDF

Info

Publication number
CN104423961B
CN104423961B CN201310412523.2A CN201310412523A CN104423961B CN 104423961 B CN104423961 B CN 104423961B CN 201310412523 A CN201310412523 A CN 201310412523A CN 104423961 B CN104423961 B CN 104423961B
Authority
CN
China
Prior art keywords
page
information
page elements
elements
routing information
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.)
Active
Application number
CN201310412523.2A
Other languages
Chinese (zh)
Other versions
CN104423961A (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310412523.2A priority Critical patent/CN104423961B/en
Publication of CN104423961A publication Critical patent/CN104423961A/en
Application granted granted Critical
Publication of CN104423961B publication Critical patent/CN104423961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

This application discloses a kind of method and system for generating test script, the information of page elements is managed collectively in database, test script is generated by calling the information of the page elements in database, even if the routing information of page elements changes, only need to update the data the content in storehouse, made an amendment without the code in the test script to generation;In addition, the routing information of the page elements stored in database has been respectively directed to page elements and has applied element object in trunk code and/or branch code, therefore, no matter the tested page is the page of trunk code building or the page of branch code generation, when generating test script, the routing information of the page elements of matching can be called according to the test environment of reality, enormously simplify generation and the maintenance process of test script.

Description

A kind of method and system for generating test script
Technical field
The application is related to field of computer technology, more particularly to a kind of method and system for generating test script.
Background technology
The code disposed during applied software development is referred to as branch code, and branch code, which is reached the standard grade, is applied to true environment The code disposed is referred to as trunk code, and branch code or trunk code will generate corresponding in running background on foreground The page, in order to carry out functional test, the page that branch code or trunk code can be generated to branch code or trunk code As test object, generation test script carries out functional test to the page.
When generating test script, it is necessary to know routing information of each page elements in the page in the page, to give birth to Into test script functional test can be carried out to page elements corresponding to the routing information according to routing information.The page Element includes the control in the page, list, list etc..
At present, when generating test script, the routing information of page elements can be write by test script by the form of note Interior specified object(Such as Java object)In, can specifying in test script when the routing information change for having page elements The routing information of the page elements is changed in object.
The scheme write by the above-mentioned routing information by page elements in the specified object of test script, can accomplish pair The unified management of page elements, still, because the essence of its scheme is still that the routing information of page elements is write on into test manually In the code of script, therefore, when the routing information change for having page elements, it is desired nonetheless to the generation in manual modification test script Code, particularly when there is substantial amounts of page elements to have routing information change, the modification to code in test script can be more complicated, Also it is unfavorable for maintenance, the management to page elements simultaneously;In addition, if the path letter of page elements is have modified in branch code Breath, and the branch code is not reached the standard grade also as, it is necessary to safeguard two test scripts respectively, one of them tests pin during trunk code This is used to test the branch code that have modified page elements routing information, and another test script is used for current master Dry code is tested, and after branch code is reached the standard grade and merged with trunk code, then updates test script so that whole test script Generation and maintenance process it is extremely complex.
The content of the invention
The embodiment of the present application provides a kind of method and system for generating test script, to solve to exist in the prior art Generation and maintenance test scenario process complexity the problem of.
A kind of method for generating test script, methods described include:
Information call request is initiated to database, address information and the survey of the tested page are carried in described information call request Test ring environment information, the test environment information represent that the tested page is the page or the branch code life of trunk code building Into the page;
The information of each page elements in the tested page that the database returns is received, wherein, the page elements Information be the database root according to the page info being locally stored, it is determined that the page letter where the address information received Cease, the address information comprising the page and the information of each page elements in the page in the page info, from the page of determination Each page elements for the test environment information matches for inquiring and receiving in the information for the page elements that face packet contains Routing information after, by the routing information and determine the page info in each page elements other information return;
The tested page is tested according to the information generation of each page elements in the tested page received Test script.
In the embodiment of the present application, even if the routing information of page elements changes, it is only necessary to update the data the interior of storehouse Appearance, made an amendment without the code in the test script to generation;In addition, no matter the tested page is trunk code building The page or the page of branch code generation, when generating test script, the page of matching can be called according to the test environment of reality The routing information of surface element, it enormously simplify generation and the maintenance process of test script.
Alternatively, the information of the page elements includes:
The mark of each page elements;
Each page elements be apply trunk code information and/or apply information in branch code;
The routing information of each page elements, the routing information include:The page when page elements are applied in trunk code The routing information of surface element, when page elements are applied in branch code the page elements routing information.
In the embodiment of the present application, the content that the packet of page elements contains reflects the page elements from different aspect Function.
Alternatively, inquire and connect in the information for the page elements that the database includes from the page info of determination The routing information of each page elements of the test environment information matches received, is specifically included:
The database is it is determined that the test environment information received represents that the tested page is the life of trunk code Into the page when, each page elements are inquired from the routing information of page elements and apply the page elements in trunk code Routing information;
The database is it is determined that the test environment information received represents that the tested page is branch code life Into the page when, each page elements are inquired from the routing information of page elements and apply the page elements in branch code Routing information.
In the embodiment of the present application, the routing information for the page elements being adapted to according to the environmental selection of the tested page so that A set of test script of generation can be respectively applied to trunk environment and branch's environment.
Alternatively, the information generation test script of each page elements, tool in the tested page that the basis receives Body includes:
The mark of the page elements received and the routing information of the page elements are bound;
Obtained using the routing information of page elements the contents of the corresponding page elements of page elements mark of binding come Generate the test script.
In the embodiment of the present application, just the mark of all page elements is bound with routing information in initialization, made The test script that must be ultimately generated functional can be tested to the institute for being tested the page.
Alternatively, also include in the information of the page elements:
The device type that the positioning method of the routing information of the page elements and the positioning method are applicable;
In the tested page that the database returns before the information of each page elements, methods described also includes:
It is described to determine that the equipment is applicable according to the device type for the equipment for initiating described information call request for the database root The positioning method of the routing information of page elements.
In the embodiment of the present application, it is determined that the equipment of initiation information call request and the routing information of the page elements When positioning method is adapted to, it can be ensured that the information of the page elements of return can correctly be identified by the equipment.
A kind of system for generating test script, the system include UI frameworks and database, wherein:
The UI frameworks, tested page is carried for initiating information call request to database, in described information call request The address information and test environment information in face, the test environment information represent that the tested page is the page of trunk code building Face or the page of branch code generation, and receive the letter of each page elements in the tested page that the database returns Breath, and the survey tested according to the information generation of each page elements in the tested page received the tested page Training sheet;
The database, the page info being locally stored for basis, it is determined that where the address information received Page info, in the page info in the address information comprising the page and the page each page elements information, from determination Each page for the test environment information matches for inquiring and receiving in the information for the page elements that the page info includes After the routing information of surface element, the other information of each page elements in the routing information and the page info determined is returned Back to the UI frameworks.
In the embodiment of the present application, even if the routing information of page elements changes, it is only necessary to update the data the interior of storehouse Appearance, made an amendment without the code in the test script to generation;In addition, no matter the tested page is trunk code building The page or the page of branch code generation, when generating test script, the page of matching can be called according to the test environment of reality The routing information of surface element, it enormously simplify generation and the maintenance process of test script.
Alternatively, the information of the page elements includes:
The mark of each page elements;
Each page elements be apply trunk code information and/or apply information in branch code;
The routing information of each page elements, the routing information include:The page when page elements are applied in trunk code The routing information of surface element, when page elements are applied in branch code the page elements routing information.
In the embodiment of the present application, the content that the packet of page elements contains reflects the page elements from different aspect Function.
Alternatively, the database, specifically for it is determined that the test environment information received represents described tested When the page is the page of trunk code building, each page elements are inquired from the routing information of page elements and are applied in trunk generation The routing information of page elements during code;It is determined that the test environment information received represents that the tested page is branch During the page of code building, each page elements are inquired from the routing information of page elements and apply the page in branch code The routing information of element.
In the embodiment of the present application, the routing information for the page elements being adapted to according to the environmental selection of the tested page so that A set of test script of generation can be respectively applied to trunk environment and branch's environment.
Alternatively, the UI frameworks, specifically for identifying the page elements received and the page elements Routing information is bound, and the page elements that binding is obtained using the routing information of page elements identify corresponding page elements Content generate the test script.
In the embodiment of the present application, just the mark of all page elements is bound with routing information in initialization, made The test script that must be ultimately generated functional can be tested to the institute for being tested the page.
Alternatively, also include in the information of the page elements:
The device type that the positioning method of the routing information of the page elements and the positioning method are applicable;
The database, the device type according to the UI frameworks is additionally operable to, determines that the UI frameworks are applicable the page member The positioning method of the routing information of element.
In the embodiment of the present application, it is determined that the equipment of initiation information call request and the routing information of the page elements When positioning method is adapted to, it can be ensured that the information of the page elements of return can correctly be identified by the equipment.
Brief description of the drawings
In order to illustrate more clearly of the technical scheme in the embodiment of the present application, make required in being described below to embodiment Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present application, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings His accompanying drawing.
Fig. 1 is the method and step schematic diagram in the embodiment of the present application one;
Fig. 2 is the system structure diagram in the embodiment of the present application two.
Embodiment
In order that the purpose, technical scheme and advantage of the application are clearer, the application is made below in conjunction with accompanying drawing into One step it is described in detail, it is clear that described embodiment is only some embodiments of the present application, rather than whole implementation Example.Based on the embodiment in the application, what those of ordinary skill in the art were obtained under the premise of creative work is not made All other embodiment, belong to the scope of the application protection.
The embodiment of the present application proposes a kind of scheme of new generation test script, before test script is generated, first by the page Page info be stored in database, each page in the address information comprising page and the page in each page info The information of element, applied again comprising page elements in trunk code and/or branch code in the information of the page elements Routing information;Afterwards, when generating test script for the tested page, it can directly be called to database request and be directed to the tested page The information of the page elements of face storage, then database is that the page of trunk code building or branch code are given birth to the tested page Into the page be foundation, after the routing information that matching is inquired from the information of the page elements, return to the page inquired The routing information of element, while the other information for also having page elements returned;The letter of the page elements returned according to database Breath can directly generate the test script tested the tested page.
By the scheme of the embodiment of the present application, the information of page elements can be managed collectively in database, it is real Namely to element object on border(As the particular content of the page elements pointed by the routing information of page elements)Unified pipe Reason, even if the routing information of page elements changes, it is only necessary to the content in storehouse is updated the data, without the survey to generation Code in training sheet is made an amendment;In addition, the routing information of the page elements stored in database has been respectively directed to page elements The element object in trunk code and/or branch code is applied, therefore, no matter is tested the page that the page is trunk code building Or the page of branch code generation, when generating test script, the page member of matching can be called according to the test environment of reality The routing information of element, enormously simplify generation and the maintenance process of test script.
Application scheme is described in detail below by specific embodiment, certainly, the application is not limited to following reality Apply example.
Embodiment one:
As shown in figure 1, to generate the method and step schematic diagram of test script in the embodiment of the present application one, methods described includes Herein below:
Step 101:The page info of memory page in database, the address information of the page is included in the page info With the information of each page elements in the page.
The step of this step 101 will perform when being not each generation test script, i.e., the memory page in database The process of information need not simultaneously perform in generation test script every time, can be before test script is generated in advance in database Memory page information, subsequently constantly it can be managed, safeguard for the page info of storage, such as increase new page info, delete Except the content in the page info stored or the page info to having stored is updated.
Corresponding page info can be stored respectively for each page respectively, in database for convenience of to being deposited in database The page info of storage is safeguarded(Such as add, delete, change)And to the content search and calling in page info, it is optional Ground, can with tabular form in database memory page information.For example, the address information of the page can be with one page of unique mark Face, when generating the page info of tabular form for the page, List name can be used as using the address information of the page so that When being called to the page info in database, the page of respective page can be gone out by index, quick search of page address Information.
It should be noted that the present embodiment one is also not necessarily limited to the storage mode that other are directed to database, the present embodiment is in the lump The storage form of page info does not limit in the type to database and database.
The address information of the page is to be capable of the information of one page of unique mark, including but not limited to URL (Uniform Resource Locator, URL)Or domain name+relative path information.
Alternatively, the description information for the page can also be included in the page info, the description information does not have to simultaneously In follow-up script generating process, but keeper is facilitated intuitively to identify the page info stored in database.Example Such as, when corresponding page info is stored in database for a certain shopping website homepage, the description information can be that " XX is purchased Thing website homepage ";For another example when corresponding page info is stored in database for search website homepage, the description letter Breath can be " YY searches for website homepage ".
Content in page info is stored in for any page elements in the page, is included but is not limited to:
1), page elements mark(Key), can the unique mark page elements.
2), page elements be apply trunk code information and/or apply information in branch code.
It is therefore, main because the page that the page and branch code of trunk code building generate has identical address information The page that dry code and branch code generate respectively is same page info in database.If in fact, in branch code Content do not update, then trunk code and branch code generation the identical page.Even if having renewal in branch code, consider The performance of the performance of branch code after to renewal and trunk code will not difference it is too big, therefore, the branch code life after renewal Into the page compared with the page of trunk code building, most of page elements are identical, but can have that some are different Page elements, for identical page elements, can apply can also apply in branch code in trunk code, and different pages Surface element still has an identical Key, but its content is different, need to record it respectively and applies and still be applied in branch's generation in trunk code The information of code, in order to which when being subsequently generated test script, selection is in the page elements of identical environment, example with the tested page Such as, if the tested page is the page of trunk code building, the information of the page elements in trunk code is applied in selection, if by The page that the page is branch code generation is surveyed, then the information of the page elements in branch code is applied in selection.
3), page elements routing information, because page elements possible application is in trunk code, it is also possible to apply in branch Code, therefore, the routing information include:The routing information of the page elements when page elements are applied in trunk code(With The content of page elements when referring to page elements and applying in trunk code), when page elements are applied in branch code the page The routing information of surface element(The content of the page elements in trunk code is applied for referring to page elements).
4), page elements routing information positioning method, can be with CSS in the scheme of the present embodiment one (Cascading Style Sheet, Cascading Style Sheet)To determine the routing information of page elements, almost all kinds of UI frames Frame all supports CSS, therefore, can also be identified with the CSS routing informations determined by all types of UI frameworks.Certainly, the application Embodiment one is also not necessarily limited to other positioning methods, such as id positioning methods or name positioning methods.
UI frameworks involved by the embodiment of the present application refer to apply the human-computer interaction interface in systems development process, pass through The navigation that UI frameworks are provided(Portal page face, tree construction navigation, multilevel menu navigation etc.)To carry out system development.
5), the device type that is applicable of positioning method.The positioning method carried out according to the path of page elements, record are fitted Device type, equipment here can refer to UI frameworks.
6), page elements be web element(Web object)Type or web element list(Web object arranges Table)Type.If page elements are web element types, subsequently element object can be directly obtained when generating test script; If page elements are web element list types, represent that the page elements have other page elements associated with itself, example Such as, the page elements of a web element list type are to pull down list, specific in the related list of the page elements Other page elements of content.
7), page elements other description informations.
, can be to being stored in database in order to generate test script after the page info that each page is stored in database Information be called, therefore, database externally provides calling interface, such as Dubbo interfaces(High-performance and transparence can be provided Remote service is called), http interfaces etc..
Step 102:Information call request is initiated to database, the address of the tested page is carried in described information call request Information and test environment information, the test environment information represent that the tested page is the page of trunk code building or divided The page of branch code building.
In this step 102, when needing to generate the script for being used for being tested the tested page, UI frameworks can be passed through The interface in database is called, initiates described information call request to database, it is desirable to which database is returned in the tested page The information of each page elements, to generate test script.
Step 103:Receive the information of each page elements in the tested page that the database returns.
, will be according to wherein carrying when database is by receiving described information call request in this step 103 The tested page address information and test environment information, select suitable page elements to believe from the page info being locally stored Cease and return, detailed process is:
The first step:Database identifies the address information of the tested page carried in information call request, and as rope Draw, from the page info being locally stored, determine the page info for the tested page, i.e., the ground of the described tested page Page info where the information of location is the page info of the tested page.
Second step:Database obtains each page member in the tested page from the page info for the tested page determined The information of element.
Due to containing the address information of the page and the information of page elements in page info(Including but not limited to step The information of 7 involved class page elements in 101), therefore, database, can be straight in the page info for determining the tested page Connect the information for therefrom obtaining each page elements in the tested page.
3rd step:Routing information positioning method and the device type that is applicable of the database root according to page elements, judge to send out Whether the equipment for playing described information call request is applicable the positioning method, if being applicable, performs next step;Otherwise, directly return Refusal respond message is returned, reason for rejection can be carried in the refusal respond message is that UI framework types are not adapted to.
Here equipment can refer to the UI frameworks for initiating described information call request.
4th step:Database inquires the test with being carried in information call request from the information of the page elements of acquisition The routing information of each page elements of environmental information matching.
Because a page elements are applied to the content of trunk code and apply the content in branch code may be different, Therefore, it is necessary to be distinguish between to the content of same page elements application in different environments.
Specifically, database determines the routing information of page elements, and the routing information includes working as page elements application In trunk code the routing information of the page elements, when page elements are applied in branch code the page elements path letter Breath.If database root determines that the tested page is the page of trunk code building according to the test environment information, from the page The routing information applied in trunk code is inquired in the routing information of element;If database root is according to the test environment information It is the page of branch code generation to determine the tested page, then inquires and applied in branch from the routing information of page elements Routing information during code.
5th step, database return the other information of the routing information of each page elements inquired and page elements in the lump Back to UI frameworks.
Step 104:Generated according to the information of each page elements in the tested page received to the tested page The test script tested.
The specific implementation of this step 104 is:
First, such as JDK can be passed through(Java Development Kit)Dynamic proxy mode, described in receiving The mark and the routing information of the page elements of page elements are bound.
Because when the page initializes, the page elements of some dynamic generations there is not yet on the page, for example, for needing In the page it is to be not present when initial for menu this page elements for clicking on that button in the page just occurs in the page , but the information of this kind of page elements is contained in the information of the page elements of database return, therefore, in initialization Just the mark of all page elements is bound with routing information so that the test script ultimately generated can be to being tested the page Institute is functional to test.
Then, the mark of the page elements with binding relationship and routing information are saved as Map object forms, each There are the mark of page elements and the binding relationship of routing information in Map objects, wherein:Key in Map objects is the page The mark of element, the content for the page elements that the Value in Map objects is referred to by routing information, i.e. element object.
Finally, the element object needed for generation test script is found out using the Map objects, and generates test script.
Due to needing to produce the higher code of many multiplicities in the generating process of script, pass through the side of the embodiment of the present application one After method obtains the information of the page elements needed for generation test script, test pin can be directly generated by way of automatically generating This, after test script generation, user writes specific test parameter in the test script, operation time such as per minute Number etc..
Embodiment two:
The embodiment of the present application two describes a kind of generation test script belonged to embodiment one under unified inventive concept System, as shown in Fig. 2 the system includes UI frameworks 11 and database 12, wherein:
The UI frameworks 11 are used to initiate information call request to database 12, are carried in described information call request tested The address information and test environment information of the page, the test environment information represent that the tested page is trunk code building The page or the page of branch code generation, and receive each page elements in the tested page that the database 12 returns Information, and according in the tested page received each page elements information generation the tested page is tested Test script;
The database 12 is used for according to the page info being locally stored, it is determined that where the address information received Page info, in the page info in the address information comprising the page and the page each page elements information, from determination Each page for the test environment information matches for inquiring and receiving in the information for the page elements that the page info includes After the routing information of surface element, the other information of each page elements in the routing information and the page info determined is returned Back to the UI frameworks 11.
Alternatively, the information of the page elements includes:
1), page elements mark, can the unique mark page elements.
2), page elements be apply trunk code information and/or apply information in branch code.
3), page elements routing information, the routing information includes:The page when page elements are applied in trunk code The routing information of surface element, when page elements are applied in branch code the page elements routing information.
4), page elements routing information positioning method.
5), the device type that is applicable of positioning method.
6), page elements be web element types or web element list types.
7), page elements other description informations.
Alternatively, the database 12 is specifically used for it is determined that the test environment information received represents described tested When the page is the page of trunk code building, each page elements are inquired from the routing information of page elements and are applied in trunk generation The routing information of page elements during code;It is determined that the test environment information received represents that the tested page is branch During the page of code building, each page elements are inquired from the routing information of page elements and apply the page in branch code The routing information of element.
Alternatively, the UI frameworks 11 are specifically used for the mark and the page elements for the page elements that will be received Routing information is bound, and the page elements that binding is obtained using the routing information of page elements identify corresponding page elements Content generate the test script.
Alternatively, the database 12 is additionally operable to the device type according to the UI frameworks, determines that the UI frameworks are applicable institute State the positioning method of the routing information of page elements.
By the scheme of the embodiment of the present application, the routing information of page elements is uniformly safeguarded in database, per secondary During into test script, and then the information in database is directly invoked, no matter how the routing information of page elements changes, as long as more The routing information safeguarded in new database, without changing the code in test script;Meanwhile safeguarded in database Routing information has distinguished page elements and has applied the content in trunk code and branch code, generates a set of test script, is surveying Routing information of the training sheet when testing trunk environment using page elements in trunk code context, in the test pin Routing information when this is tested branch's environment using page elements in branch code environment, realize a set of script and exist Operation in trunk and branch's environment, simplify generation and the maintenance process of test script;In addition, for the higher pin of multiplicity This code is supported to automatically generate, and improves the efficiency of generation test script.
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 Usable storage medium(Including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)The computer program production of upper implementation The form of product.
The application is with reference to method, the equipment according to the embodiment of the present application(System)And the flow of 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.
In a typical configuration, the computer equipment includes one or more processors (CPU), input/output Interface, network interface and internal memory.Internal memory may include the volatile memory in computer-readable medium, random access memory The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is to calculate The example of machine computer-readable recording medium.Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be with Realize that information stores by any method or technique.Information can be computer-readable instruction, data structure, the module of program or Other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk storage or Other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.According to Herein defines, and computer-readable medium does not include the computer readable media (transitory media) of non-standing, such as The data-signal and carrier wave of modulation.
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.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the application to the application God and scope.So, if these modifications and variations of the application belong to the scope of the application claim and its equivalent technologies Within, then the application is also intended to comprising including these changes and modification.

Claims (10)

  1. A kind of 1. method for generating test script, it is characterised in that methods described includes:
    Information call request is initiated to database, the address information and test wrapper of the tested page are carried in described information call request Environment information, the test environment information represent that the tested page is the page or the branch code generation of trunk code building The page;
    The information of each page elements in the tested page that the database returns is received, wherein, the letter of the page elements Breath is the page info that the database root evidence is locally stored, it is determined that the page info where the address information received, And the test environment information for inquiring and receiving in the information of the page elements included from the page info of determination After the routing information of each page elements of matching, each page elements in the routing information and the page info determined are returned Information, it is determined that the page info in the address information comprising the page and the information of each page elements in the page;
    The survey tested according to the information generation of each page elements in the tested page received the tested page Training sheet.
  2. 2. the method as described in claim 1, it is characterised in that the information of the page elements includes:
    The mark of each page elements;
    Each page elements be apply trunk code information and/or apply information in branch code;
    The routing information of each page elements, the routing information include:The page member when page elements are applied in trunk code Element routing information, when page elements are applied in branch code the page elements routing information.
  3. 3. method as claimed in claim 2, it is characterised in that the page that the database includes from the page info of determination The routing information of each page elements for the test environment information matches for inquiring and receiving in the information of surface element, specifically Including:
    The database is it is determined that the test environment information received represents that the tested page is trunk code building During the page, the path that each page elements apply the page elements in trunk code is inquired from the routing information of page elements Information;
    The database is it is determined that the test environment information received represents that the tested page is branch code generation During the page, the path that each page elements apply the page elements in branch code is inquired from the routing information of page elements Information.
  4. 4. method as claimed in claim 2, it is characterised in that each page member in the tested page that the basis receives The information generation test script of element, is specifically included:
    The mark of the page elements received and the routing information of the page elements are bound;
    Generated using the content of the corresponding page elements of the page elements mark of the routing information acquisition binding of page elements The test script.
  5. 5. the method as described in Claims 1 to 4 is any, it is characterised in that also include in the information of the page elements:
    The device type that the positioning method of the routing information of the page elements and the positioning method are applicable;
    In the tested page that the database returns before the information of each page elements, methods described also includes:
    The database root determines that the equipment is applicable the page according to the device type for the equipment for initiating described information call request The positioning method of the routing information of element.
  6. A kind of 6. system for generating test script, it is characterised in that the system includes UI frameworks and database, wherein:
    The UI frameworks, the tested page is carried for initiating information call request to database, in described information call request Address information and test environment information, the test environment information represent the tested page be the page of trunk code building also It is the page of branch code generation, and receives the information of each page elements in the tested page that the database returns, And the test tested according to the information generation of each page elements in the tested page received the tested page Script;
    The database, the page info being locally stored for basis, it is determined that the page where the address information received Information, and the test environment for inquiring and receiving in the information of the page elements included from the page info of determination After the routing information of each page elements of information matches, by each page member in the routing information and the page info determined Element information return to the UI frameworks, it is determined that the page info in comprising the page address information and the page in each page The information of surface element.
  7. 7. system as claimed in claim 6, it is characterised in that the information of the page elements includes:
    The mark of each page elements;
    Each page elements be apply trunk code information and/or apply information in branch code;
    The routing information of each page elements, the routing information include:The page member when page elements are applied in trunk code Element routing information, when page elements are applied in branch code the page elements routing information.
  8. 8. system as claimed in claim 7, it is characterised in that
    The database, specifically for it is determined that the test environment information received represents that the tested page is trunk generation During the page of code generation, each page elements are inquired from the routing information of page elements and apply the page member in trunk code The routing information of element;It is determined that the test environment information received represents that the tested page is the page of branch code generation During face, each page elements are inquired from the routing information of page elements and apply the path of the page elements in branch code to believe Breath.
  9. 9. system as claimed in claim 7, it is characterised in that
    The UI frameworks, specifically for the mark of the page elements received and the routing information of the page elements are carried out Binding, generated using the content of the corresponding page elements of the page elements mark of the routing information acquisition binding of page elements The test script.
  10. 10. the system as described in claim 6~9 is any, it is characterised in that also include in the information of the page elements:
    The device type that the positioning method of the routing information of the page elements and the positioning method are applicable;
    The database, the device type according to the UI frameworks is additionally operable to, determines that the UI frameworks are applicable the page elements The positioning method of routing information.
CN201310412523.2A 2013-09-11 2013-09-11 A kind of method and system for generating test script Active CN104423961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310412523.2A CN104423961B (en) 2013-09-11 2013-09-11 A kind of method and system for generating test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310412523.2A CN104423961B (en) 2013-09-11 2013-09-11 A kind of method and system for generating test script

Publications (2)

Publication Number Publication Date
CN104423961A CN104423961A (en) 2015-03-18
CN104423961B true CN104423961B (en) 2017-11-17

Family

ID=52973053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310412523.2A Active CN104423961B (en) 2013-09-11 2013-09-11 A kind of method and system for generating test script

Country Status (1)

Country Link
CN (1) CN104423961B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102938B (en) * 2016-02-19 2020-11-17 创新先进技术有限公司 Test script updating method and device
CN105868111B (en) * 2016-03-29 2018-07-03 网易(杭州)网络有限公司 Game of mobile terminal automatic test approach and device
CN106776319B (en) * 2016-12-15 2020-02-14 广州酷狗计算机科技有限公司 Automatic test method and device
CN107038227A (en) * 2017-03-31 2017-08-11 武汉票据交易中心有限公司 The increment synchronization method and system of a kind of script code file
CN107181806B (en) * 2017-05-27 2020-09-01 北京思特奇信息技术股份有限公司 Distributed service processing system and method based on dubbo
CN107402882B (en) * 2017-07-21 2020-11-06 杭州迪普科技股份有限公司 Web page testing method and device
CN108415804B (en) * 2018-01-23 2021-06-04 平安普惠企业管理有限公司 Method for acquiring information, terminal device and computer readable storage medium
CN109828900A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Test script automatic generation method, device, electronic equipment and storage medium
CN113688054A (en) * 2021-08-31 2021-11-23 中国平安人寿保险股份有限公司 Page testing method and device, computer readable storage medium and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN101515250A (en) * 2009-04-09 2009-08-26 腾讯科技(深圳)有限公司 Method for testing software system and device thereof
CN202372969U (en) * 2011-08-30 2012-08-08 中国工商银行股份有限公司 Software testing system based on point function driving
CN102932197A (en) * 2011-08-11 2013-02-13 阿里巴巴集团控股有限公司 Testing method and system
CN103116542A (en) * 2013-01-24 2013-05-22 浪潮(北京)电子信息产业有限公司 Test method of equipment expansion stability

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8392890B2 (en) * 2007-10-15 2013-03-05 Software Research, Inc. Method and system for testing websites
US8959483B2 (en) * 2010-05-13 2015-02-17 Salesforce.Com, Inc. Test framework of visual components in a multitenant database environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN101515250A (en) * 2009-04-09 2009-08-26 腾讯科技(深圳)有限公司 Method for testing software system and device thereof
CN102932197A (en) * 2011-08-11 2013-02-13 阿里巴巴集团控股有限公司 Testing method and system
CN202372969U (en) * 2011-08-30 2012-08-08 中国工商银行股份有限公司 Software testing system based on point function driving
CN103116542A (en) * 2013-01-24 2013-05-22 浪潮(北京)电子信息产业有限公司 Test method of equipment expansion stability

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Web系统用户登录与访问控制测试模板模型;夏启明等;《武汉大学学报(工学版)》;20100831;第43卷(第4期);第523-527页 *
面向Web应用的自动化功能测试架构研究与实现;彭璇;《中国优秀硕士学位论文全文数据库信息科技辑》;20130115;第2013年卷(第1期);第I138-167页 *

Also Published As

Publication number Publication date
CN104423961A (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN104423961B (en) A kind of method and system for generating test script
US9852148B2 (en) File path modification based management
CN106980669B (en) A kind of storage of data, acquisition methods and device
CN107957957A (en) The acquisition methods and device of test case
US10114727B2 (en) Display window contextual visualization for application performance monitoring
JP6045134B2 (en) Parallel workload simulation for application performance testing
CN110019835B (en) Resource arranging method and device and electronic equipment
US11138216B2 (en) Automatically invoked unified visualization interface
WO2017078686A1 (en) Translation of natural language into user interface actions
US20110029822A1 (en) Tracking of java objects during request processing
US10572371B2 (en) Generating valid use cases from a parsed configuration file describing use case options
CN111414369B (en) Data processing method, device and equipment
CN114791846B (en) Method for realizing observability aiming at cloud-originated chaos engineering experiment
US20220309105A1 (en) Apparatuses, methods, and computer program products for generating interaction vectors within a multi-component system
CN105183605A (en) Server performance test method and device
US20170060577A1 (en) Documentation notification
CN108287786A (en) A kind of automated testing method and device and hybrid navigation system based on map
CN101996249B (en) Grid environment-based geospatial data service issuing method
US11151448B2 (en) Location tagging for visual data of places using deep learning
CN117234916A (en) Workflow application testing method and device, electronic equipment and storage medium
Usman et al. SmartX multiview visibility framework leveraging open-source software for SDN-cloud playground
CN109656825A (en) The method and device of fine arts resource processing, electronic equipment, storage medium
Park et al. Self-adaptive middleware framework for internet of things
CN107766216A (en) It is a kind of to be used to obtain the method and apparatus using execution information
CN110297625B (en) Application processing 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