CN114036156A - Configurable test data query method and system based on metadata - Google Patents

Configurable test data query method and system based on metadata Download PDF

Info

Publication number
CN114036156A
CN114036156A CN202111335268.7A CN202111335268A CN114036156A CN 114036156 A CN114036156 A CN 114036156A CN 202111335268 A CN202111335268 A CN 202111335268A CN 114036156 A CN114036156 A CN 114036156A
Authority
CN
China
Prior art keywords
metadata
database
query
data
table structure
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.)
Pending
Application number
CN202111335268.7A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111335268.7A priority Critical patent/CN114036156A/en
Publication of CN114036156A publication Critical patent/CN114036156A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2425Iterative querying; Query formulation based on the results of a preceding query
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a configurable test data query method based on metadata, which relates to the field of automatic program design and comprises the following steps: configuring an environment variable of a first database; acquiring the first database table structure according to the environment variable; synchronizing the first database table structure into the query system as metadata of the query system; obtaining a first query instruction; according to the first query instruction, a first element is newly built; according to the first element, inquiring in the first database table structure to obtain first metadata; obtaining first table relation information of the first metadata and the second database; and acquiring first demand data according to the first metadata and the first table relation information. The technical problem that when different project groups of different teams in an enterprise carry out project testing, the data creating rule of the project teams is not clear, and data meeting the required conditions cannot be immediately obtained in the prior art is solved.

Description

Configurable test data query method and system based on metadata
Technical Field
The invention relates to the field of automatic program design, in particular to a configurable test data query method and a system based on metadata.
Background
In recent years, with the continuous development of high and new technologies, the business range of an enterprise is also continuously expanded, but the projects developed by the enterprise are often similar or related, so that when a certain team tests a project in the software development and release industry, a problem that when judging whether an application program or a website can be operated in a desired manner and whether all functions and design requirements can be met, the test needs to be completed by means of data of other teams is required, the purpose is to judge whether the application requirements of a target user can be met, but because the creation rules of data of other teams are unclear, the test data of other teams cannot be directly applied, the required test data can be obtained after understanding the creation rules of the data by communicating with other teams, and a great amount of time and energy are required in the process.
However, in the process of implementing the broad technical scheme in the embodiment of the present application, the inventors of the present application find that the above-mentioned technology has at least the following technical problems:
in the prior art, when different project groups of different teams in an enterprise carry out project testing, project data of other teams are required to be used for testing, but the data creating rule of the project teams is not clear, and the data meeting the required condition cannot be obtained immediately.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the application aims to solve the technical problem that when different project groups of different teams in an enterprise are tested, project data of other teams are required to be used for testing, but the data creating rule of the project team is not clear, and data meeting the required conditions cannot be immediately obtained by providing the method and the system for querying the configurable test data based on the metadata. The method and the system have the advantages that the table structure information of each team project can be synchronized, each team can directly acquire the table structure information of the database of other different team projects, and required project data can be directly acquired according to key fields when the projects are tested.
In a first aspect, an embodiment of the present application provides a method for querying configurable test data based on metadata, where the method is applied to a system for querying configurable test data based on metadata, and the method includes: configuring an environment variable of a first database; acquiring the first database table structure according to the environment variable; synchronizing the first database table structure into the query system as metadata of the query system; obtaining a first query instruction; according to the first query instruction, a first element is newly built; according to the first element, inquiring in the first database table structure to obtain first metadata; obtaining first table relation information of the first metadata and the second database; and acquiring first demand data according to the first metadata and the first table relation information.
On the other hand, an embodiment of the present application further provides a configurable test data query system based on metadata, where the system includes: a first configuration unit: the first configuration unit is used for configuring environment variables of a first database; a first acquisition unit: the first obtaining unit is used for obtaining the first database table structure according to the environment variable; a first synchronization unit: the first synchronization unit is used for synchronizing the first database table structure to the query system as metadata of the query system; a first obtaining unit: the first obtaining unit is used for obtaining a first query instruction; a first newly-built unit: the first newly-built unit is used for newly building a first element according to the first query instruction; a second obtaining unit: the second obtaining unit is used for querying in the first database table structure according to the first element to obtain first metadata; a third obtaining unit: the third obtaining unit is configured to obtain first table relationship information between the first metadata and the second database; a fourth obtaining unit: the fourth obtaining unit is configured to obtain first demand data according to the first metadata and the first table relationship information.
In another aspect, the present invention further provides a configurable test data query system based on metadata, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the program.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
due to configuration of the environment variables of the first database; acquiring the first database table structure according to the environment variable; synchronizing the first database table structure into the query system as metadata of the query system; obtaining a first query instruction; according to the first query instruction, a first element is newly built; according to the first element, inquiring in the first database table structure to obtain first metadata; obtaining first table relation information of the first metadata and the second database; and acquiring first demand data according to the first metadata and the first table relation information. Based on the method, a configurable test data query method based on metadata can be constructed, and the technical effects that the table structure information of each team project can be synchronized, each team can directly acquire the table structure information of databases of other different team projects, and required project data can be directly acquired according to key fields when the projects are tested are achieved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic flowchart illustrating a method for querying configurable test data based on metadata according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating a new first component in a configurable test data query method based on metadata according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a process of obtaining the first metadata in a metadata-based configurable test data query method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a configurable test data query system based on metadata according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
Description of reference numerals: a first configuration unit 11, a first acquisition unit 12, a first synchronization unit 13, a first obtaining unit 14, a new creation unit 15, a second obtaining unit 16, a third obtaining unit 17, a fourth obtaining unit 18, an electronic device 50, a processor 51, a memory 52, an input device 53, and an output device 54.
Detailed Description
The embodiment of the application provides a method and a system for querying configurable test data based on metadata, and solves the technical problem that when different project groups of different teams in an enterprise are tested, project data of other teams are required to be used for testing, but the data creating rule of the project team is not clear, and data meeting required conditions cannot be immediately obtained. The method and the system have the advantages that the table structure information of each team project can be synchronized, each team can directly acquire the table structure information of the database of other different team projects, and required project data can be directly acquired according to key fields when the projects are tested.
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are merely some embodiments of the present application and not all embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein.
Summary of the application
In recent years, with the continuous development of high and new technologies, the business range of an enterprise is also continuously expanded, but the projects developed by the enterprise are often similar or related, so that when a certain team tests a project in the software development and release industry, a problem that when judging whether an application program or a website can be operated in a desired manner and whether all functions and design requirements can be met, the test needs to be completed by means of data of other teams is required, the purpose is to judge whether the application requirements of a target user can be met, but because the creation rules of data of other teams are unclear, the test data of other teams cannot be directly applied, the required test data can be obtained after understanding the creation rules of the data by communicating with other teams, and a great amount of time and energy are required in the process. In the prior art, when different project groups of different teams in an enterprise carry out project testing, project data of other teams are required to be used for testing, but the data creating rule of the project teams is not clear, and the data meeting the required condition cannot be obtained immediately.
In view of the above technical problems, the technical solution provided by the present application has the following general idea:
the embodiment of the application provides a configurable test data query method based on metadata, wherein the method comprises the following steps: configuring an environment variable of a first database; acquiring the first database table structure according to the environment variable; synchronizing the first database table structure into the query system as metadata of the query system; obtaining a first query instruction; according to the first query instruction, a first element is newly built; according to the first element, inquiring in the first database table structure to obtain first metadata; obtaining first table relation information of the first metadata and the second database; and acquiring first demand data according to the first metadata and the first table relation information.
For better understanding of the above technical solutions, the following detailed descriptions will be provided in conjunction with the drawings and the detailed description of the embodiments.
Example one
As shown in fig. 1, an embodiment of the present application provides a method for querying configurable test data based on metadata, where the method is applied to a system for querying configurable test data based on metadata, and the method includes:
step S100: configuring an environment variable of a first database;
specifically, configuring an environment variable of a first database, wherein the first database refers to a data set in which teams store and manage the project data according to a data structure, the data set can be shared, and the environment variable of the database refers to that once the environment variable of the database is configured, each database required to be configured can obtain required content or corresponding functions through the configured environment variable, that is, the environment variable of the first database is configured so that each team member can access the first database, and each team member can access the first database is a precondition for obtaining team project data of each team.
Step S200: acquiring the first database table structure according to the environment variable;
specifically, the first database table structure is obtained according to the environment variable, and the first database table structure refers to what structure the table in the first database is constructed when constructed, that is, the structure information of the table, access to the first database is achieved according to the environment variable, the first database table structure is obtained by accessing the first database, the creation rule of the data in the first database can be obtained through the obtained first database table structure, and the data meeting the condition can be obtained according to the obtained data rule.
Step S300: synchronizing the first database table structure into the query system as metadata of the query system;
specifically, the first database table structure is synchronized into the query system as metadata of the query system, the metadata can be regarded as intermediate data, the data is used for describing other data, namely, structural data used for providing information about a certain resource, the first database table structure is synchronized into the query system, testers of each team can acquire the first database table structure synchronized into the query system through the environment configuration, the first database table structure synchronized into the query system is used as the metadata of the query system, so that a query can be performed according to the first database table structure, and the first database table structure is permanently stored in the first database by synchronizing the first database table structure into the query system, the tester can obtain the first database table structure, i.e. the data rules of the first database, at any time.
Step S400: obtaining a first query instruction;
step S500: according to the first query instruction, a first element is newly built;
specifically, a first query instruction is obtained, a team tester issues the query instruction, the query system receives the query instruction issued by the tester, that is, the query system obtains the first query instruction, and according to the first query instruction, a first element is newly created, the element refers to querying for a single database table, and a data model of the test data is obtained, the element may be composed of a plurality of tables, the definition of each table is divided into a table name, a table field definition, and a table relationship definition, and the function of the element is to further refine the structure of the first database table, wherein the refined content part mainly includes a field alias, a query field, a display field, an occupation flag field, and the like, and is to define the data content included in the first database table structure on the basis of the data creation rule of the first database table structure, the data rule is further described by defining field aliases, inquiry fields, display fields, occupation mark fields and the like, and the test data acquisition is facilitated for testers.
Step S600: according to the first element, inquiring in the first database table structure to obtain first metadata;
specifically, according to the first element, a query is performed in the first database table structure, that is, a data query is performed in the first database table structure according to the field alias, the query field, the display field, and the query access model occupying the flag field defined by the first element, so as to obtain the first metadata, where the first metadata is structural data providing information about the queried required data, and other data related to the first metadata can be obtained by obtaining the first metadata.
Step S700: obtaining first table relation information of the first metadata and the second database;
step S800: and acquiring first demand data according to the first metadata and the first table relation information.
Specifically, first table relationship information of the first metadata and the second database is obtained, where the second database refers to a database of a team needing to perform a project test, the second database is configured environmentally in the same manner as the first database, and then the first table relationship information of the first metadata and the second database is obtained according to the data structure information of the first metadata, that is, the first database and the second database are connected through the first metadata, and then the first metadata and the first table relationship information, that is, the first metadata and the first table relationship information can be obtained according to the information of the first metadata and the definition of the table element of the first table, that is, the storage manner of the first metadata in the first table, and then obtaining first demand data according to the first metadata and the first table relationship information, wherein the first demand data is obtained according to the relationship between the first metadata and the first table relationship information, namely through the known data creation rule, namely the first demand data is the test data required by a tester.
Further, the embodiment of the present application further includes:
step S101: the environment variables comprise connection IP, host, username and password.
Specifically, the environment variables include a connection IP, a host, a username, and a password, and the configuration of the environment variables is to link with a required database, that is, the environment variables configure an address, a domain name, a username, and a password of the required connection database, obtain a specific address of the required database, and further obtain the table structure and other contents or functions of the database.
Further, the embodiment of the present application further includes:
step S201: performing binning according to the first database environment configuration;
in particular, the binning refers to a data preprocessing technology, which can divide and construct a decision tree according to the type and numerical value characteristics of the data, binning according to the first database environment configuration first determining the first database characteristic for the type to which the first database belongs according to the first database environment configuration result, thereby obtaining the first database table structure information through the environment configuration of the first database, performing feature classification according to the table name, the table field definition and the table relation definition of the first database table, taking the category of the first database as a root node, and taking the feature classification result of the first database table as a leaf node of a decision tree, and increasing the query speed of the content of the first database table in the first database by performing box separation on the environment configuration of the first database.
Further, as shown in fig. 2, the embodiment of the present application further includes:
step S501: according to the first query instruction, table name information, table field information and table relation information are obtained;
step S502: and establishing a first element according to the table name information, the table field information and the table relation information.
Specifically, according to the first query instruction, table name information, table field information and table relationship information are obtained, the test person sending out the first query instruction means that the test person adds a query task in a task queue module of the query system, the query system starts to execute a query engine monitoring task, the table name information is obtained according to the first query instruction monitored, the table field information is obtained, the table relationship information is obtained, the query system constructs a data model for query and access by the first query instruction according to the table name information, the table field information and the table relationship information, namely, the first element is newly built, and the query system can select a corresponding query mode according to the first element sequence to obtain required test data.
Further, as shown in fig. 3, the embodiment of the present application further includes:
step S601: according to the first element, querying in the first database table structure to obtain a metadata set;
step S602: and performing a first field query from the metadata set to obtain the first metadata.
Specifically, according to the first element, a query is performed in the first database table structure, that is, the metadata set corresponding to the first element is obtained according to the table name, the field definition, and the features of the table relationship definition in the first element, a first field query is performed from the metadata set, the first field query sets a query condition according to a required query result, that is, the first query field, whether query content exists or not is judged according to the first query field, if so, an affiliation number of target metadata is obtained, the first metadata is obtained through the affiliation data number of the first field, data related to the first metadata can be obtained through the first metadata, and then, a tester can obtain all required test data.
Further, the embodiment of the present application further includes:
step S801: and performing data conversion on the first metadata according to the first table relation information to obtain the first demand data.
Specifically, the data conversion of the first metadata according to the first table relationship information refers to converting the obtained first metadata according to the configuration information of the first table and the first table relationship information, that is, converting the first metadata into unconverted original data according to a data setting rule of a target database table where test data is required to be obtained, and activating the first demand data, where the first demand data is the first demand data, that is, the required test data, obtained by a tester according to a query condition.
Example two
Based on the same inventive concept as the method for querying configurable test data based on metadata in the foregoing embodiment, the present invention further provides a system for querying configurable test data based on metadata, as shown in fig. 4, where the system includes:
a first configuration unit 11, wherein the first configuration unit 11 is used for configuring environment variables of a first database;
a first obtaining unit 12, configured to obtain the first database table structure according to the environment variable;
a first synchronization unit 13, configured to synchronize the first database table structure into the query apparatus as metadata of the query apparatus;
a first obtaining unit 14, wherein the first obtaining unit 14 is configured to obtain a first query instruction;
a first new building unit 15, wherein the first new building unit 15 is configured to build a first element according to the first query instruction;
a second obtaining unit 16, where the second obtaining unit 16 is configured to perform a query in the first database table structure according to the first element to obtain first metadata;
a third obtaining unit 17, where the third obtaining unit 17 is configured to obtain first table relationship information between the first metadata and the second database;
a fourth obtaining unit 18, where the fourth obtaining unit 18 is configured to obtain the first demand data according to the first metadata and the first table relationship information.
Further, the system further comprises:
the first variable unit is used for defining the environment variables to comprise connection IP, host, username and password.
Further, the system further comprises:
a fifth obtaining unit, configured to obtain table name information, table field information, and table relationship information according to the first query instruction;
and the second new building unit is used for building the first element according to the table name information, the table field information and the table relation information.
Further, the system further comprises:
a sixth obtaining unit, configured to perform a query in the first database table structure according to the first element to obtain a metadata set;
a seventh obtaining unit, configured to perform a first field query from the metadata set to obtain the first metadata.
Further, the system further comprises:
an eighth obtaining unit that performs data conversion on the first metadata according to the first table relationship information, to obtain the first demand data.
EXAMPLE III
The electronic device of the embodiment of the present application is described below with reference to fig. 5.
Fig. 5 illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of the intelligent scoring method based on the VR customer service in the foregoing embodiment, the present invention further provides an intelligent scoring system based on the VR customer service, and hereinafter, an electronic device according to an embodiment of the present application is described with reference to fig. 5. The electronic device may be a removable device itself or a stand-alone device independent thereof, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods as described hereinbefore.
As shown in fig. 5, the electronic device 50 includes one or more processors 51 and a memory 52.
The processor 51 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions.
The memory 52 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 51 to implement the methods of the various embodiments of the application described above and/or other desired functions.
In one example, the electronic device 50 may further include: an input device 53 and an output device 54, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The embodiment of the application provides a configurable test data query method based on metadata, wherein the method comprises the following steps: configuring an environment variable of a first database; acquiring the first database table structure according to the environment variable; synchronizing the first database table structure into the query system as metadata of the query system; obtaining a first query instruction; according to the first query instruction, a first element is newly built; according to the first element, inquiring in the first database table structure to obtain first metadata; obtaining first table relation information of the first metadata and the second database; according to the first metadata and the first table relation information, the technical effect of obtaining the first demand data is achieved, the table structure information of each team project can be synchronized, each team can directly obtain the table structure information of databases of other different team projects, and the effect of directly obtaining required project data according to key fields when the projects are tested is achieved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus necessary general-purpose hardware, and certainly can also be implemented by special-purpose hardware including special-purpose integrated circuits, special-purpose CPUs, special-purpose memories, special-purpose components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, the implementation of a software program is more preferable. Based on such understanding, the technical solutions of the present application may be substantially embodied in the form of a software product, which is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk of a computer, and includes several instructions for causing a computer device to execute the method according to the embodiments of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted from a computer-readable storage medium to another computer-readable storage medium, which may be magnetic (e.g., floppy disks, hard disks, tapes), optical (e.g., DVDs), or semiconductor (e.g., Solid State Disks (SSDs)), among others.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that in the embodiment of the present application, "B corresponding to a" means that B is associated with a, from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (7)

1. A configurable test data query method based on metadata is applied to a configurable test data query system based on metadata, and comprises the following steps:
configuring an environment variable of a first database;
acquiring the first database table structure according to the environment variable;
synchronizing the first database table structure into the query system as metadata of the query system;
obtaining a first query instruction;
according to the first query instruction, a first element is newly built;
according to the first element, inquiring in the first database table structure to obtain first metadata;
obtaining first table relation information of the first metadata and the second database;
and acquiring first demand data according to the first metadata and the first table relation information.
2. The method of claim 1, wherein the environment variable comprises a connection IP, host, username, password.
3. The method of claim 1, wherein said creating a first component in response to said first query instruction comprises:
according to the first query instruction, table name information, table field information and table relation information are obtained;
and establishing a first element according to the table name information, the table field information and the table relation information.
4. The method of claim 1, wherein said querying in the first database table structure according to the first element to obtain first metadata comprises:
according to the first element, querying in the first database table structure to obtain a metadata set;
and performing a first field query from the metadata set to obtain the first metadata.
5. The method of claim 1, wherein said obtaining first demand data based on said first metadata and said first table relationship information comprises:
and performing data conversion on the first metadata according to the first table relation information to obtain the first demand data.
6. A configurable test data query system based on metadata, wherein the system comprises:
a first configuration unit for configuring environment variables of a first database;
a first obtaining unit, configured to obtain the first database table structure according to the environment variable;
a first synchronization unit, configured to synchronize the first database table structure into the query system as metadata of the query system;
a first obtaining unit, configured to obtain a first query instruction;
the first newly-built unit is used for newly building a first element according to the first query instruction;
a second obtaining unit, configured to perform query in the first database table structure according to the first element to obtain first metadata;
a third obtaining unit, configured to obtain first table relationship information between the first metadata and the second database;
a fourth obtaining unit, configured to obtain first demand data according to the first metadata and the first table relationship information.
7. A configurable test data query system based on metadata, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the program.
CN202111335268.7A 2021-11-11 2021-11-11 Configurable test data query method and system based on metadata Pending CN114036156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111335268.7A CN114036156A (en) 2021-11-11 2021-11-11 Configurable test data query method and system based on metadata

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111335268.7A CN114036156A (en) 2021-11-11 2021-11-11 Configurable test data query method and system based on metadata

Publications (1)

Publication Number Publication Date
CN114036156A true CN114036156A (en) 2022-02-11

Family

ID=80137356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111335268.7A Pending CN114036156A (en) 2021-11-11 2021-11-11 Configurable test data query method and system based on metadata

Country Status (1)

Country Link
CN (1) CN114036156A (en)

Similar Documents

Publication Publication Date Title
US9934129B1 (en) Determining application test results using screenshot metadata
US8712965B2 (en) Dynamic report mapping apparatus to physical data source when creating report definitions for information technology service management reporting for peruse of report definition transparency and reuse
CN111177231A (en) Report generation method and report generation device
US7765505B2 (en) Design rule management method, design rule management program, rule management apparatus and rule verification apparatus
CN110162544B (en) Heterogeneous data source data acquisition method and device
US9251222B2 (en) Abstracted dynamic report definition generation for use within information technology infrastructure
CN109284323B (en) Management method and device for detection data
WO2019019647A1 (en) Method and system for determining application program testing range, server and storage medium
US20220215004A1 (en) Target Environment Data Seeding
US20140237485A1 (en) System and method for aggregate data from multiple sources to provide a single cim object
KR20130139724A (en) A computing system, a method for controlling thereof, and a computer-readable recording medium having a computer program for controlling thereof
WO2023098462A1 (en) Improving performance of sql execution sequence in production database instance
US7752300B2 (en) Automatically determining management information base modules for a device
WO2018188222A1 (en) A2l file merging method and device
US20210200819A1 (en) Determining associations between services and computing assets based on alias term identification
Melzer et al. Modeling and simulating federated databases for early validation of federated searches using the broker-based sysml toolbox
US20140136155A1 (en) Analyzing hardware designs based on component re-use
CN115617773A (en) Data migration method, device and system
CN114036156A (en) Configurable test data query method and system based on metadata
US20100070458A1 (en) Rule creation method and rule creating apparatus
US7856344B2 (en) Method for transforming overlapping paths in a logical model to their physical equivalent based on transformation rules and limited traceability
US20230289278A1 (en) Populating Datastores For Integration Testing
CN114020813A (en) Data comparison method, device and equipment based on Hash algorithm and storage medium
Vanhove et al. Kameleo: Design of a new platform-as-a-service for flexible data management
CN110598072B (en) Feature data aggregation method and device

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