Test object test method and device and electronic equipment

By automating the generation of test scenarios and test cases using large-scale language models, the problem of low testing efficiency and coverage in existing software testing methods is solved, realizing an efficient and automated testing process and improving the quality and reliability of software products.

CN121785903APending Publication Date: 2026-04-03CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing software testing methods rely on manually writing test cases, which is time-consuming and labor-intensive, and it is difficult to fully cover all test scenarios, resulting in low testing efficiency, coverage and quality.

Method used

Large-scale language models are introduced for semantic understanding and reasoning, automatically generating test scenarios and test cases. Multi-dimensional analysis ensures the comprehensiveness and coverage of tests, and test cases are optimized to reduce redundancy.

Benefits of technology

It improves testing efficiency and coverage, reduces manual coding time, enhances test quality and coverage, adapts to the dynamic changes of software products, and reduces testing costs and cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785903A_ABST
    Figure CN121785903A_ABST
Patent Text Reader

Abstract

The invention relates to a test object testing method and device and electronic equipment. The method comprises the steps that an input document of a test object is acquired; the input document at least comprises a demand document and an interface document; inputting the demand document and the interface document into a large-scale language model, and performing semantic understanding on the demand document and the interface document through the large-scale language model to determine a test scene; and generating a test case for the test scene, and testing the test object according to the test case. According to the embodiment of the invention, intelligent derivation of the test scene is realized by introducing semantic understanding and reasoning capabilities of the large language model, and then automatic generation of the high-quality test case is realized according to the test scene subjected to intelligent derivation, so that the test efficiency, coverage rate and quality of the test object are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence, and specifically relates to a test object testing method, device and electronic device. Background Technology

[0002] In practical applications, testing software products is a key step in ensuring their quality. Test cases are typically used to test software products. Specifically, a test case is a description of a testing task for a particular software product, reflecting the test plan, methods, techniques, and strategies. It is a set of test inputs, execution conditions, and expected results compiled for a specific goal to verify whether a particular software product requirement is met.

[0003] However, current software testing methods typically involve test engineers manually writing test cases, which is time-consuming, labor-intensive, and costly. Furthermore, it is difficult to comprehensively cover all test scenarios and is prone to missing boundary conditions and abnormal paths, resulting in low testing efficiency, coverage, and quality of software products. Summary of the Invention

[0004] The purpose of this application is to provide a test object testing method, apparatus, and electronic device to overcome or at least partially solve the above-mentioned problems.

[0005] To solve the above-mentioned technical problems, this application is implemented as follows: A test object testing method, the method comprising: Obtain the input documents for the test object; the input documents include at least a requirements document and an interface document. The requirements document and the interface document are input into a large language model to perform semantic understanding of the requirements document and the interface document through the large language model to determine the test scenario; Test cases are generated for the test scenario, and the test object is tested according to the test cases.

[0006] In the above embodiments, by introducing the semantic understanding and reasoning capabilities of a large language model, intelligent derivation of test scenarios is achieved, and then high-quality test cases are automatically generated based on the intelligently derived test scenarios, thereby improving the efficiency, coverage and quality of testing the test objects.

[0007] In one embodiment of this application, the step of inputting the requirements document and the interface document into a large language model to perform semantic understanding of the requirements document and the interface document through the large language model to determine the test scenario includes: The requirement document and interface document are input into a large language model to extract requirement-related information and interface-related information from the requirement document and interface document through the large language model. A test foundation knowledge base is generated based on the requirement-related information and interface-related information to perform multi-dimensional analysis on the test foundation knowledge base to determine test scenarios.

[0008] In the above embodiments, the system extracts requirement-related information and interface-related information from requirement documents and interface documents through a large language model, and generates a test basic knowledge base based on the requirement-related information and interface-related information. The test basic knowledge base is then analyzed from multiple dimensions to determine test scenarios, which can ensure the comprehensiveness of testing, reduce test blind spots, and improve the test coverage of software products.

[0009] In one embodiment of this application, the requirement-related information includes at least system function points, business rules, and requirement constraints; the interface-related information includes at least interface definitions, parameter specifications, data types, and interface constraints; the dimensions include at least functional dimensions, data dimensions, and exception dimensions; and generating test cases for the test scenario and testing the test object according to the test cases includes: The test scenario is converted into a corresponding structured test scenario; each test scenario has a corresponding test priority, which is determined by the importance of the test scenario to the test object. Test cases are generated based on the test scenario described in the structure; each test case includes at least test data, test steps, and expected results. The test object is tested according to the test priority order corresponding to the test cases.

[0010] In the above embodiments, the system can convert test scenarios into structured test scenarios, which facilitates script parsing and execution. In addition, it can prioritize test scenarios to test software products based on test priority order. In this way, even with limited test resources, it can at least ensure that the important functions of the software product meet user needs.

[0011] In one embodiment of this application, after generating test cases for the test scenario, the method further includes: Determine the coverage of the test cases to the test object, so as to identify the missing test scenarios of the test object through the coverage; Test cases are generated for the missing test scenarios.

[0012] In the above embodiments, the system can determine the coverage of test cases for the software product, identify missing test scenarios in the software product through coverage, and then generate corresponding test cases for the missing test scenarios, thereby ensuring the coverage of the software product.

[0013] In one embodiment of this application, after generating test cases for the test scenario, the method further includes: Identify redundant test cases in the test cases for the software product, and remove the redundant test cases from the test cases.

[0014] In the above embodiments, the system can identify redundant test cases in the test cases of the software product and delete them from the test cases, thereby reducing the testing of unnecessary test cases and improving the testing efficiency of the software product.

[0015] In one embodiment of this application, after generating test cases for the test scenario and testing the test object according to the test cases, the method further includes: When the change information of the test object is obtained, the test cases associated with the change information are selected from the test cases as target test cases; Regression testing is performed on the test object based on the target test cases.

[0016] In the above embodiments, when the system obtains change information of the software product, it can obtain the test cases corresponding to the change information as target test cases and then perform regression testing. In this way, it is not necessary to use all test cases to test the software product, thereby saving test resources. In addition, the embodiments of this application can also be set to perform regression testing only when the test priority of the test cases corresponding to the change information is higher than the preset priority. In this way, it can avoid testing some minor changes to the software product and ensure the testing efficiency of the software product.

[0017] A testing device for a test object, characterized in that the device comprises: The document acquisition module is used to acquire the input documents of the test object; the input documents include at least the requirements document and the interface document. The scenario determination module is used to input the requirement document and the interface document into a large language model, so as to perform semantic understanding of the requirement document and the interface document through the large language model to determine the test scenario; The object testing module is used to generate test cases for the test scenario and to test the test object according to the test cases.

[0018] In one embodiment of this application, the scene determination module is used for: The requirement document and interface document are input into a large language model to extract requirement-related information and interface-related information from the requirement document and interface document through the large language model. A test foundation knowledge base is generated based on the requirement-related information and interface-related information to perform multi-dimensional analysis on the test foundation knowledge base to determine test scenarios.

[0019] In one embodiment of this application, the requirement-related information includes at least system function points, business rules, and requirement constraints; the interface-related information includes at least interface definitions, parameter specifications, data types, and interface constraints; and the dimensions include at least functional dimensions, data dimensions, and exception dimensions.

[0020] In one embodiment of this application, the object testing module is used for: The test scenario is converted into a corresponding structured test scenario; each test scenario has a corresponding test priority, which is determined by the importance of the test scenario to the test object. Test cases are generated based on the test scenario described in the structure; each test case includes at least test data, test steps, and expected results. The test object is tested according to the test priority order corresponding to the test cases.

[0021] In one embodiment of this application, the device further includes: a coverage detection module, used for: Determine the coverage of the test cases to the test object, so as to identify the missing test scenarios of the test object through the coverage; Test cases are generated for the missing test scenarios.

[0022] In one embodiment of this application, the apparatus further includes: a redundancy detection module, used for: Identify redundant test cases in the test cases for the software product, and remove the redundant test cases from the test cases.

[0023] In one embodiment of this application, the apparatus further includes: a regression testing module, used for: When the change information of the test object is obtained, the test cases associated with the change information are selected from the test cases as target test cases; Regression testing is performed on the test object based on the target test cases.

[0024] An electronic device includes: a processor; and a memory for storing processor-executable instructions. The processor is configured to execute the instructions to implement the above-described test object testing method.

[0025] A computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a mobile terminal, enables the mobile terminal to perform the aforementioned test object testing method.

[0026] The embodiments of this application have at least the following beneficial effects: In this embodiment, input documents for the test object are obtained. These input documents may include at least a requirements document and an interface document. The requirements and interface documents are then input into a large language model to perform semantic understanding to determine test scenarios. Test cases are generated for these test scenarios, and the test object can then be tested based on these test cases. This embodiment, by introducing the semantic understanding and reasoning capabilities of a large language model, achieves intelligent derivation of test scenarios. Based on these intelligently derived test scenarios, high-quality test cases are automatically generated, thereby improving the efficiency, coverage, and quality of testing the test object. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating the steps of a test object testing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a testing process for a software product based on a large language model, provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of a test device for a test object provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0029] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., with the user's explicit consent, with the user being properly notified, etc.).

[0030] Currently, software product testing methods face various technical challenges and limitations. Some of the technical difficulties include: (1) Challenges in test scenario identification: Test scenario identification mainly relies on the experience and subjective understanding of testers. Requirements documents are usually complex and vague, making it difficult to fully identify all test scenarios. The test scenario identification process is time-consuming and prone to human error. There is a lack of systematic scenario derivation methods. (2) Limitations in test case design: The quality of test cases heavily depends on the professional level and domain knowledge of testers. Test case design usually adopts static methods, which are difficult to adapt to dynamic changes in the system. Test cases generated by traditional methods such as equivalence class partitioning and boundary value analysis often have problems such as incomplete coverage and high redundancy. (3) The current status of automated test case generation technology: Currently, automated test case generation tools are mostly based on preset rules and templates, making it difficult to understand complex business logic and system semantics. This results in generated test cases that often lack business value and readability. Furthermore, current automated test case generation tools are unable to handle unstructured requirements and implicit business rules.

[0031] In recent years, large language models have demonstrated powerful semantic understanding and reasoning capabilities. They possess the ability to extract information from unstructured text and perform complex reasoning and creative thinking based on contextual information. These capabilities of large language models have not yet been fully applied in the field of software testing. Therefore, the embodiments of this application aim to solve the aforementioned technical challenges by introducing the semantic understanding and reasoning capabilities of large language models to achieve intelligent derivation of test scenarios and automatic generation of high-quality test cases. This improves the efficiency, coverage, and quality of software product testing, while also reducing testing costs and timelines.

[0032] Reference Figure 1 The diagram illustrates a flowchart of a test object testing method provided in an embodiment of this application. The method may specifically include the following steps: Step 101: Obtain the input documents for the test object; the input documents include at least the requirements document and the interface document.

[0033] In practice, the test object can be the entire software product or a specific functional module within it; this application's embodiments do not impose any limitations on this. For ease of explanation, the following description primarily uses the software product as the test object.

[0034] This application embodiment can be applied to systems capable of generating test cases. Specifically, the system can simultaneously receive input documents for the software product, which may include unstructured requirements documents and interface documents. The requirements document describes the functions, business rules, user objectives, and performance requirements that the software product needs to implement, while the interface document describes the interaction specifications between components of the software product or between the system and external services, including interface addresses, request / response formats, parameter types, data structures, and error codes.

[0035] Step 102: Input the requirements document and interface document into a large language model to perform semantic understanding of the requirements document and interface document through the large language model to determine the test scenario.

[0036] Large Language Models (LLMs), often simply referred to as large models, are deep learning models trained on large amounts of text data. Once trained, these models can generate natural language text or understand the meaning of spoken text, thus achieving semantic understanding. The system can include a model adaptation layer, an intermediate layer that allows the system to connect to different large language models, enabling flexible switching and invocation of various AI-powered large language models.

[0037] In this embodiment, the system pre-deploys a large language model trained on relevant training data for test cases. After obtaining the requirements document and interface document, the system analyzes and extracts key information for generating test cases using the large language model, and then determines the test scenarios for the software product based on this key information. For example, the large language model can identify test scenarios such as "ordinary user order amount boundary test" and "VIP user order test." The software product may have one test scenario, but typically there are multiple test scenarios.

[0038] Step 103: Generate test cases for the test scenario, and test the test object according to the test cases.

[0039] In this embodiment, after determining the test scenarios for the software product using a large language model, the system can further automatically generate corresponding test cases for each test scenario using the large language model. Subsequently, the software product can be tested based on the test cases. By automating test scenario identification and test case generation using a large language model, the system can reduce manual coding time by 60%-80%, while also reducing reliance on specialized testing knowledge, enabling even novice testers to generate high-quality test cases. It is understood that because the system achieves automated testing through a large language model, it can quickly respond to changes in requirements and automatically update test scenarios and test cases.

[0040] In the above embodiments, input documents for the test object are obtained. These input documents may include at least a requirements document and an interface document. The requirements and interface documents are then input into a large language model to perform semantic understanding to determine the test scenario. Test cases are generated for each test scenario, and the test object can then be tested based on these test cases. This application embodiment, by introducing the semantic understanding and reasoning capabilities of a large language model, achieves intelligent derivation of test scenarios. Based on these intelligently derived test scenarios, high-quality test cases are automatically generated, thereby improving the efficiency, coverage, and quality of testing the test object.

[0041] In one embodiment of this application, the step of inputting the requirements document and the interface document into a large language model to perform semantic understanding of the requirements document and the interface document through the large language model to determine the test scenario may include: The requirement document and interface document are input into a large language model to extract requirement-related information and interface-related information from the requirement document and interface document through the large language model. A test foundation knowledge base is generated based on the requirement-related information and interface-related information to perform multi-dimensional analysis on the test foundation knowledge base to determine test scenarios.

[0042] In this embodiment of the application, after the system obtains the requirements document and interface document of the software product, it extracts key information for generating test cases through large language model analysis. The key information may include requirements-related information extracted from the requirements document and interface-related information extracted from the interface document.

[0043] In one embodiment of this application, the requirement-related information may include at least system function points, business rules, and requirement constraints, and the interface-related information may include at least interface definitions, parameter specifications, data types, and interface constraints.

[0044] Specifically, the system can receive the requirement document and interface document of the software product simultaneously, and extract key information through analysis by a large language model. Specifically, it identifies requirement-related information such as system function points, business rules, and constraints from the requirement document, and extracts interface-related information such as interface definitions, parameter specifications, data types, and constraints from the interface document. Then, it integrates the requirement-related information and interface-related information to establish a complete test knowledge base. Exemplarily, for the order module of an e-commerce system, the system analyzes the requirement document "Orders over 1000 yuan are free of shipping fees, and all VIP users are free of shipping fees" and interface information such as parameter definitions, request methods, and return value formats in the interface document simultaneously. After the large language model extracts the key information, based on the extracted information, the system uses the large language model to identify test scenarios. Among them, the large language model can analyze possible test scenarios of the software product from dimensions such as function, data, and exception, making the identification of test scenarios for the software product more complete and accurate.

[0045] Specifically, in the function dimension, it is necessary to check whether the functions of the software product work properly. For example, when testing the login function of the software product, it is necessary to verify password login, error password prompts, etc., to ensure that the buttons and processes related to the login function run as expected; in the data dimension, it is necessary to check the ability of the software product to process various types of data. For example, when testing the age input box, it is necessary to try to input normal numbers (such as 30 years old), boundary values (such as 0 years old, 18 years old, etc.), and illegal data (such as the Chinese character "eighteen years old") to verify whether the software product system can correctly receive and process them; in the exception dimension, it is to check the performance of the software product in some special situations. For example, when testing the payment function of the software product, it is necessary to simulate unexpected situations such as network disconnection and server busy to ensure that the system can normally prompt the user without crashing.

[0046] In the above embodiment, the system extracts requirement-related information and interface-related information from the requirement document and interface document through a large language model, and generates a test knowledge base based on the requirement-related information and interface-related information, and conducts multi-dimensional analysis on the test knowledge base to determine test scenarios, which can ensure the comprehensiveness of the test, reduce test blind spots, and improve the test coverage rate of the software product.

[0047] In an embodiment of the present application, generating test cases for the test scenarios and testing the test object according to the test cases may include: Converting the test scenario into a corresponding structured test scenario; each test scenario has a corresponding test priority, and the test priority is determined by the importance of the test scenario to the test object; Generating test cases according to the structured test scenario; the test cases at least include test data, test steps, and expected results; The test object is tested according to the test priority order corresponding to the test cases.

[0048] In this embodiment, the system can use a large language model to structurally describe the test scenario, thereby converting the test scenario into a structured test scenario. The structured description essentially transforms the "unstructured scenario" (such as the "VIP user order test" described in natural language) identified by the large language model into standardized, parsable, and unambiguous structured data (similar to JSON (JavaScript Object Notation) format of "Scenario ID + Scenario Type + Core Rules + Related Information + Constraints"), which is convenient for script parsing and execution.

[0049] In practical applications, testing resources (such as time, manpower, and computing power) are usually limited. Therefore, this embodiment of the application can also prioritize structured test scenarios. When testing the software product using test cases, the software product will be tested according to the test priority order of the test cases corresponding to the test scenarios. Prioritizing tests ensures that high-priority test scenarios are covered first. For example, test cases that affect the main workflow are tested first, thereby ensuring that the important functions of the software product meet user requirements. Of course, if testing resources are sufficient, all test scenarios can be tested using corresponding test cases, thus fully determining whether the software product's functions meet user requirements.

[0050] In the above embodiments, the system can convert test scenarios into structured test scenarios, which facilitates script parsing and execution. In addition, the system can prioritize test scenarios to test software products based on test priority order. In this way, even with limited test resources, it can at least ensure that the important functions of the software product meet user needs.

[0051] In one embodiment of this application, after generating test cases for the test scenario, the method may further include: Determine the coverage of the test cases to the test object, so as to identify the missing test scenarios of the test object through the coverage; Test cases are generated for the missing test scenarios.

[0052] In this embodiment of the application, the system evaluates and optimizes the generated test cases, such as evaluating and optimizing coverage. Specifically, the system can determine the coverage of the test cases for the software product. If the test cases fail to cover the software product, the system can identify the missing test scenarios of the test object through coverage. For example, if the system finds that the test scenario of "ordinary user order amount is 1000 yuan (boundary value)" is missing, then the test scenario is a missing test scenario, and the system automatically supplements the test cases corresponding to the missing test scenario.

[0053] In the above embodiments, the system can determine the coverage of test cases for the software product, identify missing test scenarios in the software product through coverage, and then generate corresponding test cases for the missing test scenarios, thereby ensuring the coverage of the software product.

[0054] In one embodiment of this application, after generating test cases for the test scenario, the method may further include: Identify redundant test cases in the test cases for the software product, and remove the redundant test cases from the test cases.

[0055] In this embodiment, the system evaluates and optimizes the generated test cases, such as evaluating and optimizing test efficiency. Specifically, the system can identify redundant test cases and delete them. For example, if the system finds test cases such as "Ordinary user order amount is 1000 yuan (boundary value)", "Ordinary user order amount is 2000 yuan (boundary value)" and "Ordinary user order amount is 3000 yuan (boundary value)", since these test cases differ only in their boundary values, the test case corresponding to the smallest or largest boundary value can be selected based on the actual situation. For example, "Ordinary user order amount is 3000 yuan (boundary value)" can be retained, while the other test cases, namely "Ordinary user order amount is 1000 yuan (boundary value)" and "Ordinary user order amount is 2000 yuan (boundary value)", can be considered redundant test cases and deleted from the test cases of the software product. In this way, redundant test cases will no longer participate in the testing of the software product.

[0056] In the above embodiments, the system can identify redundant test cases in the test cases of the software product and delete them from the test cases. This can reduce unnecessary test cases in the testing of the software product, thereby improving the testing efficiency of the software product.

[0057] In one embodiment of this application, after generating test cases for the test scenario and testing the test object according to the test cases, the method may further include: When the change information of the test object is obtained, the test cases associated with the change information are selected from the test cases as target test cases; Regression testing is performed on the test object based on the target test cases.

[0058] In practical applications, regression testing refers to re-executing existing test cases after changes have been made to the code, functions, or configuration of a software product, thereby verifying that these changes have not damaged the original, normal functions of the software product.

[0059] In this embodiment, when a software product undergoes changes, the system can obtain the change information and the number of changes. The system can then identify test cases associated with the change information from the software product's test cases as target test cases and use these target test cases to perform regression testing on the software product. For example, when the system obtains change information indicating that a software product's interface has changed from one interface format to another, or that the software product's data type has changed from one data type to another, it can filter test cases related to that interface from the software product's test cases as target test cases and use these target test cases to perform regression testing on the software product.

[0060] In the above embodiments, when the system obtains change information of the software product, it can obtain the test cases corresponding to the change information as target test cases and then perform regression testing. This eliminates the need to test the software product using all test cases, saving testing resources. Furthermore, this embodiment can be configured to perform regression testing only when the test priority of the test cases corresponding to the change information is higher than a preset priority. This avoids testing changes with minimal impact on the software product, reducing testing costs. Of course, if testing resources are sufficient, regression testing can be performed on all test cases corresponding to all change information; this embodiment does not impose any limitations on this.

[0061] In summary, the test case automatic generation method based on a large language model provided in this application embodiment mainly includes the following steps: 1. Receiving the software product's requirements document and interface document, extracting system functions, business rules, and interface information, etc.; 2. Using the large language model for semantic understanding to identify test scenarios; 3. Automatically generating test cases based on the identified test scenarios; 4. Evaluating and optimizing the test cases to ensure coverage and effectiveness. It is evident that the system in this application embodiment addresses the core pain points of existing software testing methods by introducing the semantic understanding and reasoning capabilities of a large language model into the software testing field. It aims to fundamentally change the software testing methodology and technical approach, making software testing more intelligent, automated, and efficient, improving the quality and reliability of software products, while reducing the testing cost and cycle time.

[0062] To enable those skilled in the art to better understand the embodiments of this application, a specific example is used for illustration below. (Refer to...) Figure 2 This is a schematic diagram of a testing process for a software product based on a large language model, provided in an embodiment of this application. The specific testing process for the software product can be as follows: S1: Requirements and Interface Analysis: The system simultaneously receives the software product's requirements document and interface document. Through large-scale language model analysis, it extracts key information, including: 1.1 Identifying system functionalities, business rules, and constraints from the requirements document; 1.2 Extracting interface definitions, parameter specifications, data types, and constraints from the interface document; 1.3 Integrating requirements and interface information to establish a complete test knowledge base. For example, for the order module of an e-commerce system, the system simultaneously analyzes the business requirement of "free shipping for orders over 1000 yuan, and free shipping for VIP users" and the interface information such as parameter definitions, request methods, and return value formats.

[0063] S2: Test Scenario Identification: Based on the extracted key information, the system uses a large language model to identify test scenarios, which may include: 2.1: Analyzing possible test scenarios from dimensions such as functionality, data, and anomalies; 2.2: Providing structured descriptions and prioritizing test scenarios. For example, the system identifies test scenarios such as "Ordinary User Order Amount Boundary Test" and "VIP User Order Test".

[0064] S3: Test Case Generation: For each test scenario, the system automatically generates corresponding test cases, which may include: 3.1: Generating test data and specific test steps; 3.2: Deriving expected results based on business rules. For example, the system generates test cases for the "VIP user order test" scenario, including the steps "Log in with VIP account → Add product → Submit order", with the expected result "Free shipping on order".

[0065] S4: Test Case Optimization: The system evaluates and optimizes the generated test cases, which may include: 4.1: Checking test coverage and supplementing missing scenarios; 4.2: Deleting redundant test cases to improve testing efficiency. For example, if the system finds that test cases are missing for the test scenario "Ordinary user order amount is 1000 yuan (boundary value)", it will automatically supplement the corresponding test cases.

[0066] The application of this application's embodiments has at least the following advantages: 1. Comprehensive improvement in test quality and coverage: Semantic understanding enables the discovery of test scenarios that are difficult to identify using current software testing methods; multi-dimensional analysis ensures the comprehensiveness of testing and reduces blind spots; intelligent identification of boundary conditions and abnormal scenarios improves the defect detection rate by 30%-50%. 2. Significantly improved testing efficiency and automation: Automated test scenario identification and test case generation reduce manual coding time by 60%-80%; reduced reliance on testing expertise enables even junior testers to generate high-quality test cases; rapid response to software product requirement changes, automatically updating test scenarios and test cases.

[0067] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of this application.

[0068] Reference Figure 3 The diagram shows a structural block diagram of a test object testing device provided in an embodiment of this application. The device may specifically include the following modules: The document acquisition module 301 is used to acquire the input documents of the test object; the input documents include at least a requirements document and an interface document. The scenario determination module 302 is used to input the requirement document and the interface document into a large language model, so as to perform semantic understanding of the requirement document and the interface document through the large language model to determine the test scenario; The object testing module 303 is used to generate test cases for the test scenario and test the test object according to the test cases.

[0069] In one embodiment of this application, the scene determination module 302 is used for: The requirement document and interface document are input into a large language model to extract requirement-related information and interface-related information from the requirement document and interface document through the large language model. A test foundation knowledge base is generated based on the requirement-related information and interface-related information to perform multi-dimensional analysis on the test foundation knowledge base to determine test scenarios.

[0070] In one embodiment of this application, the requirement-related information includes at least system function points, business rules, and requirement constraints; the interface-related information includes at least interface definitions, parameter specifications, data types, and interface constraints; and the dimensions include at least functional dimensions, data dimensions, and exception dimensions.

[0071] In one embodiment of this application, the object testing module 303 is used for: The test scenario is converted into a corresponding structured test scenario; each test scenario has a corresponding test priority, which is determined by the importance of the test scenario to the test object. Test cases are generated based on the test scenario described in the structure; each test case includes at least test data, test steps, and expected results. The test object is tested according to the test priority order corresponding to the test cases.

[0072] In one embodiment of this application, the device further includes: a coverage detection module, used for: Determine the coverage of the test cases to the test object, so as to identify the missing test scenarios of the test object through the coverage; Test cases are generated for the missing test scenarios.

[0073] In one embodiment of this application, the apparatus further includes: a redundancy detection module, used for: Identify redundant test cases in the test cases for the software product, and remove the redundant test cases from the test cases.

[0074] In one embodiment of this application, the apparatus further includes: a regression testing module, used for: When the change information of the test object is obtained, the test cases associated with the change information are selected from the test cases as target test cases; Regression testing is performed on the test object based on the target test cases.

[0075] In this embodiment, input documents for the test object are obtained. These input documents may include at least a requirements document and an interface document. The requirements and interface documents are input into a large language model to perform semantic understanding of them, determining the test scenario. Test cases are then generated for each test scenario, and the test object can be tested based on these test cases. This embodiment, by introducing the semantic understanding and reasoning capabilities of a large language model, achieves intelligent derivation of test scenarios. Based on these intelligently derived test scenarios, high-quality test cases are automatically generated, thereby improving the efficiency, coverage, and quality of testing the test object.

[0076] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment. This application also provides an electronic device, such as... Figure 4 As shown, it includes a processor 1001, a device interface 1002, a memory 1003, and a bus 1004; Memory 1003 is used to store computer programs; The processor 1001 executes the above steps when executing the program stored in the memory 1003.

[0077] The bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0078] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0079] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0080] This application also provides a storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the test object testing method of the foregoing embodiments.

[0081] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. The structure required to construct such a device is obvious from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0082] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0083] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0084] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0085] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sequencing device according to this application. This application can also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can take the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0086] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0087] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0088] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0090] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.

Claims

1. A testing method for a test object, characterized in that, The method includes: Obtain the input documents for the test object; the input documents include at least a requirements document and an interface document. The requirements document and the interface document are input into a large language model to perform semantic understanding of the requirements document and the interface document through the large language model to determine the test scenario; Test cases are generated for the test scenario, and the test object is tested according to the test cases.

2. The method according to claim 1, characterized in that, The step of inputting the requirements document and interface document into a large language model to perform semantic understanding of the requirements document and interface document through the large language model to determine the test scenario includes: By inputting the requirement documents and interface documents into a large language model, requirement-related information and interface-related information can be extracted from the requirement documents and interface documents through the large language model. A test foundation knowledge base can be generated based on the requirement-related information and interface-related information to perform multi-dimensional analysis on the test foundation knowledge base to determine test scenarios.

3. The method according to claim 2, characterized in that, The requirement-related information includes at least system function points, business rules, and requirement constraints; the interface-related information includes at least interface definitions, parameter specifications, data types, and interface constraints; the dimensions include at least functional dimensions, data dimensions, and exception dimensions.

4. The method according to claim 1, characterized in that, The step of generating test cases for the test scenario and testing the test object according to the test cases includes: The test scenario is converted into a corresponding structured test scenario; each test scenario has a corresponding test priority, which is determined by the importance of the test scenario to the test object. Test cases are generated based on the test scenario described in the structure; each test case includes at least test data, test steps, and expected results. The test object is tested according to the test priority order corresponding to the test cases.

5. The method according to claim 1, characterized in that, After generating test cases for the test scenario, the method further includes: Determine the coverage of the test cases to the test object, so as to identify the missing test scenarios of the test object through the coverage; Test cases are generated for the missing test scenarios.

6. The method according to claim 1 or 5, characterized in that, After generating test cases for the test scenario, the method further includes: Identify redundant test cases in the test cases for the software product, and remove the redundant test cases from the test cases.

7. The method according to claim 6, characterized in that, After generating test cases for the test scenario and testing the test object according to the test cases, the method further includes: When the change information of the test object is obtained, the test cases associated with the change information are selected from the test cases as target test cases; Regression testing is performed on the test object based on the target test cases.

8. A testing device for a test object, characterized in that, The device includes: The document acquisition module is used to acquire the input documents of the test object; the input documents include at least the requirements document and the interface document. The scenario determination module is used to input the requirement document and the interface document into a large language model, so as to perform semantic understanding of the requirement document and the interface document through the large language model to determine the test scenario; The object testing module is used to generate test cases for the test scenario and to test the test object according to the test cases.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the instructions to implement the test object testing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal is able to perform the test object test method as described in any one of claims 1 to 7.