A kind of test data volume statistic system and method
Technical field
The invention belongs to software tests to count field, and in particular to a kind of test data volume statistic system and method.
Background technique
In software test industry, Test Engineer will monthly be counted amount of test data, such as BUG quantity, be compiled
Write test case quantity, implementation of test cases quantity etc..And BUG quantity has special fault management system to manage, and writes
Test case quantity and implementation of test cases quantity are managed by test case management system.Usual Test Engineer needs to not
When same application program carries out data statistics, by artificial accounts statistics respectively, low efficiency.
This is the deficiencies in the prior art, therefore, in view of the above-mentioned drawbacks in the prior art, provides a kind of amount of test data system
Meter systems and method, are necessary.
Summary of the invention
It is an object of the present invention to be relied on when carrying out data statistics to different application programs for above-mentioned software test
Artificial accounts statistics, the defect of low efficiency respectively provide a kind of test data volume statistic system and method, to solve above-mentioned technology
Problem.
To achieve the above object, the present invention provides following technical scheme:
A kind of test data volume statistic system, including data sharing module and data statistics module;
Data sharing module includes subsystem data library unit to be counted and subsystem interface unit to be counted;
Subsystem data library unit to be counted, for storing the data of subsystem to be counted;
Subsystem interface unit to be counted, for the data of subsystem data library unit to be counted to be supplied to data statistics
Module;
Data statistics module, for obtaining subsystem data library unit to be counted by subsystem interface unit to be counted
Data.
Further, subsystem interface unit to be counted is also used to receive the data manipulation instruction of data statistics module, right
The data of subsystem data library unit to be counted are operated;
Data statistics module is also used to issue data manipulation instruction to data sharing module.
Further, data manipulation instruction includes data manipulation type and to operation data address.
Further, the data manipulation type includes data increase, data deletion, data modification and data query;
Subsystem interface unit to be counted is according to data manipulation type in the data manipulation instruction received, to the number of acquisition
According to being operated.
It further, include subsystem number and data path to be counted to operation data address;
Data sharing module selects subsystem to be measured according to subsystem number to be measured in operation data address to be measured, accordingly
Subsystem interface unit to be counted obtains the data of corresponding subsystem data library unit to be counted further according to data path.
Further, data path is indicated using uniform resource locator URI;
Subsystem interface unit to be counted is also used to obtain data path by URI analytical tool.
The present invention gives following technical solution:
A kind of amount of test data statistical method, includes the following steps:
Subsystem to be counted stores data in subsystem data library unit to be counted;
Data sharing module externally provides number in subsystem data library unit to be counted by system interface unit to be counted
According to;
Data statistics module obtains data in subsystem data library unit to be counted by subsystem interface unit to be counted.
Further, data sharing module is also grasped by the data that system interface unit to be counted receives data statistics module
It instructs, the data for treating statistics sub system Database Unit are operated;
Data statistics module also issues data manipulation instruction to reception data sharing module.
Further, data manipulation instruction includes data manipulation type and to operation data address;The data manipulation class
Type includes data increase, data deletion, data modification and data query;
Subsystem interface unit to be counted obtains subsystem to be counted according to data address in the data manipulation instruction received
The data of system Database Unit;
Subsystem interface unit to be counted is according to data manipulation type in the data manipulation instruction received, to the number of acquisition
According to being operated.
It further, include subsystem number and data path to be counted to operation data address;
Data sharing module selects subsystem to be measured according to subsystem number to be measured in operation data address to be measured, accordingly
Subsystem interface unit to be counted obtains the data of corresponding subsystem data library unit to be counted further according to data path.
The beneficial effects of the present invention are:
The invention avoids across the manual statistical test data volume of application, the automatic data for obtaining different application are reduced
Manual calculation work amount bring trouble is wanted every time, improves working efficiency.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progress
Beneficial effect be also obvious.
Detailed description of the invention
Fig. 1 is system schematic of the invention;
Fig. 2 is flow chart of the method for the present invention;
Wherein, 1- data sharing module;1.1- subsystem A Database Unit to be measured;1.2- subsystem B data to be measured library is single
Member;1.3- subsystem A interface unit to be measured;1.4- subsystem B interface unit to be measured;2- data statistics module.
Specific embodiment:
To enable the purpose of the present invention, feature, advantage more obvious and understandable, below in conjunction with of the invention specific
The technical solution in the present invention is clearly and completely described in attached drawing in embodiment.
Embodiment 1:
As shown in Figure 1, being directed to subsystem A to be measured and subsystem B to be measured, the present invention provides a kind of amount of test data department of statistic
System, including data sharing module 1 and data statistics module 2;
Data sharing module 1 include subsystem A Database Unit 1.1 to be counted, subsystem A interface unit 1.3 to be counted,
Subsystem B data library unit 1.2 to be measured and subsystem B interface unit 1.4 to be measured;
Subsystem A Database Unit 1.1 to be counted, for storing the data of subsystem A to be counted;
Subsystem B data library unit 1.2 to be counted, for storing the data of subsystem B to be counted;
Subsystem A interface unit 1.3 to be counted, for being supplied to the data of subsystem A Database Unit 1.1 to be counted
Data statistics module 2;
Subsystem B interface unit 1.4 to be counted, for being supplied to the data of subsystem B data library unit 1.2 to be counted
Data statistics module 2;
Data statistics module 2, for obtaining subsystem A database to be counted by subsystem A interface unit 1.3 to be counted
The data of unit 1.1;For obtaining subsystem B data library unit 1.2 to be counted by subsystem B interface unit 1.4 to be counted
Data.
In above-described embodiment 1,
Subsystem A interface unit 1.3 to be counted, is also used to receive the data manipulation instruction of data statistics module 2, treats system
The data of meter subsystem A Database Unit 1.1 are operated;
Subsystem B interface unit 1.4 to be counted, is also used to receive the data manipulation instruction of data statistics module 2, treats system
The data of meter subsystem B data library unit 1.2 are operated;
Data manipulation instruction includes data manipulation type and to operation data address;
The data manipulation type includes data increase, data deletion, data modification and data query;
It include subsystem number and data path to be counted to operation data address;Data path is positioned using unified resource
According with URI indicates;Does is the format of URI scheme: //host:port/path?
Scheme is network communication protocol, and host is host, and port is port numbers, and path is path.Path is used to indicate
Our data to be operated, such as we will operate the record that ID is 1 in A table, the path of building are as follows:/A/1, if to operate A
The name field for the record that ID is 1 in table, the path of building are as follows: A/1/name;
Data sharing module 1 selects subsystem A to be measured according to subsystem number A to be measured in operation data address to be measured, to
Statistics sub system A interface unit 1.3 obtains the data of subsystem A Database Unit 1.1 to be counted further according to data path, according to
Data manipulation type in the data manipulation instruction received, operates the data of acquisition;
Data sharing module 1 selects subsystem B to be measured according to subsystem number B to be measured in operation data address to be measured, to
Statistics sub system B interface unit 1.4 obtains the data of subsystem B data library unit 1.2 to be counted further according to data path, according to
Data manipulation type in the data manipulation instruction received, operates the data of acquisition;
Subsystem A interface unit 1.3 to be counted and subsystem B interface unit 1.4 to be counted, are also used to parse by URI
Tool obtains data path;
Data statistics module 2 is also used to issue data manipulation instruction to data sharing module 1.
Example 2:
Using a kind of amount of test data statistical method of above-described embodiment 1, the data of fault management system are stored in
In sqlite database, it is set as sqlite1, the interface unit of fault management system is provider1;Test case management system
The data of system also are stored in qlite database, are set as sqlite2, and the interface unit of test case management system is
provider2;
When data statistics module will obtain the BUG quantity of fault management system, the interface unit of fault management system
Provider1 receives the BUG quantity inquiry instruction of data statistics module 2 and BUG quantity stores path, is being lacked according to BUG quantity
Path in the database sqlite 1 of management system is fallen into, BUG quantity is inquired.
Embodiment 3:
As shown in Fig. 2, the present invention provides a kind of amount of test data statistical method, include the following steps:
Subsystem to be counted stores data in subsystem data library unit to be counted;
Data sharing module externally provides number in subsystem data library unit to be counted by system interface unit to be counted
According to;Data sharing module receives the data manipulation instruction of data statistics module by system interface unit to be counted, to be counted
The data of subsystem data library unit are operated;
Data statistics module obtains data in subsystem data library unit to be counted by subsystem interface unit to be counted;
Data statistics module also issues data manipulation instruction to reception data sharing module.
Embodiment 4:
A kind of amount of test data statistical method, includes the following steps:
Subsystem to be counted stores data in subsystem data library unit to be counted;
Data sharing module externally provides number in subsystem data library unit to be counted by system interface unit to be counted
According to;Data sharing module receives the data manipulation instruction of data statistics module by system interface unit to be counted, to be counted
The data of subsystem data library unit are operated;
Data manipulation instruction includes data manipulation type and to operation data address;
The data manipulation type includes data increase, data deletion, data modification and data query;
It include subsystem number and data path to be counted to operation data address;
Data sharing module selects subsystem to be measured according to subsystem number to be measured in operation data address to be measured, accordingly
Subsystem interface unit to be counted obtains the data of corresponding subsystem data library unit to be counted further according to data path;
Subsystem interface unit to be counted is according to data manipulation type in the data manipulation instruction received, to the number of acquisition
According to being operated;
Data statistics module obtains data in subsystem data library unit to be counted by subsystem interface unit to be counted;
Data statistics module also issues data manipulation instruction to reception data sharing module.
The embodiment of the present invention be it is illustrative and not restrictive, above-described embodiment be only to aid in understanding the present invention, because
The present invention is not limited to the embodiments described in specific embodiment for this, all by those skilled in the art's technology according to the present invention
Other specific embodiments that scheme obtains, also belong to the scope of protection of the invention.