Test case generation method and device, electronic equipment and storage medium
By receiving user-inputted topology nodes and requirements, and utilizing mind maps and a test case knowledge base to generate test cases, the problem of low efficiency in manual generation is solved, achieving efficient and accurate test case generation and dynamic maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies that rely on manually generating test cases are inefficient and prone to missing test content, failing to meet the needs of specific scenarios.
By receiving the topology nodes and test requirements selected by the user, the system calls the mind map to obtain the test case generation strategy, identifies the changed content in conjunction with the test case knowledge base, and dynamically analyzes the existing test cases to generate the target test cases using either manual interaction or automatic generation strategies.
It improves the efficiency and accuracy of test case generation, enables timely response to changes in requirements, reduces maintenance costs and the risk of obsolescence, and ensures comprehensive coverage of software functions.
Smart Images

Figure CN121764795A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology or other related technical fields. Specifically, it relates to a test case generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the practice of software engineering, the design and execution of test cases are crucial steps in ensuring software quality. Test cases are documents that detail test steps, input data, and expected results. They serve as the basis for testers to perform tests and are an important means of evaluating whether software functionality and performance meet requirements. As the complexity and scale of software systems continue to increase, the efficient and comprehensive generation and maintenance of test cases become increasingly important.
[0003] In related technologies, test cases are manually constructed and maintained in real time. This method relies on human knowledge and experience, is time-consuming, has low generation efficiency, and is prone to omissions in test content, resulting in inaccurate test cases that cannot meet the needs of specific scenarios.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a test case generation method, apparatus, electronic device, and storage medium to at least solve the technical problems in related technologies where relying on manual generation of test cases is inefficient and prone to omissions of test content.
[0006] According to one aspect of the present invention, a test case generation method is provided, comprising: receiving a topology node selected by a user and input test requirements; invoking a mind map and obtaining a test case generation strategy based on the topology node, wherein the topology node is a node in the mind map, and the mind map pre-configures a test case generation strategy for each topology node; invoking a test case knowledge base and identifying changes to existing test cases based on the topology node and the test requirements; and executing a test case generation task based on the test case generation strategy and the changes to the existing test cases to generate target test cases.
[0007] Furthermore, the mind map is pre-built, and the steps for building the mind map include: identifying sub-objects of the object to be tested, and building a first-level topology node of the mind map based on the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; identifying the test types of the sub-objects, and building a second-level topology node of the mind map based on the test types; obtaining requirement descriptions for each sub-object under different test types, extracting requirement features based on the requirement descriptions, and building a third-level topology node of the mind map based on the requirement features, wherein the granularity of the first-level topology node is larger than that of the second-level topology node, and the granularity of the second-level topology node is larger than that of the third-level topology node.
[0008] Furthermore, the step of pre-configuring a test case generation strategy for each topology node includes: performing risk analysis on the topology node and calculating the risk value of the topology node; configuring a manual interaction generation strategy for the topology node whose risk value is greater than a preset risk threshold; and configuring an automatic generation strategy for the topology node whose risk value is less than or equal to the preset risk threshold.
[0009] Further, the step of executing the test case generation task based on the test case generation strategy and the changes to the existing test cases includes: if the strategy type in the test case generation strategy is a manual interaction generation strategy, starting an interactive session window; constructing a test template based on the existing test cases and their changes, pushing the test template to the user terminal through the interactive session window, and receiving test case information returned by the user terminal; generating the test cases based on the test case information, and providing a feedback window for the generated test cases to the user terminal; receiving feedback information from the user terminal on the generated test cases through the feedback window, and generating the final target test cases based on the feedback information.
[0010] Further, the step of executing the test case generation task based on the test case generation strategy and the changes to the existing test cases includes: when the strategy type in the test case generation strategy is an automatic generation strategy, obtaining the technical document uploaded by the user; parsing the technical document and extracting feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, boundary conditions; modifying the changes to the existing test cases based on the feature information to generate the target test case.
[0011] Furthermore, the step of calling the test case knowledge base and identifying changes to existing test cases based on the topology node and the test requirements includes: extracting all existing test cases associated with the topology node from the test case knowledge base based on the topology node; determining the requirement changes existing in the topology node based on the test requirements; identifying the changes in each existing test case affected by the requirement changes; and configuring a change tag for the changes.
[0012] Furthermore, after generating the target test cases, the method further includes: generating preview content in a unified format for the target test cases and pushing the preview content to the user terminal; receiving feedback information from the user terminal and storing the target test cases in the test case knowledge base based on the feedback information.
[0013] According to another aspect of the present invention, a test case generation apparatus is also provided, comprising: a receiving unit for receiving a topology node selected by a user and input test requirements; a generation unit for invoking a mind map and obtaining a test case generation strategy based on the topology node, wherein the topology node is a node in the mind map, and the mind map pre-configures a test case generation strategy for each topology node; an identification unit for invoking a test case knowledge base and identifying changes to existing test cases based on the topology node and the test requirements; and an execution unit for executing a test case generation task based on the test case generation strategy and the changes to existing test cases to generate target test cases.
[0014] Furthermore, the test case generation device further includes: a first construction module, used to identify sub-objects of the object to be tested, and construct a first-level topology node of the mind map using the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; a second construction module, used to identify the test type of the sub-objects, and construct a second-level topology node of the mind map using the test type; and a third construction module, used to obtain requirement descriptions for each sub-object under different test types, extract requirement features based on the requirement descriptions, and construct a third-level topology node of the mind map using the requirement features, wherein the granularity of the first-level topology node is larger than that of the second-level topology node, and the granularity of the second-level topology node is larger than that of the third-level topology node.
[0015] Furthermore, the test case generation device further includes: a first analysis module, used to perform risk analysis on the topology node and calculate the risk value of the topology node; a first configuration module, used to configure a manual interaction generation strategy for the topology node whose risk value is greater than a preset risk threshold; and a second configuration module, used to configure an automatic generation strategy for the topology node whose risk value is less than or equal to the preset risk threshold.
[0016] Further, the execution unit includes: a first startup module, used to start an interactive session window when the strategy type in the test case generation strategy is a manual interaction generation strategy; a fourth construction module, used to construct a test template based on the existing test cases and their changes, push the test template to the user terminal through the interactive session window, and receive test case information returned by the user terminal; a first generation module, used to generate the test cases based on the test case information, and provide a feedback window to the user terminal for the generated test cases; and a second generation module, used to receive feedback information from the user terminal on the generated test cases through the feedback window, and generate the final target test cases based on the feedback information.
[0017] Furthermore, the execution unit further includes: a first acquisition module, used to acquire the technical document uploaded by the user terminal when the strategy type in the test case generation strategy is an automatic generation strategy; a first extraction module, used to parse the technical document and extract feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, boundary conditions; and a first modification module, used to modify the modification content of the existing test cases based on the feature information to generate the target test case.
[0018] Furthermore, the identification unit includes: a second extraction module, used to extract all existing test cases associated with the topology node from the test case knowledge base based on the topology node; and a first identification module, used to determine the requirement changes existing in the topology node based on the test requirements, identify the changed content affected by the requirement changes in each of the existing test cases, and configure a change tag for the changed content.
[0019] Furthermore, the test case generation device further includes: a first push module, used to generate preview content in a unified format for the target test case and push the preview content to the user terminal; and a first storage module, used to receive feedback information from the user terminal and store the target test case in the test case knowledge base based on the feedback information.
[0020] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute any of the above-described test case generation methods.
[0021] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described test case generation methods.
[0022] According to another aspect of the present invention, a computer program product is also provided, the computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements any of the above-described test case generation methods.
[0023] In this application, the following steps are performed: receiving the topology node selected by the user and the input test requirements; invoking the mind map; and obtaining the test case generation strategy based on the topology node. Here, the topology node is a node in the mind map, and the mind map pre-configures a test case generation strategy for each topology node. Then, the test case knowledge base is invoked to identify the changes in existing test cases based on the topology node and test requirements. Finally, the test case generation task is executed based on the test case generation strategy and the changes in existing test cases to generate the target test case.
[0024] This application differentiates between various test case generation strategies, allowing different types of test cases to be generated using different strategies. This integrates the expertise of testers with the advantages of system automation, improving the efficiency and accuracy of test case generation. Furthermore, the dynamic analysis, modification, and reuse mechanism for existing test cases during generation ensures that test cases respond promptly to changes in requirements, maintaining accurate coverage of software functionality and reducing maintenance costs and the risk of test cases becoming obsolete. This solves the technical problems of related technologies that rely on manual test case generation, which is inefficient and prone to omissions in test content. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0026] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a test case generation method is shown.
[0027] Figure 2 This is a flowchart of an optional test case generation method according to an embodiment of the present invention;
[0028] Figure 3 This is a schematic diagram of an optional test case generation process according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of an optional test case generation device according to an embodiment of the present invention;
[0030] Figure 5 This is a hardware structure block diagram of an electronic device (or mobile device) that performs an optional test case generation method according to an embodiment of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] It should be noted that the test case generation method and apparatus in this application can be used in the financial technology field for automatically generating test cases based on strategy-driven and human-computer interaction, and can also be used in any field other than the financial technology field for automatically generating test cases based on strategy-driven and human-computer interaction. This application does not limit the application field of the test case generation method and apparatus.
[0034] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0035] The following embodiments of the present invention can be applied to various test case generation systems / applications / devices. The present invention proposes a strategy-driven and human-computer interaction-based intelligent test case generation and dynamic maintenance method. It intelligently distinguishes test case generation strategies for different business scenarios through a domain knowledge base and introduces a two-way human-computer interaction empowerment mechanism, achieving dynamic perception and intelligent maintenance of existing test assets while generating test cases.
[0036] The present invention will now be described in detail with reference to various embodiments.
[0037] Example 1
[0038] According to an embodiment of the present invention, an embodiment of a test case generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0039] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a test case generation method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0040] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the test case generation method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned test case generation method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0043] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0044] Under the aforementioned operating environment, this application provides the following: Figure 2The test case generation method shown is implemented by a test case generation system.
[0045] Figure 2 This is a flowchart of an optional test case generation method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:
[0046] Step S201: Receive the topology node selected by the user and the input test requirements.
[0047] In step S201 above, firstly, the system needs to provide a user-friendly interface, allowing users to browse and select the software functional structure constructed from mind maps. The mind map is built based on the software requirements specification, design documents, and past testing experience. It decomposes the software into multiple levels of topological nodes, where the first level represents functional modules, the second level represents test types (such as functional testing, performance testing, compatibility testing, etc.), and the third level represents specific requirements. This helps users quickly locate and understand the specific functional scope to be tested.
[0048] After the user selects a specific topology node, they can input or select test requirements related to the functionality of that topology node based on the information prompted by the user interface. Test requirements can be specific business scenarios, boundary conditions, performance indicators, etc., that enable the system to obtain sufficient information necessary to generate test cases, including the expected behavior of the function, the operation process, and possible abnormal situations.
[0049] The system receives topology node information and test requirement information uploaded by the user client, which serves as the basis for generating test cases.
[0050] Step S202: Invoke the mind map and obtain the test case generation strategy based on the topology nodes.
[0051] In step S202 above, after receiving the selected topology node information, the system automatically retrieves the mind map associated with the software project. The mind map is presented in a tree structure, with each node representing a different functional module or business process of the software, ensuring that testers can intuitively understand the software's hierarchy and architecture. Each topology node in the mind map has a preset test case generation strategy, including a "fully automatic generation strategy" and a "manual interactive generation strategy." When a user selects a specific node, the system reads the corresponding node's strategy configuration information and uses it as parameters for subsequent test case generation tasks. These strategies are comprehensively set based on the software function's risk assessment, complexity, and historical testing experience, ensuring that test case generation is not only efficient but also has appropriate depth and breadth for different functional modules.
[0052] Furthermore, the mind map is pre-built. The steps for building the mind map include: identifying the sub-objects of the object to be tested and building the first-level topology nodes of the mind map based on the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; identifying the test types of the sub-objects and building the second-level topology nodes of the mind map based on the test types; obtaining the requirement descriptions of each sub-object under different test types, extracting requirement features based on the requirement descriptions, and building the third-level topology nodes of the mind map based on the requirement features, wherein the granularity of the first-level topology nodes is larger than that of the second-level topology nodes, and the granularity of the second-level topology nodes is larger than that of the third-level topology nodes.
[0053] Specifically, the mind map is pre-constructed for the object under test, divided into multiple hierarchical structures. Each hierarchical topology node represents a different granularity of system structure. The object under test can be a software system. By analyzing the software system's requirements specification, design documents, and architecture diagrams, the main functional modules, subsystems, and business processes constituting the object under test are identified as sub-objects, ensuring that the top-level structure of the mind map clearly reflects the software's architecture and functional distribution. Utilizing a built-in test type rule library, the system automatically identifies the test types that each sub-object may involve and creates a corresponding first-level topology node for each sub-object in the mind map, providing a structured framework for subsequent accurate generation of test cases. Test types are further subdivided for each first-level topology node (sub-object), such as functional testing, performance testing, and compatibility testing, to construct the second-level topology nodes of the mind map. The system extracts specific test requirement descriptions from relevant technical documents and requirements specifications, including functional inputs and outputs, business rules, and boundary conditions. These descriptions are analyzed using natural language processing technology to extract key characteristics of the requirements, such as specific business scenarios and data validation rules, which serve as the third-level topology nodes of the mind map.
[0054] In a mind map, the first-level topology nodes cover the entire software system or major subsystems, with a relatively large granularity; the second-level topology nodes refine to specific test types, with a moderate granularity; and the third-level topology nodes focus on specific requirement features, with the finest granularity. This hierarchical division from coarse to fine helps testers quickly locate and understand test requirements, while also providing a clear structural basis for the system to automatically generate test cases.
[0055] Furthermore, the step of pre-configuring a test case generation strategy for each topology node includes: performing risk analysis on the topology node and calculating the risk value of the topology node; configuring a manual interaction generation strategy for topology nodes with risk values greater than a preset risk threshold; and configuring an automatic generation strategy for topology nodes with risk values less than or equal to the preset risk threshold.
[0056] Specifically, different types of test case generation strategies are configured for topology nodes by quantifying their risk values. The system calculates a quantified risk value for each topology node by analyzing multi-dimensional information such as software requirements documents, historical defect records, business complexity, and data sensitivity. Risk analysis can employ machine learning algorithms to train models that identify factors related to the topology node, such as historical faults, change frequency, and relevance to core business, thereby deriving a comprehensive risk score and thus the risk value of the topology node.
[0057] A risk threshold is predefined; topology nodes exceeding this threshold are configured with a manual interaction generation strategy. This means that when generating test cases, the system will initiate an interactive session to discuss and determine the details of the test cases with the testers, including the selection of test scenarios, the preparation of test data, and the setting of expected results. In this way, the system can combine the professional knowledge and experience of the testers to generate more refined and complex test cases.
[0058] For topology nodes with risk values less than or equal to a preset threshold, an automatic test generation strategy is configured. This means that the system will automatically parse relevant software design documents and technical specifications, and intelligently generate test cases for these topology nodes using preset test generation algorithms (such as boundary value analysis, equivalence class partitioning, etc.), without manual intervention, saving a significant amount of manpower and time costs.
[0059] In this embodiment of the invention, the system can intelligently distinguish the risk levels of different topology nodes and automatically configure test case generation strategies based on risk values. This achieves intelligent layering of test case generation, allowing the system to concentrate resources and attention on high-risk software functions, meticulously generating test cases through manual interaction. In low-risk areas, efficiency is improved through automation, ensuring the rational allocation of testing resources. For complex and high-risk business processes, manual intervention can improve the quality of test cases and ensure comprehensive coverage of core business scenarios; while for simple functional modules, automation can significantly reduce pre-test preparation time and accelerate the overall testing progress.
[0060] Step S203: Call the test case knowledge base to identify changes to existing test cases based on topology nodes and test requirements.
[0061] In step S203 above, the test case knowledge base is connected. This is a database storing test cases generated in all previous testing activities. The test cases in the knowledge base are categorized and indexed according to attributes such as software version, functional module, and test type, making retrieval and retrieval efficient and accurate. All existing test cases related to a topology node are located through the topology node, and the latest submitted test requirements are analyzed to determine which existing test cases are no longer applicable or need to be adjusted according to new requirements, and to identify the content that needs to be changed.
[0062] Identifying and adjusting changes to existing test cases not only enables real-time maintenance of existing test cases in the knowledge base, ensuring the timeliness and accuracy of the test case library and allowing each test to be conducted based on the latest requirements and functional status, thus enhancing the synchronization between testing activities and software development, but also allows for the reuse of existing test cases during the real-time test case generation process, improving the efficiency of test case generation.
[0063] Furthermore, the steps of calling the test case knowledge base and identifying changes to existing test cases based on topology nodes and test requirements include: extracting all existing test cases associated with topology nodes from the test case knowledge base based on topology nodes; determining the requirement changes existing in the topology nodes based on test requirements, identifying the changes in each existing test case affected by the requirement changes, and configuring change tags for the changes.
[0064] Specifically, when identifying changes to existing test cases, the system retrieves all historical test cases directly or indirectly related to a selected topology node from the test case knowledge base. Utilizing the knowledge base's indexing and classification mechanisms, all relevant test cases can be quickly located. By comparing the latest submitted test requirements with historical records, natural language processing and machine learning algorithms are used to automatically identify changes in the test requirements. This includes, but is not limited to, modifications to functional parameters, adjustments to business logic, and the addition or deletion of exceptions. Through association with topology nodes, the system can focus on the specific functional modules or business processes that have been changed. For the extracted existing test cases, the system analyzes their content, especially the inputs, expected outputs, and test steps related to specific test requirements, to determine which parts of which test cases may need adjustment to adapt to the change in requirements. This process may involve semantic understanding and rule matching to ensure accurate identification of the changes. For the identified changes, the system automatically assigns a "to be changed" tag to facilitate further review or modification.
[0065] Step S204: Based on the test case generation strategy and the changes to existing test cases, execute the test case generation task to generate target test cases.
[0066] In step S204 above, the test case generation method is intelligently selected according to the preset test case generation strategy. If it is manual interactive generation, testers are guided to customize test cases through human-computer dialogue; if it is automatic generation, an automated test case generation algorithm is invoked to automatically generate test cases based on the latest requirements documents and design specifications. For existing test cases marked with a "to be changed" tag, if the generation strategy for this test case is manual interactive generation, a test case template is generated based on the existing test cases after adjusting the changed content, and the template is pushed to the user terminal to generate the final test cases through human-computer interaction. If the generation strategy is automatic generation, the system automatically adjusts the corresponding parts of the test cases, such as input data and expected results, according to the changed content to generate test cases that meet the new requirements. This allows existing test cases to be reused to quickly and accurately generate new test cases.
[0067] Furthermore, the steps for executing the test case generation task based on the test case generation strategy and the changes to existing test cases include: when the strategy type in the test case generation strategy is a manual interaction generation strategy, starting an interactive session window; constructing a test template based on existing test cases and their changes, pushing the test template to the user terminal through the interactive session window, and receiving test case information returned by the user terminal; generating test cases based on the test case information, and providing a feedback window for the generated test cases to the user terminal; receiving feedback information from the user terminal on the generated test cases through the feedback window, and generating the final target test cases based on the feedback information.
[0068] Specifically, for scenarios involving manual interaction to generate test cases, the process begins by launching an interactive session window. This window provides an interactive interface for the user, guiding them through question-and-answer, fill-in-the-blank, or multiple-choice questions to gradually refine the details of the test cases. Based on the structure and changes to existing test cases, a test template is constructed. This template includes the basic skeleton of the test cases, key points highlighting changes, blank spaces, and an option list, and is then pushed to testers via the interactive session window. The template design ensures that even with manual intervention, the test cases adhere to certain standards and formats, facilitating subsequent management and execution. The process then receives the content filled in or selected by the user in the session window and generates a preliminary draft of the test cases. This draft fully considers the changes to the test cases, ensuring coverage of the latest testing requirements. Subsequently, testers are allowed to review and modify the initially generated test cases to improve their accuracy and effectiveness.
[0069] After generating initial test cases, the system provides a feedback window to the user, displaying the preliminary draft test cases and their detailed information. The user can evaluate the test cases through this window, providing accurate, modified, or other feedback. When the user selects "modification needed," the system provides an editing interface, allowing direct modification of any part of the draft test cases. After collecting and integrating all feedback, the system saves the finalized test case information and generates the final target test cases.
[0070] In this embodiment of the invention, through a human-interactive generation strategy, testers can customize test cases based on their professional experience under the system's guidance, ensuring that the depth and breadth of test cases meet the needs of high-risk scenarios while improving writing efficiency. Simultaneously, with the construction of test templates, the system can quickly generate preliminary test case drafts, and through interactive feedback windows, errors and omissions in the test case writing process are effectively reduced, improving the efficiency and accuracy of test case generation.
[0071] Furthermore, the steps for executing the test case generation task based on the test case generation strategy and the changes to existing test cases include: when the strategy type in the test case generation strategy is automatic generation strategy, obtaining the technical documents uploaded by the user; parsing the technical documents and extracting feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, boundary conditions; modifying the changes to existing test cases based on the feature information to generate target test cases.
[0072] Specifically, when automatically generating test cases, the system retrieves relevant technical documents uploaded by the user, including but not limited to interface documents, database design documents, and requirements specifications. These documents provide key details such as the software's internal structure, business logic, and data processing rules, serving as the basis for automatically generating test cases. Subsequently, core elements for generating test cases are extracted from these technical documents to obtain feature information. These core elements may include business logic, operational processes, input / output parameters, and boundary conditions. Existing test cases marked for modification are reviewed one by one. Based on the extracted feature information (such as new business logic or modified operational processes), relevant parts of the test cases are adjusted. The adjusted existing test cases are then reused to generate new target test cases. For example, if the requirement change involves a change in data input format, the system will automatically adjust the input parameters in the existing test cases to ensure the test cases remain valid; or, if the change affects the expected business results, the system will update the expected output in the test cases accordingly to ensure the accuracy of the test results.
[0073] Furthermore, after generating the target test cases, the process also includes: generating preview content of the target test cases in a unified format and pushing the preview content to the user terminal; receiving feedback information from the user terminal and storing the target test cases in the test case knowledge base based on the feedback information.
[0074] Specifically, after generating the target test cases, they are converted into a standard, unified format. Common formats may include components such as title, test steps, expected results, and preconditions. The converted test cases are then organized into concise and clear preview content and pushed to the user terminal via electronic documents, web views, or a dedicated test case preview interface. Testers provide feedback on each test case through the user terminal, such as whether the generated target test cases are accurate and where modifications are needed. Based on the user feedback, the system makes final modifications and confirmations to the target test cases to ensure they meet standards and requirements. Subsequently, the system stores these test cases digitally in a test case knowledge base, organized according to certain classification and indexing principles, for easy subsequent retrieval, reuse, and maintenance.
[0075] Through the above steps, the system receives the topology node selected by the user and the input test requirements, invokes the mind map, and obtains the test case generation strategy based on the topology node. The topology node is a node in the mind map, and the mind map pre-configures a test case generation strategy for each topology node. Then, it invokes the test case knowledge base, identifies the changes to existing test cases based on the topology node and test requirements, and finally executes the test case generation task based on the test case generation strategy and the changes to existing test cases to generate the target test case.
[0076] In this embodiment, by differentiating between different test case generation strategies, different types of test cases are generated using different strategies. This integrates the professional knowledge of testers with the advantages of system automation, improving the efficiency and accuracy of test case generation. Simultaneously, the dynamic analysis, modification, and reuse mechanism for existing test cases during generation ensures that test cases can respond promptly to changes in requirements, maintaining accurate coverage of software functions and reducing maintenance costs and the risk of test cases becoming obsolete. This solves the technical problems in related technologies where relying on manual test case generation is inefficient and prone to omissions in test content.
[0077] The following describes in detail another optional implementation method.
[0078] Figure 3 This is a schematic diagram of an optional test case generation process according to an embodiment of the present invention, such as... Figure 3 As shown, the test case generation process includes:
[0079] Step 1, Begin;
[0080] Step 2: Create a mind map and initialize the branch generation strategy;
[0081] The mind map is pre-built for the object to be tested, divided into multiple hierarchical structures. Each hierarchical topology node represents a different granularity of system structure. The object to be tested can be a software system. By analyzing the software system's requirements specification, design documents, and architecture diagrams, the main functional modules, subsystems, and business processes constituting the object to be tested are identified as sub-objects, ensuring that the top-level structure of the mind map clearly reflects the software's architecture and functional distribution. Utilizing a built-in test type rule library, the system automatically identifies the test types that each sub-object may involve and creates a corresponding first-level topology node for each sub-object in the mind map, providing a structured framework for subsequent accurate generation of test cases. Test types are further subdivided for each first-level topology node (sub-object), such as functional testing, performance testing, and compatibility testing, to construct the second-level topology nodes of the mind map. The system extracts specific test requirement descriptions from relevant technical documents and requirements specifications, including functional inputs and outputs, business rules, and boundary conditions. These descriptions are analyzed using natural language processing technology to extract key characteristics of the requirements, such as specific business scenarios and data validation rules, which serve as the third-level topology nodes of the mind map.
[0082] In a mind map, the first-level topology nodes cover the entire software system or major subsystems, with a relatively large granularity; the second-level topology nodes refine to specific test types, with a moderate granularity; and the third-level topology nodes focus on specific requirement features, with the finest granularity. This hierarchical division from coarse to fine helps testers quickly locate and understand test requirements, while also providing a clear structural basis for the system to automatically generate test cases.
[0083] Step 3: The user selects a branch and starts the test case generation task. If the test case generation strategy for the branch node (corresponding to the topology node above) is manual interactive generation, proceed to step 4. If the test case generation strategy for the branch node is automatic generation, proceed to step 5.
[0084] Step 4: Execute the human-computer interaction process. First, check whether the current test requirements affect the existing test cases associated with the knowledge base and the selected branch node (corresponding to the existing test cases mentioned above). If so, identify the changes to the existing test cases, then build a test case generation template based on the changes, and start the large model interaction window to push the test case template to the user. If not, directly start the large model interaction window to push the test case template to the user, and finally generate test cases based on the user feedback.
[0085] Step 5: Execute the fully automated generation process. First, obtain the technical documents uploaded by the user. Then, check whether the test requirements involved in the technical documents affect the existing test cases in the knowledge base. If so, the user selects a processing method to regenerate or reuse the existing test cases. Then, test cases are automatically generated according to the processing method selected by the user. If not, test cases are generated automatically directly.
[0086] Step 6: Generate test case previews;
[0087] Step 7: Show the user the test case preview and receive user feedback;
[0088] Step 8: Generate the final target test cases based on user feedback and store them.
[0089] Step nine, end.
[0090] This invention proposes a method for intelligent generation and dynamic maintenance of test cases based on strategy-driven and human-computer interaction. It intelligently distinguishes test case generation strategies for different business scenarios through a domain knowledge base and introduces a two-way human-computer interaction empowerment mechanism to achieve dynamic perception and intelligent maintenance of existing test assets while generating test cases.
[0091] The following is a detailed description with reference to another embodiment.
[0092] Example 2
[0093] The test case generation device provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in the above embodiment one. The specific implementation method and beneficial effects can be referred to the foregoing method embodiment, and will not be repeated here.
[0094] Figure 4 This is a schematic diagram of an optional test case generation device according to an embodiment of the present invention, such as... Figure 4 As shown, the test case generation device may include: a receiving unit 41, a generation unit 42, an identification unit 43, and an execution unit 44, wherein,
[0095] The receiving unit 41 is used to receive the topology node selected by the user and the test requirements input by the user terminal;
[0096] The generation unit 42 is used to call the mind map and obtain the test case generation strategy based on the topology nodes. The topology nodes are the nodes in the mind map, and the mind map pre-configures a test case generation strategy for each topology node.
[0097] The identification unit 43 is used to call the test case knowledge base and identify the changes in existing test cases based on topology nodes and test requirements.
[0098] Execution unit 44 is used to execute test case generation tasks based on the test case generation strategy and changes to existing test cases, and generate target test cases.
[0099] The aforementioned test case generation device receives the topology nodes selected by the user and the input test requirements through the receiving unit 41; it calls up the mind map through the generation unit 42 and obtains the test case generation strategy based on the topology nodes, where the topology nodes are nodes in the mind map, and the mind map pre-configures a test case generation strategy for each topology node; it calls up the test case knowledge base through the identification unit 43 and identifies the changes to existing test cases based on the topology nodes and test requirements; and it executes the test case generation task through the execution unit 44 based on the test case generation strategy and the changes to existing test cases to generate target test cases.
[0100] In this embodiment, by differentiating between different test case generation strategies, different types of test cases are generated using different strategies. This integrates the professional knowledge of testers with the advantages of system automation, improving the efficiency and accuracy of test case generation. Simultaneously, the dynamic analysis, modification, and reuse mechanism for existing test cases during generation ensures that test cases can respond promptly to changes in requirements, maintaining accurate coverage of software functions and reducing maintenance costs and the risk of test cases becoming obsolete. This solves the technical problems in related technologies where relying on manual test case generation is inefficient and prone to omissions in test content.
[0101] Furthermore, the test case generation device also includes: a first construction module, used to identify sub-objects of the object to be tested and construct first-level topology nodes of the mind map based on the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; a second construction module, used to identify the test types of the sub-objects and construct second-level topology nodes of the mind map based on the test types; and a third construction module, used to obtain the requirement descriptions of each sub-object under different test types, extract requirement features based on the requirement descriptions, and construct third-level topology nodes of the mind map based on the requirement features, wherein the granularity of the first-level topology nodes is larger than that of the second-level topology nodes, and the granularity of the second-level topology nodes is larger than that of the third-level topology nodes.
[0102] Furthermore, the test case generation device also includes: a first analysis module for performing risk analysis on topology nodes and calculating the risk value of the topology nodes; a first configuration module for configuring a manual interaction generation strategy for topology nodes with risk values greater than a preset risk threshold; and a second configuration module for configuring an automatic generation strategy for topology nodes with risk values less than or equal to the preset risk threshold.
[0103] Furthermore, the execution unit includes: a first startup module, used to start an interactive session window when the strategy type in the test case generation strategy is a manual interaction generation strategy; a fourth construction module, used to build a test template based on existing test cases and their changes, push the test template to the user terminal through the interactive session window, and receive test case information returned by the user terminal; a first generation module, used to generate test cases based on the test case information, and provide a feedback window for the generated test cases to the user terminal; and a second generation module, used to receive feedback information from the user terminal on the generated test cases through the feedback window, and generate the final target test cases based on the feedback information.
[0104] Furthermore, the execution unit also includes: a first acquisition module, used to acquire technical documents uploaded by the user when the strategy type in the test case generation strategy is an automatic generation strategy; a first extraction module, used to parse the technical documents and extract feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, boundary conditions; and a first modification module, used to modify the modification content of the existing test cases based on the feature information and generate target test cases.
[0105] Furthermore, the identification unit includes: a second extraction module, used to extract all existing test cases associated with the topology node from the test case knowledge base based on the topology node; and a first identification module, used to determine the requirement changes existing in the topology node based on the test requirements, identify the changed content affected by the requirement changes in each existing test case, and configure a change tag for the changed content.
[0106] Furthermore, the test case generation device also includes: a first push module, used to generate preview content in a unified format for the target test cases and push the preview content to the user terminal; and a first storage module, used to receive feedback information from the user terminal and store the target test cases in the test case knowledge base based on the feedback information.
[0107] It should be noted that the receiving unit 41, generating unit 42, identifying unit 43, and executing unit 44 correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also run as part of a device in the computer terminal 10 provided in Embodiment 1.
[0108] The invention will now be described in conjunction with another alternative embodiment.
[0109] Example 3
[0110] The present invention can also provide an electronic device. Figure 5 This is a hardware structure block diagram of an electronic device (or mobile device) that performs an optional test case generation method according to an embodiment of the present invention, such as... Figure 5 As shown, the electronic device may include: one or more ( Figure 5 (Only one is shown) processor 502, memory 504, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0111] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0112] The processor can access information and applications stored in memory via a transmission device to perform the following steps: receiving the topology node selected by the user and the input test requirements; invoking the mind map and obtaining the test case generation strategy based on the topology nodes, where each topology node is a node in the mind map and a test case generation strategy is pre-configured for each topology node; invoking the test case knowledge base and identifying changes to existing test cases based on the topology nodes and test requirements; and executing the test case generation task based on the test case generation strategy and the changes to existing test cases to generate the target test cases.
[0113] The processor can access information and applications stored in memory via a transmission device to perform the following steps: identify sub-objects of the object to be tested and construct the first-level topology nodes of a mind map based on the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; identify the test types of the sub-objects and construct the second-level topology nodes of the mind map based on the test types; obtain the requirement descriptions of each sub-object under different test types, extract requirement features based on the requirement descriptions, and construct the third-level topology nodes of the mind map based on the requirement features, wherein the granularity of the first-level topology nodes is larger than that of the second-level topology nodes, and the granularity of the second-level topology nodes is larger than that of the third-level topology nodes.
[0114] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: perform risk analysis on the topology nodes and calculate the risk value of the topology nodes; configure a manual interaction generation strategy for topology nodes with risk values greater than a preset risk threshold; and configure an automatic generation strategy for topology nodes with risk values less than or equal to the preset risk threshold.
[0115] The processor can access information and applications stored in memory via a transmission device to perform the following steps: If the test case generation strategy is a manual interaction generation strategy, start an interactive session window; construct a test template based on existing test cases and their changes, push the test template to the user terminal through the interactive session window, and receive test case information returned by the user terminal; generate test cases based on the test case information, and provide a feedback window for the generated test cases to the user terminal; receive feedback information from the user terminal on the generated test cases through the feedback window, and generate the final target test cases based on the feedback information.
[0116] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: when the strategy type in the test case generation strategy is automatic generation, obtain the technical documents uploaded by the user; parse the technical documents and extract feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, boundary conditions; modify the changed content of the existing test cases based on the feature information to generate target test cases.
[0117] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: extract all existing test cases associated with the topology node from the test case knowledge base based on the topology node; determine the requirement changes existing in the topology node based on test requirements, identify the changes in each existing test case affected by the requirement changes, and configure a change tag for the changed content.
[0118] The processor can access the information and applications stored in the memory via the transmission device to perform the following steps: generate preview content of the target test cases in a uniform format and push the preview content to the user terminal; receive feedback information from the user terminal and store the target test cases in the test case knowledge base based on the feedback information.
[0119] This invention provides a test case generation scheme. By differentiating between different test case generation strategies, different types of test cases can be generated using different strategies. This integrates the professional knowledge of testers with the advantages of system automation, improving the efficiency and accuracy of test case generation. Furthermore, the dynamic analysis, modification, and reuse mechanism for existing test cases during generation ensures that test cases can respond promptly to changes in requirements, maintaining accurate coverage of software functions and reducing maintenance costs and the risk of obsolescence. This solves the technical problems of related technologies that rely on manual test case generation, which is inefficient and prone to omissions in test content.
[0120] Those skilled in the art will understand that Figure 5 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 5 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 5 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 5 The different configurations shown.
[0121] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0122] The invention will now be described in conjunction with another alternative embodiment.
[0123] Example 4
[0124] This invention also provides a computer-readable storage medium. Optionally, in this invention, the computer-readable storage medium can be used to store the program code executed by the test case generation method provided in Embodiment 1.
[0125] Optionally, in this embodiment of the invention, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0126] This invention also provides a computer program product, which, when executed on a data processing device, is suitable for performing the steps of a test case generation method: receiving a topology node selected by the user and inputting test requirements; invoking a mind map and obtaining a test case generation strategy based on the topology nodes, wherein the topology nodes are nodes in the mind map, and a test case generation strategy is pre-configured for each topology node in the mind map; invoking a test case knowledge base and identifying changes to existing test cases based on the topology nodes and test requirements; and executing a test case generation task based on the test case generation strategy and the changes to existing test cases to generate target test cases.
[0127] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0128] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0131] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0132] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0133] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A test case generation method, characterized in that, include: Receive the topology node selected by the user and the test requirements input; The mind map is invoked, and a test case generation strategy is obtained based on the topology nodes, wherein the topology nodes are nodes in the mind map, and a test case generation strategy is pre-configured for each topology node in the mind map; The test case knowledge base is invoked to identify changes to existing test cases based on the topology nodes and the test requirements. Based on the test case generation strategy and the changes to the existing test cases, a test case generation task is executed to generate the target test cases.
2. The method according to claim 1, characterized in that, The mind map is pre-built, and the steps for building the mind map include: Identify the sub-objects of the object to be tested, and construct the first-level topology nodes of the mind map using the sub-objects, wherein the sub-objects include at least: functional modules, subsystems, and business processes; Identify the test type of the sub-object, and construct the second-level topology node of the mind map based on the test type; Obtain the requirement descriptions of each of the sub-objects under different test types, extract requirement features based on the requirement descriptions, and construct the third-level topology nodes of the mind map based on the requirement features, wherein the granularity of the first-level topology nodes is greater than that of the second-level topology nodes, and the granularity of the second-level topology nodes is greater than that of the third-level topology nodes.
3. The method according to claim 1, characterized in that, The steps for pre-configuring a test case generation strategy for each of the topology nodes include: Perform risk analysis on the topology nodes and calculate the risk value of the topology nodes; Configure a manual interaction generation strategy for the topology nodes whose risk values are greater than a preset risk threshold; Configure an automatic generation strategy for the topology nodes whose risk value is less than or equal to the preset risk threshold.
4. The method according to claim 3, characterized in that, The steps for executing the test case generation task based on the test case generation strategy and the changes to the existing test cases include: If the strategy type in the test case generation strategy is a manual interaction generation strategy, then start the interactive session window; A test template is constructed based on the existing test cases and their changes, and the test template is pushed to the user terminal through the interactive session window, and the test case information returned by the user terminal is received. The test cases are generated based on the test case information, and a feedback window is provided to the user terminal for the generated test cases. The system receives feedback from the user on the generated test cases through the feedback window and generates the final target test cases based on the feedback.
5. The method according to claim 3, characterized in that, The steps for executing the test case generation task based on the test case generation strategy and the changes to the existing test cases include: When the strategy type in the test case generation strategy is automatic generation strategy, the technical documents uploaded by the user client are obtained; The technical document is parsed to extract feature information, wherein the feature information includes at least one of the following: business logic, operation process, input and output parameters, and boundary conditions; Based on the aforementioned feature information, the changes to the existing test cases are modified to generate the target test cases.
6. The method according to claim 1, characterized in that, The steps of calling the test case knowledge base to identify changes to existing test cases based on the topology nodes and the test requirements include: Based on the topology node, extract all existing test cases associated with the topology node from the test case knowledge base; Based on the test requirements, determine the requirement changes that exist in the topology nodes, identify the changes that are affected by the requirement changes in each of the existing test cases, and configure a change tag for the changes.
7. The method according to claim 1, characterized in that, After generating the target test cases, the following is also included: Generate preview content in a unified format for the target test cases and push the preview content to the user terminal; The system receives feedback information from the user terminal and stores the target test case in the test case knowledge base based on the feedback information.
8. A test case generation device, characterized in that, include: The receiving unit is used to receive the topology node selected by the user and the test requirements input. A generation unit is used to invoke the mind map and obtain a test case generation strategy based on the topology nodes, wherein the topology nodes are nodes in the mind map, and the mind map pre-configures a test case generation strategy for each topology node; The identification unit is used to call the test case knowledge base and identify the changes in existing test cases based on the topology nodes and the test requirements. The execution unit is used to execute the test case generation task based on the test case generation strategy and the changes to the existing test cases, and generate the target test cases.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the test case generation method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the test case generation method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program, wherein the computer program, when executed by a processor, implements the test case generation method according to any one of claims 1 to 7.