Test case generation and test method and device, equipment and storage medium

By using dynamic strategies between agents and large language models to generate test cases in software testing, the limitations of existing test case generation methods are solved, achieving flexible and efficient test scenario adaptation, and improving resource utilization and testing efficiency.

CN121301217APending Publication Date: 2026-01-09CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511662675.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing machine learning-based test case generation methods rely on predefined datasets, are limited to specific test scenarios and application domains, and are difficult to adapt to dynamically changing software system requirements and complex test scenarios.

Method used

By receiving test task requests, the target agent is determined from multiple agents by using priority strategies, load strategies, capability matching strategies, and adaptive strategies among multiple agents. Test cases are generated using a large language model by combining source code, business requirement documents, and historical test cases. Task allocation is optimized through knowledge base sharing among agents and reinforcement learning.

Benefits of technology

It enables flexible test case generation that adapts to different testing scenarios and application areas, improves resource utilization and testing efficiency, ensures timely response of high-priority tasks, avoids resource overload, and enhances test coverage and execution reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301217A_ABST
    Figure CN121301217A_ABST
Patent Text Reader

Abstract

The invention provides a test case generation and test method and device, equipment and a storage medium, relates to the technical field of software testing, and aims to understand logics and requirements of different software systems and automatically generate adaptive test cases. According to the specific technical scheme, a test task request is received; determining a target agent from the plurality of agents through a priority strategy, a load strategy, a capability matching strategy and an adaptive strategy between the test task and the plurality of agents; obtaining a source code, a business requirement document and a historical test case of the software system associated with the test task through the target agent; reasoning and planning by using a large language model through the target agent based on the source code of the software system associated with the test task, the business demand document and the historical test case, determining a test plan, and generating a test case; and running the generated test case through the target agent according to the test plan, and generating a test result and defect information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software testing technology, and in particular to a test case generation and testing method, apparatus, device and storage medium. Background Technology

[0002] As software systems continue to grow in scale and increase in functional complexity, traditional software testing methods face severe challenges. Currently, existing machine learning-based test case generation methods typically rely on predefined datasets (relevant data sets that are pre-collected, labeled, and fixed by humans), limiting them to specific testing scenarios and application domains. Summary of the Invention

[0003] This application provides a test case generation and testing method, apparatus, device, and storage medium that can dynamically understand the logic and requirements of different software systems and automatically generate suitable test cases.

[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: Firstly, a test case generation and testing method is provided. This method includes: receiving a test task request to request the execution of a test task; determining a target agent from multiple agents based on priority strategies, load strategies, capability matching strategies, and adaptive strategies between the test task and multiple agents, with the target agent executing the test task; obtaining the source code, business requirement documents, and historical test cases of the software system associated with the test task through the target agent; determining a test plan and generating test cases based on the source code, business requirement documents, and historical test cases using a large language model, using the target agent. Each test case includes a test case identifier, test objective, preconditions, test steps, input data, and expected results; and running the generated test cases according to the test plan using the target agent, generating test results and defect information. The test results are used to evaluate whether the system under test meets expected indicators, and the defect information is used to record errors found in the system under test, including the defect type, severity, reproduction steps, and repair suggestions.

[0005] First, this method combines source code analysis, business requirements documents, and historical test cases, and leverages the reasoning capabilities of large language models to dynamically understand the logic and requirements of different software systems, automatically generating appropriate test cases. This breaks through the limitations of predefined datasets, allowing for flexible adaptation to different test scenarios and application domains.

[0006] In addition, traditional testing usually uses static allocation methods (such as fixed test machines or manual allocation), which can easily lead to idle or overloaded resources. This method dynamically allocates suitable agents through priority strategy, load strategy, capacity matching strategy and adaptive strategy, which can achieve load balancing, accurate capacity matching and so on, thereby improving resource utilization.

[0007] In one possible implementation of the first aspect, the determination of the target agent through the priority policy, load policy, capability matching policy, and adaptive policy between the test task and multiple agents specifically includes: calculating the test task T based on the priority policy, load policy, capability matching policy, and adaptive policy between the test task and multiple agents using the following weighted expression. i With agent A j The matching score is used to determine the agent with the highest score as the target agent. (T i A j )=w1×P(T i A j )+w2×L(A j )+w3×C(T i A j )+w4×A(T i A j ) Where i and j are both positive integers, S(T) i A j ) is used to describe test task T i Assigned to agent A j The overall score; w1×P(T) i A j P(T) is used to represent a priority strategy. i A j ) is used to represent test task T i In agent A j The priority score is calculated based on the execution priority, where w1 represents the weighting coefficient of the priority strategy, which is typically determined based on the urgency and importance of the test task; w2 × L(A j ) is used to represent load balancing strategies, L(A) j ) is used to represent agent A j The current load score, w2 represents the weighting coefficient of the load policy, and the load policy represents the agent A. j The current task queue length; w3×C(T) i A j C(T) is used to represent the capability matching strategy. i A j ) is used to represent test task T i With agent Aj The capability matching score, w3 represents the weight coefficient of the capability matching strategy, and the capability matching strategy represents the ability matching strategy of agent A. j Does it have the capability to execute test task T? i Resources and capabilities; w4×A(T i A j A(T) is used to represent an adaptive policy. i A j ) is used to represent agent A j For test task T i The historical fit score, w4 is used to represent the weight coefficients of the adaptive policy, and the adaptive policy is used to represent the agent A. j For test task T i Historical processing capability of relevant features; weight coefficients satisfy w1+w2+w3+w4=1 and support dynamic configuration.

[0008] This method comprehensively considers four key dimensions: task priority, agent load status, capability matching, and historical adaptability (adaptive strategy), employing a dynamic weighted scoring model for intelligent decision-making. This method can: ensure immediate response for high-priority tasks; intelligently avoid overloaded nodes, achieving load balancing and maximizing resource utilization; accurately match based on capability characteristics, ensuring specialized tasks are executed by specialized agents; and fully utilize historical execution data to continuously optimize task allocation strategies. Through the comprehensive decision-making of these strategies, task allocation accuracy and testing efficiency can be improved. Simultaneously, the dynamic weight configuration function allows the system to flexibly adapt to various testing scenario requirements, achieving optimal resource scheduling.

[0009] In another possible implementation of the first aspect, the method further includes: if multiple test task requests are received, determining the scores of different allocation schemes using the following matching combination expression, and taking the allocation scheme with the highest score as the target allocation scheme:

[0010] The matching combination formula is used to reflect the score of the allocation scheme in which multiple test tasks are assigned to multiple agents for execution; X ij For decision variables that are either 0 or 1, when the task is a test task T i Assigned to agent A j At that time, X ij Set to 1 if the value is not 1, otherwise set to 0; n and m are positive integers; the combination matching formula satisfies the uniqueness constraint and the maximum processing capacity constraint. The uniqueness constraint indicates that each test task is assigned to an agent, and the maximum processing capacity constraint indicates that the number of test tasks assigned to each agent cannot exceed the maximum number of test tasks it can process.

[0011] This method optimizes overall resource allocation by combining matching, considering the matching relationships between multiple tasks and multiple agents. It calculates all possible allocation schemes through combination expressions and selects the scheme with the highest comprehensive score, thereby improving overall testing efficiency.

[0012] In another possible implementation of the first aspect, the method further includes: storing the source code, business requirement documents, historical test cases, test plans, generated test cases, test results, and defect information of the software system associated with the test task into a knowledge base through the target intelligent agent; the knowledge base is used to realize information sharing among intelligent agents; the generated test cases prioritize covering key test scenarios, which are determined by feature extraction algorithms based on the source code, business requirement documents, and historical test cases of the software system associated with the test task; the test plan includes test case generation steps, test environment configuration, resource allocation, execution time, preconditions, and relationships.

[0013] This method leverages knowledge base sharing (such as defect information and test plans) among agents to reuse historical testing experience, enabling tests of similar tasks to directly reference historical defect data and generate high-value test cases accordingly.

[0014] In another possible implementation of the first aspect, the method further includes: when the first agent discovers defect information while performing the first test task, the knowledge base stores the defect information; if the second agent performs a test task of the same type as the first test task, the defect information is retrieved from the knowledge base, and test cases for the defect information are generated first.

[0015] This method shares defect information through a knowledge base and generates test cases for defect information of the same type of test task. It can focus on defect information and intelligently reuse defect information, which can improve test coverage and efficiency.

[0016] In another possible implementation of the first aspect, the above-mentioned target agent runs the generated test cases according to the test plan to generate test results and defect information, specifically including: configuring the test environment before executing the test plan, which includes installing dependent libraries and preparing test data; running the generated test cases in the test environment according to the test plan through the target agent; collecting test data while running the generated test cases, which includes test logs, error reports and performance indicators; and generating test results and defect information based on the test data.

[0017] This method improves execution reliability through a standardized testing process that automates environment configuration and intelligent test execution. Furthermore, it enhances the efficiency of problem detection by intelligently analyzing test data.

[0018] In another possible implementation of the first aspect, the above method further includes: analyzing the difference between the test results and the expected target through the target agent; and dynamically adjusting the weight coefficients of the priority strategy, the load strategy, the capability matching strategy, or the adaptive strategy between the test task and the target agent based on the difference between the test results and the expected target using reinforcement learning techniques.

[0019] This method uses reinforcement learning to automatically adjust the weights of strategies such as priority and load balancing based on the deviation between test results and expectations, making task allocation more in line with actual needs. This intelligent adaptive adjustment method, which does not require manual intervention, can not only improve the accuracy of task allocation, but also continuously improve the system's performance in processing test tasks.

[0020] In another possible implementation of the first aspect, the method further includes: dynamically adjusting the weight coefficients of the priority strategies of different test tasks according to the execution status of different test tasks; predicting future high-load periods based on the historical load data of each agent and the current task flow, and pre-scheduling or delaying the test tasks during the high-load periods; recording the test results of different agents in different test tasks, and dynamically adjusting the capability matching scores of different agents and different test tasks based on the test results of different agents in different test tasks.

[0021] First, this method prioritizes critical tasks by monitoring task status and dynamically adjusting priority weights. Second, it uses historical load data and the current task flow to achieve intelligent load prediction and task pre-allocation, preventing system overload. Finally, it automatically assigns the most suitable agent to perform the corresponding task based on the agent's historical performance in different tasks, improving execution efficiency.

[0022] Secondly, a test case generation and testing apparatus is provided, comprising: a test task receiving module for receiving test task requests, the test task requests being used to request the execution of test tasks; a task analysis module for determining a target intelligent agent from multiple intelligent agents through priority strategies, load strategies, capability matching strategies, and adaptive strategies between the test task and multiple intelligent agents, the target intelligent agent being used to execute the test task; and an intelligent agent module for performing the following steps: obtaining the source code, business requirement document, and historical test cases of the software system associated with the test task; based on the source code, business requirement document, and historical test cases of the software system associated with the test task, using a large language model for reasoning and planning, determining a test plan, and generating test cases, the test cases including test case identifier, test objective, preconditions, test steps, input data, and expected results; running the generated test cases according to the test plan, generating test results and defect information, the test results being used to evaluate whether the tested system meets the expected indicators, and the defect information being used to record the errors found in the tested system, the defect information including the defect type, severity, reproduction steps, and repair suggestions of the errors in the tested system.

[0023] Thirdly, an electronic device is provided, the method comprising: a memory and at least one processor. The memory is communicatively connected to the processor. The memory is used to store computer program code, the computer program code including computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the method of the first aspect and any possible implementation thereof.

[0024] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions. When these computer instructions are executed by a processor, they are used to implement the method as described in the first aspect and any possible implementation thereof.

[0025] Fifthly, embodiments of this application provide a computer program product that, when running on a computer / executed by the computer's processor, implements the method described in the first aspect and any possible design thereof. The computer may be the test case generation and testing apparatus described in the second aspect and any possible implementation thereof.

[0026] Understandably, the beneficial effects that the test case generation and testing apparatus of the second aspect, the electronic equipment of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can achieve can be referred to the beneficial effects of the first aspect and any possible implementation thereof, which will not be repeated here. Attached Figure Description

[0027] Figure 1This is a schematic diagram of the structure of an intelligent agent provided in an embodiment of this application; Figure 2 A flowchart illustrating a test case generation and testing method provided in an embodiment of this application; Figure 3 This is a schematic diagram illustrating multi-agent collaborative work as provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a test case generation and testing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0030] The technical solutions provided in this application, including the collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data, comply with relevant laws and regulations and do not violate public order and good morals.

[0031] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.

[0032] As software systems continue to grow in scale and increase in functional complexity, traditional software testing methods face severe challenges. Currently, existing machine learning-based test case generation methods typically rely on predefined datasets (relevant data sets collected, labeled, and fixed manually beforehand), limiting them to specific testing scenarios and application domains. These methods perform poorly in generating test cases when dealing with dynamically changing software system requirements and complex testing scenarios.

[0033] Therefore, this application proposes a test case generation and testing method that can dynamically understand the logic and requirements of different software systems and automatically generate appropriate test cases. The specific solution is as follows: The system receives a test task request, which requests the execution of a test task. Based on priority, load, capability matching, and adaptive strategies between the test task and multiple agents, a target agent is selected to execute the test task. Through the target agent, the system obtains the source code, business requirements document, and historical test cases of the software system associated with the test task. Using a large language model, the target agent determines a test plan and generates test cases, including a test case identifier, test objective, preconditions, test steps, input data, and expected results. The target agent runs the generated test cases according to the test plan, generating test results and defect information. The test results evaluate whether the system under test meets expected metrics, and the defect information records discovered errors in the system under test, including the defect type, severity, reproduction steps, and remediation suggestions.

[0034] First, this method combines source code analysis, business requirements documents, and historical test cases, and leverages the reasoning capabilities of large language models to dynamically understand the logic and requirements of different software systems, automatically generating appropriate test cases. This breaks through the limitations of predefined datasets, allowing for flexible adaptation to different test scenarios and application domains.

[0035] In addition, traditional testing usually uses static allocation methods (such as fixed test machines or manual allocation), which can easily lead to idle or overloaded resources. This method dynamically allocates suitable agents through priority strategy, load strategy, capacity matching strategy and adaptive strategy, which can achieve load balancing, accurate capacity matching and so on, thereby improving resource utilization.

[0036] The following section, with reference to the accompanying drawings, details a test case generation and testing method provided in this application.

[0037] First, please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of an intelligent agent provided in an embodiment of this application. The intelligent agent includes a perception module, a decision-making module, an execution module, and a memory module.

[0038] The perception module can collect information from the system environment, including code information, user requirements, and test history, to understand the current state and environmental information of the system. The perception module can also build a comprehensive understanding of the system under test by parsing the software system's source code, analyzing business requirement documents, and gaining experience from historical test cases. During the perception process, the agent uses feature extraction algorithms to identify key modules and high-risk areas in the system, providing data support for the decision-making module.

[0039] The decision-making module can analyze collected information to determine test objectives, select test strategies, ensure that generated test cases cover the system's key functions and boundary conditions, and formulate a test case execution plan based on the analysis. This execution plan includes test case generation steps, test environment preparation, resource allocation and execution time, preconditions, and interrelationships. Furthermore, after each test case execution, the decision-making module can analyze the difference between the execution results and the expected goals, reflect on and adjust subsequent decision-making strategies to improve the system's adaptability and decision-making quality.

[0040] The following sections, in conjunction with Tables 1 to 3, describe the specifications and constraints to be followed when generating test cases, based on test case characteristics, test case standards, and test case composition.

[0041] Table 1

[0042] As shown in Table 1, the design of test cases needs to have several key characteristics, including but not limited to: explicitness, traceability, repeatability, independence, and measurability.

[0043] First, explicitness requires test cases to clearly define input data, execution steps, and expected results to ensure consistent results across different testers. Second, traceability requires each test case to correspond to a specific requirement or functionality, ensuring comprehensive test coverage. Third, repeatability emphasizes that test case execution results should be stable and unaffected by time or personnel. Furthermore, independence requires minimizing dependencies between test cases to improve testing efficiency and reliability. Finally, testability ensures that test cases can be actually executed and produce quantifiable and verifiable results. These characteristics collectively guarantee the effectiveness and accuracy of the testing work.

[0044] Table 2

[0045] As shown in Table 2, the design of test cases should follow the following criteria, including but not limited to: completeness, accuracy, coverage, effectiveness, maintainability, and priority.

[0046] Among these requirements, completeness dictates that test cases must include test objectives, preconditions, input data, test steps, and expected results to ensure the testing process is comprehensive and executable. Accuracy emphasizes that descriptions must be clear and unambiguous to ensure testers can correctly understand and execute the tests. Coverage requires test cases to cover all functional modules of the system, including positive testing (verifying normal functionality) and negative testing (verifying exception handling). Effectiveness ensures that test cases can effectively identify system defects, focusing on testing core functions, abnormal scenarios, and boundary conditions. Maintainability requires test cases to be easy to update and maintain to adapt to changes in requirements or system adjustments, maintaining long-term effectiveness. Prioritization requires test cases to be tiered based on business risks and functional importance, ensuring that critical functions are tested first. These standards collectively guarantee the comprehensiveness, reliability, and efficiency of the testing work.

[0047] Table 3

[0048] As shown in Table 3, a complete test case typically consists of several key components, including but not limited to: test case identifier, test objective, prerequisites, test steps, input data, and expected results.

[0049] The test case identifier serves as a unique number or code for easy management and tracking; the test objective clearly defines the verification purpose of the case and is associated with a specific function or requirement; the preconditions list the environmental configuration, data preparation, and other requirements that must be met before test execution; the test steps describe the operational process in detail to ensure that testers can execute it accurately; the input data provides the specific parameters or information required for the test; and the expected results define the correct response or behavior that the system should exhibit, serving as the basis for judging whether the test passes. These components together ensure that the test case structure is clear, executable, and easy to evaluate.

[0050] The execution module applies generated test cases to the system under test, verifying the system's functionality and performance through test execution. Before executing tests, it ensures the test environment is similar to the production environment to improve the reliability of test results. The execution module configures the test environment using automated tools, including installing dependency libraries and preparing test data. After executing test cases, it collects test logs, error reports, performance metrics, and other data, feeding them back to the decision-making module for subsequent optimization. When tests find defects, the execution module can automatically locate the faulty module and generate a detailed test report, including a defect description, scope of impact, and remediation suggestions.

[0051] The memory module stores perceived information and generated test cases. Through dynamic retrieval of this memory, the agent can continuously improve test performance and achieve autonomous learning. The memory module can store historical data from each test execution, including test cases, execution results, and defect information, for reference and improvement in future tests. Different agents' memory modules can share some information, thereby improving the overall quality and efficiency of test case generation. The memory module also supports the construction of knowledge graphs, helping the agent refer to historical knowledge when generating test cases and avoid repeating errors.

[0052] Please see Figure 2 , Figure 2 This is a flowchart illustrating a test case generation and testing method provided in an embodiment of this application. The test case generation and testing method in this embodiment can be executed by devices such as servers, computers, and electronic devices.

[0053] S101. Receive a test task request, which is used to request the execution of a test task.

[0054] A testing task refers to the specific testing work performed to verify the functionality, performance, security, or other quality characteristics of a software system. It typically includes elements such as testing objectives, testing environment, test cases, execution steps, and expected results.

[0055] S102. By using priority strategies, load strategies, capability matching strategies, and adaptive strategies between the test task and multiple agents, a target agent is determined from the multiple agents. The target agent is used to execute the test task.

[0056] In some embodiments, determining the target agent through the priority policy, load policy, capability matching policy, and adaptive policy between the test task and multiple agents specifically includes: calculating the test task T using the following weighted expression based on the priority policy, load policy, capability matching policy, and adaptive policy between the test task and multiple agents. i With agent A j The matching score is used to determine the agent with the highest score as the target agent. (T i A j )=w1×P(T i A j )+w2×L(A j )+w3×C(T i A j )+w4×A(T i A j (Formula 1) Where i and j are both positive integers, S(T) iA j ) is used to describe test task T i Assigned to agent A j The overall score.

[0057] w1×P(T i A j P(T) is used to represent a priority strategy. i A j ) is used to represent test task T i In agent A j The priority score is executed on the test, and w1 is used to represent the weight coefficient of the priority strategy, which is usually determined based on the urgency and importance of the test task.

[0058] w2×L(A j ) is used to represent load balancing strategies, L(A) j ) is used to represent agent A j The current load score, w2 represents the weighting coefficient of the load policy, and the load policy represents the agent A. j The current task queue length. Load balancing score L(A) j It is usually the inverse function of the current load, so that agents with less load are given priority.

[0059] w3×C(T i A j C(T) is used to represent the capability matching strategy. i A j ) is used to represent test task T i With agent A j The capability matching score, w3 represents the weight coefficient of the capability matching strategy, and the capability matching strategy represents the ability matching strategy of agent A. j Does it have the capability to execute test task T? i Resources and capabilities.

[0060] w4×A(T i A j A(T) is used to represent an adaptive policy. i A j ) is used to represent agent A j For test task T i The historical fit score, w4 is used to represent the weight coefficients of the adaptive policy, and the adaptive policy is used to represent the agent A. j For test task T i Historical processing capability of relevant features. Adaptive score A(T) i A j It can dynamically adjust based on historical data and through machine learning models to improve the flexibility and intelligence of scheduling.

[0061] The weighting coefficients satisfy w1+w2+w3+w4=1 and support dynamic configuration. This application allows adjustment of the importance of each strategy in different scenarios by setting weights w1, w2, w3, and w4. For example, in situations with many urgent tasks, the priority weight w1 can be increased, while in situations with significant differences in task resource requirements, the capability matching weight w3 can be increased.

[0062] This method comprehensively considers four key dimensions: task priority, agent load status, capability matching, and historical adaptability (adaptive strategy), employing a dynamic weighted scoring model for intelligent decision-making. This method can: ensure immediate response for high-priority tasks; intelligently avoid overloaded nodes, achieving load balancing and maximizing resource utilization; accurately match based on capability characteristics, ensuring specialized tasks are executed by specialized agents; and fully utilize historical execution data to continuously optimize task allocation strategies. Through the comprehensive decision-making of these strategies, task allocation accuracy and testing efficiency can be improved. Simultaneously, the dynamic weight configuration function allows the system to flexibly adapt to various testing scenario requirements, achieving optimal resource scheduling.

[0063] In some embodiments, if multiple test task requests are received, the scores of different allocation schemes are determined using the following matching combination expression, and the allocation scheme with the highest score is selected as the target allocation scheme: (Equation 2) The matching combination formula is used to reflect the score of the allocation scheme in which multiple test tasks are assigned to multiple agents for execution.

[0064] X ij For decision variables that are either 0 or 1, when the task is a test task T i Assigned to agent A j At that time, X ij Set the value to 1, otherwise set it to 0; n and m are positive integers.

[0065] The combination matching formula satisfies both uniqueness and maximum processing capacity constraints. The uniqueness constraint indicates that each test task is assigned to one agent, and its expression is: (Equation 3) The maximum processing capacity constraint is used to indicate that the number of test tasks assigned to each agent cannot exceed the maximum number of test tasks it can process (C). j Its expression is: (Equation 4) This method optimizes overall resource allocation by combining matching, considering the matching relationships between multiple tasks and multiple agents. It calculates all possible allocation schemes through combination expressions and selects the scheme with the highest comprehensive score, thereby improving overall testing efficiency.

[0066] S103. Obtain the source code, business requirement documents, and historical test cases of the software system associated with the test task through the target intelligent agent.

[0067] S104. Using the target intelligent agent, based on the source code of the software system associated with the test task, business requirement documents, and historical test cases, reasoning and planning are performed using a large language model to determine the test plan and generate test cases. The test cases include test case identifier, test objective, preconditions, test steps, input data, and expected results.

[0068] This solution directly acquires the source code, business requirement documents, and historical test cases of the software system associated with the test task, and analyzes and generates test cases accordingly. Therefore, it can quickly adapt to changes in system requirements and new test scenarios, maintaining the real-time nature of test cases. Furthermore, the automatic test case generation method reduces manual intervention (eliminating the need for manually writing test cases), improving the efficiency and consistency of test case generation.

[0069] S105. Through the target intelligent agent, according to the test plan, run the generated test cases, generate test results and defect information. The test results are used to evaluate whether the tested system meets the expected indicators. The defect information is used to record the errors found in the tested system. The defect information includes the defect type, severity, reproduction steps and repair suggestions of the errors in the tested system.

[0070] In some embodiments, the above-described method of running generated test cases and generating test results and defect information through a target agent according to a test plan specifically includes: configuring the test environment before executing the test plan, which includes installing dependent libraries and preparing test data; running the generated test cases in the test environment through the target agent according to the test plan; collecting test data while running the generated test cases, which includes test logs, error reports, and performance metrics; and generating test results and defect information based on the test data.

[0071] This method improves execution reliability through a standardized testing process that automates environment configuration and intelligent test execution. Furthermore, it enhances the efficiency of problem detection by intelligently analyzing test data.

[0072] In some embodiments, the method further includes: storing the source code, business requirement document, historical test cases, test plans, generated test cases, test results, and defect information of the software system associated with the test task into a knowledge base through a target intelligent agent; the knowledge base is used to realize information sharing among intelligent agents; the generated test cases prioritize covering key test scenarios, which are determined by feature extraction algorithms based on the source code, business requirement document, and historical test cases of the software system associated with the test task; the test plan includes test case generation steps, test environment configuration, resource allocation, execution time, preconditions, and relationships.

[0073] This method leverages knowledge base sharing (such as defect information and test plans) among agents to reuse historical testing experience, enabling tests of similar tasks to directly reference historical defect data and generate targeted, high-value test cases. Through agent learning and knowledge base support, comprehensive and effective test cases can be generated, improving the comprehensiveness and accuracy of software testing.

[0074] In some embodiments, the method further includes: when the first agent discovers defect information while performing a first test task, storing the defect information in a knowledge base; if the second agent performs a test task of the same type as the first test task, retrieving the defect information from the knowledge base and generating test cases for the defect information in a priority manner.

[0075] This method shares defect information through a knowledge base and generates test cases for defect information of the same type of test task. It can focus on defect information and intelligently reuse defect information, which can improve test coverage and efficiency.

[0076] In some embodiments, the method further includes: analyzing the difference between the test results and the expected target through the target agent; and dynamically adjusting the weight coefficients of the priority strategy, load strategy, capability matching strategy, or adaptive strategy between the test task and the target agent based on the difference between the test results and the expected target using reinforcement learning techniques.

[0077] This method uses reinforcement learning to automatically adjust the weights of strategies such as priority and load balancing based on the deviation between test results and expectations, making task allocation more in line with actual needs. This intelligent adaptive adjustment method, which does not require manual intervention, can not only improve the accuracy of task allocation, but also continuously improve the system's performance in processing test tasks.

[0078] In some embodiments, the method further includes: dynamically adjusting the weight coefficients of the priority strategies of different test tasks according to the execution status of different test tasks; predicting future high-load periods based on the historical load data of each agent and the current task flow, and pre-scheduling or delaying the test tasks during the high-load periods; recording the test results of different agents in different test tasks, and dynamically adjusting the capability matching scores of different agents and different test tasks based on the test results of different agents in different test tasks.

[0079] In load balancing scheduling, load prediction is performed using historical data and the current state to pre-schedule upcoming tasks. This load prediction mechanism can anticipate the load status of agents, avoiding uneven load distribution in short periods and improving system resource utilization and task execution stability.

[0080] The system dynamically evaluates the capabilities of agents and recalibrates them based on their performance in different tasks to guide subsequent capability-matching and scheduling. This more accurately selects suitable agents to execute tasks, improving both the efficiency and quality of task execution. The scheduling algorithm possesses greater flexibility, autonomy, and adaptability, maintaining high-efficiency task scheduling capabilities in complex and ever-changing testing environments. These innovations enable the system to better cope with the rapid iteration demands of software development, ensuring the generation of optimal test cases under various resource and environmental constraints.

[0081] First, this method prioritizes critical tasks by monitoring task status and dynamically adjusting priority weights. Second, it uses historical load data and the current task flow to achieve intelligent load prediction and task pre-allocation, preventing system overload. Finally, it automatically assigns the most suitable agent to perform the corresponding task based on the agent's historical performance in different tasks, improving execution efficiency.

[0082] In some embodiments, the scheduling center determines a target agent from multiple agents by employing priority strategies, load strategies, capability matching strategies, and adaptive strategies between the test task and multiple agents. This target agent then executes the test task. In this implementation, reinforcement learning is introduced, enabling the scheduling center to continuously optimize the scheduling strategy based on historical feedback from task execution. The reinforcement learning algorithm evaluates the long-term benefits of scheduling behavior to find the optimal scheduling strategy. This self-learning and optimization mechanism enhances the intelligence and adaptability of the scheduling algorithm, allowing the system to maintain high efficiency in changing environments. Furthermore, in this implementation, the scheduling center can dynamically adjust task priorities based on system operating status, task execution progress, and feedback results. This dynamic adjustment mechanism allows the system to flexibly respond to changes in task priorities, ensuring that critical tasks are processed promptly and improving overall testing efficiency.

[0083] Next, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating a multi-agent collaborative operation as provided in an embodiment of this application.

[0084] First, the system receives task requests, which may include information such as task type, execution requirements, and priority. The system performs initial verification to ensure the requests comply with processing specifications. Before a task enters the scheduling process, a task analysis module performs in-depth analysis, including requirements parsing, resource assessment, and priority determination. Subsequently, based on the task analysis results, the scheduling center selects a suitable agent to execute the task, considering capability matching, load balancing, and priority strategies, and monitors the execution status in real time. The scheduling center selects suitable agents (such as agents 1, 2, 3, etc.) and distributes the task to the corresponding execution unit. During task execution, the agent may decompose the task: if the task is complex, it may be broken down into multiple sub-tasks for parallel processing.

[0085] After the task is completed, the task results feedback is collected. By analyzing data such as task success rate and resource utilization, the task is continuously optimized and learned. This includes the analysis and adjustment of the task analysis module, optimization of scheduling algorithms and agent strategies, etc., forming a closed-loop mechanism of "execution-feedback-optimization".

[0086] By leveraging dynamic resource allocation, intelligent scheduling decisions, and continuous self-optimization capabilities, this approach can significantly improve task processing efficiency, system stability, and resource utilization. It can be widely applied to scenarios requiring efficient task scheduling, such as automated operation and maintenance and AI inference.

[0087] Figure 4 This is a schematic diagram of a test case generation and testing device provided in an embodiment of this application. Figure 4As shown, the test case generation and testing device 10 includes: a test task receiving module 11, a task analysis module 12, and an intelligent agent 13.

[0088] The test task receiving module 11 is used to receive test task requests, which are used to request the execution of test tasks.

[0089] The task analysis module 12 is used to determine the target intelligent agent from multiple intelligent agents by using priority strategies, load strategies, capability matching strategies and adaptive strategies between the test task and multiple intelligent agents. The target intelligent agent is used to execute the test task.

[0090] Agent 13 is used in the agent module to perform the following steps: acquiring the source code, business requirements document, and historical test cases of the software system associated with the test task; based on the source code, business requirements document, and historical test cases of the software system associated with the test task, using a large language model for reasoning and planning, determining the test plan, and generating test cases, which include test case identifiers, test objectives, preconditions, test steps, input data, and expected results; running the generated test cases according to the test plan, generating test results and defect information, whereby the test results are used to evaluate whether the system under test meets the expected indicators, and the defect information is used to record the errors found in the system under test, including the defect type, severity, reproduction steps, and repair suggestions.

[0091] In other embodiments, the task analysis module 12 described above is further configured to calculate the test task T based on the priority strategy, load strategy, capability matching strategy, and adaptive strategy between the test task and multiple agents, using the following weighted expression. i With agent A j The matching score is used to determine the agent with the highest score as the target agent. (T i A j )=w1×P(T i A j )+w2×L(A j )+w3×C(T i A j )+w4×A(T i A j ) Where i and j are both positive integers, S(T) i A j ) is used to describe test task T i Assigned to agent A j The overall score; w1×P(T) i A j P(T) is used to represent a priority strategy.i A j ) is used to represent test task T i In agent A j The priority score is calculated based on the execution priority, where w1 represents the weighting coefficient of the priority strategy, which is typically determined based on the urgency and importance of the test task; w2 × L(A j ) is used to represent load balancing strategies, L(A) j ) is used to represent agent A j The current load score, w2 represents the weighting coefficient of the load policy, and the load policy represents the agent A. j The current task queue length; w3×C(T) i A j C(T) is used to represent the capability matching strategy. i A j ) is used to represent test task T i With agent A j The capability matching score, w3 represents the weight coefficient of the capability matching strategy, and the capability matching strategy represents the ability matching strategy of agent A. j Does it have the capability to execute test task T? i Resources and capabilities; w4×A(T i A j A(T) is used to represent an adaptive policy. i A j ) is used to represent agent A j For test task T i The historical fit score, w4 is used to represent the weight coefficients of the adaptive policy, and the adaptive policy is used to represent the agent A. j For test task T i Historical processing capability of relevant features; weight coefficients satisfy w1+w2+w3+w4=1 and support dynamic configuration.

[0092] In other embodiments, the task analysis module 12 described above is further configured to, if multiple test task requests are received, determine the scores of different allocation schemes using the following matching combination expression, and select the allocation scheme with the highest score as the target allocation scheme:

[0093] The matching combination formula is used to reflect the score of the allocation scheme in which multiple test tasks are assigned to multiple agents for execution; X ij For decision variables that are either 0 or 1, when the task is a test task T i Assigned to agent A j At that time, X ijSet to 1 if the value is not 1, otherwise set to 0; n and m are positive integers; the combination matching formula satisfies the uniqueness constraint and the maximum processing capacity constraint. The uniqueness constraint indicates that each test task is assigned to an agent, and the maximum processing capacity constraint indicates that the number of test tasks assigned to each agent cannot exceed the maximum number of test tasks it can process.

[0094] In other embodiments, the aforementioned intelligent agent 13 is further configured to store the source code, business requirement documents, historical test cases, test plans, generated test cases, test results, and defect information of the software system associated with the test task to a knowledge base. The knowledge base is used to enable information sharing among intelligent agents. The generated test cases prioritize covering key test scenarios, which are determined by feature extraction algorithms based on the source code, business requirement documents, and historical test cases of the software system associated with the test task. The test plan includes test case generation steps, test environment configuration, resource allocation, execution time, preconditions, and relationships.

[0095] In other embodiments, the method further includes: when the first agent discovers defect information while performing a first test task, storing the defect information in a knowledge base; if the second agent performs a test task of the same type as the first test task, retrieving the defect information from the knowledge base and generating test cases for the defect information in a priority manner.

[0096] In other embodiments, the aforementioned intelligent agent 13 is further configured to configure a test environment before executing a test plan, the configuration of the test environment including installing dependent libraries and preparing test data; run the generated test cases in the test environment according to the test plan; collect test data while running the generated test cases, the test data including test logs, error reports and performance metrics; and generate test results and defect information based on the test data.

[0097] In other embodiments, the aforementioned agent 13 is also used to analyze the difference between the test results and the expected target; and through reinforcement learning techniques, dynamically adjust the weight coefficients of the priority strategy, load strategy, capability matching strategy, or adaptive strategy between the test task and the target agent based on the difference between the test results and the expected target.

[0098] In other embodiments, the aforementioned agent 13 is also used to dynamically adjust the weight coefficients of the priority strategies of different test tasks according to the execution status of different test tasks; predict future high-load periods based on the historical load data of each agent and the current task flow, and pre-schedule or delay the test tasks during the high-load periods; record the test results of different agents in different test tasks, and dynamically adjust the capability matching scores of different agents and different test tasks based on the test results of different agents in different test tasks.

[0099] The intelligent agent 13 includes a perception module 131, a decision-making module 132, an execution module 133, and a memory module 134. These modules work together to complete the steps executed by the intelligent agent 13. For details, please refer to the above. Figure 1 The content.

[0100] The test case generation and testing device 10 provided in this application embodiment can execute the method shown in the above method embodiment. Its implementation principle and beneficial effects can be referred to the relevant description in the method embodiment, and will not be repeated here.

[0101] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 20 includes a memory 21 and at least one processor 22.

[0102] The memory 21 is used to store computer program code, which includes computer instructions. These computer instructions run in the electronic device 20 to implement the method shown in the above-described method embodiments. For example, the memory may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage device, or a USB flash drive, portable hard drive, read-only memory, magnetic disk, or optical disk, etc.

[0103] Processor 22 can be a general-purpose processor, including a Central Processing Unit (CPU), a network processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 22 can also be other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.

[0104] The memory 21 and processor 22 are communicatively connected. For example, the memory 21 can be connected to the processor 22 via a system bus to complete mutual communication. The system bus can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, an industry standard architecture (ISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0105] Optionally, the memory 21 can be either standalone or integrated with the processor 22. When the memory 21 is set up independently, it is connected to the processor 22 via the system bus.

[0106] The electronic device 20 provided in this application embodiment is used to execute the technical solution of the test case generation and testing method in the above embodiment.

[0107] This application also provides a chip for executing instructions, which is used to execute the technical solutions of the test case generation and testing methods in the above embodiments.

[0108] This application also provides a computer-readable storage medium storing computer instructions. When these computer instructions are executed by a processor, they are used to implement the technical solution of the test case generation and testing method described in the above embodiments. Specifically, when the computer instructions are executed by a processor, the test case generation and testing apparatus can perform the technical solution of the test case generation and testing method described in the above embodiments.

[0109] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the test case generation and testing method in the above embodiments. The aforementioned computer-readable storage media can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage media can be any available medium accessible to a general-purpose or special-purpose computer. An exemplary computer-readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the computer-readable storage medium can exist as discrete components in an electronic control unit or main control device; this application does not limit this.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0111] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0112] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0113] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0114] It should be understood that the steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0115] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A test case generation and testing method, characterized in that, include: Receive a test task request, which is used to request the execution of a test task; The target intelligent agent is determined from the multiple intelligent agents by using priority strategies, load strategies, capability matching strategies and adaptive strategies between the test task and the multiple intelligent agents. The target intelligent agent is used to execute the test task. The target intelligent agent is used to obtain the source code, business requirement documents, and historical test cases of the software system associated with the test task. Through the target intelligent agent, based on the source code of the software system associated with the test task, business requirement documents, and historical test cases, reasoning and planning are performed using a large language model to determine the test plan and generate test cases. The test cases include test case identifier, test objective, preconditions, test steps, input data, and expected results. The target agent runs the generated test cases according to the test plan, generating test results and defect information. The test results are used to evaluate whether the tested system meets the expected indicators, and the defect information is used to record the errors found in the tested system. The defect information includes the defect type, severity, reproduction steps, and repair suggestions of the errors in the tested system.

2. The method according to claim 1, characterized in that, The process of determining the target agent through the priority strategy, load strategy, capability matching strategy, and adaptive strategy between the test task and multiple agents specifically includes: Based on the priority strategy, load strategy, capability matching strategy, and adaptive strategy between the test task and multiple agents, the test task T is calculated using the following weighted expression. i With agent A j The matching score is used to determine the agent with the highest score as the target agent. (T i ,A j )=w1×P(T i ,A j )+w2×L(A j )+w3×C(T i ,A j )+w4×A(T i ,A j ) Where i and j are both positive integers, S(T) i A j ) is used to describe test task T i Assigned to agent A j The overall score; w1×P(T i A j P(T) is used to represent a priority strategy. i A j ) is used to represent test task T i In agent A j The priority score is executed on the test, and w1 is used to represent the weight coefficient of the priority strategy, which is usually determined based on the urgency and importance of the test task. w2×L(A j ) is used to represent load balancing strategies, L(A) j ) is used to represent agent A j The current load score, w2 represents the weighting coefficient of the load policy, and the load policy represents the agent A. j The current length of the task queue; w3×C(T i A j C(T) is used to represent the capability matching strategy. i A j ) is used to represent test task T i With agent A j The capability matching score, w3 represents the weight coefficient of the capability matching strategy, and the capability matching strategy represents the ability matching strategy of agent A. j Does it have the capability to execute test task T? i Resources and capabilities; w4×A(T i A j A(T) is used to represent an adaptive policy. i A j ) is used to represent agent A j For test task T i The historical fit score, w4 is used to represent the weight coefficients of the adaptive policy, and the adaptive policy is used to represent the agent A. j For test task T i Historical processing capabilities for relevant features; The weighting coefficients satisfy w1+w2+w3+w4=1 and support dynamic configuration.

3. The method according to claim 2, characterized in that, The method further includes: If multiple test task requests are received, the scores of different allocation schemes are determined using the following matching combination expression, and the allocation scheme with the highest score is selected as the target allocation scheme: The matching combination formula is used to reflect the score of the allocation scheme in which multiple test tasks are assigned to multiple agents for execution; X ij For decision variables that are either 0 or 1, when the task is a test task T i Assigned to agent A j At that time, X ij Select 1 if the value is 1, otherwise select 0; n and m are positive integers; The combined matching formula satisfies both a uniqueness constraint and a maximum processing capacity constraint. The uniqueness constraint indicates that each test task is assigned to one agent, and the maximum processing capacity constraint indicates that the number of test tasks assigned to each agent cannot exceed the maximum number of test tasks it can process.

4. The method according to claim 1, characterized in that, The method further includes: The target intelligent agent stores the source code of the software system associated with the test task, the business requirement document, the historical test cases, the test plan, the generated test cases, the test results, and the defect information in a knowledge base, which is used to realize information sharing among intelligent agents. The generated test cases prioritize covering key test scenarios, which are determined by feature extraction algorithms based on the source code, business requirement documents, and historical test cases of the software system associated with the test task. The test plan includes test case generation steps, test environment configuration, resource allocation, execution time, preconditions, and relationships.

5. The method according to claim 4, characterized in that, The method further includes: When the first intelligent agent discovers defect information while performing the first test task, the knowledge base stores the defect information; If the second agent executes a test task of the same type as the first test task, it obtains the defect information from the knowledge base and generates test cases for the defect information first.

6. The method according to claim 1, characterized in that, The step of running the generated test cases according to the test plan through the target intelligent agent to generate test results and defect information specifically includes: Before executing the test plan, configure the test environment, which includes installing dependent libraries and preparing test data; The generated test cases are run in the test environment according to the test plan, using the target intelligent agent. When running the generated test cases, test data is collected, including test logs, error reports, and performance metrics. Based on the test data, test results and defect information are generated.

7. The method according to claim 2, characterized in that, The method further includes: The difference between the test results and the expected target is analyzed using the target intelligent agent. By using reinforcement learning techniques, the weight coefficients of the priority strategy, load strategy, capability matching strategy, or adaptive strategy between the test task and the target agent are dynamically adjusted based on the difference between the test results and the expected target.

8. The method according to claim 3, characterized in that, The method further includes: The weight coefficients of the priority strategies for different test tasks are dynamically adjusted based on the execution status of different test tasks. Based on the historical load data and current task flow of each agent, predict future high load periods and pre-schedule or delay the test tasks during the high load periods. Record the test results of different agents in different test tasks, and dynamically adjust the ability matching scores of different agents with different test tasks based on the test results of different agents in different test tasks.

9. A test case generation and testing device, characterized in that, include: The test task receiving module is used to receive test task requests, which are used to request the execution of test tasks. The task analysis module is used to determine a target intelligent agent from the multiple intelligent agents through priority strategies, load strategies, capability matching strategies and adaptive strategies between the test task and the multiple intelligent agents, and the target intelligent agent is used to execute the test task; The agent module is used to perform the following steps: Obtain the source code, business requirement documents, and historical test cases of the software system associated with the test task; Based on the source code of the software system associated with the test task, business requirement documents, and historical test cases, a large language model is used for reasoning and planning to determine the test plan and generate test cases. The test cases include test case identifier, test objective, preconditions, test steps, input data, and expected results. According to the test plan, the generated test cases are run to generate test results and defect information. The test results are used to evaluate whether the tested system meets the expected indicators. The defect information is used to record the errors found in the tested system. The defect information includes the defect type, severity, reproduction steps, and repair suggestions of the errors in the tested system.

10. An electronic device, characterized in that, include: A memory and at least one processor; the memory is communicatively connected to the processor; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, are used to implement the method as described in any one of claims 1-8.

12. A computer program product, characterized in that, When the computer program product is run on a computer / executed by the computer's processor, it implements the method as described in any one of claims 1-8.

Citation Information

Cited By

  • System and method for carrying out pressure test on artificial intelligence system with heterogeneous architecture

    CN121833541A

  • Warehouse-level test plan automatic generation method and system based on multi-tool enhanced reasoning and storage medium

    CN121935160A