CN111191086B - Test data identification method - Google Patents

Test data identification method Download PDF

Info

Publication number
CN111191086B
CN111191086B CN201911282552.5A CN201911282552A CN111191086B CN 111191086 B CN111191086 B CN 111191086B CN 201911282552 A CN201911282552 A CN 201911282552A CN 111191086 B CN111191086 B CN 111191086B
Authority
CN
China
Prior art keywords
data
test data
dimension
test
query result
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
CN201911282552.5A
Other languages
Chinese (zh)
Other versions
CN111191086A (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.)
Jiangsu Aijia Household Products Co Ltd
Original Assignee
Jiangsu Aijia Household Products Co 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 Jiangsu Aijia Household Products Co Ltd filed Critical Jiangsu Aijia Household Products Co Ltd
Priority to CN201911282552.5A priority Critical patent/CN111191086B/en
Publication of CN111191086A publication Critical patent/CN111191086A/en
Application granted granted Critical
Publication of CN111191086B publication Critical patent/CN111191086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a test data identification method, which adopts a brand-new design strategy and can efficiently realize the matching of test data, wherein the multidimensional test data filtering is supported, different service scenes are met, and the test data dimension can be configured; the method is friendly to testers, and special treatment on test accounts is not required; the service personnel and the testing personnel are on the same page, the service personnel only see the service data, and the testing personnel can see the service data and the testing data; the whole technical scheme can improve the efficiency of actual data screening and ensure the stability of actual data processing operation.

Description

Test data identification method
Technical Field
The invention relates to a test data identification method, and belongs to the technical field of data identification and screening.
Background
In a formal environment, test data generated by the test process is not exposed to business personnel. For example, the house property financial staff cannot see the collection documents generated by the test floor or the payment documents of the test supplier in the management system. In addition, the testing filter conditions of different types of business documents are different, for example, the filter conditions of a customer receipt are a project and a bank account, and the filter conditions of a settlement list are cooperators.
Several existing test data shielding methods: 1. after the test is finished, the related data is manually deleted, the defects are that the workload is large and the operation is complicated, and particularly, the test data of a complex business process relates to data of a plurality of tables; 2. adding a filtering condition in a database query script, wherein the defect is that the condition is fixed, and only a well-defined type in the filtering condition can be filtered, for example, a mobile phone number beginning with 17777 is filtered out as test data; 3. the mark is added on the test data, and the test data with the corresponding mark is deleted at regular time through the timing task, so that the defect that the test data and the production data need to be distinguished, and the special processing of the interface is involved.
Disclosure of Invention
The invention aims to solve the technical problem of providing a test data identification method, which can efficiently realize the matching of test data and improve the efficiency of actual data screening by adopting a brand-new design strategy.
In order to solve the technical problems, the invention adopts the following technical scheme: the invention designs a test data identification method for realizing test data identification and filtration aiming at a data query process in a target project, which comprises a test data presetting method and a data query method, wherein the test data presetting method is executed according to a preset period or in real time, and comprises the following steps of
Figure DEST_PATH_IMAGE002
To the step of
Figure DEST_PATH_IMAGE004
Step (ii) of
Figure 351201DEST_PATH_IMAGE002
Acquiring preset test data dimensions corresponding to the target project database, and then entering the step;
step (ii) of
Figure 811657DEST_PATH_IMAGE004
Counting to obtain each value of the test data corresponding to the test data dimension in the target project database aiming at each test data dimension, and forming a value set corresponding to the test data dimension; further obtaining value sets corresponding to the dimensions of the test data respectively;
based on a test data presetting method, the data query method is used for realizing data query operation of a user and comprises the following steps A to C;
a, a server of a target project receives a data query request from a user, acquires a corresponding data query result from a database according to the data query request, and then enters step B;
b, the server judges whether the role corresponding to the user is a role of a tester, if so, the server directly returns the data query result to the user; otherwise, entering the step C;
and C, screening the data query result according to the dimension of each test data and the value set corresponding to each test data, updating the data query result, and returning the data query result to the user.
As a preferred technical scheme of the invention: the step C comprises the following steps C1 to C3;
step C1, obtaining each data dimension in the data query result, judging whether each data dimension corresponding to each test data dimension exists in the data query result, if yes, taking each data dimension as each filtered data dimension of the data query result, and entering the step C2; otherwise, directly returning the data query result to the user;
step C2, traversing each filtering data dimension in turn, and respectively executing the following operations:
judging whether data which belong to a value set corresponding to the corresponding test data dimension exist in each data corresponding to the filtered data dimension in the data query result, if so, judging that each data record corresponding to each data in the data query result is a test data record, deleting the test data record, and updating the data query result; otherwise, no operation is performed;
after the traversal of the above-mentioned each filtered data dimension is completed, go to step C3;
and step C3, returning the data query result to the user.
As a preferred technical scheme of the invention: the system also comprises a test data configuration table arranged in the database, wherein the table field comprises a test data dimension, a test data dimension value and a test data dimension value name; and the test data configuration table is used for storing each test data dimension and the value sets corresponding to each test data dimension.
As a preferred technical scheme of the invention: in the step B, the server is used for acquiring the unique user identifier in the data query request parameter by defining an interface base class BaseController, acquiring a role corresponding to the user according to the unique user identifier, and judging whether the role is a role of the tester.
Compared with the prior art, the test data identification method adopting the technical scheme has the following technical effects:
the method for identifying the test data of the tester adopts a brand-new design strategy, can efficiently realize the matching of the test data, supports the filtering of the multi-dimensional test data, meets different service scenes, and has configurable test data dimensions; the method is friendly to testers, and special treatment on test accounts is not required; the service personnel and the testing personnel are on the same page, the service personnel only see the service data, and the testing personnel can see the service data and the testing data; the whole technical scheme can improve the efficiency of actual data screening and ensure the stability of actual data processing operation.
Drawings
FIG. 1 is a schematic flow chart of a data query method in the design of the present invention;
FIG. 2 is a schematic diagram of a test data matching and screening process in the design of the present invention.
Detailed Description
The following description will explain embodiments of the present invention in further detail with reference to the accompanying drawings.
The invention designs a test data identification method for realizing test data identification and filtration aiming at a data query process in a target project, which comprises a test data presetting method and a data query method, wherein the test data presetting method is executed according to a preset period or in real time, and comprises the following steps of
Figure 688346DEST_PATH_IMAGE002
To step (ii)
Figure 838705DEST_PATH_IMAGE004
Step (ii) of
Figure 902476DEST_PATH_IMAGE002
Obtain preset test data dimensions corresponding to the target project database, such as project, partner, bank account, etc., and then proceed to step
Figure 429272DEST_PATH_IMAGE004
Respectively counting to obtain each value of the test data corresponding to the test data dimension in the target project database aiming at each test data dimension to form a value set corresponding to the test data dimension; further obtaining value sets corresponding to the dimensions of the test data respectively; such as test item includes item A, D, E and test partners include partners b, c, f.
In practical applications, a test data configuration table is built in a design database, where a table field includes a test data dimension, a test data dimension value, and a test data dimension value name, and in an application, for example, the meaning of the configuration ('project', a, 'project a'): 'item' represents that the dimension of the test data aimed at by the configuration is an item, A represents the value of the test item, and 'item A' represents the name of the test item; and the test data configuration table is used for storing each test data dimension and the value sets corresponding to each test data dimension.
In a specific code implementation, the construction of the test data configuration table is implemented, for example, by the following code.
Figure DEST_PATH_IMAGE006
A test data configuration table constructed in actual applications such as table 1 below.
Figure DEST_PATH_IMAGE008
TABLE 1
Based on the test data presetting method, the set data query method is used for realizing data query operation of a user, and comprises the following steps A to C as shown in FIG. 1.
And step A, the server of the target project receives a data query request from a user, acquires a corresponding data query result from the database according to the data query request, and then enters step B.
B, the server judges whether the role corresponding to the user is a tester role, if so, the server directly returns the data query result to the user; otherwise, entering the step C.
In practical application, the server is configured to obtain the unique user identifier in the data query request parameter by defining an interface base class BaseController as follows, obtain a role corresponding to the user according to the unique user identifier, and determine whether the role is a role of a tester.
Figure DEST_PATH_IMAGE010
And C, screening the data query result according to the dimension of each test data and the value set corresponding to each test data, updating the data query result, and returning the data query result to the user.
In practical applications, as shown in fig. 2, the present invention specifically relates to the following steps C1 to C3 with respect to the above step C.
Step C1, obtaining each data dimension in the data query result, judging whether each data dimension corresponding to each test data dimension exists in the data query result, if so, taking each data dimension as each filtered data dimension of the data query result, and entering the step C2; otherwise, directly returning the data query result to the user.
In practical application, a service interface is written, a query parameter inherits a BaseRequestVo, an interface definition inherits a BaseController, and as follows, the filtering dimension of the interface query data is determined, and corresponding filtering conditions are added in a database query script.
Figure DEST_PATH_IMAGE012
Step C2, traversing each filtering data dimension in turn, and respectively executing the following operations:
judging whether data which belongs to the value set corresponding to the corresponding test data dimension exists in each data corresponding to the filtered data dimension in the data query result, if so, judging each data record corresponding to each data in the data query result as a test data record, deleting the test data record, and updating the data query result; otherwise, no operation is performed.
After the traversal of the above-mentioned each filtered data dimension is completed, the process proceeds to step C3.
In practical applications, such as defining the query request base class BaseRequestVo as follows, the class attributes are the data sets of the individual test dimensions.
Figure DEST_PATH_IMAGE014
And step C3, returning the data query result to the user.
According to the method for identifying the test data, a brand-new design strategy is adopted, the matching of the test data can be efficiently realized, the filtering of the multi-dimensional test data is supported, different service scenes are met, and the dimension of the test data can be configured; the method is friendly to testers, and special treatment on test accounts is not required; the service personnel and the testing personnel are on the same page, the service personnel only see the service data, and the testing personnel can see the service data and the testing data; the whole technical scheme can improve the efficiency of actual data screening and ensure the stability of actual data processing operation.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (4)

1. A test data identification method is used for realizing test data identification and filtration aiming at a data query process in a target item, and is characterized by comprising a test data presetting method and a data query method, wherein the test data presetting method is executed according to a preset period or in real time, and comprises the following steps I and II:
step I, obtaining preset test data dimensions corresponding to a target project database, and then entering step II;
step II, respectively aiming at each test data dimension, counting to obtain each value of the test data corresponding to the test data dimension in the target project database, and forming a value set corresponding to the test data dimension; further obtaining value sets corresponding to the dimensions of the test data respectively;
based on a test data presetting method, the data query method is used for realizing data query operation of a user and comprises the following steps A to C;
a, a server of a target project receives a data query request from a user, acquires a corresponding data query result from a database according to the data query request, and then enters step B;
b, the server judges whether the role corresponding to the user is a tester role, if so, the server directly returns the data query result to the user; otherwise, entering the step C;
and C, screening the data query result according to the dimension of each test data and the value set corresponding to each test data, updating the data query result, and returning the data query result to the user.
2. The test data identification method of claim 1, wherein: the step C comprises the following steps C1 to C3;
step C1, obtaining each data dimension in the data query result, judging whether each data dimension corresponding to each test data dimension exists in the data query result, if so, taking each data dimension as each filtered data dimension of the data query result, and entering the step C2; otherwise, directly returning the data query result to the user;
step C2, traversing each filtering data dimension in turn, and respectively executing the following operations:
judging whether data which belong to a value set corresponding to the corresponding test data dimension exist in each data corresponding to the filtered data dimension in the data query result, if so, judging that each data record corresponding to each data in the data query result is a test data record, deleting the test data record, and updating the data query result; otherwise, no operation is carried out;
after the traversal of the above-mentioned each filtered data dimension is completed, go to step C3;
and step C3, returning the data query result to the user.
3. The test data identification method of claim 1, wherein: the system also comprises a test data configuration table arranged in the database, wherein the table field comprises a test data dimension, a test data dimension value and a test data dimension value name; and the test data configuration table is used for storing each test data dimension and the value sets corresponding to each test data dimension.
4. The test data identification method of claim 1, wherein: in the step B, the server is used for acquiring the unique user identifier in the data query request parameter by defining an interface base class BaseController, acquiring a role corresponding to the user according to the unique user identifier, and judging whether the role is a role of the tester.
CN201911282552.5A 2019-12-13 2019-12-13 Test data identification method Active CN111191086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911282552.5A CN111191086B (en) 2019-12-13 2019-12-13 Test data identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911282552.5A CN111191086B (en) 2019-12-13 2019-12-13 Test data identification method

Publications (2)

Publication Number Publication Date
CN111191086A CN111191086A (en) 2020-05-22
CN111191086B true CN111191086B (en) 2022-07-08

Family

ID=70707399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911282552.5A Active CN111191086B (en) 2019-12-13 2019-12-13 Test data identification method

Country Status (1)

Country Link
CN (1) CN111191086B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631940A (en) * 2020-12-31 2021-04-09 北京趣拿软件科技有限公司 Test method and test device for car packing system and electronic equipment
CN113641699A (en) * 2021-08-26 2021-11-12 北京沃东天骏信息技术有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446876A (en) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 Service dimension based automatic testing method, apparatus and system
CN108446305A (en) * 2018-01-30 2018-08-24 上海天旦网络科技发展有限公司 The system and method for various dimensions service data statistics
CN109033322A (en) * 2018-07-18 2018-12-18 中国联合网络通信集团有限公司 A kind of test method and device of multidimensional data
CN110046028A (en) * 2018-11-30 2019-07-23 阿里巴巴集团控股有限公司 Data processing method, device and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446876A (en) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 Service dimension based automatic testing method, apparatus and system
CN108446305A (en) * 2018-01-30 2018-08-24 上海天旦网络科技发展有限公司 The system and method for various dimensions service data statistics
CN109033322A (en) * 2018-07-18 2018-12-18 中国联合网络通信集团有限公司 A kind of test method and device of multidimensional data
CN110046028A (en) * 2018-11-30 2019-07-23 阿里巴巴集团控股有限公司 Data processing method, device and server

Also Published As

Publication number Publication date
CN111191086A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN112199366B (en) Data table processing method, device and equipment
CN111459985B (en) Identification information processing method and device
US20090204517A1 (en) Intercompany accounting data analytics
US20120005153A1 (en) Creation of a data store
US12045225B2 (en) Multi-table data validation tool
CN104217276A (en) Rule-based automatic auditing method and system
CN111177134B (en) Data quality analysis method, device, terminal and medium suitable for mass data
CN111191086B (en) Test data identification method
CN112612813B (en) Test data generation method and device
CN107015908A (en) A kind of computer application software test system and method
CN107741903A (en) Application compatibility method of testing, device, computer equipment and storage medium
CN107943694A (en) A kind of test data generating method and device
US20200364183A1 (en) Device and method for managing ledger data on blockchain
CN111445320B (en) Target community identification method and device, computer equipment and storage medium
CN111090780A (en) Method and device for determining suspicious transaction information, storage medium and electronic equipment
CN106844320B (en) Financial statement integration method and equipment
CN109117440A (en) A kind of metadata information acquisition methods, system and computer readable storage medium
CN107944866B (en) Transaction record duplication elimination method and computer-readable storage medium
CN109947797B (en) Data inspection device and method
CN117540965A (en) Metadata-based data asset inventory method and system
CN105573984B (en) The recognition methods of socio-economic indicator and device
CN116703141A (en) Audit data processing method, audit data processing device, computer equipment and storage medium
CN109165155A (en) A kind of software defect recovery template extracting method based on clustering
CN116126846A (en) Data quality detection method, device and medium
CN115712654A (en) Method and device for inquiring transaction state

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 211100 floor 5, block a, China Merchants high speed rail Plaza project, No. 9, Jiangnan Road, Jiangning District, Nanjing, Jiangsu (South Station area)

Applicant after: JIANGSU AIJIA HOUSEHOLD PRODUCTS Co.,Ltd.

Address before: 211100 No. 18 Zhilan Road, Science Park, Jiangning District, Nanjing City, Jiangsu Province

Applicant before: JIANGSU AIJIA HOUSEHOLD PRODUCTS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant