Test data generation method and device, equipment and storage medium
By responding to the test data generation instructions of the operation and maintenance platform, determining the data category and selecting the appropriate generation method, the problem of difficulty in preparing test data of the operation and maintenance platform is solved, and automated generation and efficient testing of test data are realized.
Patent Information
- Application Number
- CN202411743700.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-03-11
AI Technical Summary
It is difficult to prepare test data of operation and maintenance platforms, resulting in inefficient testing.
By responding to the test data generation instructions of the operation and maintenance platform, the data category is determined based on the data information to be generated, and the conditions are determined based on the preset generation method, the appropriate generation method is determined, and the required test data is finally generated.
It realizes the automatic generation of test data of operation and maintenance platforms, improves testing efficiency, reduces labor costs, and solves the problem of long processing time of production data application process.
Smart Images

Figure CN119597669A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a test data generation method, device, equipment and storage medium. Background Art
[0002] With the rapid development of enterprise informatization and networking, there is a demand for efficient, stable and secure operations. In addition, as the scale of enterprise business continues to expand and the amount of data increases dramatically, traditional operation and maintenance methods can no longer meet the needs of enterprises, and operation and maintenance platforms have emerged.
[0003] The operation and maintenance platform refers to the operation and maintenance management system of applications, networks, systems, environmental equipment, etc., which provides monitoring, operation, configuration, management and other functions for the operation and maintenance objects to help users efficiently manage and operate application systems and infrastructure. The operation and maintenance platform integrates automation tools and technologies to achieve automated and intelligent configuration management, application deployment, infrastructure changes, monitoring and alarming, backup and recovery, disaster recovery drills, emergency response and other operation and maintenance tasks, providing a basis for reducing manual intervention and improving operation and maintenance efficiency and quality.
[0004] Adequate functional testing and verification of the operation and maintenance platform helps to ensure the reliable implementation of the operation and maintenance platform functions. Therefore, how to configure the test data of the operation and maintenance platform has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0005] In view of the above problems, the present application provides a test data generation method, apparatus, device and storage medium to realize the task of generating test data for an operation and maintenance platform.
[0006] The specific plan is as follows:
[0007] The first aspect of the present application provides a test data generation method, comprising:
[0008] In response to the test data generation instruction of the operation and maintenance platform, determine the data to be generated based on the data information to be generated and determine the test data category to which the data to be generated belongs; the test data category includes a transaction category, a monitoring indicator category, or a managed resource category;
[0009] Determine the generation method corresponding to the data to be generated according to the generation method corresponding to the preset test data category;
[0010] Generate the data to be generated according to the determined generation method of the data to be generated;
[0011] The process of determining the generation method corresponding to the data to be generated according to the generation method corresponding to the preset test data category includes:
[0012] In the case that the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, determining that the data to be generated is generated by arranging the preceding transaction interface in a manner of simulating transaction execution; if the preceding transaction interface is not available, determining that the data to be generated is generated by calling a preconfigured transaction data generation program;
[0013] In the case that the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform through a message, then it is determined that the generation method of the data to be generated is generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, then it is determined that the generation method of the data to be generated is generated by calling an indicator data generation program configured based on the Python language or the Java language;
[0014] In a case where the test data category to which the data to be generated belongs is a managed resource category, the method for generating the data to be generated is determined to be generating by calling a resource data generation program configured based on Python language or Java language.
[0015] A second aspect of the present application provides a test data generating device, comprising:
[0016] A generation method determination unit is used to respond to the test data generation instruction of the operation and maintenance platform, determine the data to be generated based on the data information to be generated and determine the test data category to which the data to be generated belongs; the test data category includes a transaction category, a monitoring indicator category or a managed resource category; according to the generation method determination conditions corresponding to the pre-set test data category, determine the generation method corresponding to the data to be generated; wherein, the process in which the generation method determination unit determines the generation method corresponding to the data to be generated according to the generation method determination conditions corresponding to the pre-set test data category may include: in the case that the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, then determine that the generation method of the data to be generated is generated by arranging the preceding transaction interface to simulate transaction execution; if it does not have Preamble transaction interface, it is determined that the data to be generated is generated by calling a preconfigured transaction data generation program; in the case where the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform through a message, it is determined that the data to be generated is generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, it is determined that the data to be generated is generated by calling an indicator data generation program configured based on Python language or Java language; in the case where the test data category to which the data to be generated belongs is a managed resource category, it is determined that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language;
[0017] The test data generating unit is used to generate the data to be generated according to the determined generation method of the data to be generated.
[0018] A third aspect of the present application provides a test data generating device, comprising at least one processor and a memory connected to the processor, wherein:
[0019] The memory is used to store computer programs;
[0020] The processor is used to execute the computer program to implement the test data generating method of the first aspect.
[0021] A fourth aspect of the present application provides a storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can perform the test data generation method of the first aspect.
[0022] By means of the above technical scheme, the present application first responds to the test data generation instruction of the operation and maintenance platform, determines the data to be generated and the test data category to which it belongs based on the information of the data to be generated, which can be specifically a transaction category, a monitoring indicator category or a managed resource category; then determines the conditions according to the generation method corresponding to the pre-set test data category, determines the generation method corresponding to the data category and data characteristics to which the data to be generated belongs, and finally generates the data to be generated according to the determined generation method, which solves the problem of difficulty in preparing test data for the operation and maintenance platform and provides a basis for improving the testing efficiency of the operation and maintenance platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0024] Figure 1 is a flow chart of a test data generating method according to an embodiment of the present application;
[0025] Figure 2 The schematic diagram of the process of generating the data to be generated of the transaction class is illustrated;
[0026] Figure 3 The schematic diagram of the generation process of the data to be generated of the monitoring indicator class is illustrated;
[0027] Figure 4 This example shows the schematic diagram of the process of generating the data to be generated for the managed resource class;
[0028] Figure 5 A schematic diagram of the structure of a test data generating device provided in this application;
[0029] Figure 6 A schematic diagram of the structure of a test data generating device provided in this application. DETAILED DESCRIPTION
[0030] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0031] First, the operation and maintenance platform described in this application is explained.
[0032] According to the different operation and maintenance objects, the operation and maintenance platforms can include application operation and maintenance platforms and infrastructure operation and maintenance platforms. Among them, application operation and maintenance refers to the production operation and maintenance operations such as application system monitoring, application deployment and commissioning, production emergency operation, health check, etc. of the application system. Application operation and maintenance is mainly used for monitoring and alarming, configuration, application deployment, emergency operation, service disaster recovery, data backup and other tasks of the application system. It monitors the operation and operation data in real time in the form of logs, indicators, and events, and provides indicator monitoring such as transaction volume, success rate, response time, and monitoring and alarming such as log keywords, simulated transactions, and error codes; infrastructure operation and maintenance refers to the production operation and maintenance operations such as monitoring, operation, configuration, and emergency of infrastructure resources such as equipment, systems, networks, and environments. Infrastructure operation and maintenance is mainly used to manage and maintain the basic technical facilities of the enterprise, ensure the normal operation and stability of these facilities, and provide infrastructure monitoring and alarming, infrastructure changes, disaster recovery drill switching, emergency operation and other services. In addition, the scope of infrastructure operation and maintenance is very broad, which can include data centers, networks, servers, storage, security and other aspects. Specifically, the work content of infrastructure operation and maintenance includes but is not limited to:
[0033] 1. Environmental operation and maintenance: manage and maintain various basic equipment of the enterprise, including high and low voltage power distribution systems, UPS power supplies, air conditioning systems, fire protection systems, lightning protection and grounding systems, etc. At the same time, monitor and maintain hardware equipment such as servers, storage devices, network equipment, etc. in the data center to ensure stable operation of the equipment;
[0034] 2. Network operation and maintenance: manage and maintain the enterprise's network system, including local area network, wide area network, Internet access, etc., so that network operation and maintenance personnel can monitor the status of network facilities, handle network failures, and optimize network performance, thereby ensuring the security and stability of the network;
[0035] 3. Server operation and maintenance: manage and maintain the company's server equipment, including physical servers and virtual machines, etc.; server operation and maintenance personnel monitor the operating status of the server, handle server failures, perform performance optimization and capacity planning, so as to ensure that the server can meet business needs;
[0036] 4. Storage operation and maintenance: manage and maintain the company's storage devices, including disk arrays, tape libraries, backup devices, etc.; storage operation and maintenance personnel monitor the status of equipment and manage storage resources to ensure data security and availability;
[0037] 5. Security Operation and Maintenance: Manage and maintain the enterprise's information security system, including firewalls, intrusion monitoring, data encryption, etc.; so that security operation and maintenance personnel can monitor the status of security equipment and handle security incidents, thereby improving the enterprise's information security level;
[0038] 6. System operation and maintenance: manage and maintain the company's operating system, middleware, container cloud, database and other technology stacks; so that system operation and maintenance personnel can monitor the use of operating systems, databases, cloud storage, etc., and respond to changes in demand in a timely manner, thereby ensuring stable operation at the system level.
[0039] In combination with the above content, the applicant in this case found through analysis that the business attributes of operation and maintenance platforms are usually different from those of conventional business systems and other management systems. The test data of operation and maintenance platforms are different from the test data of conventional business systems and have certain particularities. For example, the test objects and data of operation and maintenance platforms, especially infrastructure operation and maintenance platforms, are mainly infrastructure resources and data generated by interactions with them. In other words, in addition to the common transaction data of other business systems and management systems, the test data of operation and maintenance platforms also includes other types of data, so when configuring the test data of operation and maintenance platforms, it is necessary to configure according to specific circumstances, such as how to trigger network alarms, prepare continuous performance indicator data, generate continuous full-link data, simulate a large number of virtual IP reports, etc., which makes the preparation of test data for operation and maintenance platforms more difficult.
[0040] The present application provides a test data generation method, apparatus, device and storage medium, which can be used to achieve the purpose of configuring three-dimensional test data for operation and maintenance platform testing and solve the problem of difficulty in preparing test data for operation and maintenance platform testing.
[0041] Figure 1 1 is a flow chart of a method for generating test data according to an embodiment of the present application. Figure 1 As shown, the method may include the following steps S101-S103:
[0042] Step S101 : responding to a test data generation instruction of an operation and maintenance platform, determining data to be generated based on information about data to be generated and determining a test data category to which the data to be generated belongs.
[0043] Among them, this application divides the operation and maintenance platform test data into three categories of data according to the test data characteristics in different scenarios of the operation and maintenance platform, that is, the test data categories described in this application may include transaction category, monitoring indicator category or managed resource category. Specifically, transaction data may refer to data generated by transactions, such as alarm rules entered into the monitoring platform, configured monitoring policy data, newly added and modified orchestration scenarios and script data on the operating platform, etc. Transaction data is generally stored in relational databases; monitoring indicator data may refer to various indicator data used to monitor applications and infrastructure, such as cpu, memory, io, process reads, disk reads, file handles, UDP connections, physical network card status, running queue processes, port status, etc. Most of this type of indicator data is direct data sent by access hardware devices, access virtual machines, and access systems, or basic data collected through proxy scripts. Some of it is non-basic data obtained after system calculation and processing of basic data, and is generally stored in non-relational databases; managed resource data may refer to various types of resource data managed by the operation and maintenance platform, such as switches, network cards, routers and other network devices of various models, F5 devices, various types of virtual machines, operating systems, database resources, etc. Resource data generally has specific resource objects that collect relevant resource data through agents.
[0044] Step S102: determining conditions according to a generation method corresponding to a preset test data category, and determining a generation method corresponding to the data to be generated.
[0045] It should be noted that test data of various test data categories can be generated by test data generation methods corresponding to the test data categories; and a single test data category may correspond to multiple generation methods, and a specific generation method can be determined based on the data characteristics of the test data category to optimize the test data generation efficiency. The above step S102 can be called executing the generation method determination process corresponding to the test data category to which the data to be generated belongs, which can specifically include:
[0046] Step S21: when the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, determining that the data to be generated is generated by arranging the preceding transaction interface in a manner of simulating transaction execution; if the data to be generated does not have a preceding transaction interface, determining that the data to be generated is generated by calling a preconfigured transaction data generation program;
[0047] Step S22: in the case where the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform through a message, then the generation method of the data to be generated is determined to be generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, then the generation method of the data to be generated is determined to be generated by calling an indicator data generation program configured based on the Python language or the Java language;
[0048] Step S23: When the test data category to which the data to be generated belongs is a managed resource category, determine that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language.
[0049] Next, the test data categories are explained one by one.
[0050] For transaction-type data to be generated, it is possible to first determine whether the required test data (i.e., data to be generated) has a preceding transaction. If so, it is possible to determine whether the preceding transaction has a corresponding interface, so as to determine whether the preceding transaction has the preceding transaction interface. In the case where the data to be generated has a preceding transaction interface, it is possible to determine that the data to be generated is generated by arranging the preceding transaction interface to simulate transaction execution. In the case where the data to be generated does not have a preceding transaction interface, it is possible to determine that the data to be generated is generated by calling a transaction data generation program. Combined with the feature that the transaction-type data to be generated is stored in a database, the above-mentioned transaction data generation program can be used to insert data into the database, so as to achieve the task of generating transaction-type test data.
[0051] For the data to be generated of the monitoring indicator class, the actual generation method determination conditions corresponding to the monitoring indicator class can be set based on the generation method of the monitoring indicator class test data. Specifically, it is possible to first determine whether the required test data (i.e., the data to be generated) is generated by a specific access device (such as a network device, a storage device, etc.) to distinguish between direct indicator data and basic indicator data, and then determine whether the direct indicator data is sent through a message, that is, determine whether the direct indicator data can be generated through a simulated message, and determine whether the basic indicator data (also referred to as indirect indicator data) is calculated by this platform or this system. Based on this, when the data to be generated is the direct indicator data of the monitoring indicator class and is sent to the operation and maintenance platform through a message, it is determined that the data to be generated is generated by sending a simulated message. When the data to be generated is the basic indicator data of the monitoring indicator class and is calculated by this platform, it is determined that the data to be generated is generated by calling an indicator data generation program configured based on the Python language or the Java language. It should be noted that test data suitable for certain scenarios, such as monitoring indicator data that cannot be generated through simulated messages or cannot be generated by calling a generation program, can be configured manually. In this case, indication information can be output to indicate the manual configuration of the data to be generated.
[0052] For the data to be generated of managed resource types, the data to be generated can be generated by calling a resource data generation program configured based on Python or Java language to solve the problems of large and complex managed resource data and limited resources managed in the test environment.
[0053] Step S103: Generate the data to be generated according to the determined method for generating the data to be generated.
[0054] This embodiment first responds to the test data generation instruction of the operation and maintenance platform, determines the data to be generated and the test data category to which it belongs based on the information of the data to be generated, which can be specifically a transaction category, a monitoring indicator category or a managed resource category; then determines the conditions according to the generation method corresponding to the pre-set test data category, determines the generation method corresponding to the data category and data characteristics to which the data to be generated belongs, and finally generates the data to be generated according to the determined generation method.
[0055] This embodiment determines the corresponding test data generation method based on the test data category to which the data to be generated belongs and the data characteristics of the corresponding category, which provides a basis for realizing targeted test data preparation tasks and improving test efficiency; compared with the solution of manually generating all test data, this application generates test data by calling programs or interfaces, etc., which saves labor costs to a certain extent and improves test data generation efficiency, and various pre-configured programs can be reused or modified and reused, which can solve the problems of long processing time of production data application process to a certain extent, so as to improve test efficiency; in addition, by calling pre-configured programs, such as python scripts or Java programs, to generate test data, the automatic generation task of test data is realized, thereby meeting the real-time data requirements during testing. Compared with the solution of generating test data by calling pre-configured programs, this application utilizes transaction interfaces and message tools, etc., so that there is no need to pre-configure test data generation programs in various test scenarios by manual or other means, saving program configuration workload and reducing test data generation costs. Based on this, the test data generation solution provided by this embodiment solves the problem of difficult test data preparation for operation and maintenance platforms, and provides a basis for improving the test efficiency of operation and maintenance platforms.
[0056] In one or more embodiments provided in the present application, when the determined method for generating the data to be generated is to generate the data by arranging the preceding transaction interface in a manner of simulating transaction execution, the above step S103, generating the data to be generated according to the determined method for generating the data to be generated, may include the following steps AB:
[0057] Step A: obtaining a pre-configured simulated transaction script corresponding to the data type of the data to be generated.
[0058] The simulated transaction script may include an interface test tool script or a Python script, which can be used to implement the arrangement and execution of previous transactions to simulate the execution of previous transactions to generate the required test data. The following describes two scripts used to implement transaction simulation.
[0059] The interface testing tool script can be configured based on the interface information of each interface involved in the previous transaction interface and the arrangement sequence represented by the front-to-back association relationship between the interfaces involved. Exemplarily, the interface testing tool can be configured according to the following steps:
[0060] The first step is to obtain interface information, such as request URL, request type, request input parameters, etc.
[0061] Step 2: Determine the arrangement order based on the relationship between the interfaces.
[0062] Step 3: Configure the interface test tool script according to the interface information and arrangement order.
[0063] The Python script can be configured based on the interface generation method of the previous transaction interface. Exemplarily, the Python script can be configured according to the following steps:
[0064] The first step is to determine the data requirements, that is, the interface generation method;
[0065] Step 2: Determine the implementation method;
[0066] The third step is to encode according to the interface generation method and the determined implementation method to obtain a Python script.
[0067] Step B: calling the obtained simulated transaction script to simulate the execution of the preceding transaction corresponding to the data to be generated, and obtaining the execution result of the simulated transaction script to generate the data to be generated.
[0068] In one or more embodiments provided in the present application, the above-mentioned method of determining that the data to be generated is generated by calling a preconfigured transaction data generation program may include the following steps CE:
[0069] Step C: Determine the type of database that stores the data to be generated.
[0070] If the determined database type is relational, execute step D; if the determined database type is non-relational, execute step E.
[0071] Step D: Determine that the data to be generated is generated by calling a transaction data generation program configured based on a SQL statement.
[0072] Step E: Determine that the data to be generated is generated by calling a transaction data generation program configured based on Python language or Java language.
[0073] It should be noted that the transaction data generation program configured based on Python language or Java language can also be called a python script or java program for generating transaction data. This method can correspond to the situation where the previous transaction interface generation method and the SQL statement insertion method cannot generate test data, such as the scenario where there is no previous transaction interface and the required test data is not stored in a relational database in a certain format.
[0074] In one or more embodiments provided in the present application, when the method for generating the data to be generated is determined to be generated by calling a transaction data generation program configured based on a SQL statement, the above step S103, generating the data to be generated according to the determined method for generating the data to be generated, may include the following steps FG:
[0075] Step F: Obtain a pre-configured SQL statement corresponding to the data type of the data to be generated.
[0076] Specifically, when the data table storing the data to be generated is a single table, the acquired SQL statement may be a table data insertion SQL statement configured based on pre-configured table insertion data of the single table. Exemplarily, the process of configuring the SQL statement for implementing single table data insertion may include:
[0077] The first step is to insert data into the configuration table;
[0078] The second step is to insert the configuration table data into the SQL statement for execution.
[0079] In the case where the data table storing the data to be generated is a plurality of tables, the acquired SQL statement is a table data insertion SQL statement configured based on pre-configured table insertion data of the plurality of tables, wherein the table insertion data of the plurality of tables is configured based on the association relationship of the plurality of tables. Exemplarily, the process of configuring the SQL statement for implementing the insertion of the plurality of table data may include:
[0080] The first step is to determine the relationship between multiple tables and configure each table to insert data;
[0081] The second step is to insert the configuration table data into the SQL statement for execution.
[0082] Step G: Execute the acquired SQL statement to insert data into the database to generate the data to be generated.
[0083] In one or more embodiments provided in the present application, when it is determined that the data to be generated is generated by calling a transaction data generation program configured based on Python language or Java language, generating the data to be generated according to the determined generation method of the data to be generated may include the following steps HI:
[0084] Step H: Obtain a pre-configured Python script or Java program corresponding to the data type of the data to be generated.
[0085] The obtained Python script or Java program can be configured based on the data format corresponding to the data to be generated. Exemplarily, the configuration process of the Python script or Java program may include the following steps:
[0086] The first step is to determine the data flow;
[0087] The second step is to determine the format of written data and the value and function of the data;
[0088] Step 3: Determine the implementation method;
[0089] Step 4: Encode and debug according to the determined data flow, written data format, implementation method, etc. to obtain a Python script or Java program for generating transaction test data.
[0090] Step I: execute the obtained Python script or Java program to generate the data to be generated.
[0091] On the basis of the above, Figure 2 This example shows the process of generating the transaction data to be generated. Figure 2 As shown, when it is determined that the data to be generated belongs to transaction data, first determine whether it can be generated through a previous transaction; if it can be generated through a previous transaction, determine whether the previous transaction has a corresponding interface. If it has a corresponding interface, automatically generate the required data by simulating the interface transaction through an interface testing tool or a Python script; if it cannot be generated through a previous transaction, determine whether it can be generated through a SQL statement; if it can be generated through a SQL statement, write the SQL statement into the database table to generate the required data; if it does not have a corresponding interface, or cannot be generated through a SQL statement, determine whether it can be generated by writing a Python script; if it can be generated by writing a Python script, automatically generate the required data or generate basic data by writing a Python script so as to obtain the required data through calculation; if it cannot be generated by writing a Python script, determine whether it can be generated by introducing a jar package to write a Java program. If so, automatically generate the required data by introducing a specific jar package to write a Java program. If not, generate the required data manually. For example, it can be generated by manually doing transactions. For test data that cannot be inserted into this system or generated by doing transactions, it can be generated by contacting the upstream system for assistance.
[0092] The following is an example of a test data generation scenario for configuring a batch of work order data with different approval levels for subsequent work order processing test tasks to illustrate the generation scheme of transaction data provided by this application. In this scenario, the data to be generated is the approved work order data, which is data created and circulated by a process. There is a previous transaction interface approval work order. Based on this, combined with Figure 2 As shown, the data can be automatically generated through the previous transaction interface, which can be achieved by simulating the previous transaction interface through an interface testing tool or a python script. Taking the implementation through a python script as an example, the specific steps are as follows:
[0093] The first step is to determine the data requirements, that is, the interface generation method: use Python scripts to realize the work order data approved at different approval levels, and the previous interface is the approval work order;
[0094] Step 2: Determine the implementation method: first query the qualified pending approval work order data and return the parameters required by the approval interface, and then set up different levels of approval interface implementation according to different approval levels;
[0095] The third step is coding: obtain the work order data to be approved and the first-level approval and second-level approval interfaces respectively. The approval interface realizes different levels of approval by passing in different approval users to generate work order data approved at different approval levels.
[0096] In one or more embodiments provided in the present application, when it is determined that the method for generating the data to be generated is to generate the data by simulating message sending, the above step S103, generating the data to be generated according to the determined method for generating the data to be generated, may include the following steps JL:
[0097] Step J: Obtain a pre-configured message corresponding to the data to be generated.
[0098] The message content of the pre-configured message is configured based on the actual message format corresponding to the data to be generated. In a possible implementation, the data to be generated of the monitoring indicator class can be sent via a socket message or an SNMP trap message, and the test data of this type of monitoring indicator class can be generated by a message sending tool. For a socket message, the message configuration can be achieved by determining the message format and editing the message content; for an SNMP trap message, the message configuration can be achieved by determining the message format, editing the message content, and configuring the data in the SNMP Trap message sending tool.
[0099] Step K: determine the receiving end address corresponding to the data to be generated.
[0100] Step L: calling a message sending tool to send the pre-configured message to the receiving end address to generate the data to be generated.
[0101] In one or more embodiments provided in the present application, when the determined generation method of the data to be generated is to generate the data by calling an indicator data generation program configured based on the Python language or the Java language, the above-mentioned step S103, generating the data to be generated according to the determined generation method of the data to be generated, may include referring to the above-mentioned step HI.
[0102] Exemplarily, the configuration process of the Python script for generating monitoring indicator data generated by this system may include the following steps:
[0103] The first step is to determine the data flow;
[0104] The second step is to determine the format of written data and the value and function of the data;
[0105] Step 3: Determine the implementation method;
[0106] Step 4: Encode and debug according to the determined data flow, writing data format, implementation method, etc. to obtain a Python script for generating monitoring indicator test data.
[0107] It should be noted that Python scripts have the advantages of being flexible and convenient to use and having relatively low implementation costs. Based on this, Python scripts can be configured first when configuring the test data generation program.
[0108] Similarly, the configuration process of the Java program used to generate the monitoring indicator data generated by this system may include the following steps:
[0109] The first step is to determine the data flow;
[0110] The second step is to determine the format of written data and the value and function of the data;
[0111] Step 3: Determine the implementation method;
[0112] Step 4: Encode and debug according to the determined data flow, written data format, implementation method, etc. to obtain a Java program for generating monitoring indicator test data.
[0113] It should be noted that in some scenarios, Python scripts are difficult to implement. Based on this, you can introduce specific jar packages and configure java programs to achieve the task of generating monitoring indicator test data.
[0114] On the basis of the above, Figure 3This example shows the generation process of the data to be generated for the monitoring indicator class. Figure 3 As shown, when it is determined that the data to be generated belongs to the monitoring indicator type data, first determine whether the data to be generated is generated by a specific device; if not generated by a specific device, determine whether it is generated by calculation by this system; if not generated by calculation by this system or generated by a specific device, determine whether it can be generated by a simulated message, if it can be generated by a simulated message, generate the data to be generated by a simulated message sending tool; if it is generated by calculation by this system, determine whether it can be generated by writing a Python script; if it can be generated by writing a Python script, automatically generate the required data by writing a Python script or generate basic data so as to obtain the required data by calculation; if it cannot be generated by writing a Python script, determine whether it can be generated by writing a Java program by introducing a jar package, if it can be generated by writing a Java program, automatically generate the required data by introducing a specific jar package to write a Java program, if it cannot be generated by writing a Java program, generate the required data manually, for example, it can be generated by manual transactions.
[0115] The following takes the test data generation scenario of configuring full-link monitoring indicator monitoring for subsequent full-link view test tasks as an example to illustrate the generation scheme of transaction data provided by this application. In this scenario, the data to be generated is full-link monitoring indicator data, that is, a series of link data that the application connected to the monitoring system collects and associates the monitoring indicator data of transaction link nodes through program embedding. The data format of each link node is basically fixed, and the link nodes are associated with each other through a parent-child relationship. In other words, the generation process of full-link monitoring indicator data is relatively complicated and cannot be obtained by sending messages. Combined with Figure 3 As shown in the figure, the data can be generated by calling a python script to solve the problem of lack of real access system link data in the test environment. The specific steps to generate full-link monitoring indicator data through a python script are as follows:
[0116] Step 1: Determine the data flow: Based on the link data relationship, determine that the parent link information and child link information can be sent through the socket and then generate the link relationship by associating the traceId (link id) field;
[0117] Step 2: Determine the format of written data, data value and function: the parent link node format contains fields such as traceId (link id), id (node id), span_appcode (application code), ipv4 (node ip), etc. The child link node associates the parent node through parentId (parent node) to establish a link relationship;
[0118] Step 3: Determine the implementation method: Based on the link data relationship and data format, determine that the parent link information and child link information can be sent through the socket and then the link relationship can be generated by associating the traceId (link id) field. In this way, the parent link data generation, child link data generation and automatic generation method can be implemented through Python scripts to achieve the purpose of automatically generating link data throughout the day;
[0119] Step 4: Encode and debug according to the determined data flow, writing data format, implementation method, etc. to obtain a Python script for generating monitoring indicator test data.
[0120] On the basis of the above, when generating the data to be generated, the parent link data generation method is first called. After the method is called successfully, the traceId is written into the fatherTraceId.txt document for subsequent child link diagram method calls; then the child method is called according to the traceId source, and the traceId is used as a user-input variable. When the user knows the traceId of the parent link diagram, the child link diagram can be appended to the parent link diagram. If the user does not manually assign the traceId, the method will obtain the method recorded by the last call to the parent link diagram from the fatherTraceId.txt document, and assign it to the child link diagram, finally realizing the task of multi-level progressive generation of test data from parent to child. In addition, due to the restrictions of the test environment on the UDP interface, executing one or two items separately may result in failure to create a full-link diagram due to direct interception. To solve this problem, you can configure an all-day automated full-link view number creation method. Calling this method will obtain the "time-consuming" parameter from the father_parameter_duration.txt file, and then call the parent + child link diagram method every 5 minutes, and print out the execution time of the method, so as to achieve all-weather calling of UDP interface batch number creation. On this basis, after the parent and child full-link data are successfully sent to the UDP interface, a complete link view can be generated to implement the test task of the link view display function.
[0121] In one or more embodiments provided in the present application, before determining that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language, step MN may also be included:
[0122] Step M, determine whether the resources managed by the operation and maintenance platform meet the requirements of the test tasks based on the data to be generated; if so, execute step N; if not, execute the step of determining that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language.
[0123] Step N: Determine that the method for generating the data to be generated is to generate the data by operating the resources corresponding to the data to be generated that are managed by the operation and maintenance platform.
[0124] It should be noted that in scenarios where the test has less demand for resource data, the corresponding resource data can be obtained through the resources managed by the platform. The specific process may include: sending an operation permission application request, installing and starting the collection agent, and then operating the corresponding resources to generate the required data. Optionally, when the existing resources are insufficient, a resource application request can be sent before sending an operation permission application request.
[0125] In one or more embodiments provided in the present application, when it is determined that the generation method of the data to be generated is generated by calling a resource data generation program configured based on the Python language or the Java language, the above-mentioned step S103, generating the data to be generated according to the determined generation method of the data to be generated, may include referring to the above-mentioned step HI.
[0126] Exemplarily, the configuration process of a Python script or Java program for generating resource class test data may include the following steps:
[0127] The first step is to determine the data format of managed resource data;
[0128] Step 2: Determine the implementation method;
[0129] The third step is to encode and debug according to the determined data format and implementation method to obtain a Python script or Java program for generating test data for managed resources.
[0130] Based on this, by writing Python scripts or Java programs to simulate the test data of managed resources, it can be applied to performance stress testing, scenarios that require large quantities of resource data, or scenarios where there are no corresponding test resources and resource data needs to be simulated.
[0131] In addition, when the resources managed by the platform do not include the resource types required for testing, you can first determine whether you can simulate the reporting of the required resources by writing a program. If not, you can submit a work order to the resource management department to apply for resources and manage them, and then generate test data from the managed resources.
[0132] On the basis of the above, Figure 4 This example shows the process of generating data to be generated for managed resource classes. Figure 4As shown, when it is determined that the data to be generated belongs to the managed resource type data, first determine whether the resources managed by the platform have the resources corresponding to the data to be generated. If such resources are available, generate the corresponding resource data through the managed resources; if such resources are not available, determine whether the resource data can be simulated through a program; if the resource data can be simulated through a program, simulate the resource data through a Python script or a Java program; if the resource data cannot be simulated through a program, apply for the test resources required for the management of the operation and maintenance platform, and generate the corresponding resource data through the managed resources.
[0133] For example, in a test scenario where the test automation script executes the performance of a target server in batches through a procurement control agent, the test environment needs to manage a large number of servers with different operating systems installed. Since performance stress testing requires a large number of server resources with different operating systems installed, it is impossible to apply for tens of thousands of server resources in the test environment to implement stress testing. Based on this, combined with Figure 4 As shown, the resource data can be generated by Python script. The specific steps to implement the reporting of the IP resources of the acquisition and control agent virtual server through Python script are as follows:
[0134] Step 1: Determine the data format of managed resource data: The acquisition and control agent deployed on the application server reports the server IP, network domain, agent status, host name, operating system, CPU architecture, installation directory and other information. The reported information is encrypted by the encryption program and stored in the tdsql database table ant_lss.
[0135] Step 2: Determine the implementation method: simulate the reported IP address by inputting the IP address segment, and use IP+localhost as the host name. Other parameters are read from the configuration file. The Python script implements IP address segment parsing, MD5 encryption, object construction, and running to generate data.
[0136] The third step is to encode and debug according to the determined data format and implementation method to obtain a Python script or Java program for generating test data for managed resources.
[0137] The file classification involved in the design structure of the simulated virtual IP reporting script can include: auto.py, which is the script body, storing all executable functions of the script; config.yaml, which is used to store fixed input parameters; db.json, which is used to store the virtual IP segments that need to be uploaded. Among them, the main method of the auto.py script is executed in the foreground by default, and the method will finally call the Runner method in framework.runner (third-party library); config.yaml is a fixed parameter configuration document, in which apikey is the apikey of the current environment, network_domain is the network domain for simulated resource reporting, platform_url is the tenant access url, Tenantid is the tenant id, and Upstream is the ant-nigix access address.
[0138] Based on the above content, in the case where it is determined that the generation method of the data to be generated is to generate by calling a data generation program configured based on Python language or Java language (specifically, it may be a transaction data generation program, an indicator data generation program, or a resource data generation program), generating the data to be generated according to the determined generation method of the data to be generated may include: obtaining a pre-configured Python script or Java program corresponding to the data type of the data to be generated, the obtained Python script or Java program being obtained based on the data format configuration corresponding to the data to be generated; and executing the obtained Python script or Java program to generate the data to be generated.
[0139] This application provides test data generation solutions for transaction types, monitoring indicators, and managed resources, providing a basis for helping operation and maintenance platform testers to prepare test data in a targeted manner and improve test efficiency. In addition, compared with the solution that can only solve some historical static data needs after desensitizing production data and importing it into the test environment, the python script or Java program configured in this application for implementing the task of automatically generating test data can solve the real-time data needs of the test; the script program can be reused or modified and reused, which to a certain extent solves the problems of long processing time for applying for resource equipment and managing it in the test environment, and applying for production data, which helps to improve test efficiency.
[0140] The test data generating device provided in an embodiment of the present application is described below. The test data generating device described below and the test data generating method described above can refer to each other.
[0141] Figure 5 Schematic diagram of the structure of a test data generating device disclosed in an embodiment of the present application. Figure 5 As shown, the device may include:
[0142] A generation method determination unit 51 is used to respond to the test data generation instruction of the operation and maintenance platform, determine the data to be generated based on the data information to be generated and determine the test data category to which the data to be generated belongs; the test data category includes a transaction category, a monitoring indicator category or a managed resource category; according to the generation method determination condition corresponding to the pre-set test data category, determine the generation method corresponding to the data to be generated; wherein, the process in which the generation method determination unit determines the generation method corresponding to the data to be generated according to the pre-set test data category The determination condition may include: when the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, then determine that the generation method of the data to be generated is generated by arranging the preceding transaction interface in a manner of simulating transaction execution; if it does not have If a pre-sequence transaction interface is used, it is determined that the data to be generated is generated by calling a pre-configured transaction data generation program; if the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform through a message, it is determined that the data to be generated is generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, it is determined that the data to be generated is generated by calling an indicator data generation program configured based on Python language or Java language; if the test data category to which the data to be generated belongs is a managed resource category, it is determined that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language;
[0143] The test data generating unit 52 is used to generate the data to be generated according to the determined generation method of the data to be generated.
[0144] In one or more embodiments provided in the present application, the process of the test data generating unit 52 generating the data to be generated according to the determined generation mode of the data to be generated may include:
[0145] When it is determined that the data to be generated is generated by simulating message sending, obtain a pre-configured message corresponding to the data to be generated, and the message content of the pre-configured message is configured based on the actual message format corresponding to the data to be generated; determine the receiving end address corresponding to the data to be generated; and call a message sending tool to send the pre-configured message to the receiving end address to generate the data to be generated.
[0146] In one or more embodiments provided in the present application, the generation method determination unit 51 can also be used for: before determining that the generation method of the data to be generated is generated by calling a resource data generation program configured based on the Python language or the Java language, judging whether the resources managed by the operation and maintenance platform meet the requirements of the test tasks based on the data to be generated; if so, determining that the generation method of the data to be generated is generated by operating the resources corresponding to the data to be generated managed by the operation and maintenance platform; if not, executing the step of determining that the generation method of the data to be generated is generated by calling a resource data generation program configured based on the Python language or the Java language.
[0147] In one or more embodiments provided in the present application, the process of the test data generating unit 52 generating the data to be generated according to the determined generation mode of the data to be generated may include:
[0148] In the case where it is determined that the data to be generated is generated by arranging the preceding transaction interface in a manner of simulating transaction execution, a pre-configured simulation transaction script corresponding to the data type of the data to be generated is obtained, and the simulation transaction script includes an interface test tool script or a Python script; the interface test tool script is configured based on the interface information of each interface involved in the preceding transaction interface and the arrangement order represented by the front-end and back-end association relationship between the interfaces involved; the Python script is configured based on the interface generation method of the preceding transaction interface; the obtained simulation transaction script is called to simulate the execution of the preceding transaction corresponding to the data to be generated, and the execution result of the simulation transaction script is obtained to generate the data to be generated.
[0149] In one or more embodiments provided in the present application, the generation method determining unit 51 determines that the generation method of the data to be generated is a process of generating by calling a preconfigured transaction data generation program, which may include:
[0150] Determine the type of database storing the data to be generated; if the determined database type is relational, determine that the data to be generated is generated by calling a transaction data generation program configured based on SQL statements; if the determined database type is non-relational, determine that the data to be generated is generated by calling a transaction data generation program configured based on Python language or Java language.
[0151] In one or more embodiments provided in the present application, the process of the test data generating unit 52 generating the data to be generated according to the determined generation mode of the data to be generated may include:
[0152] In the case where it is determined that the data to be generated is generated by calling a transaction data generation program configured based on an SQL statement, a pre-configured SQL statement corresponding to the data type of the data to be generated is obtained; in the case where the data table storing the data to be generated is a single table, the SQL statement obtained is a table data insertion SQL statement configured based on the pre-configured table insert data of the single table; in the case where the data table storing the data to be generated is a plurality of tables, the SQL statement obtained is a table data insertion SQL statement configured based on the pre-configured table insert data of the plurality of tables, and the table insert data of the plurality of tables is configured based on the association relationship of the plurality of tables; the obtained SQL statement is executed to insert data into a database to generate the data to be generated.
[0153] In one or more embodiments provided in the present application, the process of the test data generating unit 52 generating the data to be generated according to the determined generation mode of the data to be generated may include:
[0154] In the case where it is determined that the data to be generated is generated by calling a data generation program configured based on Python language or Java language, a pre-configured Python script or Java program corresponding to the data type of the data to be generated is obtained, and the obtained Python script or Java program is configured based on the data format corresponding to the data to be generated; the obtained Python script or Java program is executed to generate the data to be generated.
[0155] The test data generation device provided in the embodiment of the present application can be applied to a test data generation device, such as a terminal with data processing capability: a mobile phone, a computer, a server, etc. Optionally, Figure 6 The hardware structure diagram of the test data generation device is shown in FIG. Figure 6 ,The hardware structure of the test data generating device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0156] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0157] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0158] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
[0159] The memory is used to store a computer program, and the processor is used to execute the computer program, so that the test data generating device can implement any of the above-mentioned test data generating methods.
[0160] A storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any test data generation method provided in the embodiment of the present application.
[0161] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any test data generating method provided in the embodiment of the present application.
[0162] Finally, it should be noted that the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0163] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0164] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A test data generation method, characterized in that: include: In response to a test data generation instruction of the operation and maintenance platform, determine the data to be generated based on the information of the data to be generated and determine the test data category to which the data to be generated belongs; The test data categories include transaction categories, monitoring indicator categories, or managed resource categories; Determine the generation method corresponding to the data to be generated according to the generation method corresponding to the preset test data category; Generate the data to be generated according to the determined generation method of the data to be generated; The process of determining the generation method corresponding to the data to be generated according to the generation method corresponding to the preset test data category includes: In the case that the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, determining that the data to be generated is generated by arranging the preceding transaction interface in a manner of simulating transaction execution; if the preceding transaction interface is not available, determining that the data to be generated is generated by calling a preconfigured transaction data generation program; In the case that the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform through a message, then it is determined that the generation method of the data to be generated is generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, then it is determined that the generation method of the data to be generated is generated by calling an indicator data generation program configured based on the Python language or the Java language; In a case where the test data category to which the data to be generated belongs is a managed resource category, the method for generating the data to be generated is determined to be generating by calling a resource data generation program configured based on Python language or Java language.
2. The test data generation method according to claim 1, characterized in that: In a case where the determined generation method of the data to be generated is to generate the data by simulating message sending, generating the data to be generated according to the determined generation method of the data to be generated includes: Acquire a pre-configured message corresponding to the data to be generated, wherein the message content of the pre-configured message is configured based on an actual message format corresponding to the data to be generated; Determine a receiving end address corresponding to the data to be generated; Calling a message sending tool to send the pre-configured message to the receiving end address to generate the data to be generated.
3. The test data generating method according to claim 1, characterized in that: Before determining that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language, the method further includes: Determine whether the resources managed by the operation and maintenance platform meet the requirements of the test task based on the data to be generated; If yes, determining that the data to be generated is generated by operating resources corresponding to the data to be generated that are managed by the operation and maintenance platform; If not, the step of determining that the data to be generated is generated by calling a resource data generation program configured based on Python language or Java language is executed.
4. The test data generating method according to claim 1, characterized in that: In the case where the determined method for generating the data to be generated is to generate the data by arranging the preceding transaction interface in a manner of simulating transaction execution, generating the data to be generated according to the determined method for generating the data to be generated includes: Acquire a pre-configured simulated transaction script corresponding to the data type of the data to be generated, wherein the simulated transaction script includes an interface test tool script or a Python script; the interface test tool script is configured based on the interface information of each interface involved in the previous transaction interface and the arrangement sequence represented by the front-back association relationship between the interfaces involved; the Python script is configured based on the interface generation method of the previous transaction interface; The obtained simulated transaction script is called to simulate the execution of the preceding transaction corresponding to the data to be generated, and the execution result of the simulated transaction script is obtained to generate the data to be generated.
5. The test data generating method according to claim 1, characterized in that: Determining that the data to be generated is generated by calling a preconfigured transaction data generation program includes: Determine the type of database storing the data to be generated; If the determined database type is relational, determining that the data to be generated is generated by calling a transaction data generation program configured based on a SQL statement; If the determined database type is non-relational, then the method for generating the to-be-generated data is determined to be generating by calling a transaction data generation program configured based on Python language or Java language.
6. The test data generating method according to claim 5, characterized in that: In the case where the determined method for generating the data to be generated is to generate the data by calling a transaction data generation program configured based on a SQL statement, generating the data to be generated according to the determined method for generating the data to be generated includes: Obtain a pre-configured SQL statement corresponding to the data type of the data to be generated; in the case where the data table storing the data to be generated is a single table, the SQL statement obtained is a table data insertion SQL statement configured based on the pre-configured table insertion data of the single table; in the case where the data table storing the data to be generated is a plurality of tables, the SQL statement obtained is a table data insertion SQL statement configured based on the pre-configured table insertion data of the plurality of tables, and the table insertion data of the plurality of tables is configured based on the association relationship of the plurality of tables; The acquired SQL statement is executed to insert data into the database to generate the data to be generated.
7. The test data generating method according to claim 1, 3 or 5, characterized in that: In the case where the determined method for generating the data to be generated is to generate the data by calling a data generation program configured based on the Python language or the Java language, generating the data to be generated according to the determined method for generating the data to be generated includes: Obtaining a pre-configured Python script or Java program corresponding to a data type of the data to be generated, wherein the obtained Python script or Java program is configured based on a data format corresponding to the data to be generated; Execute the acquired Python script or Java program to generate the data to be generated.
8. A test data generating device, characterized in that: include: A generation mode determination unit, configured to respond to a test data generation instruction of the operation and maintenance platform, determine the data to be generated based on the information of the data to be generated, and determine the test data category to which the data to be generated belongs; The test data category includes a transaction category, a monitoring indicator category or a managed resource category; a generation method corresponding to the data to be generated is determined according to a condition determined according to a pre-set generation method corresponding to the test data category; wherein the generation method determination unit determines the generation method corresponding to the data to be generated according to a condition determined according to a pre-set generation method corresponding to the test data category, and the process may include: when the test data category to which the data to be generated belongs is a transaction category, if the data to be generated has a preceding transaction interface, then the generation method of the data to be generated is determined to be generated by arranging the preceding transaction interface to simulate transaction execution; if there is no preceding transaction interface, then the generation method of the data to be generated is determined to be generated by calling a pre-configured transaction Generated by a data generation program; in the case where the test data category to which the data to be generated belongs is a monitoring indicator category, if the data to be generated is direct indicator data sent to the operation and maintenance platform via a message, then the generation method of the data to be generated is determined to be generated by simulating message sending; if the data to be generated is indirect indicator data calculated by the operation and maintenance platform, then the generation method of the data to be generated is determined to be generated by calling an indicator data generation program configured based on Python language or Java language; in the case where the test data category to which the data to be generated belongs is a managed resource category, then the generation method of the data to be generated is determined to be generated by calling a resource data generation program configured based on Python language or Java language; The test data generating unit is used to generate the data to be generated according to the determined generation method of the data to be generated.
9. A test data generating device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program so that the test data generating device can implement the test data generating method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the test data generating method as described in any one of claims 1 to 7.