Data generation method, test method, related device and related system

By using big models to generate test outlines, test cases and interface test scripts, the inefficiency problem caused by manual writing is solved, the demand for rapid delivery is achieved, and the testing efficiency and automation are improved.

CN120104498APending Publication Date: 2025-06-06IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510216684.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Manually writing test cases and test scripts takes a long time, resulting in inefficient testing and difficult to meet the needs of rapid delivery of software products.

Method used

By obtaining the product requirements data and interface definition data of the target product, using a large model to generate test outlines, test cases and interface test scripts, to achieve automated test data generation.

Benefits of technology

It greatly improves the efficiency of obtaining test cases and interface test scripts, reduces labor costs and technical thresholds, improves testing efficiency, and can meet the needs of rapid product delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104498A_ABST
    Figure CN120104498A_ABST
Patent Text Reader

Abstract

The invention discloses a data generation method, a test method, a related device and a related system, and relates to the technical field of software testing, the data generation method comprises the following steps: obtaining product related data of a target product, the product related data comprising product demand data and / or interface definition data; using the large model to generate a test outline according to the product demand data, and using the large model to generate a test case according to the product demand data and the test outline; and / or utilizing the large model to generate an interface test script according to the interface definition data. According to the data generation method disclosed by the invention, the test cases and the test scripts can be automatically generated by utilizing a large model, and compared with a manual writing mode, the acquisition efficiency of the test cases and the test scripts is greatly improved, and the labor cost and the technical threshold are greatly reduced; and the acquisition efficiency of the test case and the interface test script is greatly improved, so that the test efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a data generation method, a testing method, related devices and related systems. Background Art

[0002] In the software development life cycle, testing is a key step to ensure the quality of software products. When testing a software product, you first need to obtain the test cases and / or test scripts required for the test. After obtaining the test cases and / or test scripts, use these data to test the software product.

[0003] At present, test cases and test scripts are mostly written manually by testers. However, manual writing of test cases and test scripts is time-consuming, which leads to low testing efficiency and makes it difficult to meet the needs of rapid delivery of software products. Summary of the invention

[0004] In view of this, the present application provides a data generation method, a test method, a related device and a related system to solve the problem that manual writing of test cases and test scripts takes a long time, thereby resulting in low test efficiency. The technical solution is as follows:

[0005] The first aspect of the present application provides a data generation method, comprising:

[0006] Acquire product-related data of a target product, wherein the product-related data includes product requirement data and / or interface definition data;

[0007] Generate a test outline based on the product requirement data using the big model, and generate test cases based on the product requirement data and the test outline using the big model, wherein the test outline systematically defines the test scope through a hierarchical structure;

[0008] And / or, using the big model, generating an interface test script according to the interface definition data.

[0009] In a possible implementation, the test outline includes: test items, test points under the test items, and test scenarios under the test points.

[0010] In a possible implementation, before generating a test outline using the big model according to the product requirement data, the method further includes:

[0011] The general large model is used to identify problems existing in the product demand data and generate modification suggestions so that relevant personnel can modify the product demand data according to the modification suggestions, and the modified product demand data is used as the final product demand data.

[0012] In a possible implementation, before generating a test outline using the big model according to the product requirement data, the method further includes:

[0013] Acquire knowledge data related to the product demand data from a knowledge database to obtain target knowledge data, wherein the knowledge database includes business domain knowledge and / or research and development data of the target product;

[0014] The use of the large model to generate a test outline based on the product requirement data includes:

[0015] A test outline is generated by using a general large model according to the product requirement data and supplemented by the target knowledge data.

[0016] In a possible implementation, acquiring knowledge data related to the product demand data from a knowledge database to obtain target knowledge data includes:

[0017] Representing the product demand data as a vector to obtain a vector representation of the product demand data; calculating the similarity between the vector representation of the product demand data and the vector representation of each piece of knowledge data in a knowledge database; obtaining knowledge data related to the product demand data in the knowledge database according to the calculated similarity to obtain a first related knowledge data set;

[0018] and / or, performing word segmentation processing on the product demand data, and using the words obtained by the word segmentation processing to search for knowledge data related to the product demand data in a knowledge database to obtain a second related knowledge data set;

[0019] A plurality of pieces of knowledge data most relevant to the product demand data are screened out from the first relevant knowledge data set and / or the second relevant knowledge data set to obtain target knowledge data.

[0020] In a possible implementation, the data generating method further includes:

[0021] The general large model is used in combination with the product demand data to identify problems existing in the generated test cases, and the generated test cases are optimized according to the identified problems.

[0022] In one possible implementation, the use of a big model to generate an interface test script based on the interface definition data includes: using a code big model to generate a parameter test script for a single interface and / or a scenario test script for multiple interfaces based on the interface definition data, wherein the scenario test script for multiple interfaces is a script for testing multiple interfaces involved in the same business scenario.

[0023] In a possible implementation, the product-related data further includes: an interface call log and / or an interface implementation code;

[0024] Before generating scenario test scripts for multiple interfaces based on the interface definition data using the large model, the method further includes:

[0025] Determine the interface call relationship according to the interface call log;

[0026] Using the code big model, based on the interface definition data, a scenario test script for multiple interfaces is generated, including:

[0027] By using the code big model, according to the interface definition data, supplemented by the interface call relationship and / or the interface implementation code, a scenario test script for multiple interfaces is generated.

[0028] In a possible implementation, the interface call log includes an interface call link, and each interface in the interface call link corresponds to a call link identifier;

[0029] The determining the interface call relationship according to the interface call log includes:

[0030] According to the call link identifier corresponding to each interface in the interface call link and the call order of each interface, the interface call link is split into multiple sub-call links, and the call link identifiers corresponding to the interfaces in each sub-call link are the same;

[0031] Generate a directed graph with interfaces as nodes according to the multiple sub-call links;

[0032] Finding the longest interface call path according to the conditional probabilities of the nodes in the directed graph and a preset probability threshold, wherein the conditional probability of a node in the directed graph is the probability of calling the node under the condition of calling the next node;

[0033] The calling relationship of the interfaces in the longest interface calling path is determined as the interface calling relationship.

[0034] A second aspect of the present application provides a testing method, comprising:

[0035] Obtain test cases and / or interface test scripts generated for a target product using any of the data generation methods described above;

[0036] The target product is tested using the acquired test cases and / or interface test scripts.

[0037] A third aspect of the present application provides a data generation device, comprising: a product-related data acquisition module, and a test case generation module and / or a test script generation module;

[0038] The product-related data acquisition module is used to acquire product-related data of a target product, wherein the product-related data includes product requirement data and / or interface definition data;

[0039] The test case generation module is used to generate a test outline using the big model according to the product requirement data, and to generate a test case using the big model according to the product requirement data and the test outline, wherein the test outline systematically defines the test scope through a hierarchical structure;

[0040] The test script generation module is used to generate an interface test script based on the interface definition data using a large model.

[0041] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0042] The memory is used to store computer programs;

[0043] The processor is used to execute the computer program so that the electronic device can implement the steps of any one of the above-mentioned data generation methods.

[0044] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of any one of the above-mentioned data generation methods.

[0045] A sixth aspect of the present application provides a computer program product, comprising computer-readable instructions, which, when executed on an electronic device, enables the electronic device to implement the steps of any one of the above-described data generation methods.

[0046] A seventh aspect of the present application provides a test assistance system, comprising: a data generating device;

[0047] The data generating device is used to execute any one of the data generating methods described above.

[0048] Through the above technical solution, the data generation method provided by the present application can obtain the product demand data of the target product, and then use the big model to automatically generate a test outline based on the product demand data of the target product, and use the big model to automatically generate test cases based on the product demand data and the test outline. The data generation method provided by the present application can also obtain the interface definition data of the target product, and then use the big model to automatically generate an interface test script based on the interface definition data. The data generation method provided by the present application can use the big model to automatically generate the test cases and interface test scripts required to test the target product. Compared with the manual writing method, the efficiency of obtaining test cases and interface test scripts is greatly improved, the labor cost and technical threshold are greatly reduced, and the efficiency of obtaining test cases and interface test scripts is greatly improved, so that the test efficiency of the target product is greatly improved, thereby meeting the needs of rapid product delivery. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] Figure 1 A schematic diagram of a flow chart of a data generation method provided in an embodiment of the present application;

[0051] Figure 2 An example of a test outline provided for an embodiment of the present application;

[0052] Figure 3 A schematic diagram of a process for acquiring knowledge data related to product demand data from a knowledge database to obtain target knowledge data provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a target knowledge data acquisition process provided in an embodiment of the present application;

[0054] Figure 5 A flow chart of obtaining an interface call relationship by parsing an interface call log provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of a process for generating scenario test scripts for multiple interfaces provided in an embodiment of the present application;

[0056] Figure 7 An example of a directed graph provided for an embodiment of the present application;

[0057] Figure 8 A schematic diagram of a data generation device provided in an embodiment of the present application;

[0058] Fig. 9 A schematic diagram of the relationship between the test assistance system provided in an embodiment of the present application and other systems. DETAILED DESCRIPTION

[0059] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0060] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0061] 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 need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0062] At present, when testing software products, testers usually write test cases and test scripts manually. As the functional complexity of software products increases, the writing scale of test cases and test scripts increases exponentially. For large products, hundreds or thousands of test cases and test scripts need to be written manually by testers. This high-intensity manual writing work is time-consuming and easily leads to incomplete test cases and test scripts due to human errors, thereby reducing the effectiveness of the test.

[0063] Writing test cases requires testers to have a deep understanding of business logic. Testers also need to have certain programming skills and be able to write test scripts. It can be seen that the technical threshold for writing test cases and test scripts is high, and testers usually need to be trained for a long time. In addition, complex business scenarios and multi-interface interaction scenarios put forward higher requirements for the writing of test scripts, further increasing technical pressure.

[0064] In view of the many problems that arise when manually writing test cases and test scripts, the inventor of this case conducted research and, through continuous research, ultimately proposed a data generation method that can automatically generate test cases and test scripts. The data generation method provided in this application will now be introduced through the following embodiments.

[0065] See also Figure 1 , shows a schematic diagram of a data generation method provided in an embodiment of the present application, and the data generation method may include:

[0066] Step S101: Acquire product-related data of a target product.

[0067] In this embodiment, the product-related data of the target product may include product requirement data of the target product and / or interface definition data of the target product.

[0068] The product demand data of the target product may include a product demand description of the target product, such as a functional demand description and a performance demand description of the target product. Optionally, the product demand data of the target product may also include a product design prototype diagram of the target product.

[0069] In one possible implementation, the product requirement data and / or interface definition data of the target product can be obtained from a R&D process management system (the R&D process management system has relevant information about the R&D process of the target product) through a test system (a system used to test the target product). Specifically, the product requirement data and / or interface definition data of the target product can be obtained through an interface call between the test system and the R&D process management system.

[0070] Step S102a-1: Generate a test outline using the big model according to product requirement data.

[0071] Among them, the test outline systematically defines the test scope through a hierarchical structure.

[0072] In a possible implementation, the test outline may include test items, test points under the test items, and test scenarios under the test points.

[0073] This embodiment uses a large model to perform structured splitting of product demand data, and can split the product demand data into a three-layer tree structure of test items-test points-test scenarios, such as Figure 2 shown.

[0074] Optionally, before generating a test outline based on product requirement data, a large model (such as a general large model) can be used to identify problems with the product requirement data (such as product requirement descriptions), such as missing requirement descriptions, ambiguous descriptions, unclear descriptions, inconsistent descriptions, and requirement testability, and generate modification suggestions so that relevant personnel can modify the product requirement data based on the modification suggestions, thereby improving the quality of the product requirement data. The modified product requirement data serves as the basis for subsequent generation of test cases.

[0075] Step S102a-2: Generate test cases using the big model according to product requirement data and test outline.

[0076] After obtaining the test outline, the big model can be used to generate complete and detailed test cases (such as functional test cases, performance test cases, etc.) based on the product requirement data and the test outline. In order to improve the efficiency of obtaining test cases, this embodiment uses the big model to automatically generate test cases based on the product requirement data and the test outline.

[0077] It should be noted that there are usually multiple product requirements for the target product. In one possible implementation method, a large model can be used to generate test cases for multiple product requirements at the same time. In order to obtain high-quality test cases, in another possible implementation method, a large model can be used to generate test cases for each product requirement separately.

[0078] Optionally, after generating test cases, the big model can be used in combination with product demand data to identify problems with the generated test cases, and the generated test cases can be optimized based on the identified problems to improve the quality and coverage of the test cases. The optimization of test cases can include, but is not limited to, modifying existing test cases, supplementing missing test cases, etc.

[0079] In this embodiment, the big model used to generate a test outline, the big model used to generate a test case, the big model used to identify problems with product requirement data and generate modification suggestions, and the big model used to identify problems with generated test cases and optimize test cases based on the identified problems can be a general big model.

[0080] Step S102b: Generate an interface test script based on the interface definition data using the large model.

[0081] In one possible implementation, the big model used to generate the interface test script may be a general big model. In order to obtain a higher quality interface test script, in another possible implementation, the big model used to generate the interface test script may be a code big model.

[0082] When testing a target product, the tester usually selects a batch of interfaces of the target product for testing. In view of this, the interface definition data in step S102b may be interface definition data of several interfaces selected by the tester.

[0083] When generating an interface test script, you can perform step script generation, interface assertion generation, variable generation, and step concatenation in sequence.

[0084] Optionally, after generating the interface test script, a large model (such as a large code model) can be used in combination with the interface definition data to identify problems in the generated interface test script, and the interface test script can be optimized based on the identified problems to obtain a higher quality interface test script.

[0085] It should be noted that, after executing step S101, this embodiment may only execute step S102a-1 and step S102a-2 (for example, in some cases, only test cases need to be generated), or only execute step S102b (for example, in some cases, only interface test scripts need to be generated).

[0086] The data generation method provided in the embodiment of the present application can obtain the product demand data of the target product, and then use the big model to automatically generate a test outline based on the product demand data of the target product, and use the big model to automatically generate test cases based on the product demand data and the test outline. The data generation method provided in the embodiment of the present application can also obtain the interface definition data of the target product, and then use the big model to automatically generate an interface test script based on the interface definition data. The data generation method provided in the embodiment of the present application can use the big model to automatically generate the test cases and interface test scripts required for testing the target product. Compared with the manual writing method, the efficiency of obtaining test cases and interface test scripts is greatly improved, the labor cost and technical threshold are greatly reduced, and the efficiency of obtaining test cases and interface test scripts is greatly improved, so that the test efficiency is greatly improved, thereby meeting the needs of rapid product delivery.

[0087] In another embodiment of the present application, the specific implementation process of "using the big model to generate a test outline based on product requirement data" and "using the big model to generate test cases based on product requirement data and the test outline" is introduced.

[0088] Regarding the generation of the test outline, in one possible implementation, a large model can be used to directly generate the test outline based on product requirement data.

[0089] Specifically, using the big model, the process of generating a test outline directly based on product requirement data may include: obtaining a first prompt word template (i.e., a prompt template), specifically, the first prompt word template for generating a test case may be obtained from a prompt word system (the prompt word system has a plurality of prompt word templates pre-set), the first prompt word template including a product requirement information slot, the first prompt word template is used to prompt the big model (such as a general big model) to generate a test case according to the information in the product requirement information slot; filling the product requirement data into the product requirement information slot of the first prompt word template to obtain a first prompt word; inputting the first prompt word into the big model, the big model extracting the key points in the product requirement data, generating a test outline (such as a three-layer tree-structured test framework: test items-test points-test scenarios) and outputting it.

[0090] In order to improve the generation effect of the test outline, in another possible implementation method, a knowledge database can be pre-constructed, which can include business domain knowledge and / or R&D data of the target product (relevant system information in the R&D process). Then, when generating the test outline, first obtain the knowledge data related to the product requirement data from the knowledge database to obtain the target knowledge data, and then use the big model (such as the general big model) to generate the test outline based on the product requirement data and supplemented by the target knowledge data.

[0091] In one possible implementation, Figure 3 As shown, the process of acquiring knowledge data related to product demand data from a knowledge database to obtain target knowledge data may include:

[0092] Step S301: Represent product demand data as a vector to obtain a vector representation of the product demand data.

[0093] like Figure 4 As shown, the embedding model can be used to represent the product demand data as a vector to obtain a vector representation of the product demand data.

[0094] Step S302: Calculate the similarity between the vector representation of the product demand data and the vector representation of each piece of knowledge data in the knowledge database.

[0095] The embedding model can be used in advance to represent each piece of knowledge data in the knowledge database as a vector to obtain the vector representation of each piece of knowledge data in the knowledge database. The vector representations of each piece of knowledge data in the knowledge database form a vector database, and the vector representations in the vector database are associated with the corresponding knowledge data in the knowledge database.

[0096] When retrieving relevant knowledge data for product demand data, the vector representation of each piece of knowledge data in the knowledge database can be directly obtained from the vector database, and then the similarity between the vector representation of the product demand data and the vector representation of each piece of knowledge data in the knowledge database is calculated.

[0097] For example, the vector of product demand data is represented by A, and the vector of a piece of knowledge data in the knowledge database is represented by B. Then the similarity s(A, B) between A and B can be calculated by the following formula:

[0098] (1)

[0099] Step S303: According to the calculated similarity, knowledge data related to the product demand data in the knowledge database is obtained to obtain a first related knowledge data set.

[0100] For each piece of knowledge data in the knowledge database, if the similarity between the vector representation of the product demand data and the vector representation of the knowledge data is greater than or equal to the set similarity threshold s th1 , then it is determined that the knowledge data is knowledge data related to the product demand data. In this way, the knowledge data related to the product demand data in the knowledge database can be obtained, and the knowledge data related to the product demand data in the knowledge database constitutes a first related knowledge data set.

[0101] It should be noted that the similarity between the vector representation of product demand data and the vector representation of a piece of knowledge data is the semantic similarity between the product demand data and the piece of knowledge data. If the semantic similarity between the product demand data and the piece of knowledge data is greater than or equal to the set similarity threshold s th1 , it is determined that the semantics of this piece of knowledge data is similar to that of the product demand data.

[0102] Step S304: performing word segmentation processing on the product demand data, and using the words obtained by the word segmentation processing to search for knowledge data related to the product demand data in the knowledge database to obtain a second related knowledge data set.

[0103] Considering that the relevant knowledge data obtained based on similarity is not comprehensive, such as Figure 4 As shown, this embodiment further adopts a keyword-based retrieval method to retrieve knowledge data related to product demand data from the knowledge database.

[0104] Step S305: Filter out a number of pieces of knowledge data that are most relevant to the product demand data from the first relevant knowledge data set and the second relevant knowledge data set to obtain target knowledge data.

[0105] The first relevant knowledge data set and the second relevant knowledge data set may be merged and deduplicated to obtain a third relevant knowledge data set, and a number of pieces of knowledge data most relevant to the product demand data may be screened out from the third relevant knowledge data set.

[0106] There are many ways to implement the method of selecting several pieces of knowledge data that are most relevant to the product demand data from the third related knowledge data set. In one possible implementation method, the knowledge data in the third related knowledge data set can be sorted in descending order according to the similarity (the similarity between the vector representation of the knowledge data and the vector representation of the product demand data), and the first N pieces of knowledge data (the N pieces of knowledge data that are most relevant to the product demand data) are obtained as the target knowledge data. Of course, the knowledge data in the third related knowledge data set can also be sorted in ascending order according to the similarity, and the last N pieces of knowledge data are obtained as the target knowledge data, wherein the specific value of N can be set according to the actual application scenario. In another possible implementation method, the knowledge data whose vector representation has a similarity with the vector representation of the product demand data greater than a set similarity threshold s can be selected from the third related knowledge data set. th2 (s th2 Greater than s th1 )’s knowledge data is used as the target knowledge data.

[0107] It should be noted that this embodiment is not limited to the method of steps S301 to S305 for obtaining the target knowledge data. For example, steps S301 to S303 may be used to obtain a first relevant data set, and then, several pieces of knowledge data most relevant to the product demand data may be screened from the first relevant data set as the target knowledge data. For another example, step S304 may be used to obtain a second relevant data set, and then, several pieces of knowledge data most relevant to the product demand data may be screened from the second relevant data set as the target knowledge data.

[0108] After obtaining the target knowledge data through the above process, a large model (such as a general large model) is used to generate a test outline based on the product demand data and supplemented by the target knowledge data.

[0109] Specifically, using the big model, based on product requirement data, supplemented by target knowledge data, the process of generating a test outline may include: obtaining a second prompt word template (i.e., prompt template), specifically, the second prompt word template for generating test cases may be obtained from the prompt word system, the second prompt word template includes a product requirement information slot and a business knowledge information slot, the second prompt word template is used to prompt the big model to generate test cases based on the information in the product requirement information slot, supplemented by the information in the business knowledge information slot; filling the product requirement data into the product requirement information slot of the second prompt word template, filling the target knowledge data into the business knowledge information slot of the second prompt word template, and obtaining the second prompt word; inputting the second prompt word into the big model, the big model generates a test outline (i.e., a three-layer tree-structured test framework: test item-test point-test scenario) based on the product requirement data in the second prompt word, supplemented by the target knowledge data in the second prompt word, and outputs it.

[0110] Introducing target knowledge data based on product demand data can enrich and improve the input data, thereby improving the generation effect of large models.

[0111] After generating the test outline, further use the big model (such as the general big model) to generate test cases based on the product requirement data and the test outline.

[0112] Specifically, the process of generating test cases based on product requirement data and test outlines using the big model may include: obtaining a third prompt word template (i.e., prompt template), specifically, the third prompt word template for generating test cases may be obtained from the prompt word system, the third prompt word template includes a product requirement information slot and a test outline information slot, the third prompt word template is used to prompt the big model to generate test cases based on the information in the product requirement information slot and the information in the test outline information slot; filling the product requirement data into the product requirement information slot of the third prompt word template, filling the test outline into the test outline information slot of the third prompt word template, and obtaining the third prompt word; inputting the third prompt word into the big model, the big model generates and outputs the test case according to the product requirement data and the test outline in the third prompt word according to the prompt of the third prompt word.

[0113] In another embodiment of the present application, the specific implementation process of "using a large model to generate an interface test script according to interface definition data" is introduced.

[0114] The process of generating an interface test script using a large model and based on interface definition data may include: generating a parameter test script for a single interface and / or a scenario test script for multiple interfaces using a large model and based on interface definition data. It should be noted that the scenario test script for multiple interfaces is a script for testing multiple interfaces involved in the same business scenario.

[0115] Among them, there are many ways to use a big model to generate a parameter test script for a single interface based on interface definition data. In one possible implementation method, a big model (such as a code big model) can be used to directly generate a parameter test script for a single interface based on interface definition data.

[0116] Specifically, the process of using a large model (such as a large code model) to directly generate a parameter test script for a single interface based on interface definition data may include: obtaining a fourth prompt word template, the fourth prompt word template including an interface definition information slot, the fourth prompt word template being used to prompt the large model (such as a large code model) to generate a parameter test script for a single interface based on the information in the interface definition information slot; filling the interface definition data into the interface definition information slot of the fourth prompt word template to obtain a fourth prompt word; inputting the fourth prompt word into the large model (such as a large code model) to obtain the parameter test script for the single interface output by the large model.

[0117] Preferably, the fourth prompt word template can prompt the large model to generate a test script from aspects such as missing parameters, normal and abnormal parameters, parameter boundary values, and whether it is necessary to transmit parameters according to the information in the interface definition information slot, and input the fourth prompt word into the large model. The large model generates a parameter test script for a single interface from aspects such as missing parameters, normal and abnormal parameters, parameter boundary values, and whether it is necessary to transmit parameters according to the prompt of the fourth prompt word and the interface definition data.

[0118] In order to improve the generation effect of parameter test scripts for a single interface, in another possible implementation method, the interface implementation code can be obtained from the R&D process management system through the test system, and then, a large model (such as a large code model) can be used to generate a parameter test script for a single interface based on the interface definition data and the interface implementation code.

[0119] Specifically, the process of generating a parameter test script for a single interface using a large model (such as a large code model) based on interface definition data and supplemented by interface implementation code may include: obtaining a fifth prompt word template, the fifth prompt word template including an interface definition information slot and an interface code information slot, the fifth prompt word template being used to prompt the large model (such as a large code model) to generate a parameter test script for a single interface based on the information in the interface definition information slot and supplemented by the information in the interface code information slot; filling the interface definition data into the interface definition information slot of the fifth prompt word template, and filling the interface implementation code into the interface code information slot of the fifth prompt word template to obtain the fifth prompt word; inputting the fifth prompt word into the large model (such as the large code model) to obtain the parameter test script for the single interface output by the large model.

[0120] Preferably, the fifth prompt word template can prompt the large model to generate a test script from aspects such as parameter missing, normal and abnormal parameters, parameter boundary values, and whether it is necessary to transmit, based on the information in the interface definition information slot and supplemented by the information in the interface code information slot. The fifth prompt word is input into the large model, and the large model generates a parameter test script for a single interface from aspects such as parameter missing, normal and abnormal parameters, parameter boundary values, and whether it is necessary to transmit, according to the prompt of the fifth prompt word and the interface definition data in the fifth prompt word and supplemented by the interface implementation code in the fifth prompt word.

[0121] There are many ways to use a big model to generate scenario test scripts for multiple interfaces based on interface definition data. In one possible implementation, a big model can be used to directly generate scenario test scripts for multiple interfaces based on interface definition data.

[0122] Specifically, the process of generating scenario test scripts for multiple interfaces directly based on interface definition data using the big model may include: obtaining a sixth prompt word template, the sixth prompt word template including an interface definition information slot, the sixth prompt word template being used to prompt the big model (such as a code big model) to generate scenario test scripts for multiple interfaces based on the information in the interface definition information slot; filling the interface definition data into the interface definition information slot of the sixth prompt word template to obtain the sixth prompt word; inputting the sixth prompt word into the big model, the big model analyzing the interfaces belonging to the same scenario and the interface call relationship based on the interface definition data, generating and outputting scenario test scripts for multiple interfaces based on the analysis results and the interface definition data.

[0123] In order to improve the generation effect of scenario test scripts for multiple interfaces, in another possible implementation method, interface call logs and / or interface implementation codes can be obtained. Specifically, the interface call logs of the target system can be obtained from the environmental flow system (the environmental flow system has the flow data of the target product, and the flow data includes the interface call logs of the target system) through the test system, and the interface implementation code of the target system can be obtained from the R&D process management system through the test system. Then, by using the big model, based on the interface definition data, supplemented by the interface call logs and / or interface implementation codes, scenario test scripts for multiple interfaces are generated.

[0124] Specifically, the process of generating scenario test scripts for multiple interfaces using the big model based on interface definition data, supplemented by interface call logs and / or interface implementation codes may include: obtaining a seventh prompt word template, the seventh prompt word template including an interface definition information slot, an interface call log information slot and / or an interface code information slot, the seventh prompt word template being used to prompt the big model (such as the code big model) to generate scenario test scripts for multiple interfaces based on the information in the interface definition information slot, supplemented by the information in the interface call log information slot and / or the information in the interface code information slot; filling the interface definition data into the interface definition information slot of the seventh prompt word template, and filling the interface call log into the interface call log information slot and / or filling the interface implementation code into the interface code information slot to obtain the seventh prompt word; inputting the seventh prompt word into the big model, the big model analyzing the interfaces and interface call relationships belonging to the same scenario based on the interface definition data, supplemented by the interface call logs and / or the interface implementation codes, generating and outputting scenario test scripts for multiple interfaces based on the interfaces, interface call relationships and interface definition data belonging to the same scenario.

[0125] In order to further improve the generation effect of scenario test scripts for multiple interfaces, in another possible implementation method, after obtaining the interface call log, the interface call relationship can be obtained by parsing the interface call log, and then the big model is used to generate scenario test scripts for multiple interfaces based on the interface definition data, supplemented by the interface call relationship and / or interface implementation code.

[0126] like Figure 5 As shown, the process of obtaining the interface call relationship by parsing the interface call log may include:

[0127] Step S501: split the interface call link into multiple sub-call links according to the call link identifier corresponding to each interface in the interface call link and the call sequence of each interface.

[0128] The call link identifiers corresponding to the interfaces of each sub-call link are the same.

[0129] It should be noted that the interface call log includes an interface call link, and each interface in the interface call link corresponds to a call link identifier, such as Figure 6 As shown, after obtaining the interface call log from the environmental traffic system, the interface call link in the interface call log can be split. Specifically, the interface call link is split into multiple sub-call links according to the call link identifier corresponding to each interface in the interface call link and the call order of each interface.

[0130] Exemplarily, the interface call link is A1-B1-A2-D2-C1-C3-E3-C2, where A, B, C, D, and E in the link are interfaces. The interface call link reflects the calling order of the interfaces. "1" in A1, B1, and C1 represents the call link identifier. Similarly, for the interface call link A1-B1-A2-D2-C1-C3-E3-C2, according to the call link identifier corresponding to each interface and the calling order of each interface, it can be divided into the following three sub-call links:

[0131] Subcall link 1: [(A1, B1), (B1, C1)];

[0132] Subcall link 2: [(A2, D2), (D2, C2)];

[0133] Subcall link 3: [(C3,E3)].

[0134] Step S502: Generate a directed graph with interfaces as nodes according to multiple sub-call links.

[0135] Specifically, nodes are constructed according to interfaces included in each sub-call link, and directed edges between nodes are constructed according to the call relationships between interfaces in each sub-link.

[0136] For the above three links, construct nodes A, B, C, D and E. According to the calling relationship between interfaces in sub-call link 1, construct the directed edge from node A to node B, and construct the directed edge from node B to node C. According to the calling relationship between interfaces in sub-call link 2, construct the directed edge from node A to node D, and construct the directed edge from node D to node C. According to the calling relationship between interfaces in sub-call link 3, construct the directed edge from node C to node E, so as to obtain the following: Figure 7 The directed graph shown.

[0137] Step S503: Find the longest interface call path according to the conditional probabilities of the nodes in the directed graph and a preset probability threshold.

[0138] The conditional probability of a node in a directed graph is the probability of calling the node under the condition of calling the next node. The probability of calling node A under the condition of calling node B is:

[0139] (2)

[0140] All interface call paths can be found according to the conditional probabilities of the nodes in the directed graph and the preset probability threshold, and then the longest interface call path can be obtained.

[0141] like Figure 7 As shown, Figure 7The nodes in the example include interface A, interface B, interface C, interface D, and interface E. Assuming that the preset probability threshold is 50%, under the condition of calling interface B, the probability of calling interface A is 100%, which is greater than 50%. The interface call path starts from interface A. Under the condition of calling interface C, the probability of calling interface B is 50%, which is equal to 50%. Then the interface call path extends from interface A to interface B (if the conditional probability of an interface is greater than or equal to 50%, the interface call path extends to this interface). Under the condition of calling interface E, the probability of calling interface C is 100%, which is greater than 50%. If the probability of interface call is greater than 50%, the interface call path continues to extend from interface B to interface C. The next interface of interface C is interface E, which is the last interface. The conditional probability of this interface is 100%. If the probability of interface call is greater than 50%, the interface call path continues to extend to interface E. In this way, the interface call path A→B→C→E is found. The interface call path A→D→C→E can be found in a similar way. Since two interface call paths are finally found and the lengths of the two interface call paths are the same, the longest interface call paths are A→B→C→E and A→D→C→E.

[0142] Step S504: Determine the interface calling relationship in the longest interface calling path as the interface calling relationship.

[0143] After obtaining the interface call relationship, the big model can be used to generate scenario test scripts for multiple interfaces based on the interface definition data, supplemented by the interface call relationship and / or interface implementation code.

[0144] Specifically, the process of generating scenario test scripts for multiple interfaces using the big model according to interface definition data, supplemented by interface call relationships and / or interface implementation codes may include: obtaining an eighth prompt word template, the eighth prompt word template including an interface definition information slot, an interface call relationship information slot and / or an interface code information slot, the eighth prompt word template being used to prompt the big model (such as the code big model) to generate scenario test scripts for multiple interfaces according to the information in the interface definition information slot, supplemented by the information in the interface call relationship information slot and / or the information in the interface code information slot; filling the interface definition data into the interface definition information slot of the eighth prompt word template, and filling the interface call relationship into the interface call relationship information slot and / or filling the interface implementation code into the interface code information slot to obtain the eighth prompt word; inputting the eighth prompt word into the big model, the big model analyzing interfaces belonging to the same scenario according to the interface definition data, supplemented by the interface call relationship and / or the interface implementation code, and improving and adjusting the interface call relationship, and then generating and outputting scenario test scripts for multiple interfaces according to the interfaces, interface call relationships and interface definition data belonging to the same scenario.

[0145] It is understandable that the product requirement data of the target product may change. When the product requirement data of the target product changes, the test cases and interface test scripts need to be updated. Currently, the update of test cases and interface test scripts is done manually by testers. Manually updating test cases and test scripts is labor-intensive, time-consuming and prone to errors, which makes it difficult to meet rapidly changing product requirements, and cannot meet the high-frequency release and delivery requirements of products.

[0146] In view of this, the present application proposes that when the product requirement data of the target product changes, the big model is automatically used to generate a new test outline based on the new product requirement data. Furthermore, the big model is automatically used to generate new test cases based on the new product requirement data and the new test outline to update the original test cases.

[0147] Similarly, when the interface definition data of the target product changes (for example, the definition data of a new interface is introduced, the definition data of an existing interface is changed, etc.), the big model can be used to generate an interface test script based on the changed interface definition data, and then the original interface test script can be updated with the newly generated interface test script.

[0148] In addition, when the target product is iterated, the test cases and interface test scripts also need to be updated. When the test cases and interface test scripts need to be updated due to the iteration of the target product, the big model can also be used to achieve rapid updates of the test cases and interface test scripts.

[0149] The data generation method provided by the embodiment of the present application can use the big model to generate the test cases and interface test scripts required for the test target product. The introduction of the big model enables the generation of test cases and interface test scripts to be completed by intelligent means. The data generation method provided by the embodiment of the present application relies on the powerful natural language processing and understanding capabilities of the big model to extract the business logic and interface information required for the test from the product demand data and interface definition data, and then generate test cases and interface test scripts. The generated test cases and interface test scripts can comprehensively cover different business scenarios and interface interactions. Compared with the manual writing method, the data generation method provided by the embodiment of the present application greatly improves the acquisition efficiency of test cases and interface test scripts, and is particularly suitable for the testing of large-scale and complex products. At the same time, the data generation method provided by the embodiment of the present application reduces the technical threshold. Testers do not need to have complex programming capabilities, and only need to generate high-quality test cases and interface test scripts through simple operations or inputs, thereby shortening the training cycle of testers. Then, testers can devote more energy to business understanding and the design of test solutions. In addition, when product requirements change and products are iterated, the data generation method provided in the embodiment of the present application can use the big model to quickly complete the update of test cases and interface test scripts without the need for testers to manually check and adjust test cases and test scripts, greatly reducing the maintenance cost and error risk of test cases and interface test scripts, and can dynamically adapt to changes in product requirements and product iterations. The method for automatically generating and updating test cases and test scripts based on a big model provided in the embodiment of the present application enables testing to be performed synchronously during frequent iterations and deliveries, improving the timeliness and accuracy of testing. In an environment of agile development and continuous interaction, the solution provided in the embodiment of the present application can provide the testing team with more efficient and reliable technical means, enabling the testing team to cope with complex and changing business scenarios and rapidly iterative development requirements.

[0150] Based on the data generation method provided in the above embodiment, the embodiment of the present application further provides a testing method, which includes:

[0151] Acquire test cases and / or interface test scripts generated for the target product using the data generation method provided in the above embodiment; and test the target product using the acquired test cases and / or interface test scripts.

[0152] The testing method provided in this application has high testing efficiency and good testing effect.

[0153] The present application also provides a device corresponding to the data generation method provided in the above embodiment. Figure 8 , Figure 8A structural schematic diagram of a data generating device provided in an embodiment of the present application, the data generating device may include: a product-related data acquisition module 801, and a test case generation module 802a and / or a test script generation module 802b.

[0154] The product-related data acquisition module 801 is used to acquire product-related data of a target product, wherein the product-related data includes product requirement data and / or interface definition data.

[0155] The test case generation module 802a is used to generate a test outline using the big model according to the product requirement data, and to generate a test case using the big model according to the product requirement data and the test outline.

[0156] Among them, the test outline systematically defines the test scope through a hierarchical structure.

[0157] In a possible implementation, the test outline may include test items, test points under the test items, and test scenarios under the test points.

[0158] The test script generation module 802b is used to generate an interface test script based on the interface definition data using the large model.

[0159] In a possible implementation, the test case generation module 802a may include: a test outline generation submodule and a test case generation submodule.

[0160] The test outline generation submodule is used to generate a test outline based on product requirement data using a general large model.

[0161] The test case generation submodule is used to generate test cases based on product requirement data and test outline using the general large model.

[0162] In a possible implementation, when acquiring product requirement data and / or interface definition data, the product-related data acquisition module 801 is specifically used to:

[0163] The product requirement data and / or interface definition data are obtained from the R&D process management system through the test system.

[0164] In a possible implementation, the data generation device provided in the embodiment of the present application may also include: a demand testing module.

[0165] The demand testing module is used to use the general large model to identify problems in product demand data and generate modification suggestions so that relevant personnel can modify the product demand data according to the modification suggestions. The modified product demand data will be used as the final product demand data.

[0166] In a possible implementation, the data generation device provided in the embodiment of the present application may also include: a related knowledge data retrieval module.

[0167] The related knowledge data retrieval module is used to obtain the knowledge data related to the product demand data from the knowledge database to obtain the target knowledge data, wherein the knowledge database includes business domain knowledge and / or the research and development data of the target product.

[0168] The test outline generation submodule generates a test outline based on product requirement data using the general model. Specifically, it is used to:

[0169] Using the general big model, a test outline is generated based on product requirement data and supplemented by target knowledge data.

[0170] In a possible implementation, when the relevant knowledge data retrieval module obtains knowledge data related to product demand data from the knowledge database to obtain target knowledge data, it is specifically used to:

[0171] Representing the product demand data as a vector to obtain a vector representation of the product demand data; calculating the similarity between the vector representation of the product demand data and the vector representation of each piece of knowledge data in a knowledge database; obtaining knowledge data related to the product demand data in the knowledge database according to the calculated similarity to obtain a first related knowledge data set;

[0172] and / or, performing word segmentation processing on the product demand data, and using the words obtained by the word segmentation processing to search for knowledge data related to the product demand data in a knowledge database to obtain a second related knowledge data set;

[0173] A plurality of pieces of knowledge data most relevant to the product demand data are screened out from the first relevant knowledge data set and / or the second relevant knowledge data set to obtain target knowledge data.

[0174] In a possible implementation, the data generation device provided in the embodiment of the present application may also include: a test case review module.

[0175] The test case review module is used to use the general large model in combination with product demand data to identify problems in the generated test cases and optimize the generated test cases based on the identified problems.

[0176] In one possible implementation, when the test script generation module 802b generates an interface test script using a big model based on interface definition data, it is specifically used to: use the code big model to generate a parameter test script for a single interface and / or a scenario test script for multiple interfaces based on interface definition data, wherein the scenario test script for multiple interfaces is a script for testing multiple interfaces involved in the same business scenario.

[0177] In a possible implementation, the product-related data also includes: interface call logs and / or interface implementation codes. When the test script generation module 802b generates scenario test scripts for multiple interfaces based on the interface definition data using the code macro model, it is specifically used to:

[0178] Utilize the code big model, generate scenario test scripts for multiple interfaces based on interface definition data, supplemented by interface call logs and / or interface implementation codes.

[0179] In a possible implementation, the product-related data further includes: an interface call log and / or an interface implementation code. The data generating device may further include: an interface call relationship determination module.

[0180] The interface call relationship determination module is used to determine the interface call relationship based on the interface call log.

[0181] When the test script generation module 802b generates scenario test scripts for multiple interfaces based on the interface definition data using the code macro model, it is specifically used to:

[0182] By using the code big model, based on the interface definition data, supplemented by the interface call relationship and / or the interface implementation code, a scenario test script for multiple interfaces is generated.

[0183] In a possible implementation, the interface call log includes an interface call link, and each interface in the interface call link corresponds to a call link identifier.

[0184] When determining the interface call relationship based on the interface call log, the interface call relationship determination module is specifically used to:

[0185] According to the call link identifier corresponding to each interface in the interface call link and the call order of each interface, the interface call link is split into multiple sub-call links, and the call link identifiers corresponding to the interfaces in each sub-call link are the same;

[0186] According to multiple sub-call links, a directed graph with interfaces as nodes is generated;

[0187] According to the conditional probability of the nodes in the directed graph and the preset probability threshold, the longest interface call path is found, wherein the conditional probability of a node in the directed graph is the probability of calling the node under the condition of calling the next node;

[0188] The calling relationship of the interfaces in the longest interface calling path is determined as the interface calling relationship.

[0189] In a possible implementation, when acquiring the interface call log and / or the interface implementation code, the product-related data acquisition module 801 is specifically used to:

[0190] Obtain interface call logs from the environment traffic system through the test system;

[0191] And / or, obtain interface implementation code from the R&D process management system through the test system.

[0192] The data generation device provided in the embodiment of the present application can obtain the product demand data of the target product, and then use the big model to automatically generate a test outline based on the product demand data of the target product, and use the big model to automatically generate test cases based on the product demand data and the test outline. The data generation device provided in the embodiment of the present application can also obtain the interface definition data of the target product, and then use the big model to automatically generate an interface test script based on the interface definition data. The data generation device provided in the embodiment of the present application can use the big model to automatically generate the test cases and interface test scripts required for testing the target product. Compared with the manual writing method, the efficiency of obtaining test cases and interface test scripts is greatly improved, the labor cost and technical threshold are greatly reduced, and the efficiency of obtaining test cases and interface test scripts is greatly improved, so that the test efficiency is greatly improved, thereby meeting the needs of rapid product delivery.

[0193] An embodiment of the present application also provides an electronic device, which may include: at least one processor, at least one communication interface, at least one memory and at least one communication bus.

[0194] In the embodiment of the present application, the number of the processor, the communication interface, the memory, and the communication bus is at least one, and the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0195] The processor may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application;

[0196] The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0197] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to implement the steps of the data generation method provided in the above embodiment.

[0198] An embodiment of the present application also provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of the data generation method provided in the above embodiment.

[0199] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the steps of the data generation method provided in the above embodiment.

[0200] An embodiment of the present application also provides a test assistance system, which includes: a data generating device.

[0201] The data generating device is used to execute the data generating method provided in the above embodiment. The data generating device may be the data generating device provided in the above embodiment.

[0202] The test assistance system provided in the embodiment of the present application may further include an intelligent dialogue module. The intelligent dialogue module is used to answer questions encountered by the tester during the test process to provide professional technical support and guidance.

[0203] like Fig. 9 As shown, the test auxiliary system can be set in the test system, the test auxiliary system can interact with the test system, and can obtain product demand data, interface definition data, etc. from the R&D process management system through the test system. It can also obtain the environmental flow data of the product from the environmental flow system through the test system, and can also obtain preset prompt word templates from the prompt word system, and call the large model to realize the generation and update of test cases and interface test scripts.

[0204] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0205] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0206] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0207] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A data generation method, characterized in that: include: Acquire product-related data of a target product, wherein the product-related data includes product requirement data and / or interface definition data; Generate a test outline based on the product requirement data using the big model, and generate test cases based on the product requirement data and the test outline using the big model, wherein the test outline systematically defines the test scope through a hierarchical structure; And / or, using the big model, generating an interface test script according to the interface definition data.

2. The data generation method according to claim 1, characterized in that: The test outline includes: test items, test points under the test items, and test scenarios under the test points.

3. The data generation method according to claim 1, characterized in that: Before generating a test outline using the large model according to the product requirement data, the method further includes: The general large model is used to identify problems existing in the product demand data and generate modification suggestions so that relevant personnel can modify the product demand data according to the modification suggestions, and the modified product demand data is used as the final product demand data.

4. The data generation method according to claim 1, characterized in that: Before generating a test outline using the large model according to the product requirement data, the method further includes: Acquire knowledge data related to the product demand data from a knowledge database to obtain target knowledge data, wherein the knowledge database includes business domain knowledge and / or research and development data of the target product; The use of the large model to generate a test outline based on the product requirement data includes: A test outline is generated by using a general large model according to the product requirement data and supplemented by the target knowledge data.

5. The data generation method according to claim 4, characterized in that: The step of acquiring knowledge data related to the product demand data from a knowledge database to obtain target knowledge data includes: Representing the product demand data as a vector to obtain a vector representation of the product demand data; calculating the similarity between the vector representation of the product demand data and the vector representation of each piece of knowledge data in a knowledge database; obtaining knowledge data related to the product demand data in the knowledge database according to the calculated similarity to obtain a first related knowledge data set; and / or, performing word segmentation processing on the product demand data, and using the words obtained by the word segmentation processing to search for knowledge data related to the product demand data in a knowledge database to obtain a second related knowledge data set; A plurality of pieces of knowledge data most relevant to the product demand data are screened out from the first relevant knowledge data set and / or the second relevant knowledge data set to obtain target knowledge data.

6. The data generation method according to claim 1, characterized in that: Also includes: The general large model is used in combination with the product demand data to identify problems existing in the generated test cases, and the generated test cases are optimized according to the identified problems.

7. The data generation method according to claim 1, characterized in that: The method of utilizing the big model to generate an interface test script based on the interface definition data includes: utilizing the code big model to generate a parameter test script for a single interface and / or a scenario test script for multiple interfaces based on the interface definition data, wherein the scenario test script for multiple interfaces is a script for testing multiple interfaces involved in the same business scenario.

8. The data generation method according to claim 7, characterized in that: The product-related data also includes: interface call logs and / or interface implementation codes; Before generating scenario test scripts for multiple interfaces based on the interface definition data using the code big model, the method further includes: Determine the interface call relationship according to the interface call log; Using the code big model, based on the interface definition data, a scenario test script for multiple interfaces is generated, including: By using the code big model, according to the interface definition data, supplemented by the interface call relationship and / or the interface implementation code, a scenario test script for multiple interfaces is generated.

9. The data generation method according to claim 8, characterized in that: The interface call log includes an interface call link, and each interface in the interface call link corresponds to a call link identifier; The determining the interface call relationship according to the interface call log includes: According to the call link identifier corresponding to each interface in the interface call link and the call order of each interface, the interface call link is split into multiple sub-call links, and the call link identifiers corresponding to the interfaces in each sub-call link are the same; Generate a directed graph with interfaces as nodes according to the multiple sub-call links; Finding the longest interface call path according to the conditional probabilities of the nodes in the directed graph and a preset probability threshold, wherein the conditional probability of a node in the directed graph is the probability of calling the node under the condition of calling the next node; The calling relationship of the interfaces in the longest interface calling path is determined as the interface calling relationship.

10. A testing method, characterized in that: include: Obtaining a test case and / or an interface test script generated for a target product using the data generation method according to any one of claims 1 to 9; The target product is tested using the acquired test cases and / or interface test scripts.

11. A data generating device, characterized in that: include: A product-related data acquisition module, and a test case generation module and / or a test script generation module; The product-related data acquisition module is used to acquire product-related data of a target product, wherein the product-related data includes product requirement data and / or interface definition data; The test case generation module is used to generate a test outline using the big model according to the product requirement data, and to generate a test case using the big model according to the product requirement data and the test outline, wherein the test outline systematically defines the test scope through a hierarchical structure; The test script generation module is used to generate an interface test script based on the interface definition data using a large model.

12. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the steps of the data generation method as described in any one of claims 1 to 9.

13. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of the data generation method as described in any one of claims 1 to 9.

14. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the steps of the data generation method as described in any one of claims 1 to 9.

15. A test assistance system, characterized in that: include: a data generating device; The data generating device is used to execute the data generating method according to any one of claims 1 to 9.