Test case generation method and system based on production fault analysis report
By semantically parsing and classifying production failure analysis reports, test cases for weighted value calculation are generated, which solves the shortcomings of manually extracting test cases and achieves more comprehensive test coverage and improved system stability.
Patent Information
- Application Number
- CN202511723906.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-22
- Publication Date
- 2026-01-16
AI Technical Summary
In complex and ever-changing business scenarios and with limited testing time, existing technologies make it difficult to write test cases comprehensively and accurately through manual extraction, which affects system stability and reliability.
By semantically parsing the production failure analysis report, defect information and test implications are extracted, test points are generated by classification, basic rule elements are generated based on effective information, test hints are expanded and weight values are calculated, and finally test cases are generated.
It expands the scope of testing, ensures the effectiveness and comprehensiveness of testing, adapts to the testing needs of various systems, and improves the stability and reliability of the system.
Smart Images

Figure CN121349894A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data service, and particularly relates to a test case generation method and system based on production fault analysis reports. BACKGROUND
[0002] In software system testing, test cases need to be written according to business requirements to find potential defects in the system. However, when facing complex and variable business scenarios and limited test time, it is often difficult to achieve full test coverage, resulting in some potential problems being unable to be fully identified, thereby affecting the stability of the system and the reliability in the production environment.
[0003] Currently, most system testing still relies on test personnel manually extracting test points according to business requirements and writing test cases based on this. However, this manual extraction method is limited by personnel experience and the accuracy of understanding business requirements, making it difficult to fully and accurately grasp all test scenarios. Especially in systems with frequent changes in business requirements and complex function logic, manual extraction is prone to missing key test points or misjudgment, making it difficult to cover all potential defects and affecting the effectiveness of testing. SUMMARY
[0004] The present application provides a test case generation method and system based on production fault analysis reports, aiming to ensure the effectiveness of testing.
[0005] To achieve the above purpose, the present application provides the following technical solutions:
[0006] The first aspect of the present application provides a test case generation method based on production fault analysis reports, comprising:
[0007] Performing semantic analysis on the production fault analysis report to obtain defect information; the defect information at least includes test hints;
[0008] Classifying the test hints to obtain classification information; the classification information at least includes test points;
[0009] Extracting effective information of the production fault analysis report and generating basic rule elements based on the effective information;
[0010] Supplementing the basic rule elements to the test points to obtain supplemented test points;
[0011] Expanding the supplemented test points to obtain test prompts and weight values corresponding to the test prompts;
[0012] Generating test cases based on the supplemented test points, the test prompts and the weight values corresponding to the test prompts.
[0013] Optionally, the production fault analysis report is semantically analyzed to obtain defect information, including:
[0014] First text features are extracted from the production fault analysis report;
[0015] The first text features are analyzed to obtain text types corresponding to the first text features;
[0016] An extraction rule corresponding to the text type corresponding to the first text features is called to extract a plurality of first core elements in the production fault analysis report;
[0017] All first core elements are reorganized to obtain defect information.
[0018] Optionally, the effective information is based on the generation of basic rule elements, including:
[0019] Second text features are screened from the effective information;
[0020] The second text features are analyzed to obtain text types corresponding to the second text features;
[0021] An extraction rule corresponding to the text type corresponding to the second text features is called to extract a plurality of second core elements in the effective information;
[0022] All second core elements are reorganized to obtain basic rule elements.
[0023] Optionally, the supplemented test points are expanded to obtain test prompts and weight values corresponding to the test prompts, including:
[0024] The supplemented test points are split to obtain key information; the key information at least includes test objects, constraint condition sets, expected result sets, and association relationship sets;
[0025] An optimal test method template is screened from a preset test method template using a matching degree function;
[0026] An initial test prompt is generated based on the optimal test method template;
[0027] The initial test prompt is de-duplicated to obtain a test prompt;
[0028] According to a weight value formula and the test prompt, a weight value corresponding to the test prompt is calculated.
[0029] Optionally, it further includes:
[0030] store the defect information, the test point information, the supplemented test point, the test prompt and the weight value corresponding to the test prompt into a test prompt library;
[0031] when receiving a new business requirement, screen out test points and test prompts corresponding to the new business requirement from the test prompt library;
[0032] generate a new test case based on the test points and test prompts corresponding to the new business requirement.
[0033] The second aspect of the present application provides a test case generation system based on production fault analysis report, comprising:
[0034] an analysis unit configured to perform semantic analysis on the production fault analysis report to obtain defect information; the defect information at least includes test clues;
[0035] a classification unit configured to classify the test clues to obtain classification information; the classification information at least includes test points;
[0036] an extraction unit configured to extract effective information of the production fault analysis report and generate basic rule elements based on the effective information;
[0037] a supplement unit configured to supplement the test points with the basic rule elements to obtain supplemented test points;
[0038] an expansion unit configured to expand the supplemented test points to obtain test prompts and weight values corresponding to the test prompts;
[0039] a generation unit configured to generate test cases based on the supplemented test points, the test prompts and the weight values corresponding to the test prompts.
[0040] Optionally, the analysis unit is specifically configured to:
[0041] extract first text features from the production fault analysis report;
[0042] analyze the first text features to obtain text types corresponding to the first text features;
[0043] call extraction rules corresponding to the text types corresponding to the first text features to extract a plurality of first core elements in the production fault analysis report;
[0044] recombine all the first core elements to obtain defect information.
[0045] Optionally, the extraction unit comprises:
[0046] The screening sub-unit is configured to screen second text features from the effective information;
[0047] The analysis sub-unit is configured to analyze the second text features to obtain text types corresponding to the second text features;
[0048] The extraction sub-unit is configured to call extraction rules corresponding to the text types corresponding to the second text features, and extract a plurality of second core elements in the effective information;
[0049] The recombination sub-unit is configured to recombine all the second core elements to obtain basic rule elements.
[0050] Optionally, the expansion unit is specifically configured to:
[0051] split the supplemented test points to obtain key information; the key information at least includes a test object, a constraint condition set, an expected result set, and an association relationship set;
[0052] filter an optimal test method template from preset test method templates by using a matching degree function;
[0053] generate an initial test prompt based on the optimal test method template;
[0054] perform a deduplication processing on the initial test prompt to obtain a test prompt;
[0055] calculate a weight value corresponding to the test prompt according to a weight value formula and the test prompt.
[0056] Optionally, the method further comprises:
[0057] The storage unit is configured to store the defect information, the test point information, the supplemented test point, the test prompt, and the weight value corresponding to the test prompt into a test prompt library;
[0058] The data screening unit is configured to screen test points and test prompts corresponding to a new business requirement from the test prompt library when the new business requirement is received;
[0059] The use case generation unit is configured to generate a new test case based on the test points and test prompts corresponding to the new business requirement.
[0060] The technical solution provided in this application performs semantic parsing on production failure analysis reports to obtain test insights; classifies the test insights to obtain test points; extracts effective information from the production failure analysis reports and generates basic rule elements based on the effective information; supplements the test points with basic rule elements to obtain supplemented test points; expands the supplemented test points to obtain test hints and their corresponding weight values; and generates test cases based on the supplemented test points, test hints, and their corresponding weight values. By analyzing production failure reports, general test points are extracted and their corresponding test hints are expanded, thereby adapting to the testing requirements of various systems, expanding the test coverage, and ensuring the effectiveness of testing. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 A flowchart illustrating a test case generation method based on a production failure analysis report, provided as an embodiment of this application;
[0063] Figure 2 This is a schematic diagram of the architecture of a test case generation system based on production failure analysis reports, provided in an embodiment of this application. Detailed Implementation
[0064] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0065] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0066] like Figure 1The flowchart shown is a method for generating test cases based on production failure analysis reports provided in this application, including the following steps:
[0067] S101: Perform semantic parsing on the production failure analysis report to obtain defect information.
[0068] The defect information includes at least the test notice, defect number, system to which the defect belongs, and details of the defect event.
[0069] For example, the event details in the production failure analysis report are: "On YYYYMMDD day, the batch data import program of system K reported an error, resulting in the inability to import data normally and affecting the data application of the downstream system C. Investigation revealed a hidden defect in the leap year judgment logic, which is planned to be fixed through XX means." Semantic parsing of the production failure analysis report yields the test insight: "Is the test scenario design reasonable for special dates (e.g., leap years / leap months, cross-day / cross-year effects, special month / day / time point processing logic different from regular logic, etc.)?" The defect number is the defect date plus a four-digit sequence number. Specifically, the specific format of the defect information is shown in Table 1.
[0070] Table 1
[0071]
[0072] It should be noted that the content shown in Table 1 above is merely an example.
[0073] Optionally, in another embodiment of this application, the specific implementation of step S101 includes processes A1 to A4.
[0074] A1: Extract the first text feature from the production failure analysis report.
[0075] The first textual feature includes, but is not limited to, fault category, fault time, and fault description.
[0076] It should be noted that after extracting the first text feature, the first text feature needs to be preprocessed, that is, redundant information in the first text feature is removed using regular expressions to obtain the preprocessed first text feature.
[0077] A2: Analyze the first text feature to obtain the text type corresponding to the first text feature.
[0078] Understandably, the goal is to identify keywords, related words, and structures in the first text feature, and then determine the text type corresponding to the first text feature based on these keywords, related words, and structures.
[0079] Optional text types include, but are not limited to, causal chains, enumerations, definitions, and process flows.
[0080] For example, if the first text feature contains structured information such as causal words like "cause" and "trigger", then the text type corresponding to the first text feature can be determined to be a causal chain.
[0081] A3: Invoke the extraction rules corresponding to the text type corresponding to the first text feature to extract multiple first core elements from the production failure analysis report.
[0082] The first core element includes, but is not limited to, action, cause, and result.
[0083] For example, if the text type is a causal chain, the core elements of the "action-cause-effect" causal chain in the production failure analysis report can be extracted based on causal correlation words.
[0084] A4: Reorganize all the primary core elements to obtain defect information.
[0085] Specifically, all primary core elements are reorganized according to text type. For example, causal chains are linked logically according to "action + cause + result," and enumerations are displayed in the format of "main branch + numbered sub-items."
[0086] S102: Classify the test revelations to obtain classification information.
[0087] The classification information includes at least the defect number, primary classification, and secondary classification test points.
[0088] Specifically, primary categories include, but are not limited to, date, customer, account, page, accounting, parameter, and field validation categories. Secondary categories are further refinements of the primary categories, such as special dates, validity periods, and start and end dates under the date category.
[0089] For example, the test advisory shown in Table 1 is "Special Date Test Scenario Design: 1. Leap Year". Based on this advisory, when categorizing, the keyword "leap year" is extracted and parsed into the following hierarchical structure: primary category is date, secondary category is special date, and the test point is leap year determination. This categorization format can be seen in Table 2.
[0090] Table 2
[0091]
[0092] S103: Extract valid information from the production failure analysis report and generate basic rule elements based on the valid information.
[0093] In this context, effective information refers to data or facts that help identify the cause of the failure, its impact, solutions, and other relevant circumstances. Examples include the event that caused the failure and its underlying cause.
[0094] For example, valid information is: "Years divisible by 4 but not by 100 are leap years, and years divisible by 400 are also leap years." Basic rule elements are generated based on this valid information. Specific basic rule elements can be categorized as follows: divisible by 4 but not by 100, divisible by 400, and other cases. This rule format is shown in Table 3.
[0095] Table 3
[0096]
[0097] Optionally, in another embodiment of this application, the specific implementation of generating basic rule elements based on valid information in step S103 includes processes B1 to B4.
[0098] B1: Filter out the second text features from the valid information.
[0099] The second text features include, but are not limited to, fault category, fault time, and fault description.
[0100] It should be noted that after extracting the second text features, the second text features need to be preprocessed, that is, redundant information in the second text features is removed using regular expressions to obtain the preprocessed second text features.
[0101] B2: Analyze the second text feature to obtain the text type corresponding to the second text feature.
[0102] It should be noted that the specific implementation method of process B2 can be found in process A2, and will not be repeated here.
[0103] B3: Invoke the extraction rules corresponding to the text type corresponding to the second text feature to extract multiple second core elements from the effective information.
[0104] The second core element includes, but is not limited to, action, cause, and result.
[0105] It should be noted that the specific implementation method of process B3 can be found in process A3, and will not be repeated here.
[0106] B4: Reorganize all the second core elements to obtain the basic rule elements.
[0107] It should be noted that the specific implementation method of process B4 can be found in process A4, and will not be repeated here.
[0108] S104: Supplement the basic rule elements to the test points to obtain the supplemented test points.
[0109] S105: Expand the supplemented test points to obtain test hints and corresponding weight values for the test hints.
[0110] Optionally, the test hint expansion module can be used to expand the test points, obtain test hints and their corresponding weight values, and store the test hints and their corresponding weight values in the test point hint library.
[0111] Optionally, in another embodiment of this application, the specific implementation of step S105 includes processes C1 to C5.
[0112] C1: Break down the supplemented test points to obtain key information.
[0113] The key information includes at least the test object, the set of constraints, the set of expected results, and the set of relationships.
[0114] Specifically, key information can be represented by a set E, E=(O,C,R,D), where O is the test object; C is the set of constraints; R is the set of expected results; and D is the set of relationships. For the conditional statement "If c then r", extract c. C,r R; For the enumeration constraint "a / b / c": extract {a,b,c} C; Regarding the process description "s_1" s_2 s_3”: Extracts (s_1,s_2) and (s_2,s_3) D.
[0115] For example, taking leap year determination as an example, the corresponding set E=(O,C,R,D) are as follows: O=Year (integer) (test object); C={c1,c2,c3} (constraint set): c1: The year is divisible by 4 but not by 100 (ymod4=0∧ymod100=0); c2: The year is divisible by 400 (ymod400=0); c3: C1 is not satisfied and C2 is not satisfied (¬c1∧¬c2); R={Leap year, common year} (expected result set); D={Leap year → February has 29 days, common year → February has 28 days} (relationship).
[0116] C2: Use the matching degree function to select the optimal test method template from the preset test method templates.
[0117] The preset test method templates include, but are not limited to: equivalence class partitioning, boundary value analysis, error guessing, cause-effect graphing / decision table methods, and scenario-based testing. The specific forms of these preset test method templates are shown in Table 4.
[0118] Table 4
[0119]
[0120] Specifically, the matching degree function is expressed as shown in formula (1), where a match is considered to be made if the value exceeds the threshold of 0.6.
[0121] (1)
[0122] In formula (1), Here, E represents the matching degree, M represents the set, and M represents the preset test method template. For example, the boundary value template requires C to contain numerical constraints. The feature weights are (numerical features = 0.6, logical features = 0.4). It is an indicator function (satisfying characteristic = 1, otherwise = 0).
[0123] For example, consider the calculation of the matching degree between the leap year judgment and the equivalence class partitioning template. The constraints of the leap year judgment have a clear range (c1, c2, c3 define valid / invalid conditions), and the matching degree = 0.6×1 + 0.4×1 = 1.0, which exceeds the threshold of 0.6, so the template matches.
[0124] C3: Generates initial test prompts based on the optimal test method template.
[0125] Specifically, initial test hints are generated based on the optimal test method template, and mathematical combination rules are used to cover all possible cases. This includes the following:
[0126] Equivalence class scenario: For constraint C={x∈[a,b]}, generate: ={a+(b−a) / 2(intermediate value),a(minimum value),b(maximum value)}∪{a−1,b+1(invalid value)};
[0127] Boundary value scenario: For a critical value k, generate: ={k−a(lower critical limit), k(critical value), k+a(upper critical limit)};
[0128] Error prediction scenario: generated based on an exception type set: ={empty value, all spaces, special characters (such as 'or1=1'), long value (k+10)};
[0129] Decision table scenario: Given multiple conditions C={c1,c2}, generate all combinations:
[0130] ={c1∧c2,c1∧¬c2,¬c1∧c2,¬c1∧¬c2}
[0131] Related scenario: For process D={s1→s2→s3}, generate: ={s1→s2→s3(normal process)}∪{s1→e→termination(abnormal process)} (e is an abnormal event).
[0132] For example, consider the extended test prompts for the cause-effect graph / decision table method for determining leap years.
[0133] (c1: divisible by 4 but not by 100; c2: divisible by 400)
[0134] The key points for extended testing are as follows:
[0135] s1:c1∧¬c2 (e.g., 2020, a leap year);
[0136] s2:¬c1∧c2 (e.g., 2000, a leap year);
[0137] s3:c1∧c2 (No actual year, because if it is divisible by 400, it must be divisible by 100, which is a contradiction);
[0138] s4:¬c1∧¬c2 (such as 2019, an ordinary year).
[0139] C4: Remove duplicates from the initial test prompts to obtain the final test prompts.
[0140] Optionally, deduplication rules can be used to deduplicatize the initial test prompts.
[0141] Specifically, the deduplication rules include removing logically invalid scenarios and deduplication based on hash values of scenario characteristics, i.e., Hash(s) = H(condition(s) + result(s)). If Hash(s1) = Hash(s2), then s1 is retained.
[0142] C5: Calculate the weight value corresponding to the test prompt based on the weight value formula and the test prompt.
[0143] Specifically, the weight value formula is expressed as shown in formula (2).
[0144] Priority(s)=0.6*Risk(s)+0.4*Coverage(s)(2)
[0145] In formula (2), Risk(s) is the risk level (boundary scenario = 3, abnormal scenario = 2, basic scenario = 1), and Coverage(s) is the number of covered elements (covering multiple conditions = 2, covering single conditions = 1).
[0146] For example, taking the extended test points for leap year determination as an example, the results of selecting one extended test point for each template are as follows. Taking the weight value calculation of the test point prompt "Year = 3 (4-1, not divisible by 4) → common year" as an example, the corresponding weight value = 0.6×3 + 0.4×2 = 2.6. Specifically, the presentation format of the extended test point prompt table can be seen in Table 5.
[0147] Table 5
[0148]
[0149] S106: Generate test cases based on the supplemented test points, test hints, and the corresponding weight values of the test hints.
[0150] Understandably, by using the supplemented test points, test hints, and their corresponding weight values, multiple specific test cases can be generated. Each test case includes test hints, expected results, and calculated weight values. These test cases will help to comprehensively verify the correctness of the leap year rule.
[0151] Optionally, after step S106, considering that different business needs and test scenarios may change, the test points and test prompts can be dynamically adjusted or expanded. By further optimizing the selection of test points and prompts, test cases related to new business needs can be generated more accurately, thereby improving test coverage and effectiveness. Therefore, another embodiment of this application provides a new method for generating test cases, including processes D1 to D3.
[0152] D1: Store defect information, test point information, supplemented test points, test tips, and the corresponding weight values of test tips in the test tip library.
[0153] D2: When a new business requirement is received, filter out the test points and test prompts corresponding to the new business requirement from the test prompt library.
[0154] Understandably, when new business requirements are received, test requirements and test tips corresponding to the new business requirements are selected from the test tip library according to different dimensions such as system, primary category, secondary category, test points, test tips, and weight values.
[0155] D3: Generate new test cases based on the test points and test prompts corresponding to the new business requirements.
[0156] In summary, by analyzing production failure reports, we can extract common testing points and expand their corresponding testing tips to adapt to the testing needs of various systems, broaden the testing coverage, and ensure the effectiveness of the testing.
[0157] likeFigure 2 The diagram shown is an architectural schematic of a test case generation system based on a production failure analysis report provided in an embodiment of this application. The test case generation system includes: a parsing unit 100, a classification unit 200, an extraction unit 300, a supplementary unit 400, an expansion unit 500, and a generation unit 600.
[0158] The parsing unit 100 is used to perform semantic parsing on the production failure analysis report to obtain defect information; the defect information includes at least test insights.
[0159] The parsing unit 100 is specifically used for: extracting the first text feature from the production failure analysis report; analyzing the first text feature to obtain the text type corresponding to the first text feature; calling the extraction rule corresponding to the text type corresponding to the first text feature to extract multiple first core elements from the production failure analysis report; and reorganizing all the first core elements to obtain defect information.
[0160] Classification unit 200 is used to classify test prompts to obtain classification information; the classification information includes at least the test points.
[0161] Extraction unit 300 is used to extract valid information from production failure analysis reports and generate basic rule elements based on the valid information.
[0162] Extraction unit 300 includes:
[0163] The filtering subunit is used to filter out the second text features from the valid information.
[0164] The analysis subunit is used to analyze the second text features and obtain the text type corresponding to the second text features.
[0165] The extraction subunit is used to call the extraction rules corresponding to the text type corresponding to the second text feature to extract multiple second core elements from the effective information.
[0166] The reorganization subunit is used to reorganize all the second core elements to obtain the basic rule elements.
[0167] Supplementary unit 400 is used to supplement the basic rule elements for the test points, resulting in the supplemented test points.
[0168] The expansion unit 500 is used to expand the supplemented test points to obtain test prompts and corresponding weight values.
[0169] The expansion unit 500 is specifically used for: breaking down the supplemented test points to obtain key information; the key information includes at least the test object, the set of constraints, the set of expected results, and the set of relationships; using a matching degree function to select the optimal test method template from the preset test method templates; generating initial test prompts based on the optimal test method template; deduplicating the initial test prompts to obtain test prompts; and calculating the weight value corresponding to the test prompts according to the weight value formula and the test prompts.
[0170] The generation unit 600 is used to generate test cases based on the supplemented test points, test tips, and the weight values corresponding to the test tips.
[0171] In summary, by analyzing production failure reports, we can extract common testing points and expand their corresponding testing tips to adapt to the testing needs of various systems, broaden the testing coverage, and ensure the effectiveness of the testing.
[0172] Combination Figure 2 The test case generation system, as shown, also includes:
[0173] The storage unit is used to store defect information, test point information, supplemented test points, test tips, and the weight values corresponding to the test tips into the test tip library.
[0174] The data filtering unit is used to filter out test points and test prompts corresponding to new business requirements from the test prompt library when new business requirements are received.
[0175] The test case generation unit is used to generate new test cases based on the test points and test prompts corresponding to new business requirements.
[0176] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or system embodiments, since they are fundamentally similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. Components shown as units 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 achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0177] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0178] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating test cases based on production failure analysis reports, characterized in that, include: Semantic parsing is performed on production failure analysis reports to obtain defect information; The defect information includes at least test revelations; The test revelations are classified to obtain classification information; The classification information includes at least the test points; Extract the valid information from the production failure analysis report, and generate basic rule elements based on the valid information; The basic rule elements are added to the test points to obtain the supplemented test points; The supplemented test points are expanded to obtain test prompts and corresponding weight values for the test prompts; Test cases are generated based on the supplemented test points, the test prompts, and the weight values corresponding to the test prompts.
2. The method according to claim 1, characterized in that, The semantic parsing of the production failure analysis report to obtain defect information includes: Extract the first text features from the production failure analysis report; Analyze the first text feature to obtain the text type corresponding to the first text feature; The extraction rules corresponding to the text type corresponding to the first text feature are invoked to extract multiple first core elements from the production failure analysis report. By reorganizing all the primary core elements, defect information can be obtained.
3. The method according to claim 1, characterized in that, The generation of basic rule elements based on the effective information includes: The second text feature is selected from the valid information; Analyze the second text feature to obtain the text type corresponding to the second text feature; The extraction rule corresponding to the text type corresponding to the second text feature is invoked to extract multiple second core elements from the effective information; By reorganizing all the secondary core elements, we obtain the basic rule elements.
4. The method according to claim 1, characterized in that, The expansion of the supplemented test points to obtain test prompts and corresponding weight values for the test prompts includes: The supplemented test points are broken down to obtain key information; the key information includes at least the test object, the set of constraints, the set of expected results, and the set of relationships. The optimal test method template is selected from the preset test method templates using a matching degree function; Initial test prompts are generated based on the optimal test method template. The initial test prompts are deduplicated to obtain the final test prompts; Based on the weighting formula and the test prompts, the weighting values corresponding to the test prompts are calculated.
5. The method according to claim 1, characterized in that, Also includes: The defect information, the test point information, the supplemented test points, the test prompts, and the weight values corresponding to the test prompts are stored in the test prompt library; When a new business requirement is received, test points and test prompts corresponding to the new business requirement are filtered from the test prompt library. New test cases are generated based on the test points and test prompts corresponding to the new business requirements.
6. A test case generation system based on production failure analysis reports, characterized in that, include: The parsing unit is used to perform semantic parsing on the production failure analysis report to obtain defect information; The defect information includes at least test revelations; A classification unit is used to classify the test prompts to obtain classification information; The classification information includes at least the test points; An extraction unit is used to extract valid information from the production failure analysis report and generate basic rule elements based on the valid information. A supplementary unit is used to supplement the basic rule elements to the test points, thereby obtaining the supplemented test points; An expansion unit is used to expand the supplemented test points to obtain test prompts and corresponding weight values for the test prompts; The generation unit is used to generate test cases based on the supplemented test points, the test prompts, and the weight values corresponding to the test prompts.
7. The system according to claim 6, characterized in that, The parsing unit is specifically used for: Extract the first text features from the production failure analysis report; Analyze the first text feature to obtain the text type corresponding to the first text feature; The extraction rules corresponding to the text type corresponding to the first text feature are invoked to extract multiple first core elements from the production failure analysis report. By reorganizing all the primary core elements, defect information can be obtained.
8. The system according to claim 6, characterized in that, The extraction unit includes: A filtering subunit is used to filter out second text features from the valid information; The analysis subunit is used to analyze the second text feature to obtain the text type corresponding to the second text feature; The extraction subunit is used to call the extraction rule corresponding to the text type corresponding to the second text feature to extract multiple second core elements from the effective information; The reorganization subunit is used to reorganize all the second core elements to obtain the basic rule elements.
9. The system according to claim 6, characterized in that, The expansion unit is specifically used for: The supplemented test points are broken down to obtain key information; the key information includes at least the test object, the set of constraints, the set of expected results, and the set of relationships. The optimal test method template is selected from the preset test method templates using a matching degree function; Initial test prompts are generated based on the optimal test method template. The initial test prompts are deduplicated to obtain the final test prompts; Based on the weighting formula and the test prompts, the weighting values corresponding to the test prompts are calculated.
10. The system according to claim 6, characterized in that, Also includes: A storage unit is used to store the defect information, the test point information, the supplemented test points, the test prompts, and the weight values corresponding to the test prompts into a test prompt library; The data filtering unit is used to filter out test points and test prompts corresponding to the new business requirements from the test prompt library when a new business requirement is received. The test case generation unit is used to generate new test cases based on the test points and test prompts corresponding to the new business requirements.