Software test plan generation method, system and equipment and storage medium
By using deep learning models to extract and analyze features from software test data, efficient and comprehensive test plans are generated, solving the problem of low efficiency in traditional methods and achieving more efficient and comprehensive software testing.
Patent Information
- Application Number
- CN202411339210.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional methods of manually creating software test plans are inefficient and cannot meet the needs of efficient and comprehensive testing.
By acquiring current requirements documents, historical test data, and user feedback data, we use the trained target deep learning model to extract and analyze features, identify potential defect types and their impact range, generate an initial test plan, and adjust it according to preset resources and time.
It improves the efficiency of defect analysis and test plan development, and enhances the comprehensiveness and accuracy of testing.
Smart Images

Figure CN119292922A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a method, system, computer device and storage medium for generating a software testing plan. Background Art
[0002] Software testing is an important part of the software development process, which aims to ensure the quality and reliability of the software system to meet the needs and expectations of users. The software test plan is the basis and guidance of software testing work and is closely related to software testing. With the increase in software scale and complexity, the traditional method of manually formulating software test plans is inefficient, and the formulated software test plans are difficult to meet the needs of efficient and comprehensive testing. Summary of the invention
[0003] Based on the above description, the present application provides a method, system, computer device and storage medium for generating a software test plan to solve the problem that the current manual formulation of software test plans is difficult to meet efficient and comprehensive testing requirements.
[0004] According to a first aspect, the present application provides a method for generating a software test plan, comprising:
[0005] Obtain current requirement documents, historical test data and user feedback data, wherein the historical test data includes test reports, test case execution results and defect reports;
[0006] Extract features from current demand documents, historical test data, and user feedback data to obtain current demand feature information, historical test feature information, and user feedback feature information;
[0007] Inputting the current demand feature information, historical test feature information, and user feedback feature information into the trained target deep learning model to identify potential defect types and impact scopes;
[0008] Generate an initial test plan based on the potential defect types and impact scope described.
[0009] In one or more embodiments, the training process of the target deep learning model includes:
[0010] Acquire a training data set, wherein the training data set includes historical demand feature information, prehistoric test feature information, historical user feedback feature information, and label information; the label information includes a real defect type and a real impact range;
[0011] The historical demand feature information, prehistoric test feature information and historical user feedback feature information are used as input, and the label information is used as output to iteratively train an initial deep learning model to obtain a target deep learning model.
[0012] In one or more embodiments, the current demand feature information includes function description keywords, business process keywords, performance requirement keywords, and safety standard keywords;
[0013] The historical test feature information includes defect type, test scope and test coverage; the user feedback feature information includes problem description keywords, function suggestion keywords and performance complaint keywords.
[0014] In one or more embodiments, the feature extraction of the current requirement document, historical test data and user feedback data also includes: data preprocessing of the current requirement document, historical test data and user feedback data; the data preprocessing process includes data cleaning and data integration.
[0015] In one or more embodiments, feature extraction is performed on the current demand document, historical test data, and user feedback data, including: using natural language processing technology to extract keywords from the current demand document, historical test data, and user feedback data.
[0016] In one or more embodiments, generating an initial test plan according to the potential defect type and impact scope includes:
[0017] Plan test requirements based on the potential defect types and impact scope, including test objectives, test scope, test function points, test scenarios and test methods;
[0018] Generate an initial test plan based on test requirements and preset test plan templates.
[0019] In one or more embodiments, the method further includes: adjusting the initial test plan according to preset test resources and preset test time to obtain a target test plan.
[0020] According to a second aspect, the present application provides a system for generating a software test plan, comprising:
[0021] A data acquisition module is used to acquire current requirement documents, historical test data and user feedback data, wherein the historical test data includes historical test reports, historical test cases and historical defect descriptions;
[0022] The feature extraction module is used to extract features from the current demand document, historical test data and user feedback data to obtain current demand feature information, historical test feature information and user feedback feature information;
[0023] An identification module, used to input the current demand feature information, historical test feature information and user feedback feature information into the trained target deep learning model to obtain potential defects and impact range;
[0024] A generation module is used to generate an initial test plan according to the potential defects and impact scope.
[0025] According to a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the aforementioned methods when executing the computer program.
[0026] According to a fourth aspect, the present application provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.
[0027] Compared with the prior art, the technical solution of this application has the following beneficial technical effects:
[0028] This application extracts features from the current requirement document, historical test data, and user feedback data, and inputs the extracted current requirement feature information, historical test feature information, and user feedback feature information into the trained target deep learning model for analysis to identify the potential defect types and impact scope for the current requirement document, thereby improving the efficiency and comprehensiveness of defect analysis; and generating an initial test plan based on the potential defect types and impact scope, thereby improving the efficiency of software test plan formulation and the comprehensiveness of testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a method for generating a software test plan provided in an embodiment of the present application;
[0030] Figure 2 A flowchart of a method for generating a software test plan provided in another embodiment of the present application;
[0031] Figure 3 A schematic diagram of the principle of a system for generating a software test plan provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of the principles of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0035] See also Figure 1 , Figure 1 The embodiment of the present application provides a method for generating a software test plan. The method for generating a software test plan provided by the embodiment of the present application includes the following steps:
[0036] S101. Obtain current requirement documents, historical test data, and user feedback data. The historical test data includes test reports, test case execution results, and defect reports.
[0037] S102: Perform feature extraction on the current demand document, historical test data, and user feedback data to obtain current demand feature information, historical test feature information, and user feedback feature information.
[0038] S103: Input current demand feature information, historical test feature information, and user feedback feature information into the trained target deep learning model to identify potential defect types and impact scopes.
[0039] S104. Generate an initial test plan based on the potential defect type and impact scope.
[0040] Specifically, the current requirement document is the requirement document of the current new software version, which describes in detail the business process, performance requirements, safety standards, acceptance criteria, user stories and other information of each functional module. Historical test data is test data for old software versions. Historical test data includes test reports, test case execution results and defect reports. User feedback data refers to user feedback data on the use of the software system, and the user feedback data may include problem reports, function suggestions and performance complaints. In some embodiments, the current requirement feature information includes function description keywords, business process keywords, performance requirement keywords and safety standard keywords; the historical test feature information includes defect type, test scope and test coverage; the user feedback feature information includes problem description keywords, function suggestion keywords and performance complaint keywords.
[0041] It should be noted that the defects in the software are analyzed by identifying historical test feature information and user feedback feature information through the target deep learning model, and the correlation analysis is performed with the current requirement feature information to obtain the potential defect types and impact scope for the current requirement document; potential defect types include functional defects, performance defects, compatibility defects, interface defects, data security defects, etc. The impact scope refers to the various functional modules or operation scenarios involved in the potential defect type.
[0042] In this embodiment, defect analysis is performed on the current requirement document by acquiring historical test data and user feedback data. Specifically, feature extraction is performed on the current requirement document, historical test data, and user feedback data, and the extracted current requirement feature information, historical test feature information, and user feedback feature information are input into the trained target deep learning model for defect pattern recognition to identify the potential defect types and impact ranges for the current requirement document, thereby improving the efficiency and comprehensiveness of defect analysis; and then generating an initial test plan based on the potential defect types and impact ranges. In this way, the test plan can be efficiently formulated while improving the comprehensiveness of the test.
[0043] See also Figure 2 In some embodiments, the training process of the target deep learning model includes:
[0044] S201. Obtain a training data set, where the training data set includes historical demand feature information, prehistoric test feature information, historical user feedback feature information, and label information; the label information includes a real defect type and a real impact range.
[0045] S202: Taking historical demand feature information, prehistoric test feature information and historical user feedback feature information as input and label information as output, the initial deep learning model is iteratively trained to obtain a target deep learning model.
[0046] Specifically, historical requirement documents, prehistoric test data, and historical user feedback data are obtained, and these data are subjected to data preprocessing and feature extraction to obtain historical requirement feature information, prehistoric test feature information, and historical user feedback feature information. In this embodiment, the historical requirement document refers to the requirement document of the old software version. Prehistoric test data refers to the test data of the software version between the old software versions. Historical user feedback data refers to the user feedback data generated during the use of the old software version. It should be noted that the meanings of the historical requirement feature information, prehistoric test feature information, and historical user feedback feature information are the same as the meanings of the current requirement feature information, historical test feature information, and user feedback feature information, and this embodiment will not be repeated here. Furthermore, according to the historical test reports, historical test case execution results, and historical defect reports corresponding to the historical requirement documents, the real defect types and real impact ranges brought about by the historical requirement documents can be marked manually or by machine.
[0047] Further, a CNN model, an RNN model or a transformer model is selected as the initial deep learning model, and the historical demand feature information, the prehistoric test feature information and the historical user feedback feature information are used as input, and the label information is used as output, that is, the historical demand feature information, the prehistoric test feature information and the historical user feedback feature information are input into the initial deep learning model, and the prediction result is made close to the label information through iterative training, so that the loss value is less than the preset loss threshold, or the number of iterations reaches the preset number threshold, thereby obtaining the target deep learning model. Further, the target deep learning model is adjusted and verified by obtaining the test set and the verification set to further optimize the target deep learning model. In this way, the target deep learning model finally obtained can learn the defect recognition pattern from the historical demand feature information, the prehistoric test feature information and the historical user feedback feature information, so as to be applied to the defect analysis of the current demand document.
[0048] In some embodiments, before extracting features from the current requirement document, historical test data, and user feedback data in step S102, it also includes: preprocessing the current requirement document, historical test data, and user feedback data; the data preprocessing process includes data cleaning and data integration.
[0049] Specifically, the data cleaning process includes: deleting or repairing erroneous data, for example, deleting irrelevant or duplicate comments from user feedback data, and repairing spelling errors; filling missing values, for example, for the missing acceptance criteria in the current requirement document, they can be filled through manual communication or reviewing historical documents; handling outliers, for example, for abnormally high test time or abnormally low pass rate in historical test data, it is necessary to investigate the cause and make corrections or deletions. Further, the data integration process includes: merging data from different data sources (current requirement documents, historical test data, user feedback data) into a unified data set, which may require data format conversion and standardization, for example, unifying the date format to YYYY-MM-DD; and then integrating related data, such as associating user feedback data with related historical test data or current requirement documents. In this way, by performing data cleaning and data integration on the current requirement documents, historical test data and user feedback data, the obtained data is more effective and standardized, which helps to improve the accuracy of defect identification in subsequent models.
[0050] In some embodiments, feature extraction is performed on the current demand document, historical test data, and user feedback data in step S102, including: using natural language processing technology to extract keywords from the current demand document, historical test data, and user feedback data. Specifically, in this embodiment, natural language processing technology based on a BERT model or a GPT model can be used to understand the current demand document, historical test data, and user feedback data and perform keyword extraction to obtain current demand feature information, historical test feature information, and user feedback feature information in the form of word vectors. In this way, it is convenient for the subsequent target deep learning model to identify and analyze the extracted feature information.
[0051] In some embodiments, in step S104, an initial test plan is generated according to the potential defect type and the scope of impact, including: planning test requirements according to the potential defect type and the scope of impact, the test requirements including test objectives, test scope, test function points, test scenarios and test methods; generating an initial test plan according to the test requirements and a preset test plan template.
[0052] Specifically, according to the potential defect types and impact scope of the current requirement document, test requirements can be planned manually or by tools. In this embodiment, the test objectives include test purposes and expected results. The test scope refers to the various functional modules, business processes and interfaces that need to be tested. Test function points refer to one or more functional points that are focused on testing a functional module. Test scenarios refer to a series of test steps or test cases set for specific functions or scenarios. The test method can adopt techniques such as equivalence class partitioning, boundary value analysis or error speculation, and can adopt automated testing tools. Further, the planned test requirements are filled in the preset test plan template to generate an initial test plan. In this way, the formulation of the initial test plan is completed, and the formulation efficiency is improved overall.
[0053] In some embodiments, the method for generating the software test plan of the embodiment of the present application also includes: adjusting the initial test plan according to the preset test resources and the preset test time to obtain the target test plan. In this embodiment, for the initial test plan, it is also necessary to adjust and optimize according to the actual situation in practical applications. Specifically, it can be reviewed and modified by the test team to ensure that it meets the project requirements, resource allocation and project plan schedule. In a specific embodiment, the content of the manual review of the initial test plan includes: verifying whether the key functions and potential risk points of the software are covered, and checking the rationality of the test method and the comprehensiveness of the test scenario at the same time; assessing the feasibility of the test resources (manpower input, test environment, test tools, etc.) in the initial test plan, optimizing and adjusting the test scope, test sequence or test method, etc., to ensure the executability of the plan; identifying possible risk points (such as technical difficulties, resource shortages, test time, etc.), and supplementing the risk response strategy and solution countermeasures of the response; confirming the priority order of the test according to factors such as business importance and defect risk, and ensuring that the most critical and risky functional modules are tested first. In this way, the target test plan obtained by adjustment can improve the utilization efficiency of test resources and test time, so as to be more in line with practical applications.
[0054] In one embodiment, the present application provides a system for generating a software test plan, and the system for generating a software test plan corresponds one-to-one to a method for generating a software test plan in the above embodiment. Figure 3 As shown, the software test plan generation system 300 includes a data acquisition module 310, a feature extraction module 320, an identification module 330 and a generation module 340. Each functional unit is described in detail as follows:
[0055] The data acquisition module 310 is used to acquire the current requirement document, historical test data and user feedback data. The historical test data includes historical test reports, historical test cases and historical defect descriptions.
[0056] The feature extraction module 320 is used to extract features from the current demand document, historical test data and user feedback data to obtain current demand feature information, historical test feature information and user feedback feature information.
[0057] The identification module 330 is used to input current demand feature information, historical test feature information and user feedback feature information into the trained target deep learning model to obtain potential defects and impact ranges.
[0058] The generation module 340 is used to generate an initial test plan according to potential defects and impact scope.
[0059] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as current demand documents, historical test data, user feedback data, and target deep learning models. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of a method for generating a software test plan in the above embodiment are implemented.
[0060] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for generating a software test plan in the above embodiment are implemented.
[0061] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0062] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for generating a software test plan, characterized in that: include: Obtain current requirement documents, historical test data and user feedback data, wherein the historical test data includes test reports, test case execution results and defect reports; Extract features from current demand documents, historical test data, and user feedback data to obtain current demand feature information, historical test feature information, and user feedback feature information; Inputting the current demand feature information, historical test feature information, and user feedback feature information into the trained target deep learning model to identify potential defect types and impact scopes; Generate an initial test plan based on the potential defect types and impact scope described.
2. The method for generating a software test plan according to claim 1, characterized in that: The training process of the target deep learning model includes: Acquire a training data set, wherein the training data set includes historical demand feature information, prehistoric test feature information, historical user feedback feature information, and label information; the label information includes a real defect type and a real impact range; The historical demand feature information, prehistoric test feature information and historical user feedback feature information are used as input, and the label information is used as output to iteratively train an initial deep learning model to obtain a target deep learning model.
3. The method for generating a software test plan according to claim 1, characterized in that: The current demand feature information includes function description keywords, business process keywords, performance requirement keywords and safety standard keywords; The historical test feature information includes defect type, test scope and test coverage; the user feedback feature information includes problem description keywords, function suggestion keywords and performance complaint keywords.
4. The method for generating a software test plan according to claim 1, characterized in that: The feature extraction of the current demand document, historical test data and user feedback data also includes: data preprocessing of the current demand document, historical test data and user feedback data; the data preprocessing process includes data cleaning and data integration.
5. The method for generating a software test plan according to claim 1, characterized in that: Feature extraction is performed on the current demand document, historical test data and user feedback data, including: using natural language processing technology to extract keywords from the current demand document, historical test data and user feedback data.
6. The method for generating a software test plan according to any one of claims 1 to 5, characterized in that: Based on the potential defect types and impact, generate an initial test plan including: Plan test requirements based on the potential defect types and impact scope, including test objectives, test scope, test function points, test scenarios and test methods; Generate an initial test plan based on test requirements and preset test plan templates.
7. The method for generating a software test plan according to any one of claims 1 to 5, characterized in that: Also includes: The initial test plan is adjusted according to the preset test resources and the preset test time to obtain a target test plan.
8. A system for generating a software test plan, characterized in that: include: A data acquisition module is used to acquire current requirement documents, historical test data and user feedback data, wherein the historical test data includes historical test reports, historical test cases and historical defect descriptions; The feature extraction module is used to extract features from the current demand document, historical test data and user feedback data to obtain current demand feature information, historical test feature information and user feedback feature information; An identification module, used to input the current demand feature information, historical test feature information and user feedback feature information into the trained target deep learning model to obtain potential defects and impact range; A generation module is used to generate an initial test plan according to the potential defects and impact scope.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.