CN103001815B - The acquisition methods of test data, Apparatus and system - Google Patents

The acquisition methods of test data, Apparatus and system Download PDF

Info

Publication number
CN103001815B
CN103001815B CN201110269959.1A CN201110269959A CN103001815B CN 103001815 B CN103001815 B CN 103001815B CN 201110269959 A CN201110269959 A CN 201110269959A CN 103001815 B CN103001815 B CN 103001815B
Authority
CN
China
Prior art keywords
data
test data
web
test
agency
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
CN201110269959.1A
Other languages
Chinese (zh)
Other versions
CN103001815A (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

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a kind of acquisition methods, Apparatus and system of test data, the method comprises: web application module receives the request that web automatic test device sends, wherein, in this request, carry the parameter of the test data of obtaining web automatic test device execution web automatic test needs; Web application module, according to the parameter of carrying in request, calls the data corresponding with this parameter and prepares obtaining of agency's execution test data; Web application module is prepared to act on behalf of by data the test data of obtaining and is returned to web automatic test device. Improve by the application the efficiency that test data is obtained, reduced complexity and maintenance cost that test data is obtained.

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 of test data, install and beSystem.
Background technology
Web automatic test refer to test program automatically to a web system (such as, electronic business transaction website) test,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,---> checks goods details---> login---, and whether > paying flow process is unobstructed, and detects can to test the retrieval of electronic business transaction websiteIn this process, whether the execution result of each step is correct, for example, judges that whether the result of retrieval is correct, goods detailsWhat show is correct etc.
In web automatic test course, web automatic test device need to obtain certain test data to carry out test journeyOrder, for example, for the test process of above-mentioned electronic business transaction website, in the time carrying out " login " step, web automatic test dressPut and need to obtain one and logined in the relevant information such as account and password of this electronic business transaction website registration, and in " paying "In flow process, web automatic test device need to obtain the information such as a Bank Account Number or payment accounts and password, to complete charge.
At present, in web automatic test, the preparation of test data is generally to adopt to pass through SQL (SQL)Mode initializes or generates test data and deposits in local database. In web automatic test course, obtain at needsWhile getting test data, the test data structure keyword obtaining as required, then inquiring about from local data base by SQL shouldKeyword, thus corresponding test data obtained, 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 rightIn complicated business datum, the cost compare of writing initialization SQL and later maintenance is high, and, in web automationIn test process, can only from local database, obtain test data, if in web automatic test course, need to useTest data is not kept in local data base, and web automatic test device obtains less than corresponding test data, therebyCannot complete 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, at least to solve above-mentioned askingOne of topic.
According to the application aspect, a kind of acquisition methods of test data is provided, comprise the following steps: web application mouldPiece receives the request that web automatic test device sends, and wherein, carries and obtain web automatic test device and hold in this requestThe parameter of the test data that row web automatic test needs; Web application module, according to the parameter of carrying in request, calls and thisData corresponding to parameter are prepared agency and are carried out obtaining of test data; Data are prepared the test number that agency obtains by web application moduleAccording to returning to web automatic test device.
Preferably, web application module calls data corresponding with above-mentioned parameter and prepares agency and carry out obtaining of test data and comprise:Web application module calling data is prepared agency, above-mentioned parameter is passed to data and prepare agency; Data are prepared agency according to this ginsengNumber, carries out obtaining of test data.
Preferably, data are prepared agency one of in the following manner or its any combination is carried out obtaining of test data and comprised: dataPrepare agency by the mode of SQL, obtain the survey corresponding with above-mentioned parameter of storing in this locality or external data baseExamination data; Data are prepared agency by calling remote service, obtain the test data corresponding with above-mentioned parameter; Data are prepared agencyBy send HTTP (http) request to far-end server, obtain the test corresponding with this parameter from far-end serverData.
Preferably, web application module reception web automatic test device sends request and comprises: web automatic test device is adjustedWith the http interface of web application module, send request acquisition request test data to web application module; Web application moduleReceive this request.
Preferably, web application module reception web automatic test device sends request and comprises: web automatic test device ringsShould, in user's operation, send http request, acquisition request test data to web application module; Web application module receives shouldHttp request.
According to another aspect of the application, a kind of acquisition device of test data is also provided, be positioned at web application module side,Comprise: receiver module, the request sending for receiving web automatic test device, wherein, carries and obtain web in this requestThe parameter of the test data that automatic test device execution web automatic test needs; Acquisition module, for according to this requestThe parameter of carrying, calls the data corresponding with this parameter and prepares obtaining of agency's execution test data; Sending module, for by numberReturn to web automatic test device according to preparing to act on behalf of the test data of obtaining.
Preferably, this device also comprises: http interface module, receiver module receives web automation by http interface module and surveysThe above-mentioned request that electricity testing device sends, acquisition module is prepared agency by http interface module calling data.
According to another aspect of the application, the acquisition methods of another kind of test data is also provided, comprise the following steps: webAutomatic test device is determined the test data that execution web automatic test needs; Web automatic test device is applied to webModule sends request, and acquisition request test data wherein, carries the parameter of obtaining test data in request; Web automationTesting arrangement receives the test data that web application module returns, and wherein, test data is that web application module passes through calling dataPreparation agency carries out acquisition request.
Preferably, web automatic test device obtains test data to web application module requests and comprises: web automatic testDevice calls the http interface of web application module, sends request acquisition request test data to web application module; Or,Web automatic test device, in response to user's operation, sends http request, acquisition request test data to web application module.
According to the application another, the acquisition device of another kind of test data is provided, be positioned at web automatic test device side,Comprise: determination module, for the test data of determining that web automatic test device execution web automatic test needs; SendModule, for sending request to web application module, acquisition request test data, wherein, carries and obtains test in this requestThe parameter of data; Receiver module, the test data of returning for receiving web application module, wherein, test data is that web shouldPrepare agency by module by calling data and carry out acquisition request.
Preferably, sending module is for one of in the following manner obtaining test data to web application module requests: calling web shouldWith the http interface of module, send request acquisition request test data to web application module; In response to user's operation, toWeb application module sends http request, acquisition request test data.
According to another aspect of the application, a kind of system of obtaining of test data is provided, comprising: web automatic test dressPut, web application module and data prepare agency, wherein, web automatic test device, comprises that above-mentioned to be positioned at web automaticChange the device of testing arrangement side; Web application module, comprises the above-mentioned device that is positioned at web application module side; Data are prepared generationReason, for carrying out obtaining of test data according to the parameter of web application module transmission.
Preferably, data prepare agency for one of in the following manner or its any combination obtain test data: look into by structuringAsk language form, obtain the test data corresponding with parameter of storing in this locality or external data base; By calling remote service,Obtain the test data corresponding with parameter; By sending HTTP (http request) to far-end server, take from far-endBusiness device obtains the test data corresponding with parameter.
By the application, web automatic test device can be prepared agency from data by web application module and obtain test data,Instead of obtain test data from the local database of preserving of web automatic test device, solve in prior art and initializedThe cost compare of test data and later maintenance is high, and cannot obtain the test data outside database storage and cause cannot be completeBecome the problem of corresponding test, and then improved the efficiency that test data is obtained, reduced complexity and dimension that test data is obtainedProtect cost.
Brief description of the drawings
Accompanying drawing described herein is used to provide further understanding of the present application, forms the application's a part, and the application showsMeaning property embodiment and explanation thereof are used for explaining the application, do not form the improper restriction to the application. In the accompanying drawings:
Fig. 1 is according to the structural representation of the system of obtaining of the application's test data;
Fig. 2 is according to the structural representation of the system of obtaining of the preferred test data of the embodiment of the present application;
Fig. 3 is according to the structural representation of the acquisition device of the test data of the embodiment of the present application;
Fig. 4 is according to the structural representation of the acquisition device of the preferred test data of the embodiment of the present application;
Fig. 5 is according to the structural representation of the acquisition device of the another kind of test data of the embodiment of the present application;
Fig. 6 is according to the flow chart of the acquisition methods of the test data of the embodiment of the present application;
Fig. 7 is according to the flow chart of 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.
Detailed description of the invention
Hereinafter also describe the application in detail with reference to accompanying drawing in conjunction with the embodiments. It should be noted that, in the situation that not conflicting,Feature in embodiment and embodiment in the application can combine mutually.
In following examples, web automatic test device refers to the equipment of carrying out web automatic test, can be one section passableAutomatically perform the program of test, for example, web automatized script program; Web application module can operate on serverWeblication, for providing test data to web automatic test device; Data are prepared agency (agent) for completingTest data is prepared, for example, and the program code that can prepare for carrying out test data.
Fig. 1 is according to the structural representation of the system of obtaining of the test data of the embodiment of the present application, as shown in Figure 1, and this system masterComprise: web automatic test device 10, web application module 20 and data are prepared agency 30. Wherein, web automationTesting arrangement 10, for sending request to web application module 20, acquisition request is carried out the required test of web automatic testData, wherein, carry the parameter of obtaining this test data in this request, for example, in the time that login process is tested, webAutomatic test device 10 can send request to web application module 20, and account and the password of acquisition request user's registration, shouldIn request, can carry parameter " ID, password "; Web application module 20, is 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 useAfter the request receiving from web automatic test device 20, calling data is prepared agency 30 and is carried out obtaining of test dataGet, and the test data of obtaining is returned to web automatic test device 10, wherein, it can be many that data are prepared agency 30Individual, web application module 20 can be determined the data preparation agency 30 that need to call according to above-mentioned parameter, then this parameter is passedPass corresponding data and prepare agency 30; Data are prepared agency 30, 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 with web application mouldPiece 20 is arranged in different servers.
The system of obtaining of the above-mentioned test data providing by the application, web automatic test device separates with test data, webAutomatic test device is prepared to obtain test data agency 30 from data by web application module 20, thereby can be by webApplication module 20 carries out unified maintenance to obtaining test data from data preparation agency 30, has reduced test data maintenance cost,And, in the starting stage, also need to not become test data at web automatic test device adnation, survey thereby avoided initializingThe inconvenience that examination data are brought.
In the application's a preferred embodiment, in order to improve the automated procedures of test, web automatic test device 10Can carry out web automatic test by operation web automatized script, web application module 20 can externally provide a httpInterface, web automatized script, carrying out in web automatic test course, can be applied to web by calling this http interfaceModule 20 sends the request of obtaining test data, and Fig. 2 is the system of obtaining according to the preferred test data of the embodiment of the present applicationStructural representation, in Fig. 2, web application module 20 manages and scheduled for executing for data are prepared to agency 30, andA http interface is externally provided, calls for web automatized script 102 (operating on 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 will in this request, takeThe parameter of band passes to data and prepares agency 30, and the execution result of data being prepared to agency 30 returns to web automatized script102; Data are prepared agency 30, for the parameter of transmitting according to the http interface of web application module 20, carry out test dataObtain. In this preferred embodiment, web automatized script 102 can be in the time that test starts or in measuring executing process certainlyThe moving http interface that calls web application module 20 obtains test data, obtains and need to do not operated by user, therefore, improvesTest data obtain efficiency.
In a preferred embodiment of the present embodiment, it can be one period of generation that test data is obtained that data are prepared agency 30Code, for example, can be one section of ghost (shell) program, can be also concrete SQL query statement or java code, concreteThe application does not limit. And data are prepared agency 30 in the time obtaining test data, can be in the following manner one or a combination set of realExisting: (1), by the mode of SQL, the database of preparing agency's 30 local storages from data obtains the survey corresponding with above-mentioned parameterExamination data, or data are prepared to obtain with above-mentioned in agency's 30 databases that also can store from other equipment that are attached theretoThe test data that parameter is corresponding, for example, from being stored in the number that is arranged in the memory device of same LAN with data preparation agency 30According to obtaining the test data corresponding with above-mentioned parameter in storehouse; (2) data prepare agency 30 as client by calling remote service,Obtain the test data corresponding with above-mentioned parameter, for example, in web system, server often adopt java program rmi andThe modes such as hession provide remote service, for certain service is provided, and such as freight charges service, order service, payment services etc.,In the preferred embodiment of the present embodiment, data prepare agency 30 can provide by invoking server these serve to constructTest data. The no matter remote service of which kind of agreement, its method of calling is all similarly, client is as long as there is service this localityThe definition of interface, then calls correlation method according to the form assembly parameter of agreement; (3) by sending to far-end serverHttp request, obtains the test data corresponding with above-mentioned parameter from far-end server, and for example, data are prepared agency 30 can be to farEnd server sends the http request of carrying above-mentioned parameter, and far-end server, in response to this http request, is prepared agency 30 to dataReturn to corresponding test data, wherein, far-end server can be the test phase of carrying out with web automatic test device in networkClose various servers, for example, in the time certain web system being paid to test, may need to obtain user's bank account,Data are provided by agency's 30 parameters that can provide according to web application module, to storage user's the far-end server of bank accountSend http request, to obtain user's bank account. In this preferred embodiment, data are prepared agency 30 and can be adopted manyThe mode of kind is obtained test data, and is not limited only to local test data of preserving, thereby has expanded the source of test data, ensuresThe demand of web automatic test, has improved the accuracy rate of web automatic test.
Fig. 3 is the structural representation of the acquisition device of the test data that is positioned at web application module 20 sides of the embodiment of the present application,This device can be for realizing the web application module 20 shown in above-mentioned Fig. 1 or Fig. 2. As shown in Figure 3, this device can comprise:The first receiver module 302, the request sending for receiving web automatic test device 10, wherein, carries and obtains in this requestGet web automatic test device 10 and carry out the parameter of the test data of web automatic test needs; Acquisition module 304, usesAccording to the parameter of carrying in this request, call the data corresponding with this parameter and prepare obtaining of agency's 30 execution test datas; TheOne sending module 306, returns to web automatic test device 10 for data being prepared to agency's 30 test datas of obtaining.
The acquisition device of the test data that is positioned at web application module 20 sides by the present embodiment, can receive web fromWhen the request of movingization testing arrangement 10, respond this request, calling data is prepared agency 30 and is obtained corresponding test data, and willThe test data of obtaining returns to web automatic test device 10, thus make web automatic test device 10 can from outsidePortion obtains test data, has realized separating of web automatic test and test data, has improved the convenience that test data is safeguarded,Complexity and maintenance cost that test data is prepared are reduced.
In a preferred embodiment of the present embodiment, in order to make web automatic test device 10 can realize automatic test,As shown in Figure 4, this device can also comprise: http interface module 308, and offer web automatic test device 10 and call,The first receiver module 302 receives by http interface module 308 the above-mentioned request that web automatic test device 10 sends, andAcquisition module 304 can be prepared agency 30 by http interface module 308 calling datas. By this preferred embodiment, canIn the time that web automatic test device 10 is realized automatic test, provide test data to web automatic test device 10, fromAnd improve testing efficiency.
Fig. 5 is according to the knot of the acquisition device of the test data that is positioned at web automatic test device 10 sides of the embodiment of the present applicationStructure schematic diagram, this device can be for realizing the web automatic test device 10 in above-mentioned Fig. 1 or Fig. 2. As shown in Figure 5,This device can comprise: determination module 502, determine that for web automatic test device 10 carrying out web automatic test needsThe test data of wanting; The second sending module 504, for sending request to web application module 20, acquisition request test data,Wherein, in this request, carry the parameter of obtaining above-mentioned test data; The second receiver module 506, for receiving web application mouldThe test data that piece 20 returns, wherein, to be web application module 20 prepare agency 30 by calling data to this test data holdsRow acquisition request.
The said apparatus providing by the present embodiment, web automatic test device 10, in the time carrying out automatic test, can pass throughSend request to web application module 20, obtain test data, thereby realized dividing of web automatic test and test dataFrom, make maintenance test data uniformly, improve the convenience that test data is safeguarded, reduce that test data preparesComplexity and maintenance cost.
In a preferred embodiment of the present embodiment, corresponding to different test modes, the second sending module 504 can divideOne of following mode is not obtained test data to web application module requests: (1) calls the http interface of web application module, toWeb application module sends request, and acquisition request test data is adopted in this way, can improve web automatic test oneselfMovingization program, in this embodiment, can carry out web automatic test by web automatized script; (2) in response toUser's operation, sends http request to web application module, acquisition request test data, for example, can provide one forThe dialog box that family is selected, user can input the parameter of obtaining the test data that need to obtain in this dialog box, then to webApplication module sends http request, this test data of acquisition request.
Fig. 6 is according to the flow chart of the acquisition methods of the test data of the embodiment of the present application, and the method is from web application module 10Side is described the acquisition methods of the test data that the embodiment of the present application provides, and as shown in Figure 6, the method mainly comprises the following steps:
Step S602, web application module receives the request that web automatic test device sends, and wherein, in this request, carriesThere is the parameter of the test data of obtaining web automatic test device execution web automatic test needs;
In preferred embodiment of the present embodiment, web application module can provide a http interface for external call,Web automatic test device, in the time that needs obtain test data, can call this http interface by web automatic test script,Send a request message to web application module, acquisition request test data, in this embodiment, web automatic test dressPut by operation web automatic test script Automatically invoked http interface and obtain test data. By this preferred embodiment, canSo that web automatic test script separates with test data, be convenient to test data to unify to safeguard, and can provideThe automaticity of test;
Or in another preferred embodiment, web automatic test device also can be by answering to web in the present embodimentSend http by module and ask, acquisition request test data, for example, web automatic test device can provide one for userThe dialog box of selecting, user can input the parameter of obtaining the test data that need to obtain in this dialog box, then should to webSend http by module and ask, this test data of acquisition request. By this embodiment, can be according to the actual requirements, at needsSituation under obtain test data to web application module requests again, thereby improved the flexibility that test data is obtained.
Step S604, web application module, according to the parameter of carrying in above-mentioned request, calls the data corresponding with this parameter and prepares generationReason is carried out obtaining of this test data;
In a preferred embodiment of the present embodiment, if web application module provides external http interface, webApplication module can pass to data by above-mentioned parameter by this http interface and prepare agency, and data are prepared agency and carried out according to parameterObtaining of test data.
In a preferred embodiment of the present embodiment, data prepare agency carry out test data obtain include but not limited toLower mode:
(1) by the mode Query Database of SQL, obtain the test data corresponding with this parameter, adopt which, canEffectively utilize the database of existing store test data, improved the utilization rate of resource;
(2) by calling actual external remote service, thereby obtain and the corresponding test data of this parameter, in practical applicationIn, adopt which, the existing remote service providing can be provided, improve the utilization rate of existing remote service;
(3) can, by send the mode of http request to far-end server, obtain the test data corresponding with this parameter, adoptBy which, effectively the source that obtains of extend testing data, ensures the success rate that test data is obtained.
Step S606, web application module is prepared to act on behalf of by data the test data of obtaining and is returned to web automatic test device.
In a preferred embodiment of the present embodiment, if web application module provides the http externally calling interface,Web application can return to web automatic test device by the test data of obtaining by this http interface, or web shouldAlso can the test data of obtaining be returned to web automation by sending http response to web automatic test device by moduleTesting arrangement.
By above-mentioned steps, not only realize separating of web automatic test and test data, can also be that web automation is surveyedExamination provides the source that obtains of multiple test data, thereby has ensured the success of web automatic test.
Fig. 7 is according to the flow chart of the acquisition methods of the another kind of test data of the embodiment of the present application, and the method is from web automationTesting arrangement 10 sides are described the acquisition methods of the application's test data, and as shown in Figure 7, the method mainly comprises the following steps:
Step S702, web automatic test device is determined the test data that execution web automatic test needs;
In a preferred embodiment of the present embodiment, web automatic test device can start to carry out web automation surveyBefore examination, determine and need to obtain test data, or in another preferred embodiment of the present embodiment, web automation is surveyedElectricity testing device can be also in execution web automatic test course, determines and need to obtain test data.
Step S704, web automatic test device sends request to web application module, the above-mentioned test data of acquisition request,Wherein, in this request, carry the parameter of obtaining this test data;
In a preferred embodiment of the present embodiment, web automatic test device can move web automatized script automaticallyCarry out web automatic test, at test process, in the time that needs obtain test data, web automatized script calls web applicationThe http interface that module externally provides, sends request to web application module, carries the test that instruction need to be obtained in this requestThe parameter of data. In this preferred embodiment, web automatic test device can be tested number by automatic acquisition in test processAccording to, ensure to greatest extent the automation of web test.
In another preferred embodiment of the present embodiment, as above-mentioned, web automatic test device also can pass through to webApplication module sends http request, and acquisition request is tested required test data. Concrete and above-mentioned from web application module side to surveyingThe description of the acquisition methods of examination data is similar, specifically repeats no more.
Step S704, web automatic test device receives the test data that web application module returns, wherein, this test numberCarry out above-mentioned acquisition request according to be web application module prepare agency by calling data.
In a preferred embodiment of the present embodiment, web application module receives asking of web automatic test device transmissionAfter asking, can adopt the mode calling data of the above-mentioned description of the acquisition methods to test data from web application module side to prepare generationReason, carries out obtaining of test data, does not specifically repeat them here.
Fig. 8 is according to the flow chart of the acquisition methods of the preferred test data of the embodiment of the present application, as shown in Figure 8, and the method masterComprise the following steps:
Step S802, web automatic test device sends request to web application module, and acquisition request is carried out web automation and is surveyedTry required test data, wherein, in this request, carry the parameter of obtaining this test data;
Step S804, web application module receives the above-mentioned request from web automatic test device;
Step S806, web application module, according to the parameter of carrying in above-mentioned request, calls corresponding data and prepares agency, carries outObtaining of test data;
Step S808, data are prepared agency according to the operation of obtaining of described parameter execution test data;
For example, data are prepared agency can obtain test data by the mode of SQL, or, also can be by externally providingRemote service is obtained described test data, and in addition, data are prepared agency and also can be obtained by send http request to far-end serverGet described test data.
Step S810, the execution result that data are prepared agency by web application module returns to web automatic test module.
Afterwards, the test data that web automatic test device can return according to web application module, carries out corresponding test behaviourDo.
Carry out test as example, to the application's one preferably taking web automatic test by operation web automatized script belowConcrete enforcement describes. It should be noted that, following examples are to say the flow process of logging in network system is tested as exampleThe acquisition methods of bright test data, but be not limited to this, for other web tests, also can adopt in following examplesEmbodiment.
In this preferred embodiment, Fig. 9 is the flow chart that web automatized script is tested " login web system ", asShown in Fig. 9, web automatized script is tested mainly and is comprised the following steps " login web system ":
Step S902, web automatized script calls the http interface that web application module externally provides, to web application moduleSend request, in request, comprise parameter " serviceType (member's type), dbProperty (database configuration) ";
Step S904, web application module receives after request by http interface, and dispatch corresponding data and prepare agency's execution,Prepare agency to data and transmit relevant parameter;
Step S906, the mode that data are prepared agency's employing SQL generates the member who specifies member's type in the database of specifyingData;
Step S908, data are prepared agency the login name of the member data of generation and password are returned to application module,“{“oginld”:testcgs”,”password”:”hello1234”}”;
Step S910, web application module, by its http interface, is prepared data agency's execution result," { " oginld ": testcgs ", " password ": " hello1234 " " return to web automatized script;
Step S912, web automatized script receives the test data that web application module returns, and completes corresponding test dataPrepare.
The such scheme providing by the embodiment of the present application, web automatic test device can be by web application module from dataPrepare agency and obtain test data, instead of directly from the database of web automatic test device self storage, obtain test numberAccording to, solve in prior art the cost compare of initialization test data and later maintenance high, and cannot obtain database storageOutside test data and cause completing the problem of corresponding test, and then improved the efficiency that test data is obtained, reduceTest data complexity and the maintenance cost obtained. And in this application, test data is only not limited at databaseIn obtain, thereby expanded the mode that test data is prepared, enriched test data, the accuracy of test is further provided.
Obviously, it is apparent to those skilled in the art that each module of above-mentioned the application or each step can be with general calculatingDevice is realized, and they can concentrate on single calculation element, or is distributed on the network that multiple calculation elements form,Alternatively, they can be realized with the executable program code of calculation element, thereby they can be stored in storage deviceCarried out by calculation element, or they be made into respectively to each integrated circuit modules, or by the multiple modules in them orStep is made into single integrated circuit module and realizes. Like this, the application is not restricted to any specific hardware and software combination.
The preferred embodiment that the foregoing is only the application, is not limited to the application, for those skilled in the art, the application can have various modifications and variations. All within the application's spirit and principle, any amendment of doing, etc.With replacement, improvement etc., within all should being included in the application's protection domain.

Claims (11)

1. an acquisition methods for test data, is characterized in that, comprises the following steps:
Web application module receives the request that web automatic test device sends, and wherein, in described request, carries and obtainsThe parameter of the test data that described web automatic test device execution web automatic test needs;
Described web application module, according to the parameter of carrying in described request, calls the data corresponding with described parameter and prepares generationReason is carried out obtaining of described test data;
Described web application module is prepared to act on behalf of by described data the described test data of obtaining and is returned to described web automationTesting arrangement;
Wherein, described data are prepared agency one of in the following manner or its any combination is carried out obtaining of described test dataComprise: described data are prepared agency by SQL mode, obtain in this locality or external data base, store withThe described test data that described parameter is corresponding; Described data are prepared agency by calling remote service, obtain and described parameterCorresponding described test data; Described data are prepared agency please by sending HTTP http to far-end serverAsk, obtain the described test data corresponding with described parameter from described far-end server.
2. method according to claim 1, is characterized in that, described web application module calls the number corresponding with described parameterComprise according to preparing obtaining of described test data of agency's execution:
Described web application module calls described data and prepares agency, described parameter is passed to described data and prepare agency;
Described data are prepared agency according to described parameter, carry out obtaining of described test data.
3. method according to claim 1 and 2, is characterized in that, described web application module receives web automatic testDevice sends request and comprises:
Described web automatic test device calls the http interface of described web application module, to described web application moduleSend described request, test data described in acquisition request;
Described web application module receives described request.
4. method according to claim 1 and 2, is characterized in that, described web application module receives web automatic testDevice sends request and comprises:
Described web automatic test device, in response to user's operation, sends http request to described web application module,Test data described in acquisition request;
Described web application module receives described http request.
5. an acquisition device for test data, is positioned at web application module side, it is characterized in that, comprising:
Receiver module, the request sending for receiving web automatic test device, wherein, carries and obtains in described requestGet described web automatic test device and carry out the parameter of the test data of web automatic test needs;
Acquisition module, for the parameter of carrying according to described request, calls the data corresponding with described parameter and prepares agencyCarry out obtaining of described test data;
Sending module, returns to described web automation survey for described data being prepared to act on behalf of the described test data of obtainingElectricity testing device;
Wherein, described acquisition module one of in the following manner or its any combination prepare agency's execution institute by described dataStating obtaining of test data comprises: described data are prepared agency by SQL mode, obtain this locality or outsideThe described test data corresponding with described parameter of storing in database; Described data are prepared agency by calling remote service,Obtain the described test data corresponding with described parameter; Described data are prepared agency by sending hypertext to far-end serverHost-host protocol http request, obtains the described test data corresponding with described parameter from described far-end server.
6. device according to claim 5, is characterized in that, described device also comprises: http interface module, described reception mouldPiece receives the described request that described web automatic test device sends, described acquisition module by described http interface moduleCall described data by described http interface module and prepare agency.
7. an acquisition methods for test data, is characterized in that, comprises the following steps:
Web automatic test device is determined the test data that execution web automatic test needs;
Described web automatic test device sends request to web application module, test data described in acquisition request, wherein,In described request, carry the parameter of obtaining described test data;
Described web automatic test device receives the described test data that described web application module returns, wherein, described inTo be described web application module prepare agency by calling data to test data carries out described request and obtain;
Wherein, described data are prepared agency one of in the following manner or its any combination is carried out obtaining of described test dataComprise: described data are prepared agency by SQL mode, obtain in this locality or external data base, store withThe described test data that described parameter is corresponding; Described data are prepared agency by calling remote service, obtain and described parameterCorresponding described test data; Described data are prepared agency please by sending HTTP http to far-end serverAsk, obtain the described test data corresponding with described parameter from described far-end server.
8. method according to claim 7, is characterized in that, described web automatic test device please to web application moduleAsk and obtain described test data and comprise:
Described web automatic test device calls the http interface of described web application module, to described web application moduleSend described request, test data described in acquisition request; Or,
Described web automatic test device, in response to user's operation, sends http request to described web application module,Test data described in acquisition request.
9. an acquisition device for test data, is positioned at web automatic test device side, it is characterized in that, comprising:
Determination module, for the test data of determining that described web automatic test device execution web automatic test needs;
Sending module, for sending request to web application module, test data described in acquisition request, wherein, described pleaseIn asking, carry the parameter of obtaining described test data;
Receiver module, the described test data of returning for receiving described web application module, wherein, described test dataDescribed web application module is prepared agency's execution described request by calling data and is obtained;
Wherein, described data are prepared agency one of in the following manner or its any combination is carried out obtaining of described test dataComprise: described data are prepared agency by SQL mode, obtain in this locality or external data base, store withThe described test data that described parameter is corresponding; Described data are prepared agency by calling remote service, obtain and described parameterCorresponding described test data; Described data are prepared agency please by sending HTTP http to far-end serverAsk, obtain the described test data corresponding with described parameter from described far-end server.
10. device according to claim 9, is characterized in that, described sending module is for one of in the following manner to described webApplication module requests is obtained described test data:
Call the http interface of described web application module, send described request, acquisition request to described web application moduleDescribed test data;
In response to user's operation, send http request to described web application module, test data described in acquisition request.
The system of obtaining of 11. 1 kinds of test datas, is characterized in that, comprising: web automatic test device, web application module and numberAccording to preparing agency, wherein,
Described web automatic test device, comprises the acquisition device described in claim 9 or 10;
Described web application module, comprises the acquisition device described in claim 5 or 6;
Described data are prepared agency, for carrying out obtaining of test data according to the parameter of described web application module transmission;
Wherein, described data are prepared agency one of in the following manner or its any combination is carried out obtaining of described test dataComprise: described data are prepared agency by SQL mode, obtain in this locality or external data base, store withThe described test data that described parameter is corresponding; Described data are prepared agency by calling remote service, obtain and described parameterCorresponding described test data; Described data are prepared agency please by sending HTTP http to far-end serverAsk, 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 CN103001815A (en) 2013-03-27
CN103001815B true 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)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427627B (en) * 2013-08-23 2018-04-24 阿里巴巴集团控股有限公司 Test data acquisition methods, client and server
CN105264824A (en) * 2013-09-05 2016-01-20 华为技术有限公司 Network device and method for service testing via network 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
CN105740137B (en) * 2014-12-08 2018-07-31 阿里巴巴集团控股有限公司 Divide bucket test method and the method, apparatus and system of configuration information are provided
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
CN107515819B (en) * 2016-06-16 2020-07-28 平安科技(深圳)有限公司 Medical insurance system testing method and device
CN108268369B (en) * 2016-12-30 2021-04-02 北京国双科技有限公司 Test data acquisition method and device
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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791037A (en) * 2005-12-26 2006-06-21 北京航空航天大学 Method for realizing Web service automatic test
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020061059A (en) * 2001-01-12 2002-07-22 삼성전자 주식회사 System for offering software package make information and supporting test a system utilizing the software package
CN1997006B (en) * 2006-01-06 2011-06-22 鸿富锦精密工业(深圳)有限公司 Forwarding control system and method in the network communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791037A (en) * 2005-12-26 2006-06-21 北京航空航天大学 Method for realizing Web service automatic test
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

Also Published As

Publication number Publication date
HK1179070A1 (en) 2013-09-19
CN103001815A (en) 2013-03-27

Similar Documents

Publication Publication Date Title
CN103001815B (en) The acquisition methods of test data, Apparatus and system
US11163671B2 (en) Automatically executing stateless transactions with data dependency in test cases
CN109308266A (en) Construction method, test method, device, equipment and the medium of test case
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
US8996714B2 (en) State-dependent entity based implementation of a service oriented architected application
US20080126390A1 (en) Efficient stress testing of a service oriented architecture based application
US20090204947A1 (en) Method and system for correlating trace data
US10817267B2 (en) State machine representation of a development environment deployment process
CN107590072A (en) A kind of application and development and the method and apparatus of test
CN111737270A (en) Data processing method and system, computer system and computer readable medium
CN108958992A (en) test method and device
CN109656799A (en) Test method and device
US10120707B2 (en) Deployment of development environments
CN112288577A (en) Transaction processing method and device for distributed service, electronic equipment and medium
US20210390010A1 (en) Software Application Diagnostic Aid
CN113360377B (en) Test method and device
CN107360036A (en) A kind of network failure locating method, terminal and server
CN108089972A (en) interface test method and device
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
CN113127335A (en) System testing method and device
CN110489326A (en) HTTPAPI adjustment method device, medium and equipment based on IDS
US7509413B2 (en) Tool for displaying JMX monitoring information
Denaro et al. Performance testing of distributed component architectures
US20170161030A1 (en) Framework for flexible logging of development environment deployment
CN113011858A (en) Audit project configuration and execution 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
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