Test data generation method and device, computer equipment and storage medium

The test data generation parameters of the timing database are obtained through static configuration files or preset parameters acquisition interfaces, and the data generation thread is created to generate test data, which solves the problems of high complexity and low efficiency in the existing technology, and realizes flexibility and Improved efficiency.

CN119396698APending Publication Date: 2025-02-07DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310907400.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When testing different functions of the timing database SDK, the prior art requires frequent rebinding of code and publishing services, resulting in high complexity and low efficiency in the generation of test data.

Method used

By using static configuration files or preset parameter acquisition interfaces, obtain test data generation parameters that match the test function to be tested in the timing database, create data generation threads based on these parameters, and generate test data that conforms to the data configuration information.

Benefits of technology

It improves the flexibility of test data generation parameters and the diversity of data production methods, reduces the complexity and time of test data generation, and improves the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396698A_ABST
    Figure CN119396698A_ABST
Patent Text Reader

Abstract

The invention provides a test data generation method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a test data generation parameter matched with a to-be-tested function of a time sequence database through a static configuration file or a preset parameter obtaining interface; the test data generation parameters comprise multiple pieces of data configuration information, and the data configuration information is generated based on a data configuration format pre-configured for the to-be-tested function; creating a data generation thread corresponding to each piece of data configuration information according to the to-be-tested function; generating a plurality of pieces of test data with data names indicated by the data configuration information by utilizing each data generation thread according to data description information and data value information in the corresponding data configuration information; the test data is used for performing function test on the to-be-tested function of the time sequence database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a test data generating method, apparatus, computer equipment and storage medium. Background Art

[0002] As a widely used database, time series database has a variety of reliable data processing functions. The implementation of data processing functions mainly depends on the software development kit (SDK) and the backend functional components of the server. Therefore, the data processing effect of the time series database is often determined by the functions provided by the SDK and backend functional components. In order to ensure the data processing effect, it is necessary to perform functional testing on the SDK and backend functional components to ensure that both have the expected functions.

[0003] For testing SDK, different SDK functions often require the construction of test data in different formats for testing. In order to simulate the user's real usage scenario, the production logic used to generate test data is often strongly bound to the business logic or server code, and the service is published to achieve test data production. As a result, each time the different functions of the SDK are tested, the code needs to be re-bound and the service published, which not only increases the complexity of test data generation, but also affects the test efficiency. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a test data generating method, apparatus, computer equipment and storage medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a test data generating method, comprising:

[0006] Using a static configuration file or a preset parameter acquisition interface, obtaining test data generation parameters matching the function to be tested of the time series database; the test data generation parameters include a plurality of data configuration information, and the data configuration information is generated based on a data configuration format pre-configured for the function to be tested;

[0007] Creating data generation threads corresponding to the respective data configuration information according to the functions to be tested;

[0008] Utilizing each of the data generation threads, multiple test data with data names indicated by the data configuration information are generated according to the data description information and data value information in the corresponding data configuration information; the test data are used to perform functional testing on the to-be-tested function of the time series database.

[0009] In a possible implementation, using a static configuration file, obtaining test data generation parameters that match the function to be tested of the time series database includes:

[0010] Acquire a first static configuration file matching the function to be tested from a remote configuration platform, and acquire the pre-configured data generation parameters based on the first static configuration file; or,

[0011] The data generation parameters are obtained by using a second static configuration file pre-configured locally and matching the function to be tested.

[0012] In a possible implementation, using a preset parameter acquisition interface to acquire test data generation parameters that match the function to be tested of the time series database includes:

[0013] In response to receiving the parameter acquisition request, calling the data production service using the parameter acquisition interface;

[0014] The data generation parameters are generated based on the parameter acquisition request and the data configuration format corresponding to the function to be tested by utilizing the called data production service.

[0015] In a possible implementation manner, the data configuration information further includes a data cycle generation interval and a preset number of cycles;

[0016] Using the data generation thread, according to the data description information and data value information in the corresponding data configuration information, a plurality of test data having the data name indicated by the data configuration information is generated, including:

[0017] For any of the data generation threads, using the data generation thread, according to the data loop generation interval, based on the data description information and the data value information, generate the test data with the data name until the number of loops reaches a preset number of loops, thereby obtaining multiple test data with the data name.

[0018] In one possible implementation,

[0019] After using each of the data generation threads to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and the data value information in the corresponding data configuration information, the method further includes:

[0020] According to the data type, the test data generated by each of the data generation threads are classified and processed to obtain test data of each data type;

[0021] By using the proxy service, the test data under each data type is reported to the processing link of the server, so as to use the processing link to perform a functional test on the function to be tested.

[0022] In a possible implementation, creating data generation threads corresponding to the respective data configuration information according to the functions to be tested includes:

[0023] Determine whether there is a test data generation list currently, wherein the test data generation list includes each test data currently being generated;

[0024] If so, determining whether the data configuration information in the test data generation parameter is repeated with the acquired configuration information of each test data in the test data generation list;

[0025] If not, then create data generation threads corresponding to the respective data configuration information according to the functions to be tested.

[0026] In a possible implementation manner, after creating data generation threads corresponding to the respective data configuration information according to the functions to be tested, the method further includes:

[0027] The test data generation list is updated according to the test data to be generated corresponding to the data configuration information to obtain a new test data generation list.

[0028] In a possible implementation, using each of the data generation threads, according to the data description information and the data value information in the corresponding data configuration information, a plurality of test data having the data name indicated by the data configuration information is generated, including:

[0029] In response to triggering the modification detection mechanism, obtaining modified data configuration information;

[0030] Acquire a target thread matching the modified data configuration information from each of the created data generation threads; the target thread is a thread related to the pre-modification data configuration information corresponding to the modified data configuration information;

[0031] The target thread is restarted, and a plurality of test data having data names indicated by the modified data configuration information are generated by using the restarted target thread according to the data description information and data value information in the modified data configuration information.

[0032] In a second aspect, the present disclosure also provides a test data generating device, including:

[0033] An acquisition module, used to acquire test data generation parameters matching the function to be tested of the time series database using a static configuration file or a preset parameter acquisition interface; the test data generation parameters include a plurality of data configuration information, and the data configuration information is generated based on a data configuration format pre-configured for the function to be tested;

[0034] A creation module, used for creating data generation threads corresponding to each of the data configuration information according to the function to be tested;

[0035] A generation module is used to use each of the data generation threads to generate multiple test data with data names indicated by the data configuration information according to the data description information and data value information in the corresponding data configuration information; the test data is used to perform functional testing on the to-be-tested function of the time series database.

[0036] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.

[0037] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.

[0038] For a description of the effects of the above-mentioned test data generating apparatus, computer device, and computer-readable storage medium, please refer to the description of the above-mentioned test data generating method, which will not be repeated here.

[0039] The test data generation method, device, computer equipment and storage medium provided by the embodiment of the present disclosure use a static configuration file or a preset parameter acquisition interface to obtain test data generation parameters that match the function to be tested of the time series database, which can improve the flexibility of obtaining test data generation parameters and the diversity of data production methods. Different acquisition methods can often be applicable to different test scenarios, so through a static configuration file or a preset parameter acquisition interface, it is possible to flexibly select acquisition methods in different test scenarios, thereby realizing the testing of the function to be tested of the time series database in different test scenarios. Since the parameter acquisition interface has the characteristic of being able to be called at any time, the use of the parameter acquisition interface to obtain test data generation parameters and produce test data can improve the flexibility and real-time performance of test data generation, thereby ensuring the generation efficiency of test data. In addition, the method of using the parameter acquisition interface to obtain test data generation parameters and generate test data does not require a strong binding between the production logic of the test data and the function to be tested, so that the problem of requiring service release can be avoided, thereby reducing the complexity of test data production and improving the test data generation efficiency and test efficiency.

[0040] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0042] Figure 1 A flow chart of a test data generating method provided by an embodiment of the present disclosure is shown;

[0043] Figure 2 An interactive schematic diagram of generating test data provided by an embodiment of the present disclosure is shown;

[0044] Figure 3 A specific implementation flow chart of a data reporting process provided by an embodiment of the present disclosure is shown;

[0045] Figure 4 A triggering schematic diagram of a modification detection mechanism provided by an embodiment of the present disclosure is shown;

[0046] Figure 5 A schematic diagram of a test data generating device provided by an embodiment of the present disclosure is shown;

[0047] Figure 6 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0049] In addition, the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0050] The "multiple or several" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0051] After research, it was found that since the SDK has many functions and testing different functions requires building test data in different formats, the method of using strong binding to generate test data requires modifying the SDK-related logic and then releasing the service each time the different functions of the SDK are tested. This not only results in a long cycle and inflexible test data production, but also affects test efficiency.

[0052] Based on the above research, the present disclosure provides a test data generation method, device, computer equipment and storage medium, which uses a static configuration file or a preset parameter acquisition interface to obtain test data generation parameters that match the function to be tested of the time series database, which can improve the flexibility of obtaining test data generation parameters and the diversity of data production methods. Different acquisition methods can often be applied to different test scenarios, so through a static configuration file or a preset parameter acquisition interface, it is possible to flexibly select acquisition methods in different test scenarios, and then test the function to be tested of the time series database in different test scenarios. Since the parameter acquisition interface has the characteristic of being able to be called at any time, the use of the parameter acquisition interface to obtain test data generation parameters and produce test data can improve the flexibility and real-time performance of test data generation, thereby ensuring the generation efficiency of test data. In addition, the method of using the parameter acquisition interface to obtain test data generation parameters and generate test data does not require a strong binding between the production logic of the test data and the function to be tested, so that the problem of service release can be avoided, thereby reducing the complexity of test data production and improving the test data generation efficiency and test efficiency.

[0053] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0055] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0056] To facilitate understanding of the present embodiment, a test data generation method disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the test data generation method provided in the embodiment of the present disclosure is generally a terminal device or other processing device with a certain computing capability, wherein the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computer device, etc.; in some possible implementations, the test data generation method may be implemented by a processor calling computer-readable instructions stored in a memory.

[0057] The test data generating method provided by the embodiment of the present disclosure is described below by taking a computer device as an example of an execution subject.

[0058] like Figure 1 As shown, it is a flowchart of a test data generation method provided by an embodiment of the present disclosure, which may include the following steps:

[0059] S101: using a static configuration file or a preset parameter acquisition interface, obtaining test data generation parameters that match the function to be tested of the time series database; the test data generation parameters include a plurality of data configuration information, and the data configuration information is generated based on a data configuration format pre-configured for the function to be tested.

[0060] Here, the function to be tested can be any function provided by the SDK corresponding to the time series database in the time series data processing system. Each function can be pre-configured with a corresponding data configuration format, and different functions have different pre-set data configuration formats. The data configuration format is used to indicate the configuration format required to be relied upon when configuring parameters, and data corresponding to different configuration formats have different test functions.

[0061] The static configuration file can be a pre-configured data source file, which may include test data generation parameters configured according to the data configuration format corresponding to the function to be tested. The test data generation parameters are used to indicate the data parameters of the test data to be generated. The test data is used to perform functional testing on the SDK's function to be tested. The test data generated using different test data generation parameters can be used to test different functions of the SDK.

[0062] The preset parameter acquisition interface may be an application programming interface (API) pre-written for the data production service, through which the data production task can be invoked and the test data generation parameters can be acquired.

[0063] The test data generation parameters may include multiple data configuration information, and the data configuration information is used to indicate the attribute information of the test data to be generated. Specifically, the attribute information may include at least one data name corresponding to the test data to be generated, at least one data description information corresponding to each data name, and at least one data value information; the data description information is used to indicate the content of the data, and the data value information is used to indicate the value range of the data. One data configuration information is used to generate at least one test data with the data name indicated by the data configuration information.

[0064] Exemplarily, a piece of data configuration information is used to create a data production task, and the data production task is used to generate at least one piece of test data related to the data configuration information.

[0065] In specific implementation, when it is determined that any function of the SDK corresponding to the time series database needs to be tested, the function is used as the function to be tested. The static configuration file corresponding to the function to be tested is used to obtain the test data generation parameters that match the function to be tested; or, the test data generation parameters that match the function to be tested can be dynamically obtained by using the parameter acquisition interface through an interface call.

[0066] In one embodiment, the universal data configuration format corresponding to the various functions designed in the embodiment of the present disclosure uses json as a carrier to implement the definition of test data generation parameters in different test scenarios, thereby realizing the generation of test data in different test scenarios. Among them, different test scenarios refer to scenarios for testing different functions of the SDK. In order to further improve the flexibility of testing, a variety of data production methods are also provided, namely, a production method using a static configuration file and a production method using a parameter acquisition interface. With regard to the method of using a static configuration file, the embodiment of the present disclosure can also provide two different static configuration methods for the configuration file. Therefore, the step of "using a static configuration file to obtain test data generation parameters that match the function to be tested of the time series database" in S01 can be implemented in any of the following two ways:

[0067] Method 1: Obtain a first static configuration file matching the function to be tested from a remote configuration platform, and obtain pre-configured data generation parameters based on the first static configuration file.

[0068] Here, the first static configuration file is a static configuration file obtained from the remote configuration platform. Specifically, static configuration files for various test scenarios can be configured in advance on the remote configuration platform according to data configuration formats corresponding to different functions.

[0069] When it is determined that the tested function corresponding to the SDK needs to be tested, a first static configuration file matching the tested function can be obtained from the remote configuration platform, and then, test data generation parameters corresponding to the test data to be generated can be obtained from the first static configuration file.

[0070] In this way, configuring a static configuration file in the remote configuration platform not only has the advantage of long-term validity of a one-time configuration and long-term stable data production, but also has the advantage of not needing to release and launch services when making modifications. In addition, since various test data to be generated can be obtained based on the static configuration file, a test data generation list can also be obtained based on the static configuration file and the list can be visualized, thereby achieving the effect of observable test data. Even if the static configuration file needs to be updated, it only needs to be published on the remote configuration platform without the need to publish and launch the service.

[0071] For static configuration files configured on the remote configuration platform, it is suitable for scenarios with long-term data accumulation. It can be used as a data source for regular testing to provide test data, thereby achieving regular functional testing of the time series database.

[0072] Method 2: Using a second static configuration file pre-configured locally and matching the function to be tested, obtain data generation parameters.

[0073] Here, the second static configuration file is a static configuration file obtained locally, and the static configuration file can be pre-configured locally. For example, it can be pre-configured in the local server code, and the static configuration files under various test scenarios are configured according to the data configuration formats corresponding to various functions. In this way, the data configuration of the test data to be generated under various test scenarios can be written into the logic code of the data production service.

[0074] In specific implementation, after pre-configuring a static configuration file for a specific test scenario locally, when the service containing the function to be tested is released online, a second static configuration file matching the function to be tested can be obtained locally, and then, the test data generation parameters can be obtained in the second static configuration file.

[0075] In this way, by pre-configuring static configuration files locally, it is possible to configure static configuration files in the server code. In this way, instances can be generated for different test data and different server codes can be deployed according to specific test requirements and test scenarios, thereby meeting specific test needs. For example, static configuration files can be configured locally for functions of different versions of SDKs, thereby achieving the production of test data corresponding to different versions of SDKs.

[0076] In another embodiment, the disclosed embodiment also provides a method of dynamically calling an API to achieve dynamic generation of test data. Specifically, for the above S101, "using a preset parameter acquisition interface to obtain test data generation parameters that match the function to be tested in the time series database", it can be implemented according to the following steps:

[0077] Step 1: In response to receiving a parameter acquisition request, a data production service is called using a parameter acquisition interface.

[0078] Here, the parameter acquisition request can be a Hypertext Transfer Protocol (HTTP) request initiated by the PostMan function when the tester determines that manual self-testing is required, or when the R&D personnel determine that local self-testing is required, for calling the parameter acquisition interface to request to obtain the test data generation parameters.

[0079] In specific implementation, after receiving a parameter acquisition request (a kind of HTTP request) from a developer or tester, the HTTP server of the instance deployed in the resource container can respond to the request and call the parameter acquisition interface, and then use the called parameter acquisition interface to call the data generation service for generating test data.

[0080] Step 2: Generate data generation parameters based on the parameter acquisition request and the data configuration format corresponding to the function to be tested by using the called data production service.

[0081] In specific implementation, the data production service can be used to determine the data generation parameters according to the obtained processing information and the data configuration format corresponding to the function to be tested. The processing information is obtained in the process of processing the parameter acquisition request using the HTTP server. In this way, the required test data generation parameters can be dynamically obtained using the parameter acquisition interface.

[0082] Since the API interface can be called in real time, the API dynamic calling method has the advantages of flexibility and strong real-time performance. Therefore, the method of obtaining the interface using parameters can often be used as a data source for temporary testing, which is suitable for testing scenarios in a short period of time (such as 5 minutes, 10 minutes) and scenarios where R&D personnel or testers actively test. In this way, by calling the API interface to produce SDK test data, the SDK's data production logic can be separated from the server code, avoiding the strong coupling problem between the two. Moreover, the API calling method is relatively simpler than setting the data production logic in the server code. It can be achieved through API calls without mastering the internal logic of the code. It can greatly reduce the labor time cost and learning cost, and meet the temporary data production requirements of the test.

[0083] By providing a first static configuration file, a second static configuration file, and an API call, it is possible to combine multiple test data generation modes, and then flexibly select test data generation modes for different test scenarios, thereby improving SDK testing efficiency and problem discovery capabilities.

[0084] In a possible implementation, the API call method may be encapsulated as a visual interface, and test data may be produced through the visual interface, which may further reduce the test difficulty and test threshold.

[0085] S102: Creating data generation threads corresponding to respective data configuration information according to the functions to be tested.

[0086] Here, the data generation thread is used to execute the data production task corresponding to the data configuration information, and obtain various test data related to the data configuration information.

[0087] In specific implementation, after obtaining the data configuration information, data production tasks corresponding to each data configuration information can be created according to the functional characteristics and functional identifiers corresponding to the functions to be tested, and each data generation thread for executing each data production task can be created.

[0088] S103: Utilizing each data generation thread, according to the data description information and data value information in the corresponding data configuration information, generate a plurality of test data with data names indicated by the data configuration information; the test data is used to perform functional testing on the to-be-tested functions of the time series database.

[0089] Here, the time series database can be a database for processing a large amount of time series data. The function to be tested is the function of the software development kit, which is an SDK package. The SDK package can have different functions and different versions. The test data generation solution provided in the embodiment of the present disclosure can be used to perform functional testing on various functions of the SDK package, especially for data generation SDK.

[0090] In specific implementation, for each data generation thread, the data production task corresponding to the data generation thread can be executed, and multiple test data with the data name in the data configuration information corresponding to the data production task can be generated according to the data description information and data value information in the data configuration information corresponding to the data production task. Among them, for the same data generation thread, each of the multiple test data generated by it has the same data name, but the test data are not the same, for example, different test data can have different data values.

[0091] After the test data is generated by using the data generation thread, the data generation thread can be deleted, thereby achieving timely release of the resources occupied by the data generation thread.

[0092] In one embodiment, after generating the test data for the SDK, the test data may be reported to implement functional testing of the to-be-tested function of the time series database using the test data. Specifically, after executing S103, the test data may be reported according to the following steps:

[0093] S1: Classify and process the test data generated by each data generation thread according to the data type to obtain test data of each data type.

[0094] Here, different test data may have different data types. In order to reduce the complexity of data uploading, the test data generated by each data generation thread may be classified according to the data type of each test data to obtain test data of each data type.

[0095] S2: Using the proxy service, the test data of each data type is reported to the processing link of the server, so as to use the processing link to perform functional testing on the function to be tested.

[0096] Here, the proxy service is the agent service, which is used to proxy the instance.

[0097] In specific implementation, the test data under each data type can be sent to the proxy service. The proxy service can be used to abstract the test data under each data type into data of a key-value pair structure, where the key is the data type and the value is the test data. Then, the proxy service can be used to report each key-value pair data to the backend processing link of the server. After that, the server can perform functional testing on the SDK's to-be-tested functions using the test data in the reported key-value pair data according to the processing link.

[0098] In this way, abstracting the test data according to the data type can eliminate the differences in the test data types, improve the convenience of data transmission, and reduce the difficulty of data transmission.

[0099] like Figure 2 As shown, it is an interactive schematic diagram of generating test data provided by an embodiment of the present disclosure, wherein instances A to C are deployed in different resource containers, different instances can obtain different test data generation parameters, or can obtain the same test data generation parameters, and different instances can be used to generate different test data. Figure 2In, taking instance A as an example, the process of generating and reporting test data is shown. Among them, dot parameter acquisition, that is, obtaining test data generation parameters that match the function to be tested in the time series database. Among them, the remote configuration reading method, that is, using the first static configuration file obtained from the remote configuration platform to obtain the data generation parameters; the HTTP server acquisition method, that is, the API dynamic call method described in steps one and two above; the local configuration reading method, that is, using the second static configuration file pre-configured locally, to obtain the data generation parameters. In the specific implementation, it can be achieved by using one or more of the remote configuration reading method, the HTTP server acquisition method and the local configuration reading method to obtain the test data generation parameters.

[0100] Then, the acquired test data generation parameters can be converted into data format according to the preset unified format protocol, and the test data generation parameters can be converted into test data generation parameters with a unified format. At the same time, after obtaining the test data generation parameters with a unified format, the test data generation parameters can also be checked to determine whether the acquired test data generation parameters meet the preset specifications. If not, it means that the parameters are abnormal, feedback parameter abnormality information, and reject the test data generation this time. If so, the test data generation parameters with a unified format can be passed to the general dotting module. Among them, the general dotting module is used to generate test data. Specifically, the general dotting module can generate data creation clients (an HTTP client) and data production modules producer corresponding to the test data generation parameters based on the test data generation parameters. The data creation client is used to specify the accuracy of test data generation, the time and frequency of test generation, the data name of the test data, and other information. Specifically, the data creation client can include a thread creation module, a thread management module, and a data list storage module. Among them, the thread creation module can create data generation threads corresponding to each data configuration information according to each data configuration information and the function to be tested included in the test data generation parameters. The data production module can create corresponding coroutines for each data name indicated by the data configuration information based on the thread management module. The coroutine can run in the data generation thread to generate test data corresponding to the data name. When the static configuration file changes or the life cycle of the test data ends, the corresponding thread and each coroutine running in the thread can be terminated. Exemplarily, after creating the data generation thread, each coroutine in the data generation thread can be used to generate each test data with the data name corresponding to the coroutine according to the data description information and data value information indicated by the data configuration information. The data list storage module is used to generate the test data generation list in the following text. The data list storage module will be introduced in detail later.

[0101] After each data generation thread in the general dotting module creates the corresponding test data, the test data can be sent to the agent service (Agent) corresponding to instance A; the agent service is then used to report the test data under each data type to the processing link of the server, so as to use the processing link to perform functional testing on the function to be tested. The processing process of instances B and C can refer to the processing process of instance A, and will not be repeated here.

[0102] In this way, by using a static configuration file or a preset parameter acquisition interface to acquire test data generation parameters that match the function to be tested of the time series database, the flexibility of acquiring test data generation parameters and the diversity of data production methods can be improved. Different acquisition methods can often be applied to different test scenarios, so through a static configuration file or a preset parameter acquisition interface, it is possible to flexibly select acquisition methods in different test scenarios, thereby testing the function to be tested of the time series database in different test scenarios. Since the parameter acquisition interface has the characteristic of being able to be called at any time, the use of the parameter acquisition interface to acquire test data generation parameters and produce test data can improve the flexibility and real-time performance of test data generation, thereby ensuring the efficiency of test data generation. In addition, the method of acquiring test data generation parameters and generating test data using the parameter acquisition interface does not require a strong binding between the production logic of the test data and the function to be tested, so the problem of requiring service release can be avoided, thereby reducing the complexity of test data production and improving the efficiency of test data generation and testing.

[0103] In one embodiment, the data configuration format defined in the embodiment of the present disclosure may be as follows:

[0104] enum MType{ / / Dot type, defined using enumeration value

[0105] unknownType=0 / / unknown type

[0106] counterType=1 / / equivalent type

[0107] timerType=2 / / Timer type .... ...

[0110] }

[0111] struct MetricsOperator{ / / Generate parameter information

[0112] 1:required i64 frequency / / Data cycle generation interval, unit: milliseconds

[0113] 2:required list <metric>metrics / / Data configuration list to be output

[0114] 3:required MetricsClient metricsClient / / Data creation client corresponding to the time series data processing system, used to set common parameters

[0115] }

[0116] struct MetricsClient{ / / Data creation client information corresponding to the time series data processing system

[0117] 1:optional string prefix / / Test data prefix, valid for all test data in this request

[0118] 2:optional list <tag>globalTags / / Global tags, i.e. data description information, are effective for all test data in this request

[0119] 3:optional string tenant / / Tenant information, which can specify the server processing link used to receive test data

[0120] 4:optional i64 timeInterval / / test data upload interval

[0121] 5:optional i64 seriesExpireDuration / / test data expiration time

[0122] 6:optional bool useMultiField / / test data whether to use multiple values

[0123] 7:optional i64 liveTime / / The duration of generating test data (unit: milliseconds). After the time is up, resources will be recycled and the test will end.

[0124] Management process

[0125] }

[0126] struct Metric{ / / data configuration information

[0127] 1:required string name / / Data name of the test data

[0128] 2:required MType mType / test data corresponding to the dot type, different types correspond to different value logic

[0129] 4:optional list <tag>Tags / / A list of tags for each test data, used to define the dimensions of the points

[0130] 7:optional string suffix / / The suffix of each test data

[0131] 9:optional i64 value / / Data value information, which can fluctuate randomly or increase or decrease automatically within a certain range

[0132] }

[0133] struct Tag{ / / tag structure

[0134] 1:required string name / / string name

[0135] 2:optional i64 Tag / / For each tag, the values ​​from 0 to tag value will be traversed during execution. If there are multiple tags, all combinations will be arranged

[0136] }

[0137] It should be noted that the above content only provides examples of some data configuration formats. In specific implementation, the actual data configuration format can be determined according to the test scenario. The embodiments of the present disclosure can provide data configuration formats under various test scenarios. That is, the embodiments of the present disclosure can provide data configuration formats related to test data for testing various SDK functions. Based on the data configuration formats corresponding to various SDK functions, test data for testing various SDK functions can be generated.

[0138] Based on the above data configuration format, it can be known that the data configuration information may also include a data cycle generation interval and a preset number of cycles. In this case, the above S103 may also be implemented according to the following steps:

[0139] For any data generation thread, the data generation thread is used to generate test data with data names according to the data loop generation interval, data description information and data value information, until the number of loops reaches a preset number of loops, thereby obtaining multiple test data with data names.

[0140] In specific implementation, for each data generation thread, the data production task corresponding to the data generation thread can be cyclically executed according to the data loop generation interval until the number of loops reaches a preset number of loops or the generation time meets the preset duration for generating test data, thereby obtaining multiple test data with data names corresponding to the data production tasks.

[0141] Each time a data production task is executed, at least one test data with a data name corresponding to the data production task can be generated according to the data description information and data value information corresponding to the data production task. In this way, the test data can be generated multiple times according to the data production task according to the data cycle generation interval, thereby increasing the amount of generated test data and simulating a large traffic test scenario.

[0142] Exemplarily, when generating test data using a data generation thread, a tag enumeration + recursive drill-down method can be used according to the data loop generation interval and the preset number of loops to achieve large-scale data production. Among them, tag is data description information, and each test data to be generated can be associated with any number of tags. Assuming that each tag has n possible values ​​(that is, the data value information indicates that there are n values), and there are m data description information, then according to the data loop generation interval and the preset number of loops, a tag enumeration + recursive drill-down method can be used to generate up to m^n types of test data. Through the exponential growth model, a large amount of test data can be quickly generated to achieve the simulation of fast and large-traffic scenarios. After generating the test data, the test data can be reported to the processing link of the server to use the processing link to perform functional testing on the SDK's to-be-tested functions according to the test data.

[0143] like Figure 3 As shown, it is a specific implementation flow chart of a data reporting process provided by an embodiment of the present disclosure, wherein, after creating a data creation client (HTTP client) according to the test data generation parameters, data generation threads corresponding to each data configuration information can be created in HTTPclient according to the function to be tested, and then, each data generation thread can be used to generate test data. Specifically, for each data generation thread, multiple test data can be generated according to the data description information and data value information in the data configuration information by enumerating + recursively drilling down all data description information (tag). In addition, test data can be created cyclically according to the data cycle generation interval and the preset number of cycles. At the same time, for the test data produced, it can be abstracted into key-value pair data according to the data type. It should be noted that for each cycle, all test data created in the cycle can be abstracted into key-value pair data according to the data type and reported. Alternatively, after multiple cycles are completed, all test data created in multiple cycles can be abstracted into key-value pair data according to the data type and reported.

[0144] In one embodiment, when the parameter acquisition interface is used to obtain the test data generation parameters, the tester or the developer needs to actively submit an HTTP request. In order to prevent repeated submission of requests, S102 can be implemented according to the following steps:

[0145] It is determined whether there is a test data generation list currently, where the test data generation list includes each test data currently being generated.

[0146] Here, the various test data that need to be generated currently are the test data indicated by the test data generation parameters obtained before the test data generation parameters are obtained for the current time, and these test data have not been fully generated. The test data generation parameters obtained here can be the test data corresponding to the function to be tested, or the test data generation parameters corresponding to other functions of the SDK. For example, the various test data that need to be generated currently can be the various test data that need to be generated corresponding to the last submitted HTTP request (i.e., the parameter acquisition request).

[0147] After creating a data creation client corresponding to the test data generation parameters, the data list storage module can be used to generate and store a test data generation list according to the test data to be generated corresponding to each data configuration information in the test data generation parameters. The test data generation list can be deleted after the data production tasks corresponding to each data configuration information in the test data generation list are executed. At this time, it can be said that all the test data required to be generated for the current request have been generated. That is, after each request obtains the test data generation parameters, if the data creation client corresponding to the test data generation parameters is created, the test data generation list corresponding to the test data generation parameters can be created accordingly, and after all the test data indicated by the test data generation parameters are generated, the test data generation list corresponding to the test data generation parameters can be deleted.

[0148] In specific implementation, after the current request to obtain the test data generation parameters is made, it can be determined whether there is a test data generation list currently, that is, it can be determined whether there is an uncompleted data production task currently.

[0149] If not, a data creation client corresponding to the test data generation parameter can be directly created and S102 and S103 can be executed. If yes, it is determined whether the data configuration information in the test data generation parameter is repeated with the acquired configuration information of each test data in the test data generation list.

[0150] Here, the acquired configuration information is data configuration information corresponding to the test data in the test data generation list, which may specifically include data name, data value range and data description information.

[0151] By judging whether the data configuration information in the test data generation parameters obtained in the current request is repeated with the obtained configuration information of each test data in the test data generation list, it can be determined whether the test data generation parameters obtained in the current request are repeated with the test data generation parameters obtained in the previous request. If so, it means that the request has been submitted repeatedly and the test data generation parameters obtained this time can be ignored.

[0152] Exemplarily, it is possible to determine whether each data configuration information in the test data generation parameters has duplicated configuration information based on the acquired configuration information of each test data in the test data generation list. If so, the test data generation parameters acquired in the current request can be ignored. If not, data generation threads corresponding to each data configuration information are created according to the function to be tested. Here, if the data configuration information in the test data generation parameters acquired in the current request is only partially duplicated or not duplicated at all with the acquired configuration information in the test data generation list, a data creation client corresponding to the test data generation parameters acquired in the current request can be directly created, and in the data creation client, data generation threads corresponding to each data configuration information are created according to the function to be tested.

[0153] Furthermore, after creating data generation threads corresponding to the respective data configuration information according to the functions to be tested, the test data generation list can be updated according to the test data to be generated corresponding to the data configuration information to obtain a new test data generation list.

[0154] Here, the test data to be generated corresponding to the data configuration information can be added to the test data generation list to update the test data generation list and obtain a new test data generation list. Before updating the test data generation list, if the various test data in the test data generation list have been generated, that is, the test data generation parameters previously obtained indicate that the generated test data have all been generated, then the test data generation list can be deleted, and a new test data generation list can be generated based on the various test data to be generated corresponding to the test data generation parameters obtained in the current request. On the contrary, if the test data generation parameters previously obtained indicate that the generated test data have not all been generated, then the test data to be generated corresponding to the data configuration information can be directly added to the test data generation list to update the test data generation list.

[0155] Alternatively, after creating the data generation threads corresponding to the respective data configuration information, regardless of whether the test data generated by the test data generation parameters previously requested have been completely generated, a new test data generation list can be created separately, and the data generation list only includes the test data to be generated corresponding to the test data generation parameters currently requested. Furthermore, after the test data in the data generation list have been completely generated, the data generation list can be deleted.

[0156] Exemplarily, if the test data generation parameter obtained in the last request is parameter A, the corresponding test data generation list 1 includes test data 1 to 5. Before test data 1 to 5 are all generated, if parameter A is requested again, parameter A obtained this time can be ignored.

[0157] Before all test data 1 to 5 are generated, if parameter B is requested (the corresponding test data is test data 6 to 10), each data generation thread corresponding to parameter B can be created, and after each data generation thread is created, if test data 1 to 5 are still not generated, test data 6 to 10 can be added to test data generation list 1 to obtain a new test data generation list. After all test data 1 to 5 are generated, test data 1 to 5 in the new test data generation list can be deleted, and after all test data 6 to 10 are generated, test data 6 to 10 in the new test data generation list can be deleted, and after all test data 1 to 10 are generated, the new test data generation list can be deleted.

[0158] If the test data 1 to 5 have all been generated after the creation of each data generation thread, the test data generation list 1 may be deleted, and a new test data generation list including the test data 6 to 10 may be created.

[0159] Alternatively, after creating each data generation thread, regardless of whether test data 1 to 5 have been completely generated, a new test data generation list including test data 6 to 10 can be created separately. After test data 6 to 10 have been completely generated, the new test data generation list can be deleted. After test data 1 to 5 have been completely generated, test data generation list 1 can be deleted.

[0160] In one embodiment, in order to meet the demand for the number of test data generated and to generate test data on multiple machines at the same time, it is usually necessary to deploy multiple instances for test data production. Since the processing links of the servers in different computer rooms are separated, when verifying the function to be tested of the target SDK, it is necessary to verify the target SDKs in all computer rooms to ensure the availability of all areas. However, with respect to the prior art, usually according to the general complex balanced diversion strategy, in actual application or when modifying the static configuration file, only one of the instances receives the request and starts to execute the test data production task, so that the test data generated in some instances is still generated according to the data configuration information before the modification, which affects the accuracy of the generated test data. In order to modify the data configuration information used by each instance, the embodiment of the present disclosure provides a modification detection mechanism.

[0161] Specifically, a modification detection program may be created for each instance. When a modification of a static configuration file is detected, if there is a data production task being executed in the instance at this time (i.e., test data is being produced using the test data generation parameters in the static configuration file before the modification), the modified data configuration information may be obtained in response to triggering the modification detection mechanism. For example, the modified data configuration information may be determined based on the data configuration information indicated by the test data generation parameters in the static configuration file before the modification and the data configuration information indicated by the test data generation parameters in the static configuration file after the modification.

[0162] A target thread matching the modified data configuration information is obtained from each created data generation thread; the target thread is a thread related to the pre-modification data configuration information corresponding to the modified data configuration information.

[0163] Here, for each instance, each created data generation thread corresponding to the instance is a data generation thread created corresponding to each data configuration information before modification. The target thread is a thread related to the data configuration information before modification corresponding to the modified data configuration information.

[0164] Exemplarily, for each instance, a list of threads being executed may be maintained for each instance, the list including each data generation thread that has been created corresponding to the instance. For each instance, after triggering the modification detection mechanism and obtaining the modified data configuration information, the target thread may be determined from each data generation thread that has been created and included in the thread list corresponding to the instance.

[0165] Then, the target thread can be restarted, and the restarted target thread can be used to generate multiple test data with data names indicated by the modified data configuration information according to the data description information and data value information in the modified data configuration information.

[0166] In specific implementation, for each instance, the target thread in each data generation thread created corresponding to the instance can be restarted, and the restarted target thread can be used to generate multiple test data with data names indicated by the modified data configuration information according to the data description information and data value information in the modified data configuration information. At the same time, the test data generated by the target thread before the restart according to the data configuration information before the modification can be deleted.

[0167] For each data generation thread that has been created, except for the target thread, multiple test data with data names indicated by the unmodified data configuration information can be generated according to the data description information and data value information in the unmodified data configuration information corresponding to the thread.

[0168] Taking multiple instances as instances A to C as an example, for each instance, it is assumed that each instance generates corresponding data generation threads 1 to 3 according to the data configuration information 1 to 3 indicated by the test data generation parameter 1 in the static configuration file 1. Afterwards, if the static configuration file 1 is modified, where the data configuration information 2 is modified to the data configuration information 4, then for each instance, the modification detection mechanism will be triggered to obtain the modified data configuration information (i.e., data configuration information 4). Then, for each instance, the target thread (i.e., data generation thread 2) can be determined from the created data generation threads (i.e., data generation threads 1 to 3). Then, the data generation thread 2 in each instance can be restarted, and the restarted data generation thread 2 can be used to generate test data according to the data configuration information 4, and for the data generation threads 1 and 3 in each instance, the data generation thread 1 can be used to generate test data according to the static configuration file 1, and the data generation thread 3 can be used to generate test data according to the static configuration file 3.

[0169] like Figure 4 As shown, it is a triggering schematic diagram of a modification detection mechanism provided in an embodiment of the present disclosure, wherein, after the static configuration file is modified, the modification detection mechanisms of instances A to C can all be triggered, and then the target threads corresponding to the instances A to C can be determined and restarted, thereby realizing the generation of test data according to the modified data configuration information by using the restarted target threads.

[0170] In this way, through the reverse modification detection mechanism, when the static configuration file is modified, the created data generation thread in the instance that executes each data production task related to the static configuration file before the modification can be restarted, so that the restarted data generation thread can be used to generate test data that matches the modified static configuration file, thereby improving the accuracy of test data generation.

[0171] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0172] Based on the same inventive concept, a test data generating device corresponding to the test data generating method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned test data generating method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0173] like Figure 5 FIG. 1 is a schematic diagram of a test data generating device provided by an embodiment of the present disclosure, comprising:

[0174] The acquisition module 501 is used to acquire test data generation parameters matching the function to be tested of the time series database by using a static configuration file or a preset parameter acquisition interface; the test data generation parameters include a plurality of data configuration information, and the data configuration information is generated based on a data configuration format pre-configured for the function to be tested;

[0175] A creation module 502, used for creating data generation threads corresponding to each of the data configuration information according to the function to be tested;

[0176] The generation module 503 is used to generate multiple test data with data names indicated by the data configuration information according to the data description information and data value information in the corresponding data configuration information by using each of the data generation threads; the test data is used to perform functional testing on the to-be-tested functions of the time series database.

[0177] In a possible implementation, the acquisition module 501, when using a static configuration file to acquire test data generation parameters matching the function to be tested of the time series database, is used to:

[0178] Acquire a first static configuration file matching the function to be tested from a remote configuration platform, and acquire the pre-configured data generation parameters based on the first static configuration file; or,

[0179] The data generation parameters are obtained by using a second static configuration file pre-configured locally and matching the function to be tested.

[0180] In a possible implementation manner, the acquisition module 501, when using a preset parameter acquisition interface to acquire test data generation parameters matching the function to be tested of the time series database, is used to:

[0181] In response to receiving the parameter acquisition request, calling the data production service using the parameter acquisition interface;

[0182] The data generation parameters are generated based on the parameter acquisition request and the data configuration format corresponding to the function to be tested by utilizing the called data production service.

[0183] In a possible implementation manner, the data configuration information further includes a data cycle generation interval and a preset number of cycles;

[0184] The generating module 503, when using each of the data generating threads to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and the data value information in the corresponding data configuration information, is used to:

[0185] For any of the data generation threads, using the data generation thread, according to the data loop generation interval, based on the data description information and the data value information, generate the test data with the data name until the number of loops reaches a preset number of loops, thereby obtaining multiple test data with the data name.

[0186] In a possible implementation, the device further includes:

[0187] The reporting module 504, after using each of the data generation threads to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and the data value information in the corresponding data configuration information, is used to:

[0188] According to the data type, the test data generated by each of the data generation threads are classified and processed to obtain test data of each data type;

[0189] By using the proxy service, the test data under each data type is reported to the processing link of the server, so as to use the processing link to perform a functional test on the function to be tested.

[0190] In a possible implementation, the creation module 502, when creating the data generation threads corresponding to the respective data configuration information according to the function to be tested, is used to:

[0191] Determine whether there is a test data generation list currently, wherein the test data generation list includes each test data currently being generated;

[0192] If so, determining whether the data configuration information in the test data generation parameter is repeated with the acquired configuration information of each test data in the test data generation list;

[0193] If not, then create data generation threads corresponding to the respective data configuration information according to the functions to be tested.

[0194] In a possible implementation manner, after creating the data generation threads corresponding to the respective data configuration information according to the function to be tested, the creation module 502 is further configured to:

[0195] The test data generation list is updated according to the test data to be generated corresponding to the data configuration information to obtain a new test data generation list.

[0196] In a possible implementation manner, the generating module 503, when using each of the data generating threads to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and the data value information in the corresponding data configuration information, is used to:

[0197] In response to triggering the modification detection mechanism, obtaining modified data configuration information;

[0198] Acquire a target thread matching the modified data configuration information from each of the created data generation threads; the target thread is a thread related to the pre-modification data configuration information corresponding to the modified data configuration information;

[0199] The target thread is restarted, and a plurality of test data having data names indicated by the modified data configuration information are generated by using the restarted target thread according to the data description information and data value information in the modified data configuration information.

[0200] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0201] Based on the same technical concept, the embodiment of the present application also provides a computer device. Figure 6 FIG. 1 is a schematic diagram of a computer device provided in an embodiment of the present application, including:

[0202] Processor 601, memory 602 and bus 603. The memory 602 stores machine-readable instructions executable by the processor 601, and the processor 601 is used to execute the machine-readable instructions stored in the memory 602. When the machine-readable instructions are executed by the processor 601, the processor 601 performs the following steps: S101: using a static configuration file or a preset parameter acquisition interface, obtain test data generation parameters matching the function to be tested of the time series database; the test data generation parameters include multiple data configuration information, and the data configuration information is generated based on the data configuration format pre-configured for the function to be tested; S102: creating data generation threads corresponding to each data configuration information according to the function to be tested; and S103: using each data generation thread, according to the data description information and data value information in the corresponding data configuration information, generate multiple test data with data names indicated by the data configuration information; the test data is used to perform functional testing on the function to be tested of the time series database.

[0203] The above-mentioned memory 602 includes a memory 6021 and an external memory 6022; the memory 6021 here is also called an internal memory, which is used to temporarily store the calculation data in the processor 601, as well as the data exchanged with the external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the memory 6021. When the computer device is running, the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 executes the execution instructions mentioned in the above method embodiment.

[0204] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the test data generation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0205] The computer program product of the test data generating method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the test data generating method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0206] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

[0207] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0208] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0209] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0210] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0211] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device for processing personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0212] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.< / tag> < / tag> < / metric>

Claims

1. A test data generation method, characterized in that: include: Using a static configuration file or a preset parameter acquisition interface, obtain test data generation parameters that match the function to be tested of the time series database; The test data generation parameters include a plurality of data configuration information, wherein the data configuration information is generated based on a data configuration format pre-configured for the function to be tested; Creating data generation threads corresponding to the respective data configuration information according to the functions to be tested; Using each of the data generation threads, according to the data description information and data value information in the corresponding data configuration information, a plurality of test data having the data name indicated by the data configuration information are generated; The test data is used to perform a functional test on the to-be-tested function of the time series database.

2. The method according to claim 1, characterized in that Use the static configuration file to obtain test data generation parameters that match the function to be tested of the time series database, including: Acquire a first static configuration file matching the function to be tested from a remote configuration platform, and acquire the pre-configured data generation parameters based on the first static configuration file; or, The data generation parameters are obtained by using a second static configuration file pre-configured locally and matching the function to be tested.

3. The method according to claim 1, characterized in that: Use the preset parameter acquisition interface to obtain the test data generation parameters that match the function to be tested of the time series database, including: In response to receiving the parameter acquisition request, calling the data production service using the parameter acquisition interface; The data generation parameters are generated based on the parameter acquisition request and the data configuration format corresponding to the function to be tested by utilizing the called data production service.

4. The method according to claim 1, characterized in that The data configuration information also includes a data cycle generation interval and a preset number of cycles; Using each of the data generation threads, according to the data description information and data value information in the corresponding data configuration information, a plurality of test data having the data name indicated by the data configuration information is generated, including: For any of the data generation threads, using the data generation thread, according to the data loop generation interval, based on the data description information and the data value information, generate the test data with the data name until the number of loops reaches a preset number of loops, thereby obtaining multiple test data with the data name.

5. The method according to claim 1, characterized in that After using each of the data generation threads to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and the data value information in the corresponding data configuration information, the method further includes: According to the data type, the test data generated by each of the data generation threads are classified and processed to obtain test data of each data type; By using the proxy service, the test data under each data type is reported to the processing link of the server, so as to use the processing link to perform a functional test on the function to be tested.

6. The method according to claim 3, characterized in that Creating data generation threads corresponding to the respective data configuration information according to the functions to be tested includes: Determine whether there is a test data generation list currently, wherein the test data generation list includes each test data currently being generated; If so, determining whether the data configuration information in the test data generation parameter is repeated with the acquired configuration information of each test data in the test data generation list; If not, then create data generation threads corresponding to the respective data configuration information according to the functions to be tested.

7. The method according to claim 6, characterized in that After creating data generation threads corresponding to the respective data configuration information according to the functions to be tested, the method further includes: The test data generation list is updated according to the test data to be generated corresponding to the data configuration information to obtain a new test data generation list.

8. The method according to claim 1, characterized in that: Using each of the data generation threads, according to the data description information and data value information in the corresponding data configuration information, a plurality of test data having the data name indicated by the data configuration information is generated, including: In response to triggering the modification detection mechanism, obtaining modified data configuration information; Acquire a target thread matching the modified data configuration information from each of the created data generation threads; the target thread is a thread related to the pre-modification data configuration information corresponding to the modified data configuration information; The target thread is restarted, and a plurality of test data having data names indicated by the modified data configuration information are generated by using the restarted target thread according to the data description information and data value information in the modified data configuration information.

9. A test data generating device, characterized in that: include: An acquisition module, used to obtain test data generation parameters matching the function to be tested of the time series database using a static configuration file or a preset parameter acquisition interface; The test data generation parameters include a plurality of data configuration information, wherein the data configuration information is generated based on a data configuration format pre-configured for the function to be tested; A creation module, used for creating data generation threads corresponding to each of the data configuration information according to the function to be tested; A generating module, used to generate a plurality of test data having a data name indicated by the data configuration information according to the data description information and data value information in the corresponding data configuration information by using each of the data generating threads; The test data is used to perform a functional test on the to-be-tested function of the time series database.

10. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the test data generation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the test data generating method according to any one of claims 1 to 8.