CN103001815A - Method, device and system for acquiring test data - Google Patents

Method, device and system for acquiring test data Download PDF

Info

Publication number
CN103001815A
CN103001815A CN2011102699591A CN201110269959A CN103001815A CN 103001815 A CN103001815 A CN 103001815A CN 2011102699591 A CN2011102699591 A CN 2011102699591A CN 201110269959 A CN201110269959 A CN 201110269959A CN 103001815 A CN103001815 A CN 103001815A
Authority
CN
China
Prior art keywords
test data
data
request
web
application module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011102699591A
Other languages
Chinese (zh)
Other versions
CN103001815B (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 CN201110269959.1A priority Critical patent/CN103001815B/en
Publication of CN103001815A publication Critical patent/CN103001815A/en
Priority to HK13106040.2A priority patent/HK1179070A1/en
Application granted granted Critical
Publication of CN103001815B publication Critical patent/CN103001815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device and a system for acquiring test data. The method includes: a web application module receives a request, which carries parameters of test data needed by the automatic web test device for automatic web testing and is transmitted by an automatic web test device; the web application module calls and acquires test data executed by a data preparation proxy according to the parameters carried in the request; and the web application module returns the test data acquired by the data preparation proxy to the automatic web test device. By the method, device and system, efficiency in acquiring the test data is improved and acquisition complexity and maintenance cost of the test data are lowered.

Description

The acquisition methods of test data, Apparatus and system
Technical field
The application relates to technical field of the computer network, in particular to a kind of acquisition methods, Apparatus and system of test data.
Background technology
The web automatic test refer to test program automatically to a web system (such as, the electronic business transaction website) tests, whether several important flow processs of test web system are unobstructed, and whether the execution result of each step of flow process is correct, for example, can test the retrieval of electronic business transaction website--->whether>paying flow process is unobstructed to check goods details--->login---, and whether detection execution result of each step in this process is correct, for example, whether the result who judges retrieval is correct, and the goods details show is correct etc.
In the web automatic test course, the web automatic test device need to obtain certain test data to carry out test program, for example, test process for above-mentioned electronic business transaction website, when carrying out " login " step, the web automatic test device need to obtain the relevant informations such as an account of having registered in this electronic business transaction website and password and login, and in " paying " flow process, the web automatic test device need to obtain a Bank Account Number or the information such as payment accounts and password, to complete charge.
At present, in the web automatic test, the preparation of test data generally is to adopt by the mode of SQL (SQL) to come initialization or generate test data to deposit in the local database.In the web automatic test course, when needs obtained test data, then the test data structure keyword that obtains was as required inquired about this keyword by SQL, thereby is obtained corresponding test data from local data base, carry out test process.
The preparation method of above-mentioned test data of the prior art is more applicable for the better simply situation of business datum amount, but for the business datum of complexity, the cost compare of writing initialization SQL and later maintenance is high, and, in the web automatic test course, can only from the database of this locality, obtain test data, if the test data that needs in the web automatic test course to use is not kept in the local data base, then the web automatic test device obtains less than corresponding test data, thereby can't finish corresponding test, reduce the performance of web automatic test.
Summary of the invention
The application's main purpose is to provide a kind of acquisition methods, Apparatus and system of test data, one of to address the above problem at least.
An aspect according to the application, a kind of acquisition methods of test data is provided, may further comprise the steps: the web application module receives the request that the web automatic test device sends, wherein, carry the parameter of the test data of obtaining web automatic test device execution web automatic test needs in this request; The web application module calls the data corresponding with this parameter and prepares obtaining of agency's execution test data according to the parameter of carrying in the request; The web application module is prepared to act on behalf of the test data of obtaining with data and is returned to the web automatic test device.
Preferably, the web application module calls data corresponding with above-mentioned parameter and prepares the agency and carry out obtaining of test data and comprise: web application module calling data is prepared the agency, above-mentioned parameter is passed to data prepare the agency; Data are prepared the agency according to this parameter, carry out obtaining of test data.
Preferably, data are prepared the agency one of in the following manner or its combination in any is carried out obtaining of test data and comprised: data are prepared the agency by the mode of SQL, obtain the test data corresponding with above-mentioned parameter of storing in this locality or the external data base; Data are prepared the agency by calling remote service, obtain the test data corresponding with above-mentioned parameter; Data are prepared the agency by send HTML (Hypertext Markup Language) (http) request to far-end server, obtain the test data corresponding with this parameter from far-end server.
Preferably, the web application module receives web automatic test device transmission request and comprises: the web automatic test device calls the http interface of web application module, to web application module transmission request, acquisition request test data; The web application module receives this request.
Preferably, the web application module receives web automatic test device transmission request and comprises: the web automatic test device is in response to user's operation, to web application module transmission http request, acquisition request test data; The web application module receives this http request.
Another aspect according to the application, a kind of deriving means of test data also is provided, be positioned at web application module side, comprise: receiver module, be used for receiving the request that the web automatic test device sends, wherein, carry the parameter of the test data of obtaining web automatic test device execution web automatic test needs in this request; Acquisition module for the parameter of carrying according to this request, calls the data corresponding with this parameter and prepares obtaining of agency's execution test data; Sending module is used for that data are prepared to act on behalf of the test data of obtaining and returns to the web automatic test device.
Preferably, this device also comprises: the http interface module, and receiver module receives the above-mentioned request that the web automatic test device sends by the http interface module, and acquisition module is prepared the agency by http interface module calling data.
According to another aspect of the application, the acquisition methods of another kind of test data also is provided, may further comprise the steps: the web automatic test device determines to carry out the test data that the web automatic test needs; The web automatic test device sends request to the web application module, and the acquisition request test data wherein, carries the parameter of obtaining test data in the request; The web automatic test device receives the test data that the web application module returns, and wherein, test data is that the web application module is prepared agency's execution acquisition request by calling data.
Preferably, the web automatic test device obtains test data to the web application module requests and comprises: the web automatic test device calls the http interface of web application module, sends request, acquisition request test data to the web application module; Perhaps, the web automatic test device sends http request, acquisition request test data in response to user's operation to the web application module.
According to the application another, the deriving means of another kind of test data is provided, be positioned at web automatic test device side, comprising: determination module is used for determining that the web automatic test device carries out the test data that the web automatic test needs; Sending module is used for sending request to the web application module, and the acquisition request test data wherein, carries the parameter of obtaining test data in this request; Receiver module is used for receiving the test data that the web application module returns, and wherein, test data is that the web application module is prepared agency's execution acquisition request by calling data.
Preferably, sending module one of is used in the following manner obtaining test data to the web application module requests: call the http interface of web application module, send request, acquisition request test data to the web application module; In response to user's operation, send http request, acquisition request test data to the web application module.
Another aspect according to the application, a kind of system that obtains of test data is provided, has comprised: web automatic test device, web application module and data are prepared the agency, wherein, the web automatic test device comprises the above-mentioned device that is positioned at web automatic test device side; The web application module comprises the above-mentioned device that is positioned at web application module side; Data are prepared the agency, are used for carrying out obtaining of test data according to the parameter of web application module transmission.
Preferably, data prepare that the agency one of is used in the following manner or its combination in any is obtained test data: by the SQL mode, obtain the test data corresponding with parameter of storing in this locality or the external data base; By calling remote service, obtain the test data corresponding with parameter; By sending HTML (Hypertext Markup Language) (http request) to far-end server, obtain the test data corresponding with parameter from far-end server.
Pass through the application, the web automatic test device can be prepared the agency from data by the web application module and obtain test data, rather than from the local database of preserving of web automatic test device, obtain test data, it is high to have solved in the prior art cost compare of initialization test data and later maintenance, and can't obtain the test data outside the database storage and cause to finish the problem of corresponding test, and then improved the efficient that test data is obtained, reduced complexity and maintenance cost that test data is obtained.
Description of drawings
Accompanying drawing described herein is used to provide the further understanding to the application, consists of the application's a part, and the application's illustrative examples and explanation thereof are used for explaining the application, do not consist of the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the structural representation according to the system that obtains of the application's test data;
Fig. 2 is the structural representation according to the system that obtains of the preferred test data of the embodiment of the present application;
Fig. 3 is the structural representation according to the deriving means of the test data of the embodiment of the present application;
Fig. 4 is the structural representation according to the deriving means of the preferred test data of the embodiment of the present application;
Fig. 5 is the structural representation according to the deriving means of the another kind of test data of the embodiment of the present application;
Fig. 6 is the flow chart according to the acquisition methods of the test data of the embodiment of the present application;
Fig. 7 is the flow chart according to the acquisition methods of the another kind of test data of the embodiment of the present application;
Fig. 8 is the flow chart of the acquisition methods of the test data preferably implemented according to the application; And
Fig. 9 is the flow chart of the acquisition methods of another test data of preferably implementing according to the application.
Embodiment
Hereinafter also describe in conjunction with the embodiments the application in detail with reference to accompanying drawing.Need to prove that in the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
In following examples, the web automatic test device refers to carry out the equipment of web automatic test, can be one section program that can automatically perform test, for example, and web automatized script program; The web application module can be the weblication that operates on the server, and being used for provides test data to the web automatic test device; Data are prepared agency (agent) and are used for finishing the test data preparation, for example, and the program code that can prepare for carrying out test data.
Fig. 1 is the structural representation according to the system that obtains of the test data of the embodiment of the present application, and as shown in Figure 1, this system mainly comprises: web automatic test device 10, web application module 20 and data are prepared agency 30.Wherein, web automatic test device 10 is used for sending request to web application module 20, and acquisition request is carried out the required test data of web automatic test, wherein, carry the parameter of obtaining this test data in this request, for example, when login process is tested, web automatic test device 10 can send request to web application module 20, account and the password of acquisition request user's registration can carry parameter " ID, password " in this request; Web application module 20, be connected with web automatic test device 10, for example, web application module 20 can be connected with web automatic test device 10 by network, web application module 20 is used for after the request that receives from web automatic test device 20, calling data is prepared agency 30 and is carried out obtaining of test data, and the test data of obtaining returned to web automatic test device 10, wherein, data are prepared agency 30 can be for a plurality of, web application module 20 can be determined the data preparation agency 30 that needs call according to above-mentioned parameter, then this parameter is passed to corresponding data and prepares agency 30; Data are prepared agency 30, are used for according to above-mentioned parameter, carry out obtaining of test data.Wherein, data are prepared agency 30 can be arranged in same server with web application module 20, also can be arranged in different servers from web application module 20.
The system that obtains of the above-mentioned test data that provides by the application, the web automatic test device separates with test data, the web automatic test device is prepared to obtain test data the agency 30 from data by web application module 20, thereby can obtain test data from data preparation agency 30 by 20 pairs of web application modules and carry out unified maintenance, reduced the test data maintenance cost, and, in the starting stage, need to not become test data at web automatic test device adnation yet, thus the inconvenience of having avoided the initialization test data to bring.
In the application's a preferred implementation, in order to improve the automated procedures of test, web automatic test device 10 can be carried out the web automatic test by operation web automatized script, web application module 20 can externally provide a http interface, the web automatized script is in carrying out the web automatic test course, can send the request of obtaining test data to web application module 20 by calling this http interface, Fig. 2 is the structural representation according to the system that obtains of the preferred test data of the embodiment of the present application, in Fig. 2, web application module 20 is used for that data are prepared agency 30 and manages and scheduled for executing, and externally provide a http interface, call for web automatized script 102 (operating on the web automatic test device 10), this http interface is responsible for receiving the request of the acquisition request test data that web automatized script 102 sends, and the parameter of carrying in will asking passes to data and prepares agency 30, and the execution result of data being prepared agency 30 returns to web automatized script 102; Data are prepared agency 30, are used for the parameter according to the http interface transmission of web application module 20, carry out obtaining of test data.In this preferred implementation, web automatized script 102 can obtain test data by the http interface of Automatically invoked web application module 20 when the test beginning or in the measuring executing process, and need to do not obtained by user's operation, therefore, improved the efficient of obtaining of test data.
In a preferred implementation of present embodiment, data are prepared agency's 30 one section code that can obtain for finishing test data, for example, can be one section ghost (shell) programs, can be concrete SQL query statement or java code, concrete the application do restriction yet.And data are prepared agency 30 when obtaining test data, can be in the following manner one or a combination set of realize: (1) is by the mode of SQL, the database of preparing agency's 30 local storages from data obtains the test data corresponding with above-mentioned parameter, perhaps, data are prepared to obtain the test data corresponding with above-mentioned parameter in agency's 30 databases that also can store from other equipment that are attached thereto, for example, obtain the test data corresponding with above-mentioned parameter from being stored in data preparation agency 30 databases that are arranged in the memory device of same local area network (LAN); (2) data prepare agency 30 as client by calling remote service, obtain the test data corresponding with above-mentioned parameter, for example, in the web system, server often adopts the modes such as the rmi of java program and hession that remote service is provided, and is used for providing certain service, such as freight charges service, order service, payment services etc., in the preferred implementation of present embodiment, data are prepared these test datas of serving to construct that agency 30 can provide by invoking server.The remote service of which kind of agreement no matter, its method of calling all is similarly, as long as client is the local definition that has service interface, then calls correlation method according to the form assembly parameter of agreement and gets final product; (3) by send the http request to far-end server, obtain the test data corresponding with above-mentioned parameter from far-end server, for example, data are prepared agency 30 can send the http request of carrying above-mentioned parameter to far-end server, far-end server is in response to this http request, prepare agency 30 to data and return corresponding test data, wherein, far-end server can be the relevant various servers of test of carrying out with the web automatic test device in the network, for example, when certain web system being paid test, may need to obtain user's bank account, then data are prepared the parameter that agency 30 can provide according to the web application module, send the http request to the far-end server of storage user's bank account, to obtain user's bank account.In this preferred implementation, data are prepared agency 30 and can be adopted various ways to obtain test data, and are not limited only to local test data of preserving, thereby have expanded the source of test data, guarantee the demand of web automatic test, improved the accuracy rate of web automatic test.
Fig. 3 is the structural representation of deriving means of the test data that is positioned at web application module 20 sides of the embodiment of the present application, and this device can be used for realizing above-mentioned Fig. 1 or web application module 20 shown in Figure 2.As shown in Figure 3, this device can comprise: the first receiver module 302, be used for to receive the request that web automatic test device 10 sends, wherein, carry in this request obtain web automatic test device 10 carry out the web automatic tests need to the parameter of test data; Acquisition module 304 for the parameter of carrying according to this request, calls the data corresponding with this parameter and prepares obtaining of agency's 30 execution test datas; The first sending module 306 is used for that data are prepared agency's 30 test datas of obtaining and returns to web automatic test device 10.
The deriving means of the test data that is positioned at web application module 20 sides by present embodiment, can be when receiving the request of web automatic test device 10, respond this request, calling data is prepared agency 30 and is obtained corresponding test data, and the test data of obtaining returned to web automatic test device 10, thereby so that web automatic test device 10 can obtain test data from the outside, realized separating of web automatic test and test data, improve the convenience that test data is safeguarded, reduced complexity and maintenance cost that test data is prepared.
In a preferred implementation of present embodiment, can realize automatic test in order to make web automatic test device 10, as shown in Figure 4, this device can also comprise: http interface module 308, offering web automatic test device 10 calls, the first receiver module 302 receives the above-mentioned request that web automatic test device 10 sends by http interface module 308, and acquisition module 304 can be prepared agency 30 by http interface module 308 calling datas.By this preferred implementation, can when web automatic test device 10 be realized automatic test, provide test data to web automatic test device 10, thereby improve testing efficiency.
Fig. 5 is the structural representation according to the deriving means of the test data that is positioned at web automatic test device 10 sides of the embodiment of the present application, and this device can be used for realizing the web automatic test device 10 of above-mentioned Fig. 1 or Fig. 2.As shown in Figure 5, this device can comprise: determination module 502 is used for web automatic test device 10 and determines to carry out the test data that the web automatic test needs; The second sending module 504 is used for sending request to web application module 20, and the acquisition request test data wherein, carries the parameter of obtaining above-mentioned test data in this request; The second receiver module 506 is used for receiving the test data that web application module 20 returns, and wherein, this test data is that web application module 20 is prepared agency's 30 execution acquisition request by calling data.
The said apparatus that provides by present embodiment, web automatic test device 10 is when carrying out automatic test, can be by sending request to web application module 20, obtain test data, thereby realized separating of web automatic test and test data, so that uniformly maintenance test data have improved the convenience that test data is safeguarded, complexity and maintenance cost that test data is prepared have been reduced.
In a preferred implementation of present embodiment, corresponding to different test modes, the second sending module 504 respectively one of following mode obtains test data to the web application module requests: (1) calls the http interface of web application module, send request to the web application module, the acquisition request test data adopts this mode, can improve the automated procedures of web automatic test, in this embodiment, can carry out the web automatic test by the web automatized script; (2) in response to user's operation, send the http request to the web application module, the acquisition request test data, for example, can provide one for the dialog box of user selection, the user can input the parameter of obtaining the test data that need to obtain in this dialog box, then send http request, this test data of acquisition request to the web application module.
Fig. 6 is the flow chart according to the acquisition methods of the test data of the embodiment of the present application, and the method is described the acquisition methods of the test data that the embodiment of the present application provides from web application module 10 sides, and as shown in Figure 6, the method mainly may further comprise the steps:
Step S602, the web application module receives the request that the web automatic test device sends, and wherein, carries in this request and obtains the parameter that the web automatic test device is carried out the test data of web automatic test needs;
In preferred implementation of present embodiment, the web application module can provide one for the http interface of external call, the web automatic test device is when needs obtain test data, can call this http interface by the web automatic test script, send a request message to the web application module, the acquisition request test data, namely in this embodiment, the web automatic test device obtains test data by operation web automatic test script Automatically invoked http interface.By this preferred implementation, the web automatic test script is separated with test data, be convenient to test data is unified to safeguard, and the automaticity of test can be provided;
Perhaps, in the present embodiment in another preferred implementation, the web automatic test device also can be by sending the http request to the web application module, the acquisition request test data, for example, the web automatic test device can provide one for the dialog box of user selection, and the user can input the parameter of obtaining the test data that need to obtain in this dialog box, then send http request, this test data of acquisition request to the web application module.By this execution mode, can in the situation of needs, obtain test data to the web application module requests more according to the actual requirements, thereby improve the flexibility that test data is obtained.
Step S604, web application module call the data corresponding with this parameter and prepare obtaining of agency's this test data of execution according to the parameter of carrying in the above-mentioned request;
In a preferred implementation of present embodiment, if the web application module provides external http interface, then the web application module can pass to data with above-mentioned parameter by this http interface and prepare the agency, and data are prepared the agency and carried out obtaining of test data according to parameter.
In a preferred implementation of present embodiment, data are prepared the following mode that includes but not limited to of obtaining that the agency carries out test data:
(1) by the mode Query Database of SQL, obtains the test data corresponding with this parameter, adopt this mode, can effectively utilize the database of existing store test data, improved the utilance of resource;
(2) by calling actual external remote service, thereby obtain corresponding test data with this parameter, in actual applications, adopt this mode, the existing remote service that provides can be provided, improve the utilance of existing remote service;
(3) can obtain the test data corresponding with this parameter by send the mode of http request to far-end server, adopt this mode, effectively the source that obtains of extend testing data guarantees the success rate that test data is obtained.
Step S606, the web application module is prepared to act on behalf of the test data of obtaining with data and is returned to the web automatic test device.
A preferred implementation at present embodiment, if the web application module provides the http that externally calls interface, then web uses and can the test data of obtaining be returned to the web automatic test device by this http interface, perhaps, the web application module also can return to the web automatic test device with the test data of obtaining by send the http response to the web automatic test device.
By above-mentioned steps, not only realized separating of web automatic test and test data, the source that obtains of multiple test data can also be provided for the web automatic test, thereby guarantee the success of web automatic test.
Fig. 7 is the flow chart according to the acquisition methods of the another kind of test data of the embodiment of the present application, and the method is described the acquisition methods of the application's test data from web automatic test device 10 sides, and as shown in Figure 7, the method mainly may further comprise the steps:
Step S702, web automatic test device determine to carry out the test data that the web automatic test needs;
In a preferred implementation of present embodiment, the web automatic test device can be determined to obtain test data before beginning to carry out the web automatic test, perhaps, in another preferred implementation of present embodiment, the web automatic test device also can be in carrying out the web automatic test course, determines to obtain test data.
Step S704, the web automatic test device sends request to the web application module, and the above-mentioned test data of acquisition request wherein, carries the parameter of obtaining this test data in this request;
In a preferred implementation of present embodiment, the web automatic test device can automatically move the web automatized script and carry out the web automatic test, at test process, when needs obtain test data, the web automatized script calls the http interface that the web application module externally provides, send request to the web application module, carry the parameter of the test data that indication need to obtain in this request.In this preferred implementation, the web automatic test device can be in test process the automatic acquisition test data, guaranteed to greatest extent the automation of web test.
In another preferred implementation of present embodiment, as above-mentioned, the web automatic test device also can be by sending http request, the test data that the acquisition request test is required to the web application module.Concrete to above-mentioned similar to the description of the acquisition methods of test data from web application module side, specifically repeat no more.
Step S704, the web automatic test device receives the test data that the web application module returns, and wherein, this test data is that the web application module is prepared the above-mentioned acquisition request of agency's execution by calling data.
In a preferred implementation of present embodiment, after the web application module receives the request of web automatic test device transmission, can adopt above-mentioned from the mode calling data preparation agency of web application module side to the description of the acquisition methods of test data, carry out obtaining of test data, specifically do not repeat them here.
Fig. 8 is the flow chart according to the acquisition methods of the preferred test data of the embodiment of the present application, and as shown in Figure 8, the method mainly may further comprise the steps:
Step S802, the web automatic test device sends request to the web application module, and acquisition request is carried out the required test data of web automatic test, wherein, carries the parameter of obtaining this test data in this request;
Step S804, the web application module receives the above-mentioned request from the web automatic test device;
Step S806, web application module call corresponding data and prepare the agency according to the parameter of carrying in the above-mentioned request, carry out obtaining of test data;
Step S808, data are prepared the agency carries out test data according to described parameter the operation of obtaining;
For example, data are prepared the agency can obtain test data by the mode of SQL, perhaps, also can obtain described test data by the remote service that externally provides, in addition, data are prepared to act on behalf of and also can be passed through to send the described test data of http acquisition request to far-end server.
Step S810, the execution result that the web application module is prepared the agency with data returns to web automatic test module.
Afterwards, the test data that the web automatic test device can return according to the web application module is carried out corresponding test operation.
The below carries out test as example take the web automatic test by operation web automatized script, and one of the application more excellent implementation is described.Need to prove that following examples are the flow process of logging in network system tested as the acquisition methods of example explanation test data, still to be not limited to this, for other web tests, also can adopt the execution mode in following examples.
In this preferred embodiment, Fig. 9 is the flow chart that the web automatized script is tested " login web system ", and as shown in Figure 9, the web automatized script is tested mainly " login web system " and be may further comprise the steps:
Step S902, web automatized script call the http interface that the web application module externally provides, and send request to the web application module, comprise parameter " serviceType (member's type), dbProperty (database configuration) " in the request;
After step S904, web application module receive request by the http interface, dispatch corresponding data and prepare agency's execution, prepare the agency to data and transmit relevant parameter;
Step S906, the mode that data are prepared agency's employing SQL generates the member data of specifying member's type in the database of appointment;
Step S908, login name and the password of the member data that data preparation agency will generate return application module, namely " " oginld ": testcgs ", " password ": " hello1234 " ";
Step S910, web application module prepare agency's execution result with data by its http interface, i.e. and " { " oginld ": testcgs ", " password ": " hello1234 " " return to the web automatized script;
Step S912, the web automatized script receives the test data that the web application module returns, and finishes the preparation of corresponding test data.
The such scheme that provides by the embodiment of the present application, the web automatic test device can be prepared the agency from data by the web application module and obtain test data, rather than directly from the database of web automatic test device self storage, obtain test data, it is high to have solved in the prior art cost compare of initialization test data and later maintenance, and can't obtain the test data outside the database storage and cause to finish the problem of corresponding test, and then improved the efficient that test data is obtained, reduced complexity and maintenance cost that test data is obtained.And in this application, test data only is not limited to and obtains in database, thereby has expanded the mode that test data is prepared, and has enriched test data, and the accuracy of test further is provided.
Obviously, those skilled in the art should be understood that, each module of above-mentioned the application or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, carried out by calculation element thereby they can be stored in the storage device, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the application is not restricted to any specific hardware and software combination.
The above is the application's preferred embodiment only, is not limited to the application, and for a person skilled in the art, the application can have various modifications and variations.All within the application's spirit and principle, any modification of doing, be equal to replacement, improvement etc., all should be included within the application's the protection range.

Claims (13)

1. the acquisition methods of a test data is characterized in that, may further comprise the steps:
The web application module receives the request that the web automatic test device sends, and wherein, carries in the described request and obtains the parameter that described web automatic test device is carried out the test data of web automatic test needs;
Described web application module calls the data corresponding with described parameter and prepares obtaining of agency's described test data of execution according to the parameter of carrying in the described request;
Described web application module is prepared to act on behalf of the described test data of obtaining with described data and is returned to described web automatic test device.
2. method according to claim 1 is characterized in that, described web application module calls data preparation agency execution the obtaining of described test data corresponding with described parameter and comprises:
Described web application module calls described data and prepares the agency, described parameter is passed to described data prepare the agency;
Described data are prepared the agency according to described parameter, carry out obtaining of described test data.
3. method according to claim 2 is characterized in that, described data are prepared the agency one of in the following manner or its combination in any is carried out obtaining of described test data and comprised:
Described data are prepared the agency by the SQL mode, obtain the described test data corresponding with described parameter of storing in this locality or the external data base;
Described data are prepared the agency by calling remote service, obtain the described test data corresponding with described parameter; Described data are prepared the agency by send HTML (Hypertext Markup Language) http request to far-end server, obtain the described test data corresponding with described parameter from described far-end server.
4. each described method in 3 according to claim 1 is characterized in that, described web application module receives the web automatic test device and sends request and comprise:
Described web automatic test device calls the http interface of described web application module, sends described request, the described test data of acquisition request to described web application module;
Described web application module receives described request.
5. each described method in 3 according to claim 1 is characterized in that, described web application module receives the web automatic test device and sends request and comprise:
Described web automatic test device sends http request, the described test data of acquisition request in response to user's operation to described web application module;
Described web application module receives described http request.
6. the deriving means of a test data is positioned at web application module side, it is characterized in that, comprising:
Receiver module be used for to receive the request that the web automatic test device sends, and wherein, carries in the described request and obtains the parameter that described web automatic test device is carried out the test data that the web automatic test needs;
Acquisition module for the parameter of carrying according to described request, calls the data corresponding with described parameter and prepares obtaining of agency's described test data of execution;
Sending module is used for that described data are prepared to act on behalf of the described test data of obtaining and returns to described web automatic test device.
7. device according to claim 6, it is characterized in that, described device also comprises: the http interface module, described receiver module receives the described request that described web automatic test device sends by described http interface module, and described acquisition module calls described data by described http interface module and prepares the agency.
8. the acquisition methods of a test data is characterized in that, may further comprise the steps:
The web automatic test device determines to carry out the test data that the web automatic test needs;
Described web automatic test device sends request to the web application module, and the described test data of acquisition request wherein, carries the parameter of obtaining described test data in the described request;
Described web automatic test device receives the described test data that described web application module returns, and wherein, described test data is that described web application module obtains by calling data preparation agency execution described request.
9. method according to claim 8 is characterized in that, described web automatic test device obtains described test data to the web application module requests and comprises:
Described web automatic test device calls the http interface of described web application module, sends described request, the described test data of acquisition request to described web application module; Perhaps,
Described web automatic test device sends http request, the described test data of acquisition request in response to user's operation to described web application module.
10. the deriving means of a test data is positioned at web automatic test device side, it is characterized in that, comprising:
Determination module is used for the test data of determining that described web automatic test device execution web automatic test needs;
Sending module is used for sending request to the web application module, and the described test data of acquisition request wherein, carries the parameter of obtaining described test data in the described request;
Receiver module is used for receiving the described test data that described web application module returns, and wherein, described test data is that described web application module obtains by calling data preparation agency execution described request.
11. device according to claim 10 is characterized in that, described sending module one of is used in the following manner obtaining described test data to described web application module requests:
Call the http interface of described web application module, send described request, the described test data of acquisition request to described web application module;
In response to user's operation, send http request, the described test data of acquisition request to described web application module.
12. the system that obtains of a test data is characterized in that, comprising: web automatic test device, web application module and data are prepared the agency, wherein,
Described web automatic test device comprises claim 12 or 13 described devices;
Described web application module comprises claim 8 or 9 described devices;
Described data are prepared the agency, are used for carrying out obtaining of test data according to the parameter of described web application module transmission.
13. system according to claim 12 is characterized in that, described data prepare that the agency one of is used in the following manner or its combination in any is obtained described test data:
By the SQL mode, obtain the described test data corresponding with described parameter of storing in this locality or the external data base;
By calling remote service, obtain the described test data corresponding with described parameter;
By send HTML (Hypertext Markup Language) http request to far-end server, obtain the described test data corresponding with described parameter from described far-end server.
CN201110269959.1A 2011-09-13 2011-09-13 The acquisition methods of test data, Apparatus and system Active CN103001815B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110269959.1A CN103001815B (en) 2011-09-13 2011-09-13 The acquisition methods of test data, Apparatus and system
HK13106040.2A HK1179070A1 (en) 2011-09-13 2013-05-22 Method, device and system for obtaining testing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110269959.1A CN103001815B (en) 2011-09-13 2011-09-13 The acquisition methods of test data, Apparatus and system

Publications (2)

Publication Number Publication Date
CN103001815A true CN103001815A (en) 2013-03-27
CN103001815B CN103001815B (en) 2016-05-04

Family

ID=47929974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110269959.1A Active CN103001815B (en) 2011-09-13 2011-09-13 The acquisition methods of test data, Apparatus and system

Country Status (2)

Country Link
CN (1) CN103001815B (en)
HK (1) HK1179070A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015032060A1 (en) * 2013-09-05 2015-03-12 华为技术有限公司 Network device and method for service testing via network device
CN104427627A (en) * 2013-08-23 2015-03-18 阿里巴巴集团控股有限公司 Test data obtaining method, client and server
CN105302709A (en) * 2014-07-03 2016-02-03 阿里巴巴集团控股有限公司 Test data generating method and device
CN105471665A (en) * 2014-08-21 2016-04-06 北京奇虎科技有限公司 Website function testing method, website function testing system and website server
CN105740137A (en) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 Bucket test method, device and system, and method and device for providing configuration information
CN105893227A (en) * 2015-12-29 2016-08-24 乐视网信息技术(北京)股份有限公司 Data processing method and device
CN105893241A (en) * 2015-12-07 2016-08-24 乐视网信息技术(北京)股份有限公司 Updating method and device for test data
CN106610894A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Interface testing method and device
CN107515819A (en) * 2016-06-16 2017-12-26 平安科技(深圳)有限公司 Medicare system method of testing and device
CN108268369A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Test data acquisition methods and device
CN110221982A (en) * 2019-06-17 2019-09-10 深圳前海微众银行股份有限公司 Performance test methods, device, equipment and the readable storage medium storing program for executing of operation system
CN110471967A (en) * 2019-07-02 2019-11-19 深圳市金泰克半导体有限公司 A kind of test data management system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020095436A1 (en) * 2001-01-12 2002-07-18 Lee Jae-Ii System for providing information associated with software package and supporting test therefor
CN1791037A (en) * 2005-12-26 2006-06-21 北京航空航天大学 Method for realizing Web service automatic test
US20070162557A1 (en) * 2006-01-06 2007-07-12 Hon Hai Precision Industry Co., Ltd. System and method for transferring service requests
CN101414935A (en) * 2008-07-09 2009-04-22 北京星网锐捷网络技术有限公司 Method and system for generating test case
CN102004781A (en) * 2010-11-23 2011-04-06 北京酷我科技有限公司 Method and system for acquiring website test data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020095436A1 (en) * 2001-01-12 2002-07-18 Lee Jae-Ii System for providing information associated with software package and supporting test therefor
CN1791037A (en) * 2005-12-26 2006-06-21 北京航空航天大学 Method for realizing Web service automatic test
US20070162557A1 (en) * 2006-01-06 2007-07-12 Hon Hai Precision Industry Co., Ltd. System and method for transferring service requests
CN101414935A (en) * 2008-07-09 2009-04-22 北京星网锐捷网络技术有限公司 Method and system for generating test case
CN102004781A (en) * 2010-11-23 2011-04-06 北京酷我科技有限公司 Method and system for acquiring website test data

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427627A (en) * 2013-08-23 2015-03-18 阿里巴巴集团控股有限公司 Test data obtaining method, client and server
WO2015032060A1 (en) * 2013-09-05 2015-03-12 华为技术有限公司 Network device and method for service testing via network device
CN105264824A (en) * 2013-09-05 2016-01-20 华为技术有限公司 Network device and method for service testing via network device
CN105302709A (en) * 2014-07-03 2016-02-03 阿里巴巴集团控股有限公司 Test data generating method and device
CN105302709B (en) * 2014-07-03 2019-01-22 阿里巴巴集团控股有限公司 Test data generating method and equipment
CN105471665A (en) * 2014-08-21 2016-04-06 北京奇虎科技有限公司 Website function testing method, website function testing system and website server
CN105740137A (en) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 Bucket test method, device and system, and method and device for providing configuration information
CN106610894A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Interface testing method and device
CN105893241A (en) * 2015-12-07 2016-08-24 乐视网信息技术(北京)股份有限公司 Updating method and device for test data
CN105893227A (en) * 2015-12-29 2016-08-24 乐视网信息技术(北京)股份有限公司 Data processing method and device
CN107515819A (en) * 2016-06-16 2017-12-26 平安科技(深圳)有限公司 Medicare system method of testing and device
CN107515819B (en) * 2016-06-16 2020-07-28 平安科技(深圳)有限公司 Medical insurance system testing method and device
CN108268369A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Test data acquisition methods and device
CN108268369B (en) * 2016-12-30 2021-04-02 北京国双科技有限公司 Test data acquisition method and device
CN110221982A (en) * 2019-06-17 2019-09-10 深圳前海微众银行股份有限公司 Performance test methods, device, equipment and the readable storage medium storing program for executing of operation system
CN110221982B (en) * 2019-06-17 2023-06-09 深圳前海微众银行股份有限公司 Performance test method, device and equipment of business system and readable storage medium
CN110471967A (en) * 2019-07-02 2019-11-19 深圳市金泰克半导体有限公司 A kind of test data management system and method

Also Published As

Publication number Publication date
CN103001815B (en) 2016-05-04
HK1179070A1 (en) 2013-09-19

Similar Documents

Publication Publication Date Title
CN103001815A (en) Method, device and system for acquiring test data
US11163671B2 (en) Automatically executing stateless transactions with data dependency in test cases
CN106528432B (en) The construction method and device of test scene data bury a test method
CN109308266A (en) Construction method, test method, device, equipment and the medium of test case
RU2648966C2 (en) Apparatus and method for processing multiple open api
CN105760286B (en) Application database dynamic property detection method and detection device
CN104539487B (en) A kind of system testing and reliability estimation method based on cloud platform
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN104427627B (en) Test data acquisition methods, client and server
CN110310034A (en) A kind of service orchestration applied to SaaS, business flow processing method and apparatus
CN103905551B (en) A kind of service calling method and device
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN108628748B (en) Automatic test management method and automatic test management system
CN101131747A (en) Method, device and system for catching and/or analyzing Web page events at client terminal
CN108647141A (en) Automatic test approach, device, computer-readable medium and electronic equipment
CN103246606B (en) The performance test methods of ESB platform and system
CN108881111A (en) A kind of method and device for realizing multi-tenant system
US20100332904A1 (en) Testing of Distributed Systems
CN109460841A (en) User's account-opening method, system and storage medium
CN116719622A (en) Service flow arranging method and service flow arranging system
CN108694120A (en) The method and apparatus of testing service component
CN110377441A (en) Positioning problems method, apparatus, equipment and storage medium on application software of calling a taxi line
CN113127335A (en) System testing method and device
CN110489326A (en) HTTPAPI adjustment method device, medium and equipment based on IDS
CN110347380A (en) Front and back end development approach and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1179070

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1179070

Country of ref document: HK