Test data generation method and device, and electronic device

By splitting and replacing preset keywords in the JSON Schema, M sets of target description content are generated, which solves the problem of low generation efficiency and accuracy caused by the randomness of test data, and realizes efficient and accurate generation of full test data.

CN119829424BActive Publication Date: 2026-06-09HILLSTONE NETWORKS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HILLSTONE NETWORKS CO LTD
Filing Date
2024-12-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies generate test data using JSON Schema, which exhibits high randomness, resulting in low efficiency and accuracy in generating full test data.

Method used

By identifying preset keywords in the JSON Schema, the target sub-description content is split and replaced to generate M sets of target description content, ensuring the uniqueness and accuracy of each sub-description content.

Benefits of technology

It reduces the randomness of test data, improves the efficiency and accuracy of generating full test data, ensures the uniqueness of the value of each field, and realizes the complete generation of full test data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829424B_ABST
    Figure CN119829424B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for generating test data. Relating to the field of computers, the method includes: obtaining initial description content for describing a test data set; if a preset keyword exists in the initial description content, obtaining M first fields from the target sub-description content to which the preset keyword belongs; splitting the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field, obtaining M sets of split sub-description content; replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, obtaining M sets of target description content; and obtaining the full test data of the test data set based on the M target description content. This application solves the problem in related technologies where the generated test data has strong randomness, leading to low efficiency and accuracy in generating full test data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, and electronic device for generating test data. Background Technology

[0002] In a web system, data transfer between the front-end and back-end is done through the Application Programming Interface (API). The front-end and back-end predefine the data transfer format and the meaning of each field to facilitate interactive display. Therefore, testing the API is extremely important.

[0003] Since the data structure in the API interface is in JSON (JavaScript Object Notation) format, in order to clearly define the format and value range of the data in the interface, the design and management of the API usually need to be recorded and maintained using documentation or other manual methods. For example, developers first define a set of declarative formats for describing JSON data to standardize the API, and generate test data to test the API based on the JSON Schema.

[0004] However, when generating test data based on the description in the JSON Schema, the test data generation method defined in the JSON Schema is random, which results in a high degree of randomness in the data generated based on the JSON Schema. When a comprehensive test of the API is required, it is impossible to generate all the data, which means that some data may not exist in the test data, leading to inaccurate test data and affecting the accuracy of the API test.

[0005] There is currently no effective solution to the problem that the randomness of test data generated by JSON Schema in related technologies leads to low efficiency and accuracy in generating full test data. Summary of the Invention

[0006] This application provides a method, apparatus, and electronic device for generating test data to solve the problem that the test data generated by JSON Schema in related technologies has strong randomness, resulting in low efficiency and accuracy in generating full test data for API interface testing.

[0007] According to one aspect of this application, a method for generating test data is provided. The method includes: obtaining initial description content for describing a test data set, and identifying whether a preset keyword exists in the initial description content; if the preset keyword exists in the initial description content, obtaining M first fields from the target sub-description content to which the preset keyword belongs, and splitting the first sub-description content to which the first field belongs in the target sub-description content according to the first subordinate fields under each first field, to obtain M sets of split sub-description content, wherein each set of split sub-description content includes at least one split sub-description content; replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, respectively, to obtain M sets of target description content, wherein each set of target description content contains at least one target description content; and obtaining the full test data of the test data set based on the M target description content.

[0008] Optionally, obtaining the M first fields in the target sub-description content to which the preset keyword belongs includes: identifying the initial fields in the target sub-description content to obtain multiple initial fields; determining the position of each initial field in the target sub-description content, and determining the initial field located under the target position as the target field to obtain M target fields; obtaining the description field under each target field, and determining the description field of each target field as the first field to obtain M first fields.

[0009] Optionally, splitting the first sub-description content belonging to the first field of the target sub-description content according to the first subordinate fields under each first field includes: obtaining the field type of the first subordinate field under the first field; determining whether the field type is an enumeration type; if the first subordinate field is an enumeration type, obtaining N field values ​​in the first subordinate field, and splitting the first sub-description content according to each field value to obtain N split sub-description contents, wherein each split sub-description content contains one of the N field values; if the first subordinate field is not an enumeration type, determining the first subordinate field as a split sub-description content.

[0010] Optionally, replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each first field includes: deleting the preset keyword corresponding to the target sub-description content, and replacing the target sub-description content in the initial description content with the split sub-description content for each first field to obtain the target description content.

[0011] Optionally, the method further includes: upon receiving a critical data acquisition instruction for a target interval sent by a user terminal, determining the data type of the data to be acquired from the critical data acquisition instruction, wherein the critical data acquisition instruction contains the data type of the data to be acquired and data acquisition requirements, and the critical data acquisition instruction is used to acquire the data to be acquired from a set of M target description contents according to the data type and data acquisition requirements; acquiring a first description content containing the data type from the set of M target description contents; determining a first attribute sub-description content according to the data acquisition requirements, and determining whether the first attribute sub-description content exists in the first description content; if the first attribute sub-description content exists in the first description content, sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirements; if the first attribute sub-description content does not exist in the first description content, determining a preset attribute value of the first attribute sub-description content, and sending the preset attribute value to the user terminal according to the data acquisition requirements.

[0012] Optionally, sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirements includes: when the data acquisition requirements indicate that the data to be acquired is critical data, sending the attribute value corresponding to the first attribute sub-description content to the user terminal; when the data acquisition requirements indicate that the data to be acquired is external data of the target interval, acquiring the attribute value corresponding to the first attribute sub-description content, updating the attribute value according to the data acquisition requirements, obtaining the updated attribute value, and sending the updated attribute value to the user terminal.

[0013] Optionally, the method further includes: upon receiving a special character retrieval instruction sent by the user terminal, parsing the special character retrieval instruction to obtain instruction content, and determining the second field of the character to be retrieved from the instruction content, wherein the special character retrieval instruction is used to instruct the generation of the character to be retrieved; retrieving second description content containing the second field from a set of M target description content; retrieving the second auxiliary field of the second field in the second description content, and retrieving a special character from a character library according to the field value of the second auxiliary field to obtain a special string, and sending the special string to the user terminal, wherein the length of the special string is the field value of the second auxiliary field.

[0014] According to another aspect of this application, a test data generation apparatus is provided. The apparatus includes: a first acquisition unit, configured to acquire initial description content for describing a test data set, and identify whether a preset keyword exists in the initial description content; a splitting unit, configured to, if the preset keyword exists in the initial description content, acquire M first fields in the target sub-description content to which the preset keyword belongs, and split the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field, to obtain M sets of split sub-description content, wherein each set of split sub-description content includes at least one split sub-description content; a replacement unit, configured to replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, respectively, to obtain M sets of target description content, wherein each set of target description content contains at least one target description content; and an identification unit, configured to obtain the full test data of the test data set based on the M target description contents.

[0015] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements a method for generating test data provided in the foregoing embodiments of the present application.

[0016] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform a test data generation method provided in the foregoing embodiments.

[0017] This application employs the following steps: obtaining initial description content for describing the test data set, and identifying whether a preset keyword exists in the initial description content; if a preset keyword exists in the initial description content, obtaining M first fields from the target sub-description content to which the preset keyword belongs, and splitting the first sub-description content to which the first field belongs in the target sub-description content according to the first subordinate fields under each first field to obtain M sets of split sub-description content, wherein each set of split sub-description content includes at least one split sub-description content; replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each first field to obtain M sets of target description content, wherein each set of target description content contains at least one target description content; and obtaining the full test data of the test data set based on the M target description contents.

[0018] This solves the problem of high randomness in test data generated via JSON Schema in related technologies, leading to low efficiency and accuracy in generating full test data. By splitting the first sub-description content under the target sub-description content belonging to the preset keyword and replacing the target sub-description content with the split sub-description content, the content in the target sub-description content corresponding to the preset keyword is split and replaced. This splits the initial description content into M sets of target description content, and then obtains the full test data set based on the M target description content. Since the splitting of the description content reduces the randomness of the generated test data, it reduces the randomness of the generated test data, improves the generation efficiency of all possible test data, and ensures the uniqueness of the value of each field in each sub-description content, thus improving the accuracy of the generated full test data. Attached Figure Description

[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a flowchart of a method for generating test data according to an embodiment of this application;

[0021] Figure 2 This is a flowchart of a method for determining a first field according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of a test data generation apparatus provided according to an embodiment of this application;

[0023] Figure 4 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] It should be noted that the test data generation methods, apparatus, and electronic devices defined in this disclosure can be used in the computer field, or in any field other than the computer field, and the application fields of the test data generation methods, apparatus, and electronic devices defined in this disclosure are not limited.

[0028] It should be noted that all information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) used in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose whether to authorize or refuse use. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.

[0029] The embodiments or examples disclosed herein are not exhaustive, but merely illustrative of some embodiments or examples, and are not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment or example can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment or example can be arbitrarily interchanged. Furthermore, optional methods or examples in a particular embodiment or example can be arbitrarily combined; moreover, embodiments or examples can be arbitrarily combined. For example, some or all steps of different embodiments or examples can be arbitrarily combined, and a particular embodiment or example can be arbitrarily combined with optional methods or examples of other embodiments or examples.

[0030] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0031] JSON Schema: A specification for describing JSON data structures, defining the properties, data types, format, and other information of JSON objects.

[0032] According to an embodiment of this application, a method for generating test data is provided.

[0033] Figure 1 This is a flowchart of a method for generating test data according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:

[0034] Step S101: Obtain the initial description content used to describe the test data set, and identify whether there are preset keywords in the initial description content.

[0035] For example, the initial description content can be a JSON Schema description, which can be used to describe a JSON object containing test data. When API interface test data needs to be generated, the initial description content corresponding to the test data set to which the test data belongs can be obtained first. By compiling the initial description content, random test data can be generated from it.

[0036] For example, the initial description could be:

[0037]

[0038] After processing the initial description, the resulting random test data can be:

[0039] {id:10,tag:["a","b"]} or {id:10,tag:[12,31,33]};

[0040] Therefore, since the initial description cannot accurately obtain the full test data (for example, the test data obtained above does not contain 'c'), the initial description needs to be processed so that the full test data can be obtained from the processed initial description, thereby ensuring the integrity of the test data.

[0041] When processing the initial description content, we can first identify whether the initial description content contains preset keywords. Preset keywords are keywords in the initial description content that represent an "or" relationship, such as "oneOf". If it is determined that the initial description content does not contain preset keywords, it means that no processing is required. If preset keywords exist, the sub-description content corresponding to the preset keywords needs to be processed to obtain the processed initial description content.

[0042] Step S102: If a preset keyword exists in the initial description content, obtain the M first fields in the target sub-description content to which the preset keyword belongs, and split the first sub-description content to which the first field belongs in the target sub-description content according to the first subordinate fields under each first field to obtain M sets of split sub-description content, wherein each set of split sub-description content includes at least one split sub-description content.

[0043] For example, if a preset keyword exists in the initial description content, it is first necessary to determine the target sub-description content to which the preset keyword belongs. For instance, if the preset keyword is "oneOf", the target sub-description content could be:

[0044]

[0045] Furthermore, after obtaining the target sub-description content, the first field in the target sub-description content can be determined. The first field can be the field in the target sub-description content that follows a specific sub-description content field. For example, if the specific sub-description content field is "("items":{"type")", then the field following the specific sub-description content field is determined as the first field. That is, the first field can be "string" or "number".

[0046] The first subordinate field can be an enumerated field under the first field. After obtaining the first field, it is necessary to determine the first subordinate fields under each first field, namely ""enum":["a","b","c"]" and ""minimum":0, "maximum":100", and further split the first sub-description content to which the first subordinate field belongs. The first sub-description content can be a sub-description content that contains the first subordinate field and the first field. For example, the first sub-description content to which ""string" belongs can be:

[0047]

[0048] Furthermore, based on the first auxiliary field ""enum":["a","b","c"]", the first sub-description content is further split into M sets of split sub-description content. Each set of split sub-description content corresponds to one of the first fields, and each set contains at least one split sub-description content. For example, if the first sub-description content is:

[0049]

[0050] In this case, since the first auxiliary field contains three elements "a", "b", and "c", after splitting, we get three split sub-description contents, which are as follows:

[0051] Sub-description content 1:

[0052]

[0053] And sub-description content 2:

[0054]

[0055] And sub-description content 3:

[0056] "type":"array",

[0057] "items":{

[0058] "type":"string",

[0059] "enum":["c"]

[0060] },

[0061] "minItems":1,

[0062] "maxItems":10

[0063] This completes the splitting operation of each first sub-description content.

[0064] It should be noted that if the subordinate fields of the first sub-description content cannot be split, such as the case where the first subordinate field is ""minimum":0, "maximum":100", then the first subordinate field is not split. Instead, the first sub-description content to which the first field belongs is directly determined as the split sub-description content, thereby ensuring that the generated test data still has randomness.

[0065] Step S103: Replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field to obtain M target description content sets, wherein each target description content set contains at least one target description content.

[0066] For example, after obtaining the split sub-description content corresponding to each first field, the target sub-description content can be replaced with the split sub-description content, thereby changing the target sub-description content in the initial description content to the split sub-description content, and obtaining the updated initial description content, i.e. the target description content. This ensures that the target description content contains only one type of data element, thus guaranteeing the accuracy of the data elements in the generated data when generating test data based on the split sub-description content. In this way, multiple split sub-description contents can be used to generate full test data.

[0067] It should be noted that when replacing sub-description content, the preset keywords corresponding to the target sub-description content also need to be deleted. After obtaining multiple target description contents, since the target description contents may still carry preset keywords, the target description contents can be used as the initial description contents in the above process and the above content can be repeated until the preset keywords are no longer present in each target description content. This ensures that after processing each target description content, full test data containing all test data can be obtained based on the target description contents, thereby ensuring the integrity of the test data. It can quickly generate full test data in extreme test scenarios and ensure the accurate execution of the test process.

[0068] For example, when using a split sub-description to describe content, such as:

[0069] "type":"array",

[0070] "items":{

[0071] "type":"string",

[0072] "enum":["c"]

[0073] },

[0074]

[0075] After replacing the target sub-description content, the resulting target description content can be:

[0076]

[0077] The test data obtained based on the target description can be: {id:10,tag:["c"]}, thus ensuring that the test data must contain the element "c".

[0078] It should be noted that since a subfield under a first field may contain multiple data elements, and each data element needs to be split to obtain the corresponding target description content, a first field may generate multiple target description contents, thus obtaining a set of target description contents. In the case of M first fields, M sets of target description contents will be obtained.

[0079] Step S104: Obtain the full set of test data based on the descriptions of the M targets.

[0080] For example, after obtaining the target description content set corresponding to each first field, the full test data corresponding to the test data set can be generated by running M target description content sets for API testing.

[0081] For example, the target description content in each target description content set can be sequentially input into the preset recognition model of the sub-description content, so that the target description content can be processed by the recognition model of the sub-description content to obtain the full test data under the test data set, thereby completing the automatic generation operation of the full test data.

[0082] Here, the recognition model can be used to generate simulated data based on the JSON Schema. In this embodiment, the recognition model is used to generate test data for the API interface based on the JSON Schema.

[0083] For example, by using a sub-description content recognition model to process the description content in the target description content set, the test data obtained from each target description content can be combined to obtain the full set of test data.

[0084] The test data generation method provided in this application embodiment obtains initial description content for describing the test data set and identifies whether a preset keyword exists in the initial description content. If a preset keyword exists in the initial description content, M first fields are obtained from the target sub-description content to which the preset keyword belongs. The first sub-description content to which the first field belongs in the target sub-description content is split according to the first auxiliary fields under each first field, resulting in M ​​sets of split sub-description content. Each set of split sub-description content includes at least one split sub-description content. The target sub-description content in the initial description content is replaced with the split sub-description content corresponding to each first field, resulting in M ​​sets of target description content, each containing at least one target description content. The full test data of the test data set is obtained based on the M target description contents. This solves the problem in related technologies where the test data generated from description content has strong randomness, leading to low accuracy in generating full test data. By splitting the first sub-description content under the target sub-description content belonging to the preset keyword, and replacing the target sub-description content with the split sub-description content, the content in the target sub-description content corresponding to the preset keyword is split and replaced. This splits the initial description content into M sets of target description content, and then obtains the full set of test data based on the M sets of target description content. Since the splitting of the description content reduces the randomness of the generated test data, it reduces the randomness of the generated test data and improves the generation efficiency of all possible test data. In addition, it also ensures the uniqueness of the value of each field in each sub-description content, thus improving the accuracy of the generated full set of test data.

[0085] To accurately determine the first field, optionally, in the test data generation method provided in the embodiments of this application, Figure 2 This is a flowchart of an optional field determination method provided according to an embodiment of this application, such as... Figure 2 As shown, the M first fields obtained from the target sub-description content to which the preset keyword belongs include:

[0086] Step S201: Identify the initial fields in the target sub-description content to obtain multiple initial fields.

[0087] Step S202: Determine the position of each initial field in the target sub-description content, and determine the initial field located at the target position as the target field, thus obtaining M target fields.

[0088] Step S203: Obtain the description field under each target field, and determine the description field of each target field as the first field, thus obtaining M first fields.

[0089] For example, when determining the first field, since the content of the first field is different, it is impossible to determine which fields are the first field based on the field content. Therefore, the initial field in the target sub-description content can be identified first. The initial field can be a corresponding field that is related to the first field. For example, in the sub-description content, the first field is usually after a certain field, so that field can be identified as the initial field. Thus, when determining the first field, the initial field can be used to locate the first field.

[0090] It should be noted that after determining multiple initial fields, there may be other initial fields in the sub-description content where the first field does not exist. In this case, to avoid incorrectly selecting the first field, the position information of each initial field in the description content can be determined. Based on the position information, it can be determined whether the initial field is the same as the first field and then it can be identified as the target field.

[0091] After determining the target field, the first field can be determined based on the relationship between the target field and the first field. If the first field is a description field under the target field, the description field under the target field can be determined as the first field, thereby determining each first field in the target sub-description content.

[0092] For example, the target sub-description content can be:

[0093]

[0094] The initial field can be "("items":{"type")". In this case, the position of the initial field can be determined. In the target sub-description content above, there are two initial fields, both located after "{"type":"array",". Therefore, it can be determined that the two initial fields are target fields. Furthermore, the description fields "string" and "number" under the target fields can be determined as the first field, thereby achieving the technical effect of accurately determining the first field.

[0095] This embodiment achieves the technical effect of accurately determining the first field by accurately identifying the target field and determining the description field under the target field as the first field, thus ensuring the accurate execution of the subsequent operation of splitting the subordinate fields under the first field.

[0096] Optionally, in the test data generation method provided in this application embodiment, splitting the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field includes: obtaining the field type of the first auxiliary field under the first field; determining whether the field type is an enumeration type; if the first auxiliary field is an enumeration type, obtaining N field values ​​in the first auxiliary field, and splitting the first sub-description content according to each field value to obtain N split sub-description contents, wherein each split sub-description content contains one of the N field values; if the first auxiliary field is not an enumeration type, determining the first auxiliary field as a split sub-description content.

[0097] Specifically, when splitting the content of the first sub-description, it is necessary to first determine whether the content of the first sub-description can be split. First, it is necessary to obtain the field type of the first auxiliary field. For example, if the first field is "string", the first auxiliary field of this field is: "enum":["a","b","c"]. At this time, it can be determined whether the field type of the first auxiliary field is an enumeration field. If the first auxiliary field is an enumeration type, such as "enum":["a","b","c"], it indicates that the auxiliary field can be split. Then, it is split according to the enumeration field value. For example, "enum":["a","b","c"] is split into "a","b","c", thereby completing the splitting of the field value in the first auxiliary field.

[0098] It should be noted that after splitting the field values, the first sub-description content needs to be split according to the field values. When splitting the first sub-description content, the splitting process is to split the field value of the first subordinate field in the first sub-description content, while the sub-description content in other positions remains unchanged, thus obtaining multiple split sub-description contents.

[0099] For example, the content of the first sub-description is:

[0100]

[0101] In this case, after splitting the field value of the first subordinate field in the first sub-description content, three split sub-description contents are obtained, namely:

[0102]

[0103] as well as

[0104]

[0105]

[0106] as well as

[0107]

[0108] This completes the splitting operation of the first sub-description content.

[0109] It should be noted that if the first subordinate field is not an enumeration type, the field value in the first subordinate field does not need to be split. The first subordinate field can be directly identified as the split sub-description content, thereby completing the operation of splitting each first sub-description content in the target sub-description content.

[0110] This embodiment ensures accurate splitting of the first sub-description content by splitting the field values ​​in the subordinate fields according to the field type.

[0111] Optionally, in the test data generation method provided in this application embodiment, replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each first field includes: deleting the preset keyword corresponding to the target sub-description content, and replacing the target sub-description content in the initial description content with the split sub-description content for each first field to obtain the target description content.

[0112] For example, after obtaining the split sub-description content, in order to ensure that the target sub-description content obtained after replacement does not contain the preset keyword, when replacing the target sub-description content in the initial description content with the split sub-description content, the preset keyword of the target sub-description content needs to be deleted, that is, the "oneOf" appearing in the first line of the target sub-description content needs to be deleted, thereby indicating that the replacement operation of the target sub-description content is completed.

[0113] For example, when using the following split sub-description content:

[0114]

[0115] After replacing the target sub-description content, the resulting target description content can be:

[0116]

[0117] This completes the replacement operation of the target sub-description content in the initial description content.

[0118] It should be noted that since the replaced sub-description content may also contain preset keywords, after performing the replacement operation, each target description content can be used as a new initial description content, and the above operation can be repeated to further split each target description content, ensuring that the target description content does not contain preset keywords. This ensures the integrity of the generated test data when using the target description content to generate test data. For example, all oneOf properties and enumeration properties (e.g., enum) in the JSON description can be recursively split. The values ​​in each oneOf and enumeration property are combined to form a JSON description that does not contain oneOf or enumeration properties. Each complete JSON description after splitting is placed in an array, called schemaList. Since it is a recursive algorithm, each passed description can be collectively referred to as a Schema.

[0119] Optionally, in the test data generation method provided in the embodiments of this application, the method further includes: upon receiving a critical data acquisition instruction for a target interval sent by a user terminal, determining the data type of the data to be acquired from the critical data acquisition instruction, wherein the critical data acquisition instruction includes the data type of the data to be acquired and data acquisition requirements, and the critical data acquisition instruction is used to acquire the data to be acquired from a set of M target description contents according to the data type and data acquisition requirements; acquiring a first description content containing the data type from the set of M target description contents; determining a first attribute sub-description content according to the data acquisition requirements, and determining whether the first attribute sub-description content exists in the first description content; if the first attribute sub-description content exists in the first description content, sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirements; if the first attribute sub-description content does not exist in the first description content, determining a preset attribute value of the first attribute sub-description content, and sending the preset attribute value to the user terminal according to the data acquisition requirements.

[0120] It should be noted that, in this application, after obtaining the target description content, when processing the target description content to obtain test data, specific test data can also be obtained according to the critical data acquisition instruction sent by the user terminal. The critical data are the two endpoint values ​​of the target interval.

[0121] For example, upon receiving a critical data acquisition instruction, the instruction must first be parsed to obtain the data to be acquired as indicated by the instruction, and the data type of the data to be acquired must be determined. For instance, if the critical data acquisition instruction indicates the acquisition of the upper boundary value of the data to be acquired, which is a numeric type, then the data type of the data to be acquired, i.e., the numeric type, can be determined first, and the first description content containing the data type can be obtained from the set of M target description contents, i.e., the first description content containing the numeric type can be obtained.

[0122] For example, the first description could be:

[0123]

[0124] The first description includes a numeric type: "number". The first attribute sub-description can be determined based on the data acquisition requirements. These requirements specify whether the acquired data is above or below a specified boundary, and the data range requirement. Specifically, the data must either be normal data within the range defined in the sub-description or external data outside that range. If the data acquisition requirement is above a specified boundary, the corresponding first attribute sub-description is "maximum"; if it's below a specified boundary, it's "minimum". When the data acquisition requirement is above a specified boundary, we first determine if a corresponding first attribute sub-description exists (i.e., if "maximum" exists). If it does, we can directly determine the critical data to be fed back to the user based on the sub-description value and the data range requirement, thus completing the generation of the critical data.

[0125] It should be noted that if the first attribute sub-description content does not exist, it indicates that there is no upper boundary value in the first description content. In this case, the preset attribute value of the first attribute sub-description content can be directly obtained, and the critical data that needs to be fed back to the user terminal can be determined according to the preset attribute value and the data range requirements in the data acquisition requirements, so as to ensure that test data can be fed back to the user terminal.

[0126] For example, the first description is:

[0127]

[0128] In this case, the critical data acquisition instruction is to obtain the upper boundary value of the parameter with a numeric data type as test data. At this time, the data type is first determined to be "number", that is, numeric type, and then it is further determined whether there is a first attribute sub-description content corresponding to the upper boundary value, that is, "maximum". If it exists, the attribute value under "maximum", that is, 100, is taken as the boundary value. The boundary value 100 is processed according to the data range requirements to obtain the boundary value that meets the data range requirements. The processed boundary value is then sent to the user terminal, thereby completing the boundary test value generation process.

[0129] It should be noted that the data range requirement in the data acquisition requirement is used to characterize whether the test value that the user needs to obtain is a normal value within the test value range or an abnormal value outside the test range. Optionally, in the test data generation method provided in the embodiments of this application, sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirement includes: when the data acquisition requirement indicates that the data to be acquired is critical data, sending the attribute value corresponding to the first attribute sub-description content to the user terminal; when the data acquisition requirement indicates that the data to be acquired is external data of the target interval, acquiring the attribute value corresponding to the first attribute sub-description content, updating the attribute value according to the data acquisition requirement, obtaining the updated attribute value, and sending the updated attribute value to the user terminal.

[0130] For example, when the data acquisition request indicates that the data to be acquired is critical data, it indicates that the test data to be acquired is a normal value within the test value range. In this case, the boundary value can be sent to the user terminal.

[0131] For example, if the upper critical data obtained according to the above process is 100, when the data acquisition request indicates that the critical data should be acquired, the upper critical data 100 can be sent to the user terminal without processing the critical data.

[0132] Furthermore, when the data acquisition requirements indicate that the data to be acquired is external data, the characterization needs to be processed based on the obtained critical data. This processing method requires expanding the upper critical data according to the data range indicated in the data acquisition requirements to obtain abnormal upper critical data, such as 108, and sending this value as a test value to the user terminal to ensure the accuracy of the feedback test data.

[0133] This embodiment ensures the accuracy of the data fed back to the user by processing critical data according to data acquisition requirements.

[0134] Optionally, in the test data generation method provided in the embodiments of this application, the method further includes: upon receiving a special character acquisition instruction sent by a user terminal, parsing the special character acquisition instruction to obtain instruction content, and determining a second field of the character to be acquired from the instruction content, wherein the special character acquisition instruction is used to instruct the generation of the character to be acquired; acquiring a second description content containing the second field from a set of M target description contents; acquiring a second auxiliary field of the second field in the second description content, and acquiring a special character from a character library according to the field value of the second auxiliary field to obtain a special string, and sending the special string to the user terminal, wherein the length of the special string is the field value of the second auxiliary field.

[0135] It should be noted that, in this application, after obtaining the target description content, when processing the target description content to obtain test data, specific test data can also be obtained according to the special character acquisition command sent by the user terminal.

[0136] For example, upon receiving a special character retrieval instruction from a user, it is necessary to parse the instruction to obtain its content, and determine the second field of the character to be retrieved based on the instruction content. This second field, used in the description content, indicates the string length range. After determining the second field, a second description containing the second field can be retrieved. This second description can be:

[0137] "name":{

[0138] "type":"string",

[0139] "minLength":10,

[0140] "maxLength":100

[0141] },

[0142] The second field is "string". After obtaining the second description content, the auxiliary fields of the second description content can be obtained, namely "minLength":10,"maxLength":100. After obtaining these auxiliary fields, the length boundary value of the string indicated by the instruction can be determined according to the instruction content. For example, to generate a string with the maximum length, the second auxiliary field is determined to be "maxLength":100, and the length of the generated special character is determined to be 100. 100 characters are randomly selected from the character library, combined into a string of length 100, and sent to the user terminal, thus completing the special character generation operation.

[0143] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0144] This application also provides a test data generation apparatus. It should be noted that the test data generation apparatus of this application can be used to execute the test data generation method provided in this application. The test data generation apparatus provided in this application will be described below.

[0145] Figure 3 This is a schematic diagram of a test data generation apparatus provided according to an embodiment of this application. Figure 3 As shown, the device includes: a first acquisition unit 31, a splitting unit 32, a replacement unit 33, and an identification unit 34.

[0146] The first acquisition unit 31 is used to acquire the initial description content used to describe the test data set and to identify whether there are preset keywords in the initial description content.

[0147] The splitting unit 32 is used to obtain M first fields in the target sub-description content to which the preset keywords belong when there are preset keywords in the initial description content, and to split the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field to obtain M split sub-description content sets, wherein each split sub-description content set includes at least one split sub-description content.

[0148] Replacement unit 33 is used to replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, to obtain M sets of target description content, wherein each set of target description content contains at least one target description content.

[0149] The identification unit 34 is used to obtain the full set of test data for the test data set based on the descriptions of the M targets.

[0150] The test data generation apparatus provided in this application embodiment acquires initial description content for describing the test data set through a first acquisition unit 31 and identifies whether there is a preset keyword in the initial description content; if the preset keyword exists in the initial description content, the splitting unit 32 acquires M first fields in the target sub-description content to which the preset keyword belongs, and splits the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field to obtain M split sub-description content sets, wherein each split sub-description content set includes at least one split sub-description content; the replacement unit 33 replaces the target sub-description content in the initial description content with the split sub-description content corresponding to each first field to obtain M target description content sets, wherein each target description content set contains at least one target description content; and the identification unit 34 obtains the full test data of the test data set based on the M target description contents. This invention addresses the issue of high randomness in test data generated from description content in related technologies, leading to low accuracy in generating full test data. It solves this problem by splitting the first sub-description content under the target sub-description content corresponding to the preset keyword, and replacing the target sub-description content with the split sub-description content. This splits the initial description content into M sets of target description content, and then generates full test data based on these M sets. Because splitting the description content reduces the randomness of the generated test data, it lowers the randomness of test data generation, improves the efficiency of generating all possible test data, and ensures the uniqueness of the value of each field in each sub-description content, thus improving the accuracy of the generated full test data.

[0151] Optionally, in the test data generation apparatus provided in this application embodiment, the splitting unit 32 includes: an identification module, used to identify initial fields in the target sub-description content to obtain multiple initial fields; a first determination module, used to determine the position of each initial field in the target sub-description content, and determine the initial field located at the target position as the target field to obtain M target fields; and a first acquisition module, used to acquire the description field under each target field, and determine the description field of each target field as the first field to obtain M first fields.

[0152] Optionally, in the test data generation apparatus provided in this application embodiment, the splitting unit 32 includes: a second acquisition module, used to acquire the field type of the first subordinate field under the first field; a judgment module, used to judge whether the field type is an enumeration type; a third acquisition module, used to acquire N field values ​​in the first subordinate field when the first subordinate field is an enumeration type, and split the first sub-description content according to each field value to obtain N split sub-description contents, wherein each split sub-description content contains one of the N field values; and a second determination module, used to determine the first subordinate field as a split sub-description content when the first subordinate field is not an enumeration type.

[0153] Optionally, in the test data generation apparatus provided in this application embodiment, the replacement unit 33 includes: a deletion module, used to delete the preset keywords corresponding to the target sub-description content, and for each first field, replace the target sub-description content in the initial description content with the split sub-description content to obtain the target description content.

[0154] Optionally, in the test data generation apparatus provided in the embodiments of this application, the apparatus further includes: a determining unit, configured to determine the data type of the data to be acquired from the critical data acquisition instruction when receiving a critical data acquisition instruction for a target interval sent by a user terminal, wherein the critical data acquisition instruction includes the data type of the data to be acquired and data acquisition requirements, and the critical data acquisition instruction is used to acquire the data to be acquired from a set of M target description contents according to the data type and data acquisition requirements; a second acquisition unit, configured to acquire a first description content containing the data type from the set of M target description contents; a judging unit, configured to determine a first attribute sub-description content according to the data acquisition requirements, and judge whether the first attribute sub-description content exists in the first description content; a first sending unit, configured to send the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirements when the first attribute sub-description content exists in the first description content; and a second sending unit, configured to determine a preset attribute value of the first attribute sub-description content when the first attribute sub-description content does not exist in the first description content, and send the preset attribute value to the user terminal according to the data acquisition requirements.

[0155] Optionally, in the test data generation apparatus provided in this application embodiment, the first sending unit includes: a sending module, configured to send the attribute value corresponding to the first attribute sub-description content to the user terminal when the data acquisition requirement indicates that the data to be acquired is critical data; and an updating module, configured to acquire the attribute value corresponding to the first attribute sub-description content, update the attribute value according to the data acquisition requirement, obtain the updated attribute value, and send the updated attribute value to the user terminal when the data acquisition requirement indicates that the data to be acquired is external data of the target interval.

[0156] Optionally, in the test data generation apparatus provided in the embodiments of this application, the apparatus further includes: a parsing unit, configured to parse the special character acquisition instruction sent by the user terminal upon receiving the special character acquisition instruction, obtain the instruction content, and determine the second field of the character to be acquired from the instruction content, wherein the special character acquisition instruction is used to instruct the generation of the character to be acquired; a third acquisition unit, configured to acquire the second description content containing the second field from a set of M target description contents; and a fourth acquisition unit, configured to acquire the second auxiliary field of the second field in the second description content, and acquire the special character from the character library according to the field value of the second auxiliary field to obtain the special string, and send the special string to the user terminal, wherein the length of the special string is the field value of the second auxiliary field.

[0157] The device for generating the test data includes a processor and a memory. The first acquisition unit 31, the splitting unit 32, the replacement unit 33, the identification unit 34, etc., are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.

[0158] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured. By adjusting kernel parameters, the problem of high randomness in test data generated via JSON Schema, leading to low efficiency and accuracy in generating full test data, can be addressed.

[0159] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0160] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a method for generating the test data.

[0161] This invention provides a processor for running a program, wherein the program executes a method for generating test data during runtime.

[0162] Figure 4 This is a schematic diagram of an electronic device provided according to an embodiment of this application, such as... Figure 4 As shown, this embodiment of the invention provides an electronic device 40, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the above-described test data generation method. The device in this document can be a server, PC, PAD, mobile phone, etc.

[0163] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of initializing the method for generating the above-described test data.

[0164] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing descriptions of computer-usable program sub-programs.

[0165] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0166] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0167] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0168] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0169] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0170] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0171] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0172] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating test data, characterized in that, include: Obtain initial description content for describing the test data set, and identify whether there are preset keywords in the initial description content, wherein the preset keywords are keywords in the initial description content that represent or relationships; If the preset keyword exists in the initial description content, obtain M first fields in the target sub-description content to which the preset keyword belongs, and split the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field to obtain M sets of split sub-description content. The first field is the field in the target sub-description content to which the preset keyword belongs located after the initial field, and the first auxiliary field is used to describe the range or attribute of the first field. Each set of split sub-description content includes at least one split sub-description content. The process of splitting the first sub-description content belonging to the first field of the target sub-description content according to the first auxiliary fields under each first field includes: obtaining the field type of the first auxiliary field under the first field; determining whether the field type is an enumeration type; if the first auxiliary field is the enumeration type, obtaining N field values ​​in the first auxiliary field, and splitting the first sub-description content according to each field value to obtain N split sub-description contents, wherein each split sub-description content contains one of the N field values, and the split sub-description content is a sub-description content containing a single enumeration value obtained by splitting according to the enumeration value of the first auxiliary field; Replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field to obtain M target description content sets, wherein each target description content set contains at least one target description content; The full set of test data is obtained from the set of M target description contents.

2. The method according to claim 1, characterized in that, The M first fields obtained from the target sub-description content to which the preset keyword belongs include: Identify the initial fields in the target sub-description content to obtain multiple initial fields; Determine the position of each initial field in the target sub-description content, and identify the initial field located at the target position as the target field, thus obtaining M target fields; Obtain the description field under each target field, and determine the description field of each target field as the first field, thus obtaining M first fields.

3. The method according to claim 1, characterized in that, The first sub-description content belonging to the first field in the target sub-description content is split according to the first subordinate field under each first field, including: If the first auxiliary field is not the enumeration type, the first auxiliary field is determined to be the split sub-description content.

4. The method according to claim 1, characterized in that, Replacing the target sub-description content in the initial description content with the split sub-description content corresponding to each of the first fields includes: Delete the preset keywords corresponding to the target sub-description content, and for each first field, replace the target sub-description content in the initial description content with the split sub-description content to obtain the target description content.

5. The method according to claim 1, characterized in that, The method further includes: Upon receiving a critical data acquisition instruction for a target interval sent by a user terminal, the data type of the data to be acquired is determined from the critical data acquisition instruction. The critical data acquisition instruction includes the data type of the data to be acquired and the data acquisition requirements. The critical data acquisition instruction is used to acquire the data to be acquired from the M target description content sets according to the data type and the data acquisition requirements. Obtain the first description content containing the data type from the M sets of target description content; The first attribute sub-description content is determined according to the data acquisition requirements, and it is determined whether the first attribute sub-description content exists in the first description content; If the first attribute sub-description content exists in the first description content, the attribute value corresponding to the first attribute sub-description content in the first description content is sent to the user terminal according to the data acquisition requirements; If the first attribute sub-description content is not present in the first description content, a preset attribute value for the first attribute sub-description content is determined, and the preset attribute value is sent to the user terminal according to the data acquisition requirements.

6. The method according to claim 5, characterized in that, Sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user terminal according to the data acquisition requirements includes: When the data acquisition request indicates that the data to be acquired is critical data, the attribute value corresponding to the first attribute sub-description content is sent to the user terminal. When the data acquisition requirement indicates that the data to be acquired is external data of the target interval, the attribute value corresponding to the first attribute sub-description content is acquired, and the attribute value is updated according to the data acquisition requirement to obtain the updated attribute value, and the updated attribute value is sent to the user terminal.

7. The method according to claim 1, characterized in that, The method further includes: Upon receiving a special character retrieval instruction sent by the user terminal, the special character retrieval instruction is parsed to obtain the instruction content, and the second field of the character to be retrieved is determined from the instruction content, wherein the special character retrieval instruction is used to instruct the generation of the character to be retrieved; Obtain the second description content containing the second field from the M target description content sets; Obtain the second auxiliary field of the second field in the second description content, and obtain special characters from the character library according to the field value of the second auxiliary field to obtain a special string, and send the special string to the user terminal, wherein the length of the special string is the field value of the second auxiliary field.

8. A test data generation device, characterized in that, include: The first acquisition unit is used to acquire initial description content for describing the test data set, and to identify whether there are preset keywords in the initial description content, wherein the preset keywords are keywords in the initial description content that represent or relationships; The splitting unit is configured to, when the preset keyword exists in the initial description content, obtain M first fields in the target sub-description content to which the preset keyword belongs, and split the first sub-description content to which the first field belongs in the target sub-description content according to the first auxiliary fields under each first field to obtain M split sub-description content sets, wherein the first field is the field in the target sub-description content to which the preset keyword belongs located after the initial field, the first auxiliary field is used to describe the range or attribute of the first field, and each split sub-description content set includes at least one split sub-description content; The splitting unit includes: a second acquisition module for acquiring the field type of the first subordinate field under the first field; a judgment module for judging whether the field type is an enumeration type; and a third acquisition module for acquiring N field values ​​in the first subordinate field when the first subordinate field is the enumeration type, and splitting the first sub-description content according to each field value to obtain N split sub-description contents, wherein each split sub-description content contains one of the N field values, and the split sub-description content is a sub-description content containing a single enumeration value obtained by splitting according to the enumeration value of the first subordinate field. The replacement unit is used to replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, so as to obtain M sets of target description content, wherein each set of target description content contains at least one target description content; The identification unit is used to obtain the full test data of the test data set based on the M target description content sets.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the test data generation method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, executes the method for generating test data according to any one of claims 1 to 7.