Test data generation method and device and electronic equipment

By splitting and replacing the sub-description content corresponding to the preset keywords in JSON Schema, a full amount of test data is generated, which solves the problem of high randomness of test data in the prior art, resulting in low efficiency and accuracy, and achieves more efficient and accurate test data generation.

CN119829424AActive Publication Date: 2025-04-15HILLSTONE NETWORKS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411776957.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-15
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In the prior art, the test data generated by JSON Schema has strong randomness, resulting in low efficiency and accuracy in generating a full amount of test data.

Method used

By obtaining whether there are preset keywords in the initial description content, if so, split the first field in the target sub-description content, generate a set of multiple split molecule description contents, and replace it with the initial description content, and generate a full amount of test data.

Benefits of technology

Reduces the randomness of the test data, improves the efficiency and accuracy of generating a full amount of test data, and ensures the uniqueness of the value of each field in each sub-description content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829424A_ABST
    Figure CN119829424A_ABST
Patent Text Reader

Abstract

The invention discloses a test data generation method and device and electronic equipment. The method comprises the steps that initial description content used for describing a test data set is acquired; under the condition that a preset keyword exists in the initial description content, obtaining M first fields in target sub-description content to which the preset keyword belongs, and splitting the first sub-description content to which the first field in the target sub-description content belongs according to a first affiliated field under each first field to obtain M split sub-description content sets; 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 target description content sets; and obtaining full test data of the test data set according to the M target description contents. Through the method and the device, the problem that the efficiency and the accuracy of generating the full-amount test data are low due to the fact that the randomness of the generated test data is high in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular, to a method and device for generating test data and an electronic device. Background Art

[0002] In a Web system, data transmission between the front-end and back-end is carried out through the Application Programming Interface (API). The front-end and back-end will define the format of data transmission and the meaning of each field in advance to facilitate interactive display, so API testing 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 documents or other manual methods. For example, developers first define a set of JSON Schema in a declarative format for describing JSON data to standardize the API, and generate test data for testing the API based on the JSON Schema.

[0004] However, when generating test data according to the description in JSON Schema, the test data generation method defined in JSON Schema is random, which results in a strong randomness of the data generated according to JSON Schema. When the API needs to be fully tested, full data cannot be generated, that is, some data may not exist in the test data, resulting in inaccurate test data and affecting the accuracy of API testing.

[0005] Currently, no effective solution has been proposed to address the problem that the test data generated by JSON Schema in related technologies is highly random, resulting in low efficiency and accuracy in generating full test data. Summary of the invention

[0006] The present application provides a method, device and electronic device for generating test data to solve the problem that the test data generated by JSON Schema in the related art is highly random, resulting in low efficiency and accuracy in generating full test data for API interface testing.

[0007] According to one aspect of the present 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 there is a preset keyword in the initial description content; in the case where there is a preset keyword in the initial description content, obtaining M first fields in the target sub-description content to which the preset keyword belongs, and splitting the first sub-description content belonging to the first field in the target sub-description content according to the first subsidiary field 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; using the split sub-description content corresponding to each first field to replace the target sub-description content in the initial description content, respectively, to obtain M target description content sets, wherein each target description content set includes at least one target description content; obtaining the full test data of the test data set according to the M target description contents.

[0008] Optionally, obtaining M first fields in the target sub-description content to which the preset keyword belongs includes: identifying the initial field 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 at 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 in the target sub-description content according to the first subsidiary field under each first field includes: obtaining the field type of the first subsidiary field under the first field; judging whether the field type is an enumeration type; when the first subsidiary field is an enumeration type, obtaining N field values ​​in the first subsidiary 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 field value among the N field values; when the first subsidiary field is not an enumeration type, determining the first subsidiary field as a split sub-description content.

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

[0011] Optionally, the method also includes: upon receiving a critical data acquisition instruction for a target interval sent by a user terminal, determining a data type of the data to be acquired from the critical data acquisition instruction, wherein the critical data acquisition instruction includes the data type and data acquisition requirements of the data to be acquired, and the critical data acquisition instruction is used to acquire the data to be acquired from M target description content sets according to the data type and the data acquisition requirements; acquiring a first description content including the data type from the M target description content sets; 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; in a case where the first attribute sub-description content exists in the first description content, sending an 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; in a case where 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 end 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 end; when the data acquisition requirement indicates that the data to be acquired is external data in a target interval, acquiring the attribute value corresponding to the first attribute sub-description content, and updating the attribute value according to the data acquisition requirement to obtain an updated attribute value, and sending the updated attribute value to the user end.

[0013] Optionally, the method also includes: upon receiving a special character acquisition instruction sent by the user end, 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 indicate 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 subsidiary field of the second field in the second description content, and acquiring special characters from a character library according to the field value of the second subsidiary field to obtain a special character string, and sending the special character string to the user end, wherein the length of the special character string is the field value of the second subsidiary field.

[0014] According to another aspect of the present application, a device for generating test data is provided. The device includes: a first acquisition unit, which is used to acquire initial description content for describing a test data set, and identify whether there is a preset keyword in the initial description content; a splitting unit, which is used to acquire M first fields in the target sub-description content to which the preset keyword belongs, and split the first sub-description content belonging to the first field in the target sub-description content according to the first subsidiary field 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; a replacement unit, which 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, respectively, to obtain M target description content sets, wherein each target description content set includes at least one target description content; an identification unit, which is used to obtain the full test data of the test data set according to the M target description contents.

[0015] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, a method for generating test data provided in the aforementioned embodiment of the present application is implemented.

[0016] According to another aspect of the present invention, an electronic device is provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein when the computer-readable instructions are executed, a method for generating test data provided in the aforementioned embodiment is executed.

[0017] Through the present application, the following steps are adopted: obtaining initial description content for describing a test data set, and identifying whether there are preset keywords in the initial description content; in the case where there are preset keywords in the initial description content, obtaining M first fields in the target sub-description content to which the preset keywords belong, and splitting the first sub-description content belonging to the first field in the target sub-description content according to the first subsidiary field 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; using the split sub-description content corresponding to each first field to replace the target sub-description content in the initial description content, respectively, to obtain M target description content sets, wherein each target description content set contains at least one target description content; obtaining the full test data of the test data set according to the M target description contents.

[0018] In this way, the problem that the test data generated by JSON Schema in the related art is highly random, resulting in low efficiency and accuracy in generating full test data is solved. By splitting the first sub-description content under the target sub-description content to which the preset keyword belongs, 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, so as to split the initial description content into M target description content sets, and then obtain the full test data of the test data set according to the M target description contents. Since the splitting of the description content reduces the randomness of the test data generated by the description content, the randomness of the generated test data is reduced, and the generation efficiency of all possible test data is improved. In addition, the uniqueness of the value of each field in each sub-description content is ensured, and the accuracy of the generated full test data is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

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

[0021] Figure 2 is a flowchart of a first field determination method provided according to an embodiment of the present application;

[0022] Figure 3 is a schematic diagram of a device for generating test data according to an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work 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 and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] It should be noted that the test data generation method, device and electronic device determined in the present disclosure can be used in the computer field, and can also be used in any field other than the computer field. The application field of the test data generation method, device and electronic device determined in the present disclosure is not limited.

[0028] It should be noted that the collected 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, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation portals are provided for users to choose to authorize or refuse to use. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0029] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0030] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0031] JSON Schema: is a specification for describing the JSON data structure, which defines the properties, data types, format and other information of the JSON object.

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

[0033] Figure 1 1 is a flow chart of a method for generating test data according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0034] Step S101 : obtaining initial description content for describing a test data set, and identifying whether there are preset keywords in the initial description content.

[0035] Exemplarily, the initial description content may be a JSON Schema description content, and the initial description content may be used to describe a JSON object containing test data. When it is necessary to generate API interface test data, the initial description content corresponding to the test data set to which the test data belongs may be obtained first, and random test data may be generated from the initial description content by compiling the initial description content.

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

[0037]

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

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

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

[0041] When processing the initial description content, it is possible to first identify whether the initial description content contains a preset keyword, wherein the preset keyword is a keyword representing an "or" relationship in the initial description content, such as "oneOf". When it is determined that the preset keyword does not exist in the initial description content, it indicates that no processing is required. When the preset keyword exists, the sub-description content corresponding to the preset keyword needs to be processed to obtain the processed initial description content.

[0042] Step S102, when there is a preset keyword 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 in the target sub-description content belongs according to the first subsidiary field 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.

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

[0044]

[0045] Furthermore, after obtaining the target sub-description content, the first field in the target sub-description content can be determined, wherein the first field can be a field in the target sub-description content that is located after a specific sub-description content field. For example, the specific sub-description content field is: "("items":{"type")". At this time, the field after 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 subsidiary field may be an enumeration field under the first field. After obtaining the first field, it is necessary to determine the first subsidiary field under each first field, that is, "enum": ["a", "b", "c"]" and "minimum": 0, "maximum": 100", and further split the first sub-description content to which the first subsidiary field belongs, wherein the first sub-description content may be a sub-description content including the first subsidiary field and the first field, for example, the first sub-description content to which "string" belongs may be:

[0047]

[0048] The first sub-description content is further split according to the first subsidiary field ""enum":["a","b","c"]" to obtain M split sub-description content sets, wherein each split sub-description content set corresponds to a first field, and each split sub-description content set contains at least one split sub-description content. For example, when the first sub-description content is:

[0049]

[0050] In the case of , since the first subsidiary field contains three elements "a", "b", and "c", three sub-description contents are obtained after splitting, which are:

[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] Thus, the splitting operation of each first sub-description content is completed.

[0064] It should be noted that when the subsidiary field of the first sub-description content cannot be split, for example, when the first subsidiary field is "minimum":0, maximum":100", the first subsidiary field is not split, but 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 is still random.

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

[0066] Exemplarily, after obtaining the split sub-description content corresponding to each first field, the split sub-description content can be used to replace the target sub-description content, thereby changing the target sub-description content in the initial description content as a whole to the split sub-description content, and obtaining the updated initial description content, that is, the target description content, and making the target description content contain only one type of data element, so that when generating test data according to the split sub-description content, the accuracy of the data elements in the generated data can be guaranteed, and multiple split sub-description contents can be used to generate full test data.

[0067] It should be noted that when replacing the sub-description content, the preset keywords corresponding to the target sub-description content need to be deleted as well. After obtaining multiple target description contents, since the target description content may still carry preset keywords, the target description content can be used as the initial description content in the above process to repeat the above content until the preset keywords do not exist in each target description content. This ensures that after processing each target description content, full test data containing all test data can be obtained according to the target description content, thereby ensuring the integrity of the test data, and being able to quickly generate full test data in extreme test scenarios to ensure the accurate conduct of the test process.

[0068] For example, when using a split sub-description 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 target description content can be obtained as follows:

[0076]

[0077] The test data obtained according to the target description content can be: {id:10,tag:["c"]}, thereby ensuring that the test data must contain the "c" element.

[0078] It should be noted that since the subsidiary fields 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 correspondingly, thereby obtaining a target description content set. When there are M first fields, M target description content sets will be obtained.

[0079] Step S104, obtaining the full amount of test data of the test data set according to the M target description contents.

[0080] Exemplarily, after obtaining the target description content set corresponding to each first field, the full amount of test data corresponding to the test data set can be generated according to the M target description contents by running the M target description contents for use in API testing.

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

[0082] Here, the recognition model can be used to generate simulation data according to JSON Schema. In this embodiment, the recognition model is used to generate test data of the API interface according to JSON Schema.

[0083] For example, the description contents in the target description content set are processed by the sub-description content recognition model, so that the test data obtained according to each target description content are combined to obtain the full amount of test data.

[0084] The test data generation method provided by the embodiment of the present application is to obtain the initial description content used to describe the test data set, and identify whether there is a preset keyword in the initial description content; when there is a preset keyword 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 belonging to the first field in the target sub-description content according to the first subsidiary field under each first field, and obtain M split sub-description content sets, wherein each split sub-description content set includes at least one split sub-description content; respectively replace the target sub-description content in the initial description content with the split sub-description content corresponding to each first field, and obtain M target description content sets, wherein each target description content set includes at least one target description content; obtain the full test data of the test data set according to the M target description contents. This solves the problem that the test data generated by the description content in the related art is highly random, resulting in a low accuracy rate in generating the 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, so as to split the initial description content into M target description content sets, and then obtain the full test data of the test data set according to the M target description contents. Since the splitting of the description content reduces the randomness of the test data generated by the description content, the randomness of the generated test data is reduced, and the generation efficiency of all possible test data is improved. In addition, the uniqueness of the value of each field in each sub-description content is ensured, thereby improving the accuracy of the generated full test data.

[0085] In order to accurately determine the first field, optionally, in the method for generating test data provided in the embodiment of the present application, Figure 2 is a flowchart of an optional field determination method provided according to an embodiment of the present application, such as Figure 2 As shown, obtaining the M first fields in the target sub-description content to which the preset keyword belongs includes:

[0086] Step S201, identifying the initial fields in the target sub-description content to obtain a plurality of initial fields.

[0087] Step S202, determining the position of each initial field in the target sub-description content, and determining the initial field located at the target position as the target field, to obtain M target fields.

[0088] Step S203, obtaining a description field under each target field, and determining the description field of each target field as the first field, to obtain M first fields.

[0089] Exemplarily, when determining the first field, since the field content of the first field is different, it is impossible to determine which fields are the first fields through the field content. Therefore, the initial field in the target sub-description content can be identified first, wherein the initial field can be a corresponding field that has an association with the first field. For example, in the sub-description content, the first field is usually located after a certain field, and the field can be determined as the initial field. Therefore, 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 initial fields in other locations in the sub-description content where the first field does not exist. At this time, in order to avoid incorrect selection of the first field, the position information of each initial field in the description content can be determined, and then it can be determined whether the initial field is the initial field corresponding to the first field based on the position information, and it can be determined as the target field.

[0091] After the target field is determined, the first field can be determined based on the relationship between the target field and the first field. When 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 can be:

[0093]

[0094] The initial field can be: "("items":{"type")", at this time, the position of the initial field can be determined. In the above target sub-description content, two initial fields are included, and their positions are both located after "{"type":"array",". Therefore, it can be determined that the above two initial fields are both target fields, and the description fields "string" and "number" under the target field are further 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 determining the target field and determining the description field under the target field as the first field, thereby ensuring the accurate execution of the subsequent operation of splitting the subsidiary fields under the first field.

[0096] Optionally, in the test data generation method provided in the embodiment of the present application, splitting the first sub-description content belonging to the first field in the target sub-description content according to the first subsidiary field under each first field includes: obtaining the field type of the first subsidiary field under the first field; judging whether the field type is an enumeration type; when the first subsidiary field is an enumeration type, obtaining N field values ​​in the first subsidiary 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 field value among the N field values; when the first subsidiary field is not an enumeration type, determining the first subsidiary field as a split sub-description content.

[0097] Specifically, when splitting the first sub-description content, it is necessary to first determine whether the first sub-description content can be split. First, it is necessary to obtain the field type of the first subsidiary field. For example, when the first field is "string", the first subsidiary field of the field is: "enum":["a","b","c"]. At this time, it can be determined whether the field type of the first subsidiary field is an enumeration field. When the first subsidiary field is an enumeration type, such as "enum":["a","b","c"], it indicates that the subsidiary 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 subsidiary field.

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

[0099] For example, the first sub-description reads:

[0100]

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

[0102]

[0103] as well as

[0104]

[0105]

[0106] as well as

[0107]

[0108] Thereby, the splitting operation of the first sub-description content is completed.

[0109] It should be noted that, when the first subsidiary field is not an enumeration type, the field value representing the first subsidiary field does not need to be split, and the first subsidiary field can be directly determined 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 segmentation of the first sub-description content by segmenting the field values ​​in the subsidiary fields according to the field types.

[0111] Optionally, in the test data generation method provided in the embodiment of the present application, 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 keywords corresponding to the target sub-description content, and for each first field, replacing the target sub-description content in the initial description content with the split sub-description content to obtain the target description content.

[0112] Exemplarily, after obtaining the split sub-description content, in order to ensure that there are no preset keywords in the description content obtained after replacement, it is necessary to delete the preset keywords of the target sub-description content when using the split sub-description content to replace the target sub-description content in the initial description content, that is, delete "oneOf" appearing in the first line of the target sub-description content, thereby indicating that the replacement operation on 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 target description content can be obtained as follows:

[0116]

[0117] Thus, the replacement operation of the target sub-description content in the initial description content is completed.

[0118] It should be noted that, since preset keywords may also exist in the replaced sub-description content, after performing the replacement operation, each target description content can also be used as a new initial description content, and the above operation can be repeated to further split each target description content, thereby ensuring that preset keywords will not appear in the target description content, and then when the target description content is used to generate test data, the integrity of the generated test data can be guaranteed. Exemplarily, all oneOf attributes and enumeration attributes (such as enum) in the JSON description can be recursively split, and the values ​​in each oneOf and the values ​​in the enumeration attribute are arranged and combined to form a JSON description that does not contain oneOf and enumeration attributes. After splitting, each complete JSON description is placed in an array, which is called schemaList; since it is a recursive algorithm, the description passed in each time can be collectively referred to as Schema.

[0119] Optionally, in the test data generation method provided in the embodiment of the present application, the method also includes: upon receiving a critical data acquisition instruction of 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 and data acquisition requirements of the data to be acquired, and the critical data acquisition instruction is used to acquire the data to be acquired from M target description content sets according to the data type and the data acquisition requirements; acquiring a first description content including the data type from the M target description content sets; 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; when 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; when 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 the present 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 end, wherein the critical data are the two endpoint values ​​of the target interval.

[0121] Exemplarily, when a critical data acquisition instruction is received, the critical data acquisition instruction needs to be parsed first to obtain the data to be acquired indicated by the instruction, and determine the data type of the data to be acquired. For example, the critical data acquisition instruction indicates to acquire the boundary value of the upper boundary of the data to be acquired of a numerical type. At this time, the data type of the data to be acquired, that is, the numerical type, can be determined first, and the first description content containing the data type is acquired from the M target description content sets, that is, the first description content containing the numerical type is acquired.

[0122] For example, the first description content may be:

[0123]

[0124] The first description content includes a numerical type: "number". At this time, the first attribute sub-description content can be determined according to the data acquisition requirement, wherein the data acquisition requirement is the upper boundary or the lower boundary of the acquired data, and the data range requirement, that is, the data is normal data within the data range specified in the sub-description content, or external data outside the data range specified in the sub-description content. When the data acquisition requirement is the upper boundary, the corresponding first attribute sub-description content is "maximum", and when the data acquisition requirement is the lower boundary, the corresponding first attribute sub-description content is "minimum". When the data acquisition requirement is to obtain the upper boundary, it can be determined from the first description content whether there is a corresponding first attribute sub-description content, that is, whether there is "maximum". If so, the critical data that needs to be fed back to the user end can be directly determined according to the sub-description content value corresponding to the first attribute sub-description content and the data range requirement in the data acquisition requirement, thereby completing the generation operation of the critical data.

[0125] It should be noted that, in the absence of the first attribute sub-description content, it is characterized by the absence of an upper boundary value in the first description content. At this time, 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 end can be determined based on the preset attribute value and the data range requirements in the data acquisition requirements, thereby ensuring that the test data can be fed back to the user end.

[0126] For example, in the first description:

[0127]

[0128] In this case, the critical data acquisition instruction is to obtain the upper boundary value of the parameter whose data type is a numerical type as the test data. At this time, first determine that the data type is "number", that is, the numerical type, and further determine whether there is a first attribute sub-description content corresponding to the upper boundary value, that is, "maximum". If it exists, use the attribute value under "maximum", that is, 100, as the boundary value, and process the boundary value 100 according to the data range requirement to obtain a boundary value that meets the data range requirement, and further send the processed boundary value to the user end, thereby completing the generation process of the boundary test value.

[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 embodiment of the present application, sending the attribute value corresponding to the first attribute sub-description content in the first description content to the user end 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 end; when the data acquisition requirement indicates that the data to be acquired is external data in the target interval, acquiring the attribute value corresponding to the first attribute sub-description content, and updating the attribute value according to the data acquisition requirement to obtain the updated attribute value, and sending the updated attribute value to the user end.

[0130] Exemplarily, when the data acquisition requirement indicates that the acquired data is critical data, it means that the test data acquired by the data acquisition requirement is a normal value within the test value range. In this case, the boundary value can be sent to the user end.

[0131] For example, the upper critical data obtained according to the above process is 100. When the data acquisition request indicates to obtain the critical data, the upper critical data 100 is sent to the user end without processing the critical data.

[0132] Furthermore, when the data acquisition requirements indicate that the data to be acquired are external data, the characterization needs to be processed based on the critical data obtained. The processing method needs to expand 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 send this value as a test value to the user end, thereby ensuring the accuracy of the feedback test data.

[0133] This embodiment processes critical data according to data acquisition requirements, thereby ensuring the accuracy of data fed back to the user end.

[0134] Optionally, in the test data generation method provided in the embodiment of the present application, the method also includes: when receiving a special character acquisition instruction sent by the user end, parsing the special character acquisition instruction, obtaining the instruction content, and determining the second field of the character to be acquired from the instruction content, wherein the special character acquisition instruction is used to indicate the generation of the character to be acquired; acquiring the second description content containing the second field from the M target description content sets; acquiring the second subsidiary field of the second field in the second description content, and acquiring the special character from the character library according to the field value of the second subsidiary field, obtaining a special character string, and sending the special character string to the user end, wherein the length of the special character string is the field value of the second subsidiary field.

[0135] It should be noted that in the present application, after obtaining the target description content, when the target description content is processed to obtain test data, specific test data can also be obtained according to the special character acquisition instruction sent by the user end.

[0136] Exemplarily, when a special character acquisition instruction sent by a user terminal is received, the special character acquisition instruction needs to be parsed to obtain the instruction content, and the second field of the character to be acquired is determined according to the instruction content, wherein the second field is used to indicate the length range of the character string in the description content. After determining the second field, the second description content including the second field can be obtained, wherein the second description content can be:

[0137] "name":{

[0138] "type":"string",

[0139] "minLength":10,

[0140] "maxLength":100

[0141] },

[0142] Among them, the second field is "string". After obtaining the second description content, the subsidiary fields of the second description content, that is, "minLength":10,"maxLength":100, can be obtained. After obtaining the subsidiary fields, the length boundary value of the string indicated by the special character acquisition instruction can be determined according to the instruction content. For example, a string with a maximum length is generated. At this time, the second subsidiary field is determined to be "maxLength":100, and the length of the generated special character is determined to be 100. 100 characters are randomly obtained from the character library, combined into a string with a length of 100, and the string is sent to the user end, thereby completing the special character generation operation.

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

[0144] The embodiment of the present application also provides a test data generation device. It should be noted that the test data generation device of the embodiment of the present application can be used to execute the test data generation method provided in the embodiment of the present application. The test data generation device provided in the embodiment of the present application is introduced below.

[0145] Figure 3 Schematic diagram of a device for generating test data according to an embodiment of the present 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 initial description content used to describe the test data set, and identify whether there is a preset keyword 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 keyword belongs, when there is a preset keyword in the initial description content, and split the first sub-description content to which the first field in the target sub-description content belongs according to the first subsidiary field 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] The 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, so as to obtain M target description content sets, wherein each target description content set includes at least one target description content.

[0149] The identification unit 34 is used to obtain the full amount of test data of the test data set according to the M target description contents.

[0150] The test data generation device provided in the embodiment of the present application obtains the initial description content for describing the test data set through the first acquisition unit 31, and identifies whether there is a preset keyword in the initial description content; the splitting unit 32 obtains M first fields in the target sub-description content to which the preset keyword belongs, and splits the first sub-description content belonging to the first field in the target sub-description content according to the first subsidiary field 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 uses the split sub-description content corresponding to each first field to replace the target sub-description content in the initial description content, respectively, to obtain M target description content sets, wherein each target description content set contains at least one target description content; the identification unit 34 obtains the full test data of the test data set according to the M target description contents. The invention solves the problem that the test data generated by describing content in the related art is highly random, resulting in a low accuracy rate in generating full test data. The invention solves the problem that the test data generated by describing content in the related art is highly random, and that the accuracy rate of generating full test data is low. The invention splits the first sub-description content under the target sub-description content to which the preset keyword belongs, and replaces the target sub-description content with the split sub-description content, thereby splitting and replacing the content in the target sub-description content corresponding to the preset keyword, thereby splitting the initial description content into M target description content sets, and then obtaining the full test data of the test data set based on the M target description contents. Since the splitting of the description content reduces the randomness of the test data generated by the description content, the randomness of the generated test data is reduced, and the generation efficiency of all possible test data is improved. In addition, the uniqueness of the value of each field in each sub-description content is ensured, and the accuracy of the generated full test data is improved.

[0151] Optionally, in the test data generating device provided in the embodiment of the present application, the splitting unit 32 includes: an identification module, used to identify the initial field 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; a first acquisition module, used to obtain 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 generating device provided in the embodiment of the present application, the splitting unit 32 includes: a second acquisition module, used to obtain the field type of the first subsidiary 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 obtain N field values ​​in the first subsidiary field when the first subsidiary 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 field value among the N field values; a second determination module, used to determine the first subsidiary field as a split sub-description content when the first subsidiary field is not an enumeration type.

[0153] Optionally, in the test data generating device provided in the embodiment of the present application, 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, use the split sub-description content to replace the target sub-description content in the initial description content to obtain the target description content.

[0154] Optionally, in the test data generation device provided in the embodiment of the present application, the device also includes: a determination unit, which is used to determine the data type of the data to be acquired from the critical data acquisition instruction when receiving the critical data acquisition instruction of the target interval sent by the user terminal, wherein the critical data acquisition instruction contains the data type and data acquisition requirements of the data to be acquired, and 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; a second acquisition unit, which is used to acquire the first description content containing the data type from the M target description content sets; a judgment unit, which is used to determine the first attribute sub-description content according to the data acquisition requirements, and to judge whether the first attribute sub-description content exists in the first description content; a first sending unit, which is used 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; a second sending unit, which is used to determine the 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 to send the preset attribute value to the user terminal according to the data acquisition requirements.

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

[0156] Optionally, in the test data generation device provided in the embodiment of the present application, the device also includes: a parsing unit, which is used to parse the special character acquisition instruction sent by the user end, 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 indicate the generation of the character to be acquired; a third acquisition unit, which is used to acquire the second description content containing the second field from the M target description content sets; and a fourth acquisition unit, which is used to acquire the second subsidiary 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 subsidiary field, obtain the special character string, and send the special character string to the user end, wherein the length of the special character string is the field value of the second subsidiary field.

[0157] The test data generating device includes a processor and a memory. The first acquisition unit 31, splitting unit 32, replacement unit 33, 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 corresponding functions.

[0158] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the problem of strong randomness of test data generated by JSON Schema in related technologies, resulting in low efficiency and accuracy in generating full test data, is solved by adjusting kernel parameters.

[0159] The memory may include non-permanent memory in a computer-readable medium, 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] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for generating test data is implemented.

[0161] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for generating test data is executed when the program is running.

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

[0163] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the steps of the above test data generation method.

[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain the sub-description of a computer-usable program.

[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0166] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions 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] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0170] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0171] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0172] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for generating test data, characterized in that: include: Acquire initial description content for describing a test data set, and identify whether a preset keyword exists in the initial description content; In the case where the preset keyword exists in the initial description content, M first fields in the target sub-description content to which the preset keyword belongs are obtained, and the first sub-description content to which the first field in the target sub-description content belongs is split according to the first subsidiary field 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; 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 target description content sets, wherein each target description content set contains at least one target description content; The full amount of test data of the test data set is obtained according to the M target description contents.

2. The method according to claim 1, characterized in that Acquiring the M first fields in the target sub-description content to which the preset keyword belongs includes: Identify the initial field in the target sub-description content to obtain a plurality of initial fields; Determine the position of each initial field in the target sub-description content, and determine the initial field located under the target position as the target field, to obtain M target fields; A description field under each target field is obtained, and the description field of each target field is determined as the first field, so as to obtain M first fields.

3. The method according to claim 1, characterized in that Splitting the first sub-description content to which the first field in the target sub-description content belongs according to the first subsidiary fields under each first field includes: Obtaining the field type of the first subsidiary field under the first field; Determine whether the field type is an enumeration type; In the case where the first subsidiary field is of the enumeration type, obtaining N field values ​​in the first subsidiary 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 field value among the N field values; In a case where the first subsidiary field is not of the enumeration type, the first subsidiary field is determined as 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 first field includes: The preset keywords corresponding to the target sub-description content are deleted, and for each first field, the target sub-description content in the initial description content is replaced 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 comprises: In the case of receiving a critical data acquisition instruction of a target interval sent by a user terminal, determining a data type of the data to be acquired from the critical data acquisition instruction, wherein the critical data acquisition instruction includes the data type and data acquisition requirements of the data to be acquired, and 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; Acquire a first description content including the data type from the M target description content sets; Determine a first attribute sub-description content according to the data acquisition requirement, and judge whether the first attribute sub-description content exists in the first description content; In a case where 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 requirement; In the case that the first attribute sub-description content does not exist in the first description content, a preset attribute value of the first attribute sub-description content is determined, and the preset attribute value is sent to the user terminal according to the data acquisition requirement.

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 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, 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 an updated attribute value, and the updated attribute value is sent to the user end.

7. The method according to claim 1, characterized in that The method further comprises: When 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 generation of the character to be acquired; Acquire a second description content including the second field from the M target description content sets; Obtain the second subsidiary field of the second field in the second description content, obtain special characters from a character library according to the field value of the second subsidiary field, obtain a special character string, and send the special character string to the user end, wherein the length of the special character string is the field value of the second subsidiary field.

8. A device for generating test data, characterized in that: include: 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, 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 in the target sub-description content belongs according to the first subsidiary field 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; 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, to obtain M target description content sets, wherein each target description content set includes at least one target description content; An identification unit is used to obtain the full amount of test data of the test data set according to the M target description contents.

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 run, the device where the computer-readable storage medium is located is controlled to execute the test data generation method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program executes the test data generation method according to any one of claims 1 to 7 when running.

Citation Information

Patent Citations

  • Interface test method and apparatus and computer device

    CN109189666A

  • Automatic generation method for a code-level test case set

    CN110990257A

  • Interface test data and test script generation method, terminal equipment and storage medium

    CN113886232A

  • Test case generation method and device, equipment, storage medium and program product

    CN115587045A

  • Method and device for automatically generating test data, electronic equipment and storage medium

    CN116627843A