CN102890651B - The method of testing of a kind of contextual data and device - Google Patents
The method of testing of a kind of contextual data and device Download PDFInfo
- Publication number
- CN102890651B CN102890651B CN201110201772.8A CN201110201772A CN102890651B CN 102890651 B CN102890651 B CN 102890651B CN 201110201772 A CN201110201772 A CN 201110201772A CN 102890651 B CN102890651 B CN 102890651B
- Authority
- CN
- China
- Prior art keywords
- rule
- contextual data
- submeter
- logical table
- data
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
This application provides the method for testing of a kind of contextual data and device, method therein specifically includes: receives user and processes request, described user processes request and includes an original electron form document and corresponding policing rule, this original electron form document includes contextual data, and described policing rule includes logical table rule; By traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed. The application has good motility, it is possible to reduce the testing time, improves testing efficiency.
Description
Technical field
The application relates to software testing technology field, particularly relates to method of testing and the device of a kind of contextual data.
Background technology
Test is one of important step in software development process, and test fully is to ensure that the important foundation of test software reliability. In recent years, along with the development of test software, test software size constantly expands, test software deployment architecture also progressively distribution.
In order to test software in the R&D process of software, it may be desirable to contextual data is tested, here, contextual data refers mainly to simulation tested software true and uses scene and the test data that prepare. The method of testing of existing contextual data, it usually needs first manually prepare contextual data one by one, then call ready contextual data and test. Thus the method for testing of existing contextual data generally requires a large amount of manual intervention, therefore the testing time is long, and testing efficiency is low.
In a word, it is necessary to the technical problem that those skilled in the art urgently solve is exactly: how can reduce the testing time, improves testing efficiency.
Summary of the invention
Technical problems to be solved in this application are to provide test preparation method and the device of a kind of contextual data, and it has good motility, it is possible to reduce the testing time, improve testing efficiency.
In order to solve the problems referred to above, this application discloses the method for testing of a kind of contextual data, including:
Receiving user and process request, described user processes request and includes an original electron form document and corresponding policing rule, and this original electron form document includes contextual data, and described policing rule includes logical table rule;
By traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed.
Preferably, described by traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is carried out process and specifically include:
According to the corresponding worksheet in this original electron form document of this logical table Rule;
According to this logical table rule, every contextual data in this worksheet is carried out router-level topology, obtain corresponding target point storehouse submeter index and target point storehouse submeter mapping relations;
Divide storehouse submeter mapping relations according to described target point storehouse submeter index and target, every contextual data is placed in the corresponding worksheet of new electronic form file of correspondence;
According to the mode of the corresponding data base of a file, the contextual data called in described new electronic form file is tested.
Preferably, the described step that according to this logical table rule, every contextual data in this worksheet is carried out router-level topology, including:
For every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
The data element of extraction is replaced the variable in logical table rule and generates a rule example;
Calculate this rule example, obtain target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
Preferably, described processing procedure also includes:
After having placed, add described new electronic form file to Map data structure according to the mode of the corresponding data base of a file every time.
Preferably, described index according to target point storehouse submeter divides storehouse submeter mapping relations with target, and every contextual data is placed on the step in the corresponding worksheet of corresponding new electronic form file, including:
Finding step: divide storehouse to index according to target, search corresponding electronic form file object in described Map data structure, if it is found, then perform the first interpolation step, otherwise, performs newly-built step;
First adds step: add this contextual data searching indexing in corresponding worksheet with target submeter of gained electronic form file;
Newly-built step: divide storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and perform the second interpolation step;
Second adds step: this contextual data is added to indexing in corresponding worksheet with described target submeter of newly created electronic form file.
Preferably, described method also includes:
Traversal at described policing rule terminates, and after each logical table rule is disposed accordingly, all new electronic form file in Map data structure write disk, and records the mapping relations of corresponding document path and data base.
On the other hand, disclosed herein as well is the test device of a kind of contextual data, including:
Interface module, is used for receiving user and processes request, and described user processes request and includes an original electron form document and corresponding policing rule, and this original electron form document includes contextual data, and described policing rule includes logical table rule;
Processing module, for regular by traveling through the logical table obtained in described policing rule, and processes the contextual data in this original electron form document according to each logical table rule.
Preferably, described processing module farther includes:
Worksheet obtains submodule, for according to the corresponding worksheet in this original electron form document of this logical table Rule;
Router-level topology submodule, for every contextual data in this worksheet being carried out router-level topology according to this logical table rule, obtains corresponding target point storehouse submeter index and target point storehouse submeter mapping relations; And
Place submodule, for dividing storehouse submeter mapping relations according to described target point storehouse submeter index and target, every contextual data is placed in the corresponding worksheet of new electronic form file of correspondence; And
Test submodule, for the mode according to the corresponding data base of a file, the contextual data called in described new electronic form file is tested.
Preferably, described router-level topology submodule includes:
Extraction unit, in order to for every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
Example generates unit, generates a rule example for the data element of extraction replaces the variable in logical table rule;And
Example calculation unit, is used for calculating this rule example, obtains target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
Preferably, described processing module also includes:
Add submodule, for, after having placed, adding described new electronic form file to Map data structure according to the mode of the corresponding data base of a file every time;
Described placement submodule includes:
Search unit, for dividing storehouse to index according to target, described Map data structure is searched corresponding electronic form file object, if it is found, then perform the first interpolation step, otherwise, perform newly-built step;
First adding device, for adding this contextual data indexing in corresponding worksheet with target submeter of lookup gained electronic form file;
Newly-built unit, for dividing storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and trigger the second adding device;
Second adding device, for adding indexing in corresponding worksheet with described target submeter of newly created electronic form file to by this contextual data.
Compared with prior art, the application has the advantage that
The application proposes the automatic flow that a kind of contextual data processes, it has only to user and configures good strategy rule, then the input that all contextual data carrying out router-level topology will be needed to be organized in an original electron form document as automatic flow according to the mode of the corresponding worksheet of a logical table, and this automatic flow can resolve policing rule automatically, the router-level topology of every contextual data in this original electron form document is carried out automatically according to analysis result, and automatically according to router-level topology result, this contextual data is organized in the new electronic form file of newly-generated corresponding router-level topology result, therefore, it is possible to be greatly improved router efficiency and the accuracy rate of contextual data, reduce the time of contextual data such that it is able to greatly reduce the testing time of tested software, improve testing efficiency.
It addition, the automatic flow of the application can automatically derive ready new electronic form file according to user's input, and automatically configure to test software; Or, described automatic flow can be automatically integrating in test software, follow-up for this test software; So, once the policing rule that router-level topology uses adjusts to some extent, then user only need to change the policing rule of input; Therefore, the advantage that the automatic flow of the application has flexible configuration, by increasing capacitance it is possible to increase the convenience of user's input, and the new electronic form file of flexible configuration can be provided to test software.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for testing embodiment 1 of a kind of contextual data of the application;
Fig. 2 is the flow chart of the method for testing embodiment 2 of a kind of contextual data of the application;
Fig. 3 is the schematic diagram of a kind of process automatically processing contextual data of the application;
Fig. 4 is the structure chart of the test device embodiment of a kind of contextual data of the application;
Fig. 5 is the signal of a kind of my_table worksheet of the application.
Detailed description of the invention
Understandable for enabling the above-mentioned purpose of the application, feature and advantage to become apparent from, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
For making those skilled in the art be more fully understood that the application, simply introduce point storehouse submeter strategy that the application contextual data uses below.
At present, in order to reduce data base read-write pressure, improve readwrite performance, it is possible to single storehouse list table is split, namely a point storehouse submeter strategy is adopted to carry out data storage. Described point of storehouse submeter strategy is according to certain policing rule, the data in the single tables of data (being called logical table) that originally can be stored in centralized database is respectively stored in the different pieces of information table (being called physical table) of disparate databases. It practice, point storehouse and submeter can be the strategies of two combination in any, the specific strategies such as the many submeters in storehouse, every storehouse one, many points of storehouses table, the many submeters in every storehouse, many points of storehouses generally can be included according to practical situation.
Such as, in software field, a point storehouse submeter policy store business datum can be adopted, and in order to test such software in R&D process, it is necessary to prepare corresponding contextual data and be stored in the data base that tested software uses. Here, contextual data refers in software development process, in order to test or debug tested software, and the test data that the true use scene of simulation tested software is prepared. Described software can apply to the client of network, server etc., and is applied to data process, communication etc. It is particularly used in the various fields such as electric power, ecommerce, entertainment video, for instance, the contextual data in ecommerce can include various transaction data.
Before data store, route can be used to be calculated the target point storehouse submeter of contextual data by policing rule. Here, target point storehouse submeter can refer in employing point data base of storehouse submeter strategy, and concrete contextual data should the data base of stored correspondence and tables of data; Policing rule be indicate every concrete contextual data should the rule of stored target point storehouse submeter.
For using the contextual data of point storehouse submeter strategy, generally it is ready to these contextual data be placed in electronic form file (such as excel file), then stores for follow-up. Having such mapping principle with data base for electronic form file: the corresponding electronic form file of data base, a worksheet (i.e. sheet) in an electronic form file is to should a table in data base.
One of core idea of the embodiment of the present application is in that, the automatic flow that a kind of contextual data processes is proposed, it has only to user and configures good strategy rule, then the input that all contextual data carrying out router-level topology will be needed to be organized in an original electron form document as automatic flow according to the mode of the corresponding worksheet of a logical table, and this automatic flow can resolve policing rule automatically, the router-level topology of every contextual data in this original electron form document is carried out automatically according to analysis result, and automatically according to router-level topology result, this contextual data is organized in the new electronic form file of newly-generated corresponding router-level topology result. relative to existing artificial calculating, described automatic flow can be greatly improved router efficiency and the accuracy rate of contextual data, thus greatly reducing the time of contextual data.
Further, since the application uses automatic flow, ready electronic form file can be automatically derived according to user's input, and automatically configure to test software; Or, described automatic flow can be automatically integrating in test software, follow-up for this test software.
Such as, the example of the policing rule that user inputs an original electron form document and correspondence is as follows:
ITestDataSet (locations={ " ruleData.xls " }, dsNames={ " rule " })
Wherein, " ruleData.xls " is original electron form document, and " rule " is corresponding policing rule;So, once the policing rule that router-level topology uses adjusts to some extent, then user only need to change " rule " of input, therefore, the advantage that the automatic flow of the application has flexible configuration, the convenience of user's input can be increased, and the electronic form file of flexible configuration can be provided to test software.
With reference to Fig. 1, it is shown that the flow chart of the method for testing embodiment 1 of a kind of contextual data of the application, specifically may include that
Step 101, reception user process request, described user processes and specifically can include an original electron form document and corresponding policing rule in request, this original electron form document may further include again contextual data, described policing rule may further include again logical table rule;
At present, along with increasing of application software, policing rule also becomes variation. Such as, based in the storage of data base, the factors such as the safety for data can by same number according to being stored in multiple data base, each data base is called a master library or standby storehouse, the producers and consumers of data is directly provided reading and writing data service by usual master library, and standby storehouse is for backing up or reduce the data of storage in master library, master library and standby storehouse can switch mutually. So, except original point of storehouse strategy and submeter strategy, described policing rule can also include active and standby strategy.
No matter adopting any policing rule, the application is desirable that it is specific to logical table this level of rule. Because for the automatic flow of user and the application, policing rule and the original electron form document of user's input have corresponding relation, and the logical table that corresponding relation here is embodied in policing rule logical table rule and refers to has corresponding relation with the worksheet in original electron form document. Therefore, in a kind of application example of the application, preparation user processes the process of request and may include that first configuration good strategy rule, then will need the input that all contextual data carrying out router-level topology are organized in an original electron form document as automatic flow according to the mode of the corresponding worksheet of a logical table.
Assuming that user processes the policing rule using logical table my_table in request, the physical data distribution of my_table is as follows:
DB0:{my_table_0000, my_table_0001, my_table_0002}
DB1:{my_table_0003, my_table_0004, my_table_0005}
So, except the policing rule of logical table my_ttable, user also needs to prepare an electronic form file, this electronic form file has only to set up the worksheet of a my_ttable by name, all of contextual data is all placed in this worksheet, namely user is without the concern for which physics submeter is every contextual data should be distributed in, final distribution as contextual data will be carried out router-level topology by the automatic flow of the application according to policing rule, then two electronic form files of corresponding DB0 and DB1 data base are generated, and both of these documents has my_table_0000-my_table0002 and my_table_0003-my_table0005 each 3 worksheets respectively, so, contextual data can correctly be distributed in these 3 worksheets.
Certainly, above-mentioned logical table my_table is intended only as example, when more complicated, user processes policing rule in request and potentially includes multiple logical table, but user processes in request only one of which original electron form document all the time, a simply worksheet in each logical table this original electron form document corresponding, and the process for the data in these worksheets calculates, then configuring according to the policing rule of each logical table and carry out one by one, process is similar with the processing procedure of above-named unity logic table.
Step 102, the logical table rule obtained by traversal in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed.
In a preferred embodiment of the present application, described processing procedure specifically may include that
Here, described traversal is primarily referred to as along certain search pattern, successively each logical table rule in described policing rule is all done once and only done once accessing. Meanwhile, in ergodic process, according to each logical table rule, the contextual data in this original electron form document is processed.
Sub-step A1, according to the corresponding worksheet in this original electron form document of this logical table Rule;
Assume that this logical table rule is the rule for my_table logical table, configuration according to this rule can obtain the logic table name my_table of this rule configuration, therefore, can go this original electron form document goes to search worksheet of the same name according to this name of my_table, if this worksheet exists, so can obtain this worksheet, then give step 122 the data in this worksheet and go to deal with.
In a preferred embodiment of the present application, if this worksheet is absent from, that is ignored as this rule, goes to see next rule. That is, when the corresponding worksheet in this original electron form document of step 121 obtains unsuccessfully, should be terminated this and processes, and return the traversal of the next rule of search pattern continuation.
Sub-step A2, according to this logical table rule, every contextual data in this worksheet is carried out router-level topology, obtain corresponding target point storehouse submeter index and target point storehouse submeter mapping relations;
In a preferred embodiment of the present application, described step 122 may further include:
For every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
The data element of extraction is replaced the variable in logical table rule and generates a rule example;
Calculate this rule example, obtain target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
In the example of a kind of original electron form document of the application, it is assumed that this original electron form document has the worksheet that name is called my_table. With reference to Fig. 5, it is shown that the signal of a kind of my_table worksheet of the application. Fig. 5 has 3 contextual data records (the first row is Data field names); Logic of propositions table rule for a point storehouse rule of my_table is: id%2, and submeter rule is: id%3, and % represents modulo operation here, is additionally provided with the distributed intelligence of physical library table in rule; Assume that the physical data of my_table is distributed as above-mentioned DB0 and DB1 data base, having physics submeter my_table_0000-my_table0002 and my_table_0003-my_table0005 respectively, the router-level topology process at Article 1 contextual data record may include that
Judge to determine that a point field for storehouse submeter is id according to rule configuration, so the id value with regard to acquirement Article 1 contextual data record is 1, calculate a point storehouse index 1%2=1, so know that this data should be stored in DB1 (index is from 0), calculate submeter index 1%3=1 again, so know that this data should be stored in my_table_0004 table, this completes the router-level topology of Article 1 contextual data record.
Sub-step A3, according to described target point storehouse submeter index and target divide storehouse submeter mapping relations, every contextual data is placed on correspondence new electronic form file corresponding worksheet in;
The router-level topology result of Article 1 contextual data record in table 1, because knowing that this contextual data record should be stored in the my_table_0004 table in DB1, it is called on the worksheet of my_table_0004 at this point it is possible to this contextual data to be added to the name with DB1 new electronic form file one to one.
Can be seen that, this automatic flow of the application is always able to automatically resolve policing rule, carry out the router-level topology of every contextual data in this original electron form document automatically according to analysis result, and automatically according to router-level topology result, this contextual data is organized in the electronic form file of newly-generated corresponding router-level topology result. According to the corresponding electronic form file of a data base, a worksheet in one electronic form file to should the principle of a table in data base, the distribution finally giving all new electronic form files is always able to consistent with the physical data distribution of logical table specified by rules in policing rule.
Sub-step A4, mode according to the corresponding data base of file, the contextual data called in described new electronic form file is tested.
After the new electronic form file that the contextual data calculated is placed on correspondence, mean that contextual data is ready, now, test software can according to the mode of the corresponding data base of a file, and the contextual data called in described new electronic form file is tested.
To sum up, the application can realize applying automatization's route of the contextual data of any strategy combination by allowing user only need to carry out the configuration of simple policing rule, thus being substantially reduced the time of contextual data, allow the contextual data employing policing rule and do not use time of contextual data of policing rule almost without difference, so, just can greatly reduce the testing time of contextual data, improve testing efficiency.
With reference to Fig. 2, it is shown that the flow chart of the method for testing embodiment 2 of a kind of contextual data of the application, specifically may include that
Step 201, reception user process request;
Wherein, described user processes and specifically can include an original electron form document and corresponding policing rule in request, may further include again contextual data, may further include again logical table rule in described policing rule in this original electron form document;
Step 202, the logical table rule obtained by traversal in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed, described processing procedure specifically may include that
Step 221, according to the corresponding worksheet in this original electron form document of this logical table Rule;
Step 222, according to this logical table rule, every contextual data in this worksheet is carried out router-level topology, obtains corresponding target point storehouse submeter index and target point storehouse submeter mapping relations;
Step 223, according to described target point storehouse submeter index and target divide storehouse submeter mapping relations, every contextual data is placed on correspondence new electronic form file corresponding worksheet in;
Step 224, having placed after every time, add described new electronic form file to mapping (Map) data structure according to the mode of file one data base of correspondence;
Step 225, mode according to the corresponding data base of file, the contextual data called in described new electronic form file is tested.
The present embodiment and embodiment 1 are distinctive in that, adopt Map data structure to deposit the new electronic form file of corresponding router-level topology result and corresponding data base, test the follow-up use of software in order to step 225.
The definition of the application a kind of Map example data structure is as follows:
Map<StringdataSource, HSSFWorkbookexcel>, wherein, dataSource is database object, and it can include the necessary information of a data base, and such as address, user name, password etc., excel is exactly the title of new electronic form file. One specific example such as Map{ (dataSource0, excel0.xls), (dataSource1, excel1.xls), (dataSource2, excel2.xls), ..., such structure just can the one_to_one corresponding of fulfillment database and new excel file. Map data structure should be sky in an initial condition.
In a preferred embodiment of the present application, described step 223 may further include:
Finding step: divide storehouse to index according to target, search corresponding electronic form file object in described Map data structure, if it is found, then perform the first interpolation step, otherwise, performs newly-built step;
First adds step: add this contextual data searching indexing in corresponding worksheet with target submeter of gained electronic form file;
Newly-built step: divide storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and perform the second interpolation step;
Second adds step: this contextual data is added to indexing in corresponding worksheet with described target submeter of newly created electronic form file.
In the still another preferable embodiment of the application, described method can also include:
Traversal at described policing rule terminates, and after each logical table rule is disposed accordingly, all new electronic form file in Map data structure write disk, and records the mapping relations of corresponding document path and data base.
Here, the mapping relations of the file path of record and data base, it is possible to pass to subsequent use person (test software or people); Such as, for test software, the file path of described record and the mapping relations of data base can load for test software, if itest is a test software for the test of java routine interface of Taobao's independent research, itest may use the mapping relations of file path and data base when loading scenario data.
In actual applications, the application can record the relative path of file write disk, the name of data source object corresponding to each electrical form is found again from Map data structure, thus it is known that the corresponding relation of file and data base, they are organized into two arrays corresponding to element and pass to itest, as follows:
Locations={ " target/test-classes/autoGen/DB1.xls ",
��target/test-classes/autoGen/DB2.xls��}
DsNames={ " DB1 ", " DB2 " }
So, itest is known that where read electronic form file, and knows which data base which electronic form file should be loaded in.
For making those skilled in the art be more fully understood that the application, illustrate that the application prepares the process of contextual data automatically below by way of a specific example, with reference to Fig. 3, specifically may include that
Step 301, reception user process request, described user processes and specifically can include an original electron form document and corresponding policing rule in request, this original electron form document may further include again contextual data, described policing rule may further include again logical table rule;
Step 302, the request that described user processed load configuration as data and preserve to testing software;
Data in step 303, traversal test software load configuration, have searched whether that policing rule configure, if so, then perform step 304, otherwise, execution step 312;
Step 304, initialization Map data structure, data base and Xin electronic form file one_to_one corresponding in this structure, under original state, this structure is empty;
Step 305, by traversal strategies rule, from described policing rule obtain a logical table rule;
Step 306, according to the corresponding worksheet in this original electron form document of this logical table Rule;
Step 307, according to this logical table rule, every contextual data in this worksheet is carried out router-level topology, obtain corresponding target point storehouse submeter index and target point storehouse submeter mapping relations;
Step 308, according to described target point storehouse submeter index and target divide storehouse submeter mapping relations, every contextual data is placed on correspondence new electronic form file corresponding worksheet in;
Step 309, having placed after every time, add described new electronic form file to Map data structure according to the mode of file one data base of correspondence;
Step 310, judge whether the traversal of described policing rule terminates, if so, then perform step 311, otherwise return step 305;
Step 311, all new electronic form file in Map data structure is write disk, and record the mapping relations of corresponding document path and data base;
Step 312, end.
Described automatic flow is directly integrated in the test software of subsequent load by this example, follow-up for this test software. It practice, described automatic flow can be individually operated, automatically derive ready electronic form file according to user's input, and automatically configure to this test software. The run location of described automatic flow is not any limitation as by the application.
The application uses it addition, can also combine with the configuration of prior art " electronic form file corresponding a data base ". Such as, the application can provide following configuration template:
ITestDataSet (locations={ " db1.xls ", " ruleData.xls ", " db2.xls " }, dsNames={ " db1 ", " rule ", " db2 " })
Wherein, db1.xls and db2.xls is two electronic form files, db1 and db2 is two data bases, ruleData.xls is the data needing to carry out policing rule computing, rule is policing rule, allowing user can be configured to an electronic form file both can a corresponding data base, also can a corresponding policing rule, if configured to electronic form file correspondence database, then load data into data base by original mode, if configured to a corresponding policing rule of electronic form file, then the strategically rule of the data in this electronic form file is automatically generated the electronic form file corresponding with target point storehouse submeter after calculating, and automatically by corresponding good with actual data base for these files, confession test software subsequent load is deleted to data base or from data base.
In implementing, the automatic flow of the application is preferably used java language to be implemented, but uses other Languages (such as c, c#) to implement also to reach same effect.
Corresponding to preceding method embodiment, disclosed herein as well is the test device of a kind of contextual data, with reference to Fig. 4, specifically may include that
Interface module 401, request is processed for receiving user, described user processes and may further include an original electron form document and corresponding policing rule in request, this original electron form document may further include contextual data, described policing rule may further include logical table rule;
Processing module 402, for regular by traveling through the logical table obtained in described policing rule, and processes the contextual data in this original electron form document according to each logical table rule.
In a preferred embodiment of the present application, described processing module 402 may further include:
Worksheet obtains submodule B1, for according to the corresponding worksheet in this original electron form document of this logical table Rule;
Router-level topology submodule B2, for every contextual data in this worksheet being carried out router-level topology according to this logical table rule, obtains corresponding target point storehouse submeter index and target point storehouse submeter mapping relations;
Place submodule B3, for dividing storehouse submeter mapping relations according to described target point storehouse submeter index and target, every contextual data is placed in the corresponding worksheet of new electronic form file of correspondence; And
Test submodule B4, for the mode according to the corresponding data base of a file, the contextual data called in described new electronic form file is tested.
In practice, the test device of described contextual data can be integrated in application testing software, it is also possible to as an independent test software, automatically derives ready electronic form file according to user's input, and automatically configures to application testing software. The particular location of the test device of described contextual data is not any limitation as by the application.
In a preferred embodiment of the present application, described router-level topology submodule B2 may further include:
Extraction unit, in order to for every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
Example generates unit, generates a rule example for the data element of extraction replaces the variable in logical table rule; And
Example calculation unit, is used for calculating this rule example, obtains target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
In another preferred embodiment of the present application, described processing module 402 can also include:
Add submodule, for, after having placed, adding described new electronic form file to Map data structure according to the mode of the corresponding data base of a file every time.
In the embodiment of the present application, it is preferred that described placement submodule B3 may further include:
Search unit, for dividing storehouse to index according to target, described Map data structure is searched corresponding electronic form file object, if it is found, then perform the first interpolation step, otherwise, perform newly-built step;
First adding device, for adding this contextual data indexing in corresponding worksheet with target submeter of lookup gained electronic form file;
Newly-built unit, for dividing storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and trigger the second adding device;
Second adding device, for adding indexing in corresponding worksheet with described target submeter of newly created electronic form file to by this contextual data.
In the embodiment of the present application, it is preferred that described device can also include:
Deposit module, for terminating in the traversal of described policing rule, and after each logical table rule is disposed accordingly, writes disk by all new electronic form file in Map data structure;
Logging modle, for, after deposit, recording the mapping relations of corresponding document path and data base.
For device embodiment, due to itself and embodiment of the method basic simlarity, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method.
Each embodiment in this specification all adopts the mode gone forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually referring to.
Above to the method for testing of a kind of contextual data provided herein and device, it is described in detail, principle and the embodiment of the application are set forth by specific case used herein, and the explanation of above example is only intended to help and understands the present processes and core concept thereof; Simultaneously for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this specification content should not be construed as the restriction to the application.
Claims (8)
1. the method for testing of a contextual data, it is characterised in that including:
Receiving user and process request, described user processes request and includes an original electron form document and corresponding policing rule, and this original electron form document includes contextual data, and described policing rule includes logical table rule;
By traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed;
Wherein, described by traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is carried out process and specifically include:
According to the corresponding worksheet in this original electron form document of this logical table Rule;
According to this logical table rule, every contextual data in this worksheet is carried out router-level topology, obtain corresponding target point storehouse submeter index and target point storehouse submeter; Wherein, submeter index in described target point storehouse includes target point storehouse index and target submeter index, and described target point storehouse submeter includes target point storehouse and target submeter;
Divide storehouse submeter mapping relations according to described target point storehouse submeter index and target, every contextual data is placed in the corresponding worksheet of new electronic form file of correspondence;
According to the mode of the corresponding data base of a file, the contextual data called in described new electronic form file is tested.
2. the method for claim 1, it is characterised in that the described step that according to this logical table rule, every contextual data in this worksheet is carried out router-level topology, including:
For every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
The data element of extraction is replaced the variable in logical table rule and generates a rule example;
Calculate this rule example, obtain target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
3. the method for claim 1, it is characterised in that described by traveling through the logical table rule obtained in described policing rule, and according to each logical table rule, the contextual data in this original electron form document is processed, also include:
After having placed, add described new electronic form file to Map data structure according to the mode of the corresponding data base of a file every time.
4. method as claimed in claim 3, it is characterised in that described index according to target point storehouse submeter divides storehouse submeter mapping relations with target, and every contextual data is placed on the step in the corresponding worksheet of corresponding new electronic form file, including:
Finding step: divide storehouse to index according to target, search corresponding electronic form file object in described Map data structure, if it is found, then perform the first interpolation step, otherwise, performs newly-built step;
First adds step: add this contextual data searching indexing in corresponding worksheet with target submeter of gained electronic form file;
Newly-built step: divide storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and perform the second interpolation step;
Second adds step: this contextual data is added to indexing in corresponding worksheet with described target submeter of newly created electronic form file.
5. method as claimed in claim 3, it is characterised in that described method also includes:
Traversal at described policing rule terminates, and after each logical table rule is disposed accordingly, all new electronic form file in Map data structure write disk, and records the mapping relations of corresponding document path and data base.
6. the test device of a contextual data, it is characterised in that including:
Interface module, is used for receiving user and processes request, and described user processes request and includes an original electron form document and corresponding policing rule, and this original electron form document includes contextual data, and described policing rule includes logical table rule;
Processing module, for regular by traveling through the logical table obtained in described policing rule, and processes the contextual data in this original electron form document according to each logical table rule;
Wherein, described processing module farther includes:
Worksheet obtains submodule, for according to the corresponding worksheet in this original electron form document of this logical table Rule;
Router-level topology submodule, for every contextual data in this worksheet being carried out router-level topology according to this logical table rule, obtains corresponding target point storehouse submeter index and target point storehouse submeter; Wherein, submeter index in described target point storehouse includes target point storehouse index and target submeter index, and described target point storehouse submeter includes target point storehouse and target submeter; And
Place submodule, for dividing storehouse submeter mapping relations according to described target point storehouse submeter index and target, every contextual data is placed in the corresponding worksheet of new electronic form file of correspondence; And
Test submodule, for the mode according to the corresponding data base of a file, the contextual data called in described new electronic form file is tested.
7. device as claimed in claim 6, it is characterised in that described router-level topology submodule includes:
Extraction unit, in order to for every contextual data in this worksheet, according to this logical table Rule Extraction data element therein;
Example generates unit, generates a rule example for the data element of extraction replaces the variable in logical table rule; And
Example calculation unit, is used for calculating this rule example, obtains target point storehouse submeter index and the target point storehouse submeter mapping relations of this contextual data.
8. device as claimed in claim 6, it is characterised in that described processing module also includes:
Add submodule, for, after having placed, adding described new electronic form file to Map data structure according to the mode of the corresponding data base of a file every time;
Described placement submodule includes:
Search unit, for dividing storehouse to index according to target, described Map data structure is searched corresponding electronic form file object, if it is found, then trigger the first adding device, otherwise, triggers newly-built unit;
First adding device, for adding this contextual data indexing in corresponding worksheet with target submeter of lookup gained electronic form file;
Newly-built unit, for dividing storehouse to index according to described target, a newly-built corresponding electronic form file object in described Map data structure, and trigger the second adding device;
Second adding device, for adding indexing in corresponding worksheet with described target submeter of newly created electronic form file to by this contextual data.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110201772.8A CN102890651B (en) | 2011-07-19 | 2011-07-19 | The method of testing of a kind of contextual data and device |
HK13103564.5A HK1176706A1 (en) | 2011-07-19 | 2013-03-22 | Method and device for testing scene data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110201772.8A CN102890651B (en) | 2011-07-19 | 2011-07-19 | The method of testing of a kind of contextual data and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102890651A CN102890651A (en) | 2013-01-23 |
CN102890651B true CN102890651B (en) | 2016-06-08 |
Family
ID=47534159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110201772.8A Active CN102890651B (en) | 2011-07-19 | 2011-07-19 | The method of testing of a kind of contextual data and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102890651B (en) |
HK (1) | HK1176706A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104778252B (en) * | 2015-04-16 | 2018-12-21 | 天脉聚源(北京)传媒科技有限公司 | The storage method and device of index |
CN107229486A (en) * | 2016-03-24 | 2017-10-03 | 阿里巴巴集团控股有限公司 | Application scenarios determine method and device |
CN105897485B (en) * | 2016-06-06 | 2019-04-19 | 北京航天发射技术研究所 | A kind of safe analogy method and system of CAN bus based process |
CN110955664A (en) * | 2019-12-03 | 2020-04-03 | 中国建设银行股份有限公司 | Method and device for routing messages in different banks and tables |
CN112597233B (en) * | 2020-12-29 | 2024-06-25 | 平安银行股份有限公司 | Batch processing method, device and equipment for data indexes and storage medium |
CN113127366B (en) * | 2021-04-28 | 2023-08-15 | 芜湖雄狮汽车科技有限公司 | Matrix automatic test method based on model and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212362A (en) * | 2006-12-26 | 2008-07-02 | 中兴通讯股份有限公司 | Automatic testing device and method incorporating a variety of testing tools |
CN101266566A (en) * | 2007-03-13 | 2008-09-17 | 中国电信股份有限公司 | Multi- test scene automatic dispatch system and method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020059167A1 (en) * | 2000-07-25 | 2002-05-16 | Makoto Sunada | Apparatus for saving files into a plurality of holders |
-
2011
- 2011-07-19 CN CN201110201772.8A patent/CN102890651B/en active Active
-
2013
- 2013-03-22 HK HK13103564.5A patent/HK1176706A1/en unknown
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212362A (en) * | 2006-12-26 | 2008-07-02 | 中兴通讯股份有限公司 | Automatic testing device and method incorporating a variety of testing tools |
CN101266566A (en) * | 2007-03-13 | 2008-09-17 | 中国电信股份有限公司 | Multi- test scene automatic dispatch system and method |
Also Published As
Publication number | Publication date |
---|---|
HK1176706A1 (en) | 2013-08-02 |
CN102890651A (en) | 2013-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10628449B2 (en) | Method and apparatus for processing database data in distributed database system | |
CN102890651B (en) | The method of testing of a kind of contextual data and device | |
US10102218B2 (en) | File system with per-extent checksums | |
US20220342875A1 (en) | Data preparation context navigation | |
US9367569B1 (en) | Recovery of directory information | |
CN104850565B (en) | A kind of metadata management method based on K-V storage systems | |
CN105956166A (en) | Database reading-writing method and database reading-writing apparatus | |
US11526465B2 (en) | Generating hash trees for database schemas | |
CN104408111A (en) | Method and device for deleting duplicate data | |
US11151081B1 (en) | Data tiering service with cold tier indexing | |
US20070156778A1 (en) | File indexer | |
JP2018538600A (en) | Signature-based cache optimization for data preparation | |
CN108427728A (en) | Management method, equipment and the computer-readable medium of metadata | |
CN111459884B (en) | Data processing method and device, computer equipment and storage medium | |
WO2023098462A1 (en) | Improving performance of sql execution sequence in production database instance | |
CN110019111A (en) | Data processing method, device, storage medium and processor | |
WO2017020757A1 (en) | Rebalancing and elastic storage scheme with elastic named distributed circular buffers | |
CN104516945A (en) | Hadoop distributed file system metadata storage method based on relational data base | |
CN111680030A (en) | Data fusion method and device, and data processing method and device based on meta information | |
US10521398B1 (en) | Tracking version families in a file system | |
CN116610670A (en) | State data storage method and device based on block chain | |
US20170339581A1 (en) | High-performance content reconstruction of merged and removed cells in integrated circuit layout verification process | |
CN117540056B (en) | Method, device, computer equipment and storage medium for data query | |
CN104424238B (en) | A kind of method, apparatus that mass file generates | |
CN117873405B (en) | Data storage method, device, computer equipment and storage medium |
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: 1176706 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: 1176706 Country of ref document: HK |