CN116610591A - Method, device, system and medium for generating test data and call statement - Google Patents
Method, device, system and medium for generating test data and call statement Download PDFInfo
- Publication number
- CN116610591A CN116610591A CN202310889614.9A CN202310889614A CN116610591A CN 116610591 A CN116610591 A CN 116610591A CN 202310889614 A CN202310889614 A CN 202310889614A CN 116610591 A CN116610591 A CN 116610591A
- Authority
- CN
- China
- Prior art keywords
- generating
- data
- test data
- object file
- call
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000015654 memory Effects 0.000 claims description 23
- 238000007781 pre-processing Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 7
- 238000004904 shortening Methods 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy 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)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a method, a device, a system and a medium for generating test data and call sentences. The method specifically comprises the following steps: obtaining an object file group, analyzing the object file group, and generating a table object file, wherein the table object file comprises a data relation expression; generating a table rule file according to the table object file and a preset rule; receiving the count configuration information, and counting the database according to the count configuration information and the table rule file to generate test data; confirming calling characteristic information according to the test data and the data relation expression; and generating a corresponding call statement according to the call feature information. Generating a table rule file by analyzing the object file group, and generating test data for database creation number according to the table rule file and creation number configuration information. And confirming calling characteristic information according to the test data and the data relation expression, generating a calling statement, improving the overall coverage rate of the calling statement, shortening the test time and reducing the labor cost.
Description
Technical Field
The present application relates to the field of database technologies, and in particular, to a method, an apparatus, a system, and a medium for generating test data and call statements.
Background
With the emphasis of the country on the data security, the trend of database localization is not well-known. To fully compatible the business logic and SLQ syntax of the history database, a full test of the business is required.
In the process of business testing, a large number of SQL objects with complicated logic exist, such as stored procedures, triggers, packages, automatic functions and the like. These objects tend to have complex logic and long space, and have poor readability for non-business personnel, and meanwhile, due to the problems of data security and data capacity, related data and business logic cannot be assigned to the company environment for developing a database, so that in the process of testing the objects, the background data which can hit all the logic of the objects is lacking, and the disordered data cannot enter related processes; lack of call SQL applicable to current data; the objects are many and have deep layers, interaction exists between the objects, and manpower is very time-consuming and easy to miss for cleaning the data relationship.
Disclosure of Invention
The embodiment of the application mainly aims to provide a method, a device, a system and a medium for generating test data and call sentences, so as to improve the overall coverage rate of the call sentences, shorten the test time and reduce the labor cost.
In one aspect of the present application, there is provided a method for generating test data and a call statement, the method comprising:
obtaining an object file group, analyzing the object file group, and generating a table object file, wherein the table object file comprises a data relation expression;
generating a table rule file according to the table object file and a preset rule;
receiving the count configuration information, and counting the database according to the count configuration information and the table rule file to generate test data;
confirming calling characteristic information according to the test data and the data relation expression;
and generating a corresponding call statement according to the call feature information.
In one embodiment, the obtaining the object file group, analyzing the object file group, and generating a table object file, where the table object file includes a data relational expression, includes:
obtaining an object file group, preprocessing the object file group, and generating a plurality of sub-object files;
analyzing SQL grammar in each sub-object file and outputting a corresponding data relation expression;
and merging and de-duplication processing is carried out on each data relation expression according to the library table, and a corresponding table object file is generated.
In one embodiment, the data relationship expression includes a library name, a table name, a field type, a field value, an object type, a call type.
In one embodiment, the generating a table rule file according to the table object file and a preset rule specifically includes:
and analyzing the table object file, and generating a table rule file with a corresponding structure by combining the data rules in the preset rule base.
In one embodiment, the table rule file contains field names, field types, data rules for all fields.
In one embodiment, the receiving the count configuration information, counting the database according to the count configuration information and the table rule file, and generating test data includes:
receiving database connection information and data volume demand information;
and reading the table rule file, and creating the database according to the database connection information, the data quantity demand information and the table rule file to generate test data.
In one embodiment, said validating call feature information from said test data and said data relationship expression comprises:
analyzing the data relation expression to obtain trigger characteristics of different objects in the object file group;
and acquiring test data generated in the current database, and determining characteristic values of calling sentences aiming at different objects according to the test data and the trigger characteristics.
According to another aspect of the present application, there is provided an apparatus for testing data and calling a sentence, including:
the preprocessing module is used for acquiring an object file group, analyzing the object file group and generating a table object file, wherein the table object file comprises a data relation expression;
the metadata generation module is used for generating a table rule file according to the table object file and a preset rule;
the count module is used for receiving count configuration information, counting the database according to the count configuration information and the table rule file, and generating test data;
the feature analysis module is used for confirming calling feature information according to the test data and the data relation expression;
and the call generation module is used for generating a corresponding call language according to the call characteristic information.
According to another aspect of the present application, there is provided a system for generating test data and call statements, the system comprising at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating test data and call statements.
According to another aspect of the present application, there is provided a non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform a method of generating test data and call statements.
The beneficial effects are that: according to the technical scheme, the table rule file is generated by analyzing the object file group, and the test data is generated according to the table rule file and the number of database structures according to the number of structures configuration information. And confirming calling characteristic information according to the test data and the data relation expression, generating a calling statement, improving the overall coverage rate of the calling statement, shortening the test time and reducing the labor cost.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for generating test data and call statements provided in accordance with an embodiment of the present application;
FIG. 2 is another flow chart of a method for generating test data and call statements provided in accordance with an embodiment of the present application;
FIG. 3 is a schematic diagram of a functional module of a test data and call statement generating device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of a system for generating test data and call statements according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a flowchart of a method for generating test data and call statements according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
s100, acquiring an object file group, analyzing the object file group, and generating a table object file, wherein the table object file comprises a data relation expression.
S200, generating a table rule file according to a preset rule according to the table object file;
s300, receiving the count configuration information, and counting the database according to the count configuration information and the table rule file to generate test data;
s400, confirming calling characteristic information according to the test data and the data relation expression;
s500, generating a corresponding call statement according to the call feature information.
In this embodiment, an effective total object file group is obtained, the object file group is automatically analyzed, a table object file containing a data relation expression is generated, a table rule file corresponding to a related table, a field and a value is generated according to a preset rule according to the generated table object file, the count configuration information input by a test developer is received, the count is generated for each branch of the object according to the count configuration information and the table rule file, test data is generated, calling feature information is confirmed according to the test data and the data relation expression, and calling sentences for different branches of different objects are automatically generated according to the calling feature information. The flow of the first analysis object logic and the data in generating the call statement is simplified, the test time is shortened, and the test coverage is improved.
Furthermore, the application aims at the data developer, performs white box analysis under the condition that an object is used in known service, such as the trigger logic SQL full code is included, directly performs weight division coverage on SQL logic, generates data which accords with the service, also includes abnormal and illegal data in the SQL grammar data development stage to a certain extent, and can generate calling sentences according to the generated data in the house money database. And the grammar and functional faults caused by call completion due to lack of sufficient data and corresponding call modes are avoided.
In one embodiment, the step S100 includes:
obtaining an object file group, preprocessing the object file group, and generating a plurality of sub-object files;
analyzing SQL grammar in each sub-object file and outputting a corresponding data relation expression;
and merging and de-duplication processing is carried out on each data relation expression according to the library table, and a corresponding table object file is generated.
In this embodiment, a table object file group is obtained, a synonym reduction is performed on the file group, a trigger in a DML (Data Manipulation Language, DML, data manipulation language) is identified, annotation is ignored, object splitting and the like are processed, a plurality of sub-object files are generated, SQL grammar (Structured Query Language ) in each sub-object file is analyzed in parallel through a plurality of extensible parsing units in the system, a corresponding data relational expression of each sub-object file is output, and the data relational expression comprises a library name, a table name, a field type, a field value, an object type and a call type. And merging and deduplicating the full relationship of each data relationship expression according to the library table (without the object type and the call type) to generate a corresponding table object file. And the manual analysis process is omitted. The labor cost is reduced.
In one embodiment, the step S200 includes:
and analyzing the table object file, and generating a table rule file with a corresponding structure by combining the data rules in the preset rule base.
In this embodiment, the rule data interface converts the table object file into rules in the data rule base and updates the rules to the table rule file. The rule data interface receives the combined and de-regenerated table object files, analyzes each table object file, processes the relational expression in the table object file by combining the data rules in the preset rule base to generate a table rule file with a corresponding structure, independently generates the table rule file containing field names of all fields, field types and data rules according to the table, and the preset rule database defines the data rules such as enumeration, random, self-increment, unique constraint and the like. The generated table rule file is a landing file, and a test developer can manually define and modify rules according to the grammar of the data rule base, so that convenience is provided for test development.
In one embodiment, the step S300 includes:
receiving database connection information and data volume demand information;
and reading the table rule file, and creating the database according to the database connection information, the data quantity demand information and the table rule file to generate test data.
In this embodiment, a table rule file generated according to a data rule base is read, database connection information and a quantity requirement input by configuration of a test developer are received, and test data are generated according to the database connection information, the quantity requirement and the number of database structures of the table rule file. By automatically analyzing the object file, the number of each branch of the object is created, and the problem of difficult number creation is effectively solved.
In one embodiment, the step S400 includes:
analyzing the data relation expression to obtain trigger characteristics of different objects in the object file group;
and acquiring test data generated in the current database, and determining characteristic values of calling sentences aiming at different objects according to the test data and the trigger characteristics.
In this embodiment, the data relational expression of each sub-object file is parsed to obtain the trigger feature corresponding to each sub-object, where the trigger feature includes a trigger SQL type and a trigger condition. And acquiring test data generated in the current database, combining the data relational expression and a direct-connection database selection mode, acquiring the characteristics and the final value of the test data, and determining the characteristic values of the calling sentences for different objects according to the characteristics and the final value of the test data and the trigger SQL type and the trigger condition of the data relational expression. The full coverage of the call statement is achieved.
Still another embodiment of the present application further provides an application flowchart of a method for generating test data and call statements, as shown in fig. 2, specifically including:
1) Obtaining an object file group, preprocessing the object file group, and generating a plurality of sub-object files;
2) Analyzing SQL grammar in each sub-object file and outputting corresponding data relation expression;
3) Merging and de-duplication processing is carried out on each data relation expression according to the library table, and a corresponding table object file is generated;
4) Analyzing the table object file, and generating a table rule file with a corresponding structure by combining data rules in a preset rule base;
5) Receiving the count configuration information, and counting the database according to the count configuration information and the table rule file to generate test data;
6) Analyzing the data relation expression to obtain trigger characteristics of different objects in the object file group;
7) Acquiring test data generated in a current database, and determining characteristic values of calling sentences aiming at different objects according to the test data and trigger characteristics;
8) And generating corresponding call sentences according to the characteristic values of the call sentences of different objects.
In the technical scheme of the embodiment of the application, the table rule file is generated by analyzing the object file group, and the test data is generated according to the table rule file and the number of database structures according to the number of structures configuration information. And confirming calling characteristic information according to the test data and the data relation expression, generating a calling statement, improving the overall coverage rate of the calling statement, shortening the test time and reducing the labor cost.
Fig. 3 is a schematic functional block diagram of a device for generating test data and call statements according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
the preprocessing module 11 is configured to obtain an object file group, analyze the object file group, and generate a table object file, where the table object file includes a data relationship expression;
a metadata generation module 12, configured to generate a table rule file according to a preset rule according to the table object file;
the count module 13 is configured to receive count configuration information, count the database according to the count configuration information and the table rule file, and generate test data;
a feature parsing module 14, configured to confirm calling feature information according to the test data and the data relational expression;
and the call generation module 15 generates a corresponding call language according to the call characteristic information.
In the technical scheme of the embodiment of the application, the table rule file is generated by analyzing the object file group, and the test data is generated according to the table rule file and the number of database structures according to the number of structures configuration information. And confirming calling characteristic information according to the test data and the data relation expression, generating a calling statement, improving the overall coverage rate of the calling statement, shortening the test time and reducing the labor cost.
In an alternative embodiment, the preprocessing module 11 may include:
the preprocessing unit is used for acquiring an object file group, preprocessing the object file group and generating a plurality of sub-object files;
the parsing unit is used for parsing the SQL grammar in each sub-object file and outputting a corresponding data relation expression;
and the data relation processing unit is used for carrying out merging and deduplication processing on each data relation expression according to the library table to generate a corresponding table object file.
In an alternative embodiment, the parsing unit comprises:
the data relationship expression includes a library name, a table name, a field type, a field value, an object type, and a call type.
In an alternative embodiment, the metadata generation module 12 is specifically configured to:
and analyzing the table object file, and generating a table rule file with a corresponding structure by combining data rules in a preset rule base, wherein the table rule file comprises field names, field types and data rules of all fields.
In an alternative embodiment, the count module 13 may include:
the receiving unit is used for receiving the database connection information and the data volume demand information;
and the count making unit is used for reading the table rule file, making the number of the database according to the database connection information, the data quantity demand information and the table rule file, and generating test data.
In an alternative embodiment, the counting unit may be specifically configured to:
analyzing the data relation expression to obtain trigger characteristics of different objects in the object file group;
and acquiring test data generated in the current database, and determining characteristic values of calling sentences aiming at different objects according to the test data and the trigger characteristics.
The device for generating the test data and the call statement provided by the embodiment of the application can execute the method for generating the test data and the call statement provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method for generating the test data and the call statement.
Another embodiment of the present application further provides a system for generating test data and call statements, as shown in fig. 4, the system 10 includes:
one or more processors 110 and a memory 120, one processor 110 being illustrated in fig. 4, the processors 110 and the memory 120 being coupled via a bus or other means, the bus coupling being illustrated in fig. 4.
Processor 110 is used to implement various control logic for system 10, which may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single-chip microcomputer, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Also, the processor 110 may be any conventional processor, microprocessor, or state machine. The processor 110 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The memory 120 is used as a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and a module, such as program instructions corresponding to the test data and the generation method of the call statement in the embodiment of the present application. Processor 110 executes various functional applications of system 10 and data processing, i.e., implements the personnel information query method in the method embodiments described above, by running non-volatile software programs, instructions, and units stored in memory 120.
Memory 120 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created from the use of system 10, etc. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 120 may optionally include memory located remotely from processor 110, which may be connected to system 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Embodiments of the present application provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, e.g., to perform the method steps S100 through S500 of fig. 1 described above.
By way of example, nonvolatile storage media can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM may be available in many forms such as Synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environments described herein are intended to comprise one or more of these and/or any other suitable types of memory.
In summary, in the method, the device, the system and the medium for generating test data and call sentences, the table rule file is generated by analyzing the object file group, and the test data is generated by constructing the database according to the table rule file and the construction number configuration information. And confirming calling characteristic information according to the test data and the data relation expression, generating a calling statement, improving the overall coverage rate of the calling statement, shortening the test time and reducing the labor cost.
Of course, those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-volatile computer readable storage medium, which when executed may comprise the steps of the above described method embodiments, to instruct related hardware (e.g., processors, controllers, etc.). The storage medium may be a memory, a magnetic disk, a floppy disk, a flash memory, an optical memory, etc.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present application are achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.
Claims (10)
1. The method for generating the test data and the call statement is characterized by comprising the following steps:
obtaining an object file group, analyzing the object file group, and generating a table object file, wherein the table object file comprises a data relation expression;
generating a table rule file according to the table object file and a preset rule;
receiving the count configuration information, and counting the database according to the count configuration information and the table rule file to generate test data;
confirming calling characteristic information according to the test data and the data relation expression;
and generating a corresponding call statement according to the call feature information.
2. The method for generating test data and call statements according to claim 1, wherein the obtaining the object file group, analyzing the object file group, and generating a table object file, wherein the table object file includes a data relation expression, includes:
obtaining an object file group, preprocessing the object file group, and generating a plurality of sub-object files;
analyzing SQL grammar in each sub-object file and outputting a corresponding data relation expression;
and merging and de-duplication processing is carried out on each data relation expression according to the library table, and a corresponding table object file is generated.
3. The method for generating test data and call statements according to claim 1 or 2, wherein the data relation expression comprises a library name, a table name, a field type, a field value, an object type, and a call type.
4. The method for generating test data and call sentences according to claim 1, wherein said generating a table rule file according to a preset rule from said table object file comprises:
and analyzing the table object file, and generating a table rule file with a corresponding structure by combining the data rules in the preset rule base.
5. The method for generating test data and call statements according to claim 4, wherein said table rule file contains field names, field types, and data rules of all fields.
6. The method for generating test data and call statements according to claim 1, wherein said receiving the count configuration information, counting the database according to the count configuration information and the table rule file, generating test data comprises:
receiving database connection information and data volume demand information;
and reading the table rule file, and creating the database according to the database connection information, the data quantity demand information and the table rule file to generate test data.
7. The method for generating test data and call statements according to claim 6, wherein said validating call feature information according to said test data and said data relational expression comprises:
analyzing the data relation expression to obtain trigger characteristics of different objects in the object file group;
and acquiring test data generated in the current database, and determining characteristic values of calling sentences aiming at different objects according to the test data and the trigger characteristics.
8. A test data and call statement generation apparatus, comprising:
the preprocessing module is used for acquiring an object file group, analyzing the object file group and generating a table object file, wherein the table object file comprises a data relation expression;
the metadata generation module is used for generating a table rule file according to the table object file and a preset rule;
the count module is used for receiving count configuration information, counting the database according to the count configuration information and the table rule file, and generating test data;
the feature analysis module is used for confirming calling feature information according to the test data and the data relation expression;
and the call generation module is used for generating corresponding call sentences according to the call characteristic information.
9. A system for generating test data and call statements, said system comprising at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating test data and call statements of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer-executable instructions which, when executed by one or more processors, cause the one or more processors to perform the method of generating test data and call statements of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310889614.9A CN116610591B (en) | 2023-07-20 | 2023-07-20 | Method, device, system and medium for generating test data and call statement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310889614.9A CN116610591B (en) | 2023-07-20 | 2023-07-20 | Method, device, system and medium for generating test data and call statement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116610591A true CN116610591A (en) | 2023-08-18 |
CN116610591B CN116610591B (en) | 2023-09-12 |
Family
ID=87683956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310889614.9A Active CN116610591B (en) | 2023-07-20 | 2023-07-20 | Method, device, system and medium for generating test data and call statement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116610591B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6219802B1 (en) * | 1998-07-06 | 2001-04-17 | Mci Communications Corporation | System for generating test data |
US20040243598A1 (en) * | 2003-03-06 | 2004-12-02 | Sleeper Dean A. | Method and system for managing database SQL statements in web based and client/server applications |
CN107480053A (en) * | 2017-07-21 | 2017-12-15 | 杭州销冠网络科技有限公司 | A kind of Software Test Data Generation Method and device |
CN110825618A (en) * | 2019-10-10 | 2020-02-21 | 重庆金融资产交易所有限责任公司 | Method and related device for generating test case |
CN115981996A (en) * | 2022-11-14 | 2023-04-18 | 卫宁健康科技集团股份有限公司 | Test data generation method, device, equipment and storage medium |
CN116431516A (en) * | 2023-04-26 | 2023-07-14 | 山东建筑大学 | Program statement selection method and system for mutation test |
-
2023
- 2023-07-20 CN CN202310889614.9A patent/CN116610591B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6219802B1 (en) * | 1998-07-06 | 2001-04-17 | Mci Communications Corporation | System for generating test data |
US20040243598A1 (en) * | 2003-03-06 | 2004-12-02 | Sleeper Dean A. | Method and system for managing database SQL statements in web based and client/server applications |
CN107480053A (en) * | 2017-07-21 | 2017-12-15 | 杭州销冠网络科技有限公司 | A kind of Software Test Data Generation Method and device |
CN110825618A (en) * | 2019-10-10 | 2020-02-21 | 重庆金融资产交易所有限责任公司 | Method and related device for generating test case |
CN115981996A (en) * | 2022-11-14 | 2023-04-18 | 卫宁健康科技集团股份有限公司 | Test data generation method, device, equipment and storage medium |
CN116431516A (en) * | 2023-04-26 | 2023-07-14 | 山东建筑大学 | Program statement selection method and system for mutation test |
Non-Patent Citations (2)
Title |
---|
VASANTH KUMAR KUNITALA: "Macros Development for Create the Reusable Programs and Generate Customize Result in Clinical Data Reporting", JOURNAL OF SCIENTIFIC RESEARCH AND REPORTS, vol. 2, no. 2, pages 719 - 740 * |
刘红;范青刚;: "一种基于Oracle的数据存储优化方法", 软件导刊, no. 02, pages 164 - 166 * |
Also Published As
Publication number | Publication date |
---|---|
CN116610591B (en) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107704265B (en) | Configurable rule generation method for service flow | |
AU2018272840B2 (en) | Automated dependency analyzer for heterogeneously programmed data processing system | |
CN107644323B (en) | Intelligent auditing system for business flow | |
WO2020233330A1 (en) | Batch testing method, apparatus, and computer-readable storage medium | |
CN107665216B (en) | Database access method and middleware | |
CN108197306A (en) | SQL statement processing method, device, computer equipment and storage medium | |
CN110209650A (en) | The regular moving method of data, device, computer equipment and storage medium | |
CN106293891B (en) | Multidimensional investment index monitoring method | |
CN116560642A (en) | Code generation method and device, electronic equipment and storage medium | |
CN113204571A (en) | SQL execution method and device related to write-in operation and storage medium | |
CN108766507A (en) | A kind of clinical quality index calculating method based on CQL Yu standard information model openEHR | |
CN114489950A (en) | Component adapting method and device, electronic equipment and storage medium | |
CN116610591B (en) | Method, device, system and medium for generating test data and call statement | |
US7716646B2 (en) | Loading a chain of processors from an XML file | |
CN109857390B (en) | Annotation transmission method of Git warehouse file annotation system | |
CN114385145A (en) | Web system back-end architecture design method and computer equipment | |
CN108920749B (en) | Pipeline two-dimensional and three-dimensional data updating method and device and computer readable storage medium | |
CN114358596A (en) | Index calculation method and device | |
CN105354144A (en) | Method and system for automatically testing consistency of business support system information models | |
WO2019153547A1 (en) | Database operation method, apparatus and device, and computer-readable storage medium | |
CN109766266A (en) | Testing tool selection method, device, computer installation and readable storage medium storing program for executing | |
CN111221846B (en) | Automatic translation method and device for SQL sentences | |
CN114416104B (en) | Structured data file processing method and device | |
CN111324434B (en) | Configuration method, device and execution system of computing task | |
CN117950711A (en) | Data processing method and device of database program and server |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |