Software test data and test case intelligent generation method and system

Through the intelligent generation system of software test data and use case, the problems of inefficiency and insufficient data coverage in the existing technology are solved, and automated test data generation and use case construction are realized, testing efficiency and coverage are improved, and data accuracy and Consistency, adapting to complex scenarios, improves the quality and stability of software products.

CN118939560APending Publication Date: 2024-11-12GANGSHENG TECH SERVICES (SHENZHEN) LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411312513.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing software testing tools rely on manual creation and maintenance of test data and use cases, which are inefficient and difficult to ensure the effectiveness and integrity of the data. Especially in complex data models, they cannot achieve full coverage, and lack intelligent dynamic generation capabilities, so they cannot adapt to multiple Source heterogeneous data environment and real-world complexity.

Method used

Provides a software test data and use case intelligent generation system, including a unified data source module, expression processing module, identifier module, data source processing module, data retrieval module, test case generation module and test data generation module, through automatic search, Process and generate test data, support a variety of data sources and formats, and realize dynamic data generation and correlation management.

Benefits of technology

It improves testing efficiency and coverage, reduces manual errors, ensures the accuracy and consistency of test data, can adapt to complex scenarios, and significantly improves the quality and stability of software products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939560A_ABST
    Figure CN118939560A_ABST
Patent Text Reader

Abstract

The invention provides a software test data and test case intelligent generation method and system. The method comprises the steps that automatic data retrieval is conducted on a data source according to defined data metadata and a data source retrieval type; retrieving file data from different data sources through a data retrieval module; defining and processing a unified data source special expression; performing conversion and standardization processing on the retrieval data; generating corresponding document data; a test case is generated through a test case generation module; and performing screening and expansion operation on the pre-prepared data source through a test data generation module to generate test data, and applying the test data to the test case. The test case and the test data are automatically generated, manual intervention is greatly reduced, the test working efficiency is improved, omission and errors caused by manual operation are avoided, the test coverage rate is higher, it is ensured that the correctness and stability of software functions in different application scenes are fully verified, and the test efficiency is improved. And a multi-source heterogeneous data environment is compatible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing automation and intelligentization, and in particular to a method and system for intelligently generating software testing data and test cases. Background Art

[0002] In software testing, testers need to construct different test cases to complete the system testing. For cases with the same test behavior, testers usually test in the following ways: Copy cases with the same test behavior, modify the test data in them, and then start testing. In this process, a large number of test cases are redundant. When the system under test changes, all the copied test cases need to be modified to correct the test behavior, which causes testers to spend a lot of time correcting test cases with the same test behavior. When the tester completes the correction, he needs to run the test to check whether the system under test passes the test. If some test cases need to be corrected and run again due to human errors, this will increase a lot of testers' waiting time and efficiency.

[0003] Testers also have some requirements for the randomness and coverage of data, such as a random price or a random quantity, etc. This type of test content is manually thought of and directly filled into the test case. In this process, testers need to spend a lot of time to complete the data organization, and the corresponding artificial value preference will also lead to the problem of low test case effectiveness.

[0004] Deficiencies of existing technologies: 1. Existing software testing tools and technologies often rely on testers to manually create and maintain test data and test cases, which is not only inefficient but also difficult to ensure the validity and integrity of test data, especially when faced with large and complex data models, and it is impossible to achieve full-scale, multi-level coverage testing.

[0005] 2. Currently, the test data generation tools on the market usually only support limited data source types and formats, have poor adaptability to test requirements in multi-source heterogeneous data environments, and cannot flexibly access various databases, files or other application systems to obtain the required data.

[0006] 3. Many testing tools lack the ability to intelligently and dynamically generate test data. They are unable to automatically generate test data that meets specific conditions based on actual business logic, and are even more unable to generate diversified and randomized test instances according to preset rules to simulate complex real-world situations.

[0007] 4. For data-driven testing scenarios, existing technologies have limitations in dealing with data relevance and dependency. For example, when there are data reference relationships between multiple test cases, existing solutions find it difficult to effectively manage and update the relevance between these data.

[0008] Therefore, the prior art has deficiencies and needs further improvement. Summary of the invention

[0009] In view of the problems existing in the prior art, the present invention provides a method and system for intelligently generating software test data and test cases.

[0010] To achieve the above object, the specific scheme of the present invention is as follows: The present invention provides a software test data and test case intelligent generation system, the system comprising: Unified data source module, expression processing module, identifier module, data source processing module, data retrieval module, test case generation module and test data generation module; data source configuration, predefined templates, predefined test data; The unified data source module is used to automatically retrieve the data source according to the data metadata and data source retrieval type defined by the tester; The expression processing module is used to process the special expressions defined by the tester and adjust the data retrieval, process the special expressions of the unified data source, and form conditional expressions for data retrieval; The identifier module provides data type definition and random data generation functions, performs type conversion and expansion on the search data, and includes a random basic algorithm to generate random data; The data source processing module is used to load data from various data sources and convert the data into a format suitable for use by the template engine; the data source processing module processes different types of data, including numbers, text, and dates, places the data in the correct position according to the requirements of the template, and pre-processes the data, including removing duplicates and formatting date and time to ensure the quality and consistency of the data. By providing high-quality data, the data source processing module can ensure that the generated test cases are accurate; The data retrieval module supports multiple data source types and file formats and is used to retrieve data from multiple data sources such as file data, database engine data and application data; The test case generation module generates test cases according to the predefined test case document template, predefined test data and predefined output path, and generates specific test cases by loading the predefined template, combining the data provided by the unified data source module, filling in the template engine module, and outputting according to the predefined output path; The test data generation module generates and fills the test data in the test case by combining the unified data source module, the identifier module and the expression processing module; The test case generation module and the test data generation module work together to automatically generate test cases and test data; The data source configuration is the basis for test case generation, and is used to provide the required data sources, including text files, databases, and network interfaces; The predefined templates include the basic structure and elements of the test cases. They can be customized by the user or use the default templates provided by the system. By combining the data from the unified data source module, the case generation controller can quickly generate test cases that meet the requirements; The predefined test data refers to a set of test data predefined in the test case generation process, which is usually used to fill in the fields of the test case; the predefined test data can be static or dynamically generated; static test data is usually stored in files, and the formats include CSV and Excel, which can be directly loaded into the test case generation module; dynamically generated test data needs to be generated by scripts or other tools, and then passed to the test case generation module; predefined test data can ensure the integrity and consistency of the test cases, especially when a large amount of test data is required. By using predefined test data, testers can generate test cases more effectively and improve test efficiency and coverage.

[0011] Furthermore, the system is implemented using languages ​​that support object-oriented programming, including Ruby, Python, Java, C++, C#, RUST, and Go to build a software testing framework.

[0012] Furthermore, the identifier module includes a random basic algorithm, which generates unpredictable random test data according to the RRS algorithm principle, including integer, floating point, string, and Boolean types.

[0013] Furthermore, the test case generation module includes: a template engine module and a case generation controller; Template engine module, used to generate test documents by combining predefined templates and data, convert and standardize retrieved data to conform to standard programming language types, and support random data generation; Case generation controller: used to receive data from the unified data source module and generate specific test cases according to predefined templates.

[0014] Further, the test data generation module includes: a data generation controller; The data generation controller is used to receive data from the unified data source module and generate specific test data according to predefined test data.

[0015] Furthermore, the template engine module supports template formats of multiple programming languages, including HTML, XML, and JSON, to meet different testing requirements.

[0016] Furthermore, the test case generation module and the test data generation module can self-adjust and optimize according to historical test results and feedback to improve the quality and relevance of the test cases.

[0017] The present invention also provides a method for intelligently generating software test data and test cases. Based on the above system, the method comprises the following steps: S1, using the unified data source module, automatically retrieves data from the data source according to the data metadata and data source retrieval type defined by the tester; S2, retrieves file data, database engine data and application data from different data sources through a data retrieval module; S3, in the expression processing module, the tester defines and processes the unified data source-specific expressions to regulate data retrieval and reduce the test program memory consumption; S4, uses the identifier module to convert and standardize the retrieved data, supports built-in general identifiers to define data types and scenario-defined identifiers; S5, using the template engine module to generate corresponding document data according to the predefined template document and data; S6, generating a test case by combining a predefined test case document template, predefined test data, and a predefined output path through a test case generation module; S7, through the test data generation module, combined with the unified data source module, the identifier module and the expression processing module, the pre-prepared data source is screened and expanded to generate test data, and the test data is applied to the test case.

[0018] Furthermore, step S3 further includes using an expression processing module to simplify and optimize complex logical expressions to improve data processing efficiency.

[0019] Furthermore, step S4 further includes generating random test data using the identifier module, and adjusting parameters of the random data generation algorithm according to specific requirements of the test scenario.

[0020] The technical solution of the present invention has the following beneficial effects: 1. Reduce manual uncertainty: Reduce the main problem of testers' mistakes, inefficiency and excessive manpower consumption, and also solve the problems of testers' versatility and readability in constructing test cases, so that testers can efficiently construct test cases with strong versatility and few mistakes, while reducing cross-project learning costs; 2. High degree of automation: By introducing intelligent algorithms and frameworks, the automatic generation of test cases and test data is realized, which greatly reduces manual intervention, improves test work efficiency, and avoids omissions and errors caused by manual operations.

[0021] 3. Comprehensive coverage: Designing a comprehensive and sophisticated combination of test cases for complex software systems, combined with dynamic data generation strategies, can achieve higher test coverage and ensure that the correctness and stability of software functions in different application scenarios are fully verified.

[0022] 4. Strong data flexibility: The proposed test data generation method is compatible with multi-source heterogeneous data environments, and can flexibly access different types of databases, files and other data sources to generate rich and diverse test data that meets actual business needs.

[0023] 5. Intelligent association processing: In response to the issues of association and dependency between data, the present invention proposes an innovative data management mechanism that can accurately process and maintain the reference relationship between test data, ensuring the consistency and accuracy of data when performing data-driven testing.

[0024] 6. Improve test quality: Due to the use of advanced data generation strategies and intelligent matching technology, it is possible to simulate a test environment that is closer to real user scenarios, thereby effectively discovering potential problems and vulnerabilities and significantly improving the overall quality of software products. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a system block diagram of the test cases and test data of the present invention; Figure 2 It is a principle block diagram of the test case generation module of the present invention; Figure 3 It is a principle block diagram of the test data generation module of the present invention; Figure 4 It is a diagram of the steps for generating test cases and test data of the present invention; In the figure: 11. Unified data source module; 12. Template engine module; 13. Expression processing module; 14. Identifier module; 15. Data source processing module; 16. Case generation controller; 17. Data generation controller; 18. Data retrieval module; 100. Test case generation module; 101. Test data generation module; 200. Data source configuration; 400. Test case; 500. Predefined module; 600. Predefined test data; 700. Test data. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments; it can be understood that the specific embodiments described herein are only used to explain the present invention rather than to limit the present invention; it should also be noted that, for ease of description, only the parts related to the present invention rather than all are shown in the accompanying drawings.

[0027] like Figure 1 As shown, the present invention provides a software test data and test case intelligent generation system, the language of which can be any object-oriented language, especially Ruby, Python, Java, C++, C#, RUST, Go, wherein the relevant technical points of this article will be explained by taking Ruby language as an example to illustrate the present invention.

[0028] The software system comprises: Unified data source module 11, expression processing module 13, identifier module 14, data source processing module 15, data retrieval module 18, test case generation module 100, test data generation module 101, data source configuration 200, predefined module 500, predefined test data 600; The unified data source module 11 can retrieve data from the data source according to the data metadata and data source retrieval type defined by the tester, instead of manually specifying and converting the data in a specific code, and integrate and uniformly process the data from different data sources. It can ensure that all data input into the case generation controller conforms to certain formats and standards.

[0029] Expression processing module 13: If the predefined template 500 contains some complex logic or expressions, this module can parse and calculate the values ​​of these expressions, and then insert the results into the corresponding test case positions.

[0030] The expression processing module 13 allows the tester to define a specific expression, which, after being processed by the processing module, is used by the data retrieval module to perform data retrieval adjustments, thereby reducing the memory consumption of the test program.

[0031] The expression processed by the expression processing module is a special expression for the unified data source. The processing method is to form a conditional expression through lexical analysis and then grammatical analysis, and act on the data retrieval module. The expression form example is as follows: (a eq 'b') and (c eq 'd')andq gte '12', where eq is the abbreviation of equal, expressing the meaning of "equal", and gte is the abbreviation of Greate Equal, expressing the meaning of "greater than or equal to".

[0032] Identifier Module 14: Sometimes we need to reference some specific objects or resources in test cases, such as file paths, URLs, etc. The identifier module can help us manage and find this information and ensure that they are correct when generating test cases.

[0033] The identifier module 14 converts the data into standard programming language types by defining specific expressions and combining with the unified data source module, or uses standard programming language types to expand the data. Testers can use built-in general identifiers to define data types, or they can flexibly define identifiers and conversion codes in their own scenarios through the identifier module, and process the data returned by the data retrieval module for specific scenarios.

[0034] Among them, the standard programming language types are integer, floating point, string, and Boolean.

[0035] Among them, the identifier module is an independent module and does not rely on a unified data source.

[0036] Among them, the identifier module contains a random basic algorithm and can provide random integer, floating point, string, and Boolean type data.

[0037] Among them, the random basic algorithm is based on the RRS (RFC4086) algorithm. After obtaining the corresponding random operator combination, the combination is performed to form an unpredictable random number. The basic algorithm is as follows: Step 1: Enter the operator range. N=input; Step 2: Calculate the number of operators you need to obtain: ; Step 3: Get the operator. I = RRS(space); Step 4: Merge all operators. ; Step 5: Get the result after taking the model. Result = candidateMod(N-1); The algorithm code is as follows: def self.random_in_space(total, shift = 0) space_level = Math.log(total, 256).ceil rand_bytes = rand_bytes_array(space_level, shift) result = 1 rand_bytes.each_byte do |b| result = result * b end if result>total result = result % (total - 1) end return result end Data source processing module 15: It plays a vital role in the test case generation process. It is responsible for loading data from various data sources and converting the data into a format suitable for the template engine. The data source processing module needs to be able to handle different types of data, including numbers, text, dates, etc., and be able to place the data in the correct position according to the requirements of the template. In addition, the data source processing module also needs to pre-process the data, such as removing duplicates, formatting dates and times, etc., to ensure the quality and consistency of the data. By providing high-quality data, the data source processing module can ensure that the generated test cases are accurate.

[0038] The data retrieval module 18 is used to retrieve different data sources. The data source retrieval content includes but is not limited to file data, database engine data, and application data; The retrieved file data includes but is not limited to standard formats RFC4180(CSV), RFC8259(JSON), RFC5364(XML), RFC9512(YAML).

[0039] The retrieved file data includes but is not limited to various non-international standard formats such as Parquet, AVRO, Protobuf, Excel, and Access; The data engines retrieved include but are not limited to various relational databases such as MySQL, Oracle, SQL Server, DB2, Amazon Aurora, PostgreSQL, Hive, Redshift, Greenplum, GauseDB, and SQLite. The application data retrieved includes but is not limited to various network protocols RFC2616 (HTTP), RFC4227 (SOAP); The data engines retrieved include but are not limited to various non-relational databases such as Redis, Mongo, Cassandra, and HBase; Preferably, in the test case generation module 100, the tester can generate the corresponding test case by predefining the test case document template, predefining the test data, and predefining the output path. The data is loaded through the unified data module, and after the template engine module fills the template with data, it is output to the corresponding location according to the predefined output path.

[0040] The test data generation module 101 prepares test data in advance, combines the unified data source module with the identifier module and the expression processing module, and performs operations of filtering and then expanding or expanding and then filtering on the pre-prepared data source to generate corresponding data and use it in the test case.

[0041] The test data generation module 101 configures a unified data source module under the pre-prepared test data, so that the unified data source module uses a corresponding data source processing module to adapt the predefined data to form a unified abstract data view.

[0042] The data generation controller calls the unified data source module to retrieve data, uses the identifier module to convert, supplement and fill the expressions in the data, and uses the expression processing module to screen and filter the data.

[0043] Data source configuration 200: This is the basis for test case generation, which provides the required data source. The data source can include various types of information, such as text files, databases, network interfaces, etc.

[0044] Predefined templates 500: These templates contain the basic structure and elements of test cases. They can be customized by the user or use the default templates provided by the system. By combining data from the unified data source module, the case generation controller can quickly generate test cases that meet the requirements.

[0045] Predefined test data 600: refers to a set of test data predefined in the test case generation process, which is usually used to fill in the fields of the test case. Predefined test data can be static or dynamically generated. Static test data is usually stored in files, such as CSV, Excel and other formats, which can be directly loaded into the test case generation module. Dynamically generated test data may need to be generated by scripts or other tools, and then passed to the test case generation module. The main advantage of predefined test data is that it can ensure the integrity and consistency of test cases, especially when a large amount of test data is required. By using predefined test data, testers can generate test cases more effectively and improve test efficiency and coverage.

[0046] Figure 2 1 is a schematic diagram of the structure of the test case generation module 100, which mainly includes the following parts: The template engine module 12 fills the template placeholders by combining the predefined template document with the data, and generates the corresponding document data of the template; The template engine module 12 is selected according to different languages, and its model and version are different; The template engine module 12 is a very important component in the test case generation process. It is responsible for loading and parsing predefined template files, and applying the data loaded from the unified data source to the template to generate the final test case. The template engine module parses the template file, understands the structure and fields of the test case, and then fills these fields according to the loaded data to generate a test case that meets specific requirements. The flexibility and scalability of the template engine module enable testers to customize templates according to different test requirements, thereby generating richer and more comprehensive test cases.

[0047] Case generation controller 16: It is the core part of the entire test case generation process; it receives data from the unified data source module and generates specific test cases according to the predefined template 500.

[0048] Through the collaborative work of several parts, the test case generation module can quickly and efficiently generate a large number of test cases that meet the requirements, thus helping us better evaluate and verify the performance and stability of software products.

[0049] Figure 3 1 is a schematic diagram of the structure of the test data generation module 101, which mainly includes the following parts: Data generation controller 17: It is the core part of the entire test data generation process. It receives data from the unified data source module and generates specific test data 700 according to the predefined test data 600.

[0050] Through the collaborative work of several parts, the test data generation module can quickly and efficiently generate a large amount of test data that meets the requirements, thus helping us better evaluate and verify the performance and stability of software products.

[0051] Figure 4 This is a flowchart of the operation of the software test data and test case intelligent generation method. According to the description in the figure, the workflow of this module is as follows: start: S1, using the unified data source module 11, automatically searching the data source according to the data metadata and data source search type defined by the tester; S2, retrieving file data, database engine data and application data from different data sources through the data retrieval module 18; S3, in the expression processing module 13, the tester defines and processes the unified data source dedicated expression to regulate data retrieval and reduce the memory consumption of the test program; S4, using the identifier module 14 to convert and standardize the search data, supporting built-in general identifiers to define data types and scenario-defined identifiers; S5, using the template engine module 12 to generate corresponding document data according to the predefined template 500 document and data; S6, generating a test case 400 by combining the predefined test case document template, the predefined test data 600 and the predefined output path through the test case generation module 100; S7, through the test data generation module 101, in combination with the unified data source module 11, the identifier module 14 and the expression processing module 13, the pre-prepared data source is screened and expanded to generate test data 700, and the test data is applied to the test case 400.

[0052] Finish.

[0053] Through this process, the test case generation module can automatically generate test cases based on predefined templates and data sources, thereby improving testing efficiency and accuracy.

[0054] Technical advantages: Testers can use the test case generation module to convert the passed test cases into test case templates. After filling in the data, they can complete thousands of test cases and conduct large-scale integrity tests. Generally, modifying a large number of test cases will inevitably introduce a small amount of human errors, thereby increasing the number of test rounds and the cost of testing. In this process, if there are changes to the system or test requirements, the tester only needs to check the data without modifying each case, solving the problem of inefficiency and unnecessary resource consumption in this scenario.

[0055] In particular, assuming that it takes 1 minute to change the data points and review the test cases, and assuming that there are 100 test cases in each group of test cases, it will take 100 minutes. If the solution is replaced with the above solution, there is no need to modify the test cases, and the data can be directly modified and reviewed in batches. Generally speaking, all changes can be completed in 5-10 minutes.

[0056] Testers can use the test data generation module to intelligently generate corresponding data when writing test cases. This is mainly reflected in the use of unified identification and unified generation rules to generate data when filling in the test data of the case. At the same time, the random part of the data is automatically generated by the device algorithm, which solves the problem of data skew caused by human preferences, enhances uniformity, and increases the coverage of test cases. In particular, uniformity reduces the learning cost of testers across different projects.

[0057] In particular, the test case generation module can be combined with the test data generation module to form different scenarios with strong applicability.

[0058] The above description is only a preferred embodiment of the present invention, and does not limit the scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the protection scope of the present invention.

Claims

1. A software test data and test case intelligent generation system, characterized in that: The system includes: Unified data source module, expression processing module, identifier module, data source processing module, data retrieval module, test case generation module and test data generation module; data source configuration, predefined templates, predefined test data; The unified data source module is used to automatically retrieve the data source according to the data metadata and data source retrieval type defined by the tester; The expression processing module is used to process the special expressions defined by the tester and adjust the data retrieval, process the special expressions of the unified data source, and form conditional expressions for data retrieval; The identifier module provides data type definition and random data generation functions, performs type conversion and expansion on the search data, and includes a random basic algorithm to generate random data; The data source processing module is used to load data from various data sources and convert the data into a format suitable for use by the template engine; the data source processing module processes different types of data, including numbers, text, and dates, places the data in the correct position according to the requirements of the template, and pre-processes the data, including removing duplicates and formatting date and time to ensure the quality and consistency of the data. By providing high-quality data, the data source processing module can ensure that the generated test cases are accurate; The data retrieval module supports multiple data source types and file formats and is used to retrieve data from multiple data sources such as file data, database engine data and application data; The test case generation module generates test cases according to the predefined test case document template, predefined test data and predefined output path, and generates specific test cases by loading the predefined template, combining the data provided by the unified data source module, filling in the template engine module, and outputting according to the predefined output path; The test data generation module generates and fills the test data in the test case by combining the unified data source module, the identifier module and the expression processing module; The test case generation module and the test data generation module work together to automatically generate test cases and test data; The data source configuration is the basis for test case generation, and is used to provide the required data sources, including text files, databases, and network interfaces; The predefined templates include the basic structure and elements of the test cases. They can be customized by the user or use the default templates provided by the system. By combining the data from the unified data source module, the case generation controller can quickly generate test cases that meet the requirements; The predefined test data refers to a set of test data predefined in the test case generation process, which is usually used to fill in the fields of the test case; the predefined test data can be static or dynamically generated; static test data is usually stored in files, and the formats include CSV and Excel, which can be directly loaded into the test case generation module; dynamically generated test data needs to be generated by scripts or other tools, and then passed to the test case generation module; predefined test data can ensure the integrity and consistency of the test cases, especially when a large amount of test data is required. By using predefined test data, testers can generate test cases more effectively and improve test efficiency and coverage.

2. The software test data and test case intelligent generation system according to claim 1, characterized in that: The system is implemented using object-oriented languages, including Ruby, Python, Java, C++, C#, RUST, and Go to build a software testing framework.

3. The software test data and test case intelligent generation system according to claim 1, characterized in that: The identifier module includes a random basic algorithm, and generates unpredictable random test data according to the RRS algorithm principle, including integer, floating point, string, and Boolean types.

4. The software test data and test case intelligent generation system according to claim 1, characterized in that: The test case generation module includes: a template engine module and a case generation controller; Template engine module, used to generate test documents by combining predefined templates and data, convert and standardize retrieved data to conform to standard programming language types, and support random data generation; Case generation controller: used to receive data from the unified data source module and generate specific test cases according to predefined templates.

5. The software test data and test case intelligent generation system according to claim 1, characterized in that: The test data generation module includes: a data generation controller; The data generation controller is used to receive data from the unified data source module and generate specific test data according to predefined test data.

6. The software test data and test case intelligent generation system according to claim 1, characterized in that: The template engine module supports template formats of multiple programming languages, including HTML, XML, and JSON, to meet different testing requirements.

7. The software test data and test case intelligent generation system according to claim 1, characterized in that: The test case generation module and the test data generation module can self-adjust and optimize according to historical test results and feedback to improve the quality and relevance of the test cases.

8. A method for intelligently generating software test data and test cases, characterized in that: Based on the system according to any one of claims 1 to 7, the method comprises the following steps: S1, using the unified data source module, automatically retrieves data from the data source according to the data metadata and data source retrieval type defined by the tester; S2, retrieves file data, database engine data and application data from different data sources through a data retrieval module; S3, in the expression processing module, the tester defines and processes the unified data source-specific expressions to regulate data retrieval and reduce the test program memory consumption; S4, uses the identifier module to convert and standardize the retrieved data, supports built-in general identifiers to define data types and scenario-defined identifiers; S5, using the template engine module to generate corresponding document data according to the predefined template document and data; S6, generating a test case by combining a predefined test case document template, predefined test data, and a predefined output path through a test case generation module; S7, through the test data generation module, combined with the unified data source module, the identifier module and the expression processing module, the pre-prepared data source is screened and expanded to generate test data, and the test data is applied to the test case.

9. The method for intelligently generating software test data and test cases according to claim 8, characterized in that: Step S3 further includes using an expression processing module to simplify and optimize complex logical expressions to improve data processing efficiency.

10. The method for intelligently generating software test data and test cases according to claim 8, characterized in that: Step S4 further includes generating random test data using the identifier module and adjusting the parameters of the random data generation algorithm according to the specific requirements of the test scenario.

Citation Information

Cited By

  • Interface output data generation method and device, equipment and medium

    CN119961152A

  • Interface output data generation method and apparatus, device, and medium

    CN119961152B

  • Vehicle lamp test case intelligent generation method and system based on knowledge graph

    CN120595185A