PLM test case generation method and system based on knowledge base and intelligent agent
By using a knowledge base and intelligent agent-based approach, multi-source input information is parsed into structured data. Combined with semantic retrieval and an AI generation engine, test cases are automatically generated. The generation strategy is optimized through execution feedback, which solves the problems of information fragmentation and high-risk scenario coverage in PLM systems and achieves efficient and accurate test case generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PU HUA KE JI YOU XIAN GONG SI
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies struggle to unify and integrate multi-source knowledge in PLM systems, fail to effectively cover the high-risk scenarios unique to PLM, generate test cases that lack self-evolution and optimization capabilities, and incur high implementation costs.
By using a knowledge base and intelligent agent-based approach, multi-source input information is parsed into structured knowledge data. Combined with semantic retrieval and an AI generation engine, test cases are automatically generated. The generation strategy is optimized through execution feedback, and an execution feedback closed loop is established.
It achieves a close alignment between test cases and PLM business requirements, systematically covers high-risk scenarios, and generates test cases that become more accurate with iteration, reducing costs and the need for manual review.
Smart Images

Figure CN122064583A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of PLM software testing technology, and in particular to a method and system for generating PLM test cases based on a knowledge base and intelligent agents. Background Technology
[0002] In Product Lifecycle Management (PLM) systems, business processes such as engineering changes, BOM management, version control, and permission approval are highly complex and interconnected. As PLM system functionality expands, the number of test cases grows exponentially. Manually maintaining test cases is not only inefficient and prone to missing critical scenarios, but also difficult to keep pace with changes in requirements and code. Automated test case generation has become an important direction for ensuring the quality of PLM systems. However, existing technologies are mostly general solutions for typical enterprise application systems, lacking in-depth modeling of PLM-specific business objects and their complex state transitions and permission matrices, making it difficult to meet the testing requirements of PLM scenarios.
[0003] Currently, common test case generation methods mainly fall into three categories: First, white-box methods based on code analysis, which focus on the internal structure of the program and use static and dynamic analysis techniques combined with search algorithms to generate test data with the goal of achieving high code coverage; second, black-box methods based on requirement models, which start from the software design specifications and use formal models, input syntax, or combinatorial mathematics methods to derive test cases that verify functional specifications; and third, methods based on large language models, which use artificial intelligence technology to directly generate test scenarios and test data based on requirement descriptions through natural language prompts or model fine-tuning.
[0004] While existing technologies can partially automate test case generation, they still have many shortcomings in practical applications within PLM scenarios, specifically in the following four aspects: 1. Fragmented information sources and a lack of unified knowledge representation. White-box methods, centered on source code, struggle to understand business semantics and cannot directly connect to business objects in the PLM such as bill of materials, engineering change requests, or notifications. Black-box methods, centered on requirement text or models, struggle to perceive underlying implementation details, database structure, and historical defect information. Methods based on large language models rely primarily on cue words and embedded knowledge within the model, making it difficult to systematically integrate multi-source information such as requirements, code, defects, and historical test cases. This results in the requirement, development, and testing teams still operating independently during the testing process, making it difficult to comprehensively optimize testing strategies within a unified knowledge framework.
[0005] 2. Difficulty in effectively covering high-risk scenarios unique to PLM. PLM systems widely contain complex permission matrices, such as controlling approval and operation permissions by role, project, or organizational structure; they also have strict state machines and version management mechanisms, such as constraints between the status of bills of materials or engineering change notices and their references in downstream systems; and there are dependencies across business objects and concurrent change scenarios, such as the same component being modified by multiple projects simultaneously. Existing general generation solutions mainly cover code paths or basic functional use cases, lacking the ability to specifically model and automatically generate solutions for the high-risk scenarios unique to PLM, such as unauthorized approvals, version misuse, and concurrent change conflicts.
[0006] 3. Insufficient intelligent generation capabilities, lacking self-evolution and continuous optimization. Traditional white-box and black-box generation strategies rely heavily on manually preset rules, failing to leverage historical defects and test execution results for automatic optimization. While large language models can generate test cases with natural language descriptions, they suffer from illusion problems and uncontrollable coverage, and struggle to continuously absorb new knowledge and defect experiences generated within the project. Consequently, test case generation often remains a one-time event, lacking an iterative optimization mechanism driven by execution feedback, preventing test assets from autonomously improving alongside system iterations.
[0007] 4. High implementation costs in real-world PLM scenarios. White-box tools generate test cases that are mostly low-level paths or parameter combinations, which are difficult for PLM business personnel to read and have a high barrier to understanding and use. Black-box methods require the maintenance of complex domain models or specialized domain languages, and their update and maintenance workload is large, making it difficult to match the rapid change pace of actual PLM projects. Simply relying on large language models to generate test cases still requires a lot of manual review, correction and secondary processing, and the overall investment cost remains high.
[0008] In summary, existing technologies have not yet built a test case generation system that can be applied to the PLM field, unify and integrate multi-source knowledge, and utilize multi-agent collaboration to achieve a closed loop from knowledge modeling, scenario generation to execution feedback. Summary of the Invention
[0009] This invention provides a method and system for generating PLM test cases based on a knowledge base and intelligent agents to solve the aforementioned problems in the prior art.
[0010] In a first aspect, embodiments of the present invention provide a PLM test case generation method based on a knowledge base and an intelligent agent, comprising: The system receives multi-source input information from the PLM system, parses the multi-source input information, extracts business elements and technical constraints, and transforms them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; Based on the structured knowledge data, semantic retrieval is performed to match candidate assets from the historical test asset library; the candidate assets are sorted, and test case recommendation results related to the current requirements are output. Based on the structured knowledge data and test case recommendation results, the preset test methods are integrated, and test cases are automatically generated through an AI generation engine based on the identified specific risk scenarios in the PLM field. The generated test cases are converted into executable test scripts and run. The test execution results are collected and then structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and the matching recommendation strategy.
[0011] Preferably, after outputting recommended test cases related to the current requirements, the method further includes: The code analysis agent performs static or dynamic analysis on the code repository to obtain code implementation details related to the current requirements. The analysis results are then abstracted into a code technology model and written into a knowledge base. A mapping is established with the structured knowledge data to guide the construction of test cases and the generation of complex scenarios.
[0012] Preferably, after automatically generating test cases through an AI generation engine, the method further includes: The recommended test cases and the new test cases generated by AI are reviewed, confirmed and optimized. The confirmed new test cases are saved to the test case library and traceable associations are established with the corresponding original requirements, technical design documents, non-textual requirement artifacts and related code locations.
[0013] Preferably, the multi-source input information is parsed to extract business elements and technical constraints, and then transformed into unified structured knowledge data, including: Perform natural language processing on natural language requirements to extract business rules, functional points, user roles, and business processes; Analyze the technical design documents to extract technical constraints, interface definitions, data flow and state transition information; The non-textual requirement artifacts are parsed, including graphic structure recognition and text extraction for image artifacts, and speech recognition and keyframe extraction for video artifacts, in order to extract interface elements, operation steps and state change sequences. All parsing results are uniformly mapped into graph-structured data representing roles, business objects, operations, constraints, and state machines.
[0014] Preferably, semantic retrieval is performed based on the structured knowledge data to match candidate assets from the historical test asset database; the candidate assets are then sorted, and test case recommendation results relevant to the current requirements are output, including: The structured knowledge data and the content in the historical test asset library are vectorized using an encoding model, and the structural features of business object type, state machine identifier and module to which they belong are incorporated into the vectorization process. Initial candidate assets are obtained by using an approximate nearest neighbor retrieval method in the vector database; A re-ranking model is introduced to refine the initial candidate assets. The refinement combines structured features such as path length, state machine sharing relationship and defect pattern matching relationship in the knowledge graph to generate a comprehensive score. The recommendation results are then output after ranking based on the scores.
[0015] Preferably, based on the structured knowledge data and test case recommendation results, a preset testing method is integrated, and test cases are automatically generated through an AI generation engine based on the identified PLM-specific risk scenarios, including: Based on the preset testing methods, basic test inputs and combinations are generated by combining the structured knowledge data; wherein, the testing methods include boundary value analysis, equivalence class partitioning, scenario-based testing, and decision table-driven testing. Generate enhanced test cases for different technical objects, including: test cases for the validity of interface parameters, boundary values and missing fields, test cases for database transactions such as transaction commit failure, abnormal rollback and concurrent update conflict, and test cases for business state machines that cover all state paths. The retrieval module obtains highly relevant content from the test case recommendation results as knowledge context, which is then input into the AI generation engine to assist in generating new test cases.
[0016] Preferably, the test execution results are structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy, including: The generated test cases are automatically assembled into test plans and mapped to automated test scripts, triggering the test execution framework to run. Collect code coverage data, performance metrics, and defect information during test execution. The defect information includes defect type, scope of impact, and associated business objects. The collected test execution results are structured and stored in a knowledge base, and synchronized to the AI generation engine and related intelligent agents to adjust the priority of test case generation, optimize risk scenario identification rules, and update the feature weights used for matching recommendations.
[0017] Secondly, an embodiment of the present invention provides a PLM test case generation system based on a knowledge base and intelligent agents, comprising: The information parsing module is used to receive multi-source input information from the PLM system, parse the multi-source input information, extract business elements and technical constraints, and transform them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; The intelligent matching and recommendation module is used to perform semantic retrieval based on the structured knowledge data, match candidate assets from the historical test asset library, sort the candidate assets, and output test case recommendation results related to the current requirements. The test case generation module is used to automatically generate test cases based on the structured knowledge data and test case recommendation results, integrate preset test methods, and based on the identified specific risk scenarios in the PLM field, through an AI generation engine. The execution and feedback module is used to convert the generated test cases into executable test scripts and run them, collect the test execution results, and structure the test execution results back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy.
[0018] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the PLM test case generation method based on knowledge base and agent as described in the first aspect embodiment of the present invention.
[0019] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the PLM test case generation method based on knowledge base and intelligent agent as described in the first aspect embodiment of the present invention.
[0020] The PLM test case generation method and system based on knowledge base and intelligent agent provided in this invention have the following advantages compared with the prior art: (1) This invention parses multi-source input information, such as natural language requirements, technical design documents, and non-textual requirement artifacts, into unified structured knowledge data. Using a knowledge base as a carrier, it connects multi-source knowledge such as business rules, state machines, code implementations, historical test cases, and defect reports. This unified knowledge representation provides a computable knowledge foundation for test case generation, enabling the generated test cases to closely align with business requirements, have strong business relevance, and clear semantics, thus solving the problems of fragmented information sources and lack of unified knowledge expression in existing technologies.
[0021] (2) This invention automatically identifies patterns related to key PLM risks such as permission matrices, version status control, and concurrent changes based on a knowledge base, and generates targeted test scenarios and test cases accordingly. By integrating preset test methods, such as boundary value analysis and equivalence class partitioning, it generates enhanced test cases for different technical objects, systematically covering business scenarios, code paths, and complex concurrency situations. This can accurately target high-risk scenarios unique to PLM and meet the testing requirements in PLM scenarios.
[0022] (3) This invention backflows the test execution results, including defect type, scope of impact, and number of regressions, into the knowledge base in a structured manner, driving the intelligent agent to automatically improve the coverage of high-risk scenarios and dynamically adjust the priority of test cases in subsequent test case generation. This closed-loop self-evolution mechanism enables the system to learn from continuous testing practices, becoming more intelligent with use, and generating more accurate test cases over time, effectively coping with the continuous iteration of the PLM system, transforming personal experience into organizational assets, and improving the standardization level of testing work. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 Flowchart of the PLM test case generation method based on knowledge base and intelligent agent provided by the present invention; Figure 2 The structural block diagram of the PLM test case generation system based on knowledge base and intelligent agent provided in the embodiments of the present invention.
[0025] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.
[0028] This invention proposes a test case generation method based on knowledge base and intelligent agents in PLM systems, which organically combines PLM domain knowledge graph, vector retrieval, large language model and multi-agent collaboration to build a "digital test team" for PLM projects.
[0029] Figure 1 The flowchart of the PLM test case generation method based on knowledge base and intelligent agent provided by the present invention is shown below. Figure 1 The method includes: Step S1: Receive multi-source input information from the PLM system, parse the multi-source input information, extract business elements and technical constraints, and transform them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts.
[0030] In this embodiment, multi-source input information is received from the PLM system. This multi-source input information is then parsed, extracting business-related elements from natural language requirements and technical constraints from technical design documents and non-textual requirement artifacts. The extracted business elements and technical constraints are integrated and transformed into unified structured knowledge data. This structured knowledge data is the unified data format generated after parsing and extracting business elements and technical constraints from the multi-source input information. In this embodiment, the structured knowledge data uses graph structures such as knowledge graphs as its carrier, providing a unified knowledge foundation for subsequent steps.
[0031] Step S2: Perform semantic retrieval based on the structured knowledge data to match candidate assets from the historical test asset library; sort the candidate assets and output test case recommendation results related to the current requirements.
[0032] Based on the structured knowledge data obtained in step S1, semantic retrieval operations are performed. Candidate assets relevant to the current requirements are matched against the historical test asset repository, which stores past test cases and other assets. The historical test asset repository refers to a database or knowledge base that stores reusable testing knowledge and experience, such as historical test cases, defect reports, and business rule fragments.
[0033] Then, the matched candidate assets are sorted according to their relevance, and the content with high relevance to the current requirement is selected. Finally, the recommended test cases related to the current requirement are output, providing historical asset support for the generation of subsequent test cases.
[0034] Step S3: Based on the structured knowledge data and test case recommendation results, integrate the preset test methods, and automatically generate test cases through the AI generation engine based on the identified PLM domain-specific risk scenarios; Specifically, combining the structured knowledge data from step S1 with the test case recommendation results from step S2, and incorporating pre-defined testing methods, the system identifies risk scenarios specific to the PLM domain and automatically generates test cases using an AI generation engine. These PLM-specific risk scenarios refer to risk-related scenarios unique to PLM systems, such as concurrent changes, access control, and state machine management. The test case generation process is based on PLM business requirements and historical assets to ensure that the test cases align with PLM testing needs.
[0035] Step S4: Convert the generated test cases into executable test scripts and run them, collect the test execution results, and structure the test execution results back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy.
[0036] Specifically, the test cases generated in step S3 are converted into executable test scripts, and the scripts are started to run the tests. During the test, the test execution results are collected, and after the collected results are structured, they are fed back to the knowledge base and the agent. Using the fed-back test execution results, the generation strategy and matching recommendation strategy of subsequent test cases are adjusted and optimized to achieve continuous iteration of the process.
[0037] This invention solves the problem of fragmented test information by parsing and integrating multi-source heterogeneous information in the PLM field into unified structured knowledge. Based on deep semantic retrieval, it enables efficient and intelligent reuse of historical assets, improving the starting point and efficiency of test design. By integrating classic testing methods with PLM-specific risk identification, it drives AI to generate test cases with broad functional coverage and precise risk mitigation capabilities, significantly enhancing the depth and effectiveness of testing. The established execution feedback loop allows the system to continuously learn from testing practice, dynamically optimizing generation and recommendation strategies, achieving adaptive evolution and continuous performance improvement throughout the entire test case generation process.
[0038] In some embodiments of this application, after step S2 outputs the recommended test cases related to the current requirements, the method further includes: The code analysis agent performs static or dynamic analysis on the code repository to obtain code implementation details related to the current requirements. The analysis results are then abstracted into a code technology model and written into a knowledge base. A mapping is established with the structured knowledge data to guide the construction of test cases and the generation of complex scenarios.
[0039] Existing test generation methods primarily rely on high-level descriptions such as requirements documents, making it difficult to delve into the specific code details of the system implementation. This can lead to generated test cases that may not cover underlying technical risks, such as specific API exception handling, database transaction boundaries, and concurrency locking mechanisms. To address this issue, this embodiment introduces a targeted code analysis step after completing intelligent matching based on requirements. This aims to link business requirements with code implementation, model technical constraints and risk patterns at the code level, and provide a precise basis for generating test cases that closely align with the code logic for complex scenarios.
[0040] Specifically, the code analysis agent performs analysis on the PLM system's code repository. The analysis methods include static analysis or dynamic analysis: In static analysis, the code analysis agent does not need to run the code, but directly reads the code modules associated with the current requirements (such as the code files corresponding to BOM management and project changes in PLM), and extracts the code implementation details, including interface definitions, function call relationships, database table structures and field constraints, permission verification logic, exception handling branches, etc.
[0041] Dynamic analysis is an optional operation. When it is necessary to obtain the runtime behavior of the code, the code analysis agent can start the runtime environment of the corresponding code module and monitor real-time information such as data flow, function execution order, and external system interaction (such as interface calls with downstream MES systems) during the runtime process, further supplementing the runtime implementation details not covered by static analysis.
[0042] Throughout the analysis process, we always focus on content relevant to the current requirements, filtering out irrelevant code modules to ensure that the obtained implementation details accurately serve the current test case generation requirements.
[0043] After completing the analysis, the code analysis agent abstracts the extracted code implementation details into a code technology model. The model must include core elements at the code level, such as interface parameter rules, database transaction boundaries, and state variable change logic, and writes the model into the knowledge base. Establish a mapping relationship between the code technical model and structured knowledge data. For example, associate the "BOM version update interface" in the code with the "BOM state machine change rules" in the structured knowledge data, and associate the "permission verification function" in the code with the "role operation permission constraints" in the structured knowledge data. Use this mapping relationship to guide the construction of subsequent test cases: on the one hand, supplement the basic test cases with code-level verification points; on the other hand, generate specialized test cases for complex scenarios derived from the code logic (such as data consistency issues caused by multiple threads calling the same interface, permission verification bypass vulnerabilities), ensuring that the test cases cover both business requirements and code implementation dimensions.
[0044] This embodiment supplements the code implementation details through code analysis, constructs a code technical model, and associates it with structured business knowledge, solving the problem of missed test scenarios caused by the disconnect between requirements and code. This ensures that subsequently generated test cases not only conform to business rules but also match actual code logic, improving coverage of complex scenarios. Simultaneously, it provides code-level verification for test cases, reducing invalid tests caused by test cases being divorced from code implementation, and improving the accuracy and effectiveness of PLM testing.
[0045] In some embodiments of this application, after automatically generating test cases through an AI generation engine in step S3, the method further includes: The recommended test cases and the new test cases generated by AI are reviewed, confirmed and optimized. The confirmed new test cases are saved to the test case library and traceable associations are established with the corresponding original requirements, technical design documents, non-textual requirement artifacts and related code locations.
[0046] It is understandable that test cases generated by AI-generated engines and historically recommended test cases may have issues such as missing assertion conditions, unreasonable test data, and redundancy, and are difficult to fully cover the complete state machine path and potential defect scenarios of PLM business objects. To address this issue, this embodiment combines manual review and optimization with knowledge graph-assisted expansion to fill in test case defects, enrich scenario coverage, and establish a full-link traceable association, ensuring the accuracy, completeness, and manageability of test cases, thus solving the limitations of AI-generated test cases and the lack of asset management.
[0047] First, test engineers conduct a comprehensive review of both historical reused test cases and AI-generated new test cases in the test case recommendation results. Optimization actions are taken for any issues discovered during the review process, including adding assertion conditions to test cases with missing assertions, adjusting test data that does not conform to business logic or technical constraints, and deleting duplicate, redundant, or meaningless test cases.
[0048] Simultaneously, scenario expansion operations are performed based on the knowledge graph. All state machine paths related to the current business object are traversed, clarifying the complete business process corresponding to each path and labeling the user roles, interfaces, and data objects involved in the path. Defect patterns associated with the current business object are matched in the knowledge graph, including types such as unauthorized access, version reference errors, and concurrent modification conflicts. Based on preset rule templates, combined with the traversed state machine paths and matched defect patterns, targeted enhanced test scenarios are automatically expanded, forming a more comprehensive set of test cases. Test engineers review and confirm the expanded test cases again to ensure they meet the testing requirements.
[0049] After being reviewed and confirmed by the test engineer, the newly generated test cases will be automatically saved to the test case library, realizing the asset-based storage of test cases. At the same time, a traceable association is established between the test cases and multi-source original input information and related code locations. The associated objects include the corresponding original requirements, technical design documents, non-textual requirement artifacts, and related code locations, ensuring that each test case can be traced back to the source of its generation, providing support for subsequent test case maintenance, version rollback, and problem localization.
[0050] This embodiment optimizes test case quality by combining manual review with knowledge graph-assisted expansion. It supplements assertion conditions, corrects test data, and eliminates redundant content. Simultaneously, it expands the entire business state machine path and defect-related enhancement scenarios, improving the completeness and relevance of test cases. By establishing a traceable association with the original input and code, it achieves asset-based management of test cases, facilitating subsequent reuse, maintenance, and issue tracing, providing a reliable guarantee for the efficient implementation and continuous optimization of PLM testing.
[0051] In some embodiments of this application, step S1 involves parsing the multi-source input information, extracting business elements and technical constraints, and transforming them into unified structured knowledge data, specifically including: First, natural language processing is performed on the natural language requirements to extract business rules, functional points, user roles, and business processes, transforming the originally unstructured text requirements into standardized structured information.
[0052] Next, the technical design document was analyzed to fully extract the technical constraints, interface definitions, data flow and state transition information, clarify the core technical elements of the PLM system implementation layer, and provide a basis for the technical details verification of subsequent test cases.
[0053] Then, specific analysis is performed on non-textual requirement artifacts. For image artifacts, graphic structure recognition and text extraction operations are performed to extract interface elements, process nodes, and the connection relationships between nodes. For video artifacts, speech recognition and keyframe extraction operations are performed to extract operation step sequences and interface state change sequences, ensuring that the core requirement elements in non-textual information are not missed.
[0054] Subsequently, all parsing results from natural language requirements, technical design documents, and non-textual requirement artifacts are integrated and uniformly mapped into graph-structured data representing roles, business objects, operations, constraints, and state machines, thereby achieving a unified structured representation of multi-source information.
[0055] Furthermore, for lengthy requirement or design documents, this embodiment automatically divides the document content into logically independent modular paragraph units based on the document's chapter heading structure and semantic similarity between paragraphs. For each requirement or design item, its hash value is calculated as a unique fingerprint for that item, and an item-level index is established. This indexing mechanism enables efficient incremental parsing when processing new versions of the document, quickly locating newly added, deleted, or modified items by comparing hash values, thereby avoiding full-scale repetitive processing and achieving rapid knowledge synchronization and updates.
[0056] This invention parses multi-source input information, such as natural language requirements, technical design documents, and non-textual requirement artifacts, into unified structured knowledge data. Using a knowledge base as a carrier, it connects multiple sources of knowledge, including business rules, state machines, code implementations, historical test cases, and defect reports. This unified knowledge representation provides a computable knowledge foundation for test case generation, enabling the generated test cases to closely align with business requirements, exhibit strong business relevance, and clear semantics. This solves the problems of fragmented information sources and a lack of unified knowledge expression in existing technologies.
[0057] In some embodiments of this application, step S2 involves performing semantic retrieval based on the structured knowledge data to match candidate assets from the historical test asset database; sorting the candidate assets and outputting test case recommendation results related to the current requirements, specifically including the following steps S21~S23: S21, the structured knowledge data and the content in the historical test asset library are vectorized using an encoding model, and the business object type, state machine identifier and structural features of the module to which it belongs are incorporated in the vectorization process.
[0058] Over the long-term iteration of PLM systems, a large number of historical test cases, defect reports, and other assets have been accumulated. However, traditional keyword-based retrieval methods struggle to understand the deep business semantics of new requirements, resulting in low asset reuse rates and requiring testers to design numerous test cases from scratch. To address this issue, this embodiment utilizes deep semantic understanding and intelligent sorting to proactively and accurately extract reusable test knowledge from the historical asset repository. This transforms historical experience into directly usable test productivity, avoiding repetitive work and improving the consistency and quality of test design.
[0059] Specifically, the first step is vectorization. Vectorization refers to the process of converting unstructured or semi-structured data, such as text and graph structures, into fixed-dimensional numerical vectors through an encoding model. In this embodiment, a dual-tower encoding model is used. One encoding tower is dedicated to processing the structured knowledge data of the current requirement, while the other encoding tower is used to process various contents stored in the historical test asset library, including descriptions of historical test cases, defect report details, and extracted business rule fragments. During the vectorization process, the strong semantic structural features contained in the structured knowledge data, such as business object types, unique state machine identifiers, and functional modules, are consciously incorporated into the final generated vector representation through feature encoding technology. This ensures that the vector not only carries textual semantics but also contains key domain structural information. After vectorization, the current requirement is represented as a query vector.
[0060] S22, the initial candidate assets are obtained by using an approximate nearest neighbor retrieval method in the vector database.
[0061] Specifically, in a pre-indexed vector database, an approximate nearest neighbor retrieval algorithm is used to quickly find the K most similar historical asset vectors to the query vector in the vector space, forming initial candidate assets. This ensures high recall during the retrieval process and avoids missing potentially usable historical test assets. Approximate nearest neighbor retrieval is an algorithm that quickly searches for the K most similar vectors to the target vector in a high-dimensional vector space. It sacrifices a small amount of precision in exchange for a much faster retrieval speed than precisely calculating all distances.
[0062] S23, a re-ranking model is introduced to refine the initial candidate assets. The refinement combines structured features such as path length, state machine sharing relationship and defect pattern matching relationship in the knowledge graph to generate a comprehensive score. The recommendation results are output after ranking according to the score.
[0063] Among them, the reordering model refers to a model that refines and re-ranks the candidate result list obtained from the initial retrieval. It typically utilizes more complex calculations or richer features to improve the relevance of the ranked results to the target requirements.
[0064] In this embodiment, a reordering model is introduced to refine the initial candidate set. This model employs a cross-encoder architecture, simultaneously inputting a textual description of the current requirement and a description of a candidate asset into the model for deep interactive computation, resulting in a model score based on semantic closeness. Next, structured features relevant to both the current requirement and the candidate asset are extracted from the knowledge graph, such as the length of their association path in the knowledge graph, whether they involve or share the same business state machine, and whether they match the same historical defect pattern. These structured features are calculated and normalized, then weighted and fused with the model score from the cross-encoder to form a comprehensive score. In this way, the comprehensive score reflects both semantic relevance and structural association strength in the knowledge graph. The comprehensive score is calculated sequentially for all initial candidate assets, and they are finally sorted from highest to lowest score, outputting a precise list of test case recommendations highly relevant to the current requirement.
[0065] This embodiment incorporates PLM domain structural features into vectorization, combined with an approximate nearest neighbor retrieval and reordering model. This ensures both high recall of historical test assets and significantly improves the accuracy of recommendation results. It achieves efficient accumulation and reuse of historical test assets, reduces repetitive test case construction work, provides high-quality references for subsequent AI-generated test cases, saves testing resources and time costs, and aligns with the characteristics of PLM business structure, making recommendation results more relevant to actual testing needs.
[0066] In some embodiments of this application, step S3 involves fusing preset testing methods with the structured knowledge data and test case recommendation results, and automatically generating test cases using an AI generation engine based on the identified PLM domain-specific risk scenarios. This specifically includes the following steps S31-S33: S31, Based on the preset testing method, generate basic test inputs and combinations by combining the structured knowledge data; wherein, the testing method includes boundary value analysis, equivalence class partitioning, scenario-based testing, and decision table-driven testing.
[0067] Existing general test generation solutions are insufficient for a deep understanding and modeling of the complex business rules and technical risks unique to PLM systems. The generated test cases often remain at the functional level and lack specificity for key issues such as deep concurrency conflicts, access control vulnerabilities, and state consistency.
[0068] Therefore, this embodiment combines domain knowledge, historical experience, and multiple generation strategies to drive AI to not only generate use cases that cover basic functions, but also to proactively construct high-value test scenarios that can accurately target the core risk points of PLM and are in line with actual technical implementation.
[0069] In this embodiment, four preset testing methods—boundary value analysis, equivalence class partitioning, scenario-based testing, and decision table-driven testing—are integrated. These methods, combined with the structured knowledge data generated in step S1 and the PLM domain knowledge base, generate basic test inputs and combinations with high coverage potential. Boundary value analysis, equivalence class partitioning, scenario-based testing, and decision table-driven testing are all classic software test design methods used to systematically design test inputs and scenarios to ensure coverage of various normal, abnormal, and boundary conditions.
[0070] Based on the business rules, technical constraints, and state transition information in the structured knowledge data, the boundaries of key parameters are determined through boundary value analysis, valid and invalid inputs are classified through equivalence class division, the complete business process is sorted out through scenario method, and the correspondence between conditions and actions is clarified through decision table drive, forming a comprehensive set of basic test inputs.
[0071] S32 generates enhanced test cases for different technical objects, including: test cases for the validity of interface parameters, boundary values and missing fields, test cases for database transactions such as transaction commit failure, abnormal rollback and concurrent update conflict, and test cases for business state machines covering all state paths.
[0072] Specifically, based on the technical models obtained from code analysis and historical defect information from the knowledge base, specific risk scenarios in the PLM domain are proactively identified, and targeted enhanced test cases are generated. This includes simulating multiple threads accessing the same resource simultaneously to construct test cases for high-concurrency creation, modification, or approval operations; constructing large-scale data submission and batch processing scenarios to generate test cases verifying the system's performance and stability under high load; and generating security-related test cases such as horizontal and vertical privilege escalation based on the PLM permission model. Simultaneously, specialized enhanced test cases are generated for technical objects such as interfaces, database transactions, and business state machines: for interfaces, test cases related to parameter validity, boundary values, and missing fields are generated; for database transactions, test cases related to commit failure, abnormal rollback, and concurrent update conflicts are generated; and for business state machines, full-path test cases covering normal paths, abnormal paths, and boundary states are generated.
[0073] S33, the highly relevant content in the test case recommendation results is obtained through the retrieval module as knowledge context and input into the AI generation engine to assist in generating new test cases.
[0074] Specifically, the retrieval module calls the test case recommendation results output in step S2, filtering out historical test cases, defect reports, and business rule fragments that are highly relevant to the current requirements. These retrieval results are compressed and used as knowledge context input to the AI generation engine, assisting the engine in generating new test scenarios and test cases. By integrating historical testing experience and business rules, the business fit and technical accuracy of the generated test cases are improved, ensuring that the newly generated test cases conform to both PLM business logic and actual code implementation.
[0075] This invention automatically identifies patterns related to key PLM risks such as permission matrices, version status control, and concurrent changes based on a knowledge base, and generates targeted test scenarios and test cases accordingly. By integrating preset testing methods, such as boundary value analysis and equivalence class partitioning, it generates enhanced test cases for different technical objects, systematically covering business scenarios, code paths, and complex concurrency situations. This allows for precise targeting of high-risk scenarios unique to PLM, meeting the testing requirements of PLM scenarios.
[0076] In some embodiments of this application, step S4 involves structurally feeding the test execution results back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy. Specifically, this includes the following steps S41-S43: S41 automatically assembles the generated test cases into a test plan and maps them into automated test scripts, triggering the test execution framework to run.
[0077] In this embodiment, all generated test cases are automatically assembled into a complete test plan according to business scenarios, test priorities, and execution dependencies, ensuring the orderly progress of the testing process. Based on the test case content in the test plan, it is automatically mapped and transformed into automated test scripts that can be recognized and run by the test execution framework. The scripts contain core elements such as test steps, input data, and expected results. After the script is generated, the test execution framework is automatically triggered to start running without manual intervention, thus automating test execution.
[0078] S42, collect code coverage data, performance metrics and defect information during test execution, including defect type, scope of impact and associated business objects.
[0079] Specifically, during the operation of the test execution framework, multi-dimensional test execution results are collected simultaneously. First, code coverage data is collected to quantify the coverage of test cases on the PLM system's code logic. Second, performance metrics are recorded to capture the system's operational efficiency and stability under test loads. Third, defect information is collected, detailing defect types such as functional anomalies, performance bottlenecks, and access vulnerabilities, clarifying the scope of defect impact such as involved business modules and user groups, as well as related business objects such as BOM data and engineering change orders, ensuring complete and traceable defect information.
[0080] S43, the collected test execution results are structured and stored in the knowledge base, and synchronized to the AI generation engine and related intelligent agents to adjust the priority of test case generation, optimize risk scenario identification rules, and update the feature weights used for matching recommendations.
[0081] The collected code coverage data, performance metrics, and defect information are structured according to a unified standard, organized into a format that meets the requirements of the knowledge base, and then stored in the knowledge base. Simultaneously, the structured test execution results are synchronized to the AI generation engine and related intelligent agents. Based on this feedback, multi-dimensional optimizations are carried out: adjusting the priority of test case generation according to defect distribution, prioritizing coverage of high-defect-rate business scenarios; optimizing the identification rules for specific risk scenarios in the PLM domain by combining the correlation between defect types and risk scenarios; and updating the feature weights used for matching recommendations based on historical asset reuse effects to improve the accuracy of subsequent retrieval and recommendations.
[0082] This invention provides a structured feedback loop of test execution results, including defect type, impact scope, and regression count, into a knowledge base. This drives the intelligent agent to automatically increase coverage of high-risk scenarios and dynamically adjust test case priorities in subsequent test case generation. This closed-loop self-evolutionary mechanism enables the system to learn from continuous testing practices, becoming increasingly intelligent with use. The generated test cases become more accurate over time, effectively addressing the continuous iteration of PLM systems, transforming personal experience into organizational assets, and improving the standardization of testing work.
[0083] In some embodiments of this application, the specific application of the present invention can be described through the following implementation steps: Step 1: Input of Requirements and AI Analysis The input section includes a detailed requirement description and pre-built common test assets. The requirement description is: design engineers can create new bills of materials (BOMs) and submit them to the project manager for approval. Only BOMs in the published state can be referenced by downstream production systems. Common test assets refer to pre-built PLM-related testing methodologies, such as state machine coverage, permission matrix verification, and data consistency checks.
[0084] AI-powered analysis and structured processing are specific to the PLM (Product Lifecycle Management) field. First, domain entity recognition is performed. A natural language processing model is used to semantically understand the requirements, extracting core business objects (i.e., the Bill of Materials, BOM), relevant roles (design engineers and project managers), key operations (creation, submission for approval, referencing), and related states (draft, pending approval, published). The corresponding state machine is then derived. Simultaneously, business rules are extracted, resulting in three core rules: Rule 1, design engineers can create BOMs; Rule 2, BOMs must be approved by the project manager; Rule 3, only BOMs in the published state can be referenced by the production system. Based on this information, a simplified state machine path for the BOM is derived: from the draft state, through the submission operation, it enters the pending approval state, and then through the approval operation, it reaches the published state.
[0085] The final output of the parsing process is structured JSON-LD (JavaScript Object Notation for Linked Data) format data, which clearly describes elements such as roles, objects, rules, and state machines, and completes vectorized representation for subsequent use.
[0086] Step 2: Match existing test cases First, vector matching is performed. The structured requirement elements parsed in step one are vectorized using a Bi-Encoder model. Bi-Encoder is a model that can simultaneously consider contextual information during encoding. Then, a historical test case library is retrieved from the vector database to find test cases relevant to the current requirement semantics.
[0087] Subsequently, the data is rearranged and scored. A cross-encoder model is used to finely sort the retrieved historical use cases, and a comprehensive score is calculated for each candidate use case based on structured features such as state machine path length, shared business objects, and involved roles. For example, it might match the submission and approval process of a historical use case ECN (Engineering Change Notice), because both involve the state transition of submission and approval; it might also match a document release state verification use case, because both involve rules for state control access.
[0088] The final output is a recommended reuse list. These highly relevant use cases are highlighted, and specific suggestions are given, such as reusing the permission verification step in the engineering change notification submission approval use case, and reusing the status verification logic in the document release use case.
[0089] Step 3: Generate test cases For the parts that are not fully covered after matching in step two, such as the data consistency verification specific to the bill of materials, the AI generation engine is activated.
[0090] The generation process integrates multiple technical actions. First, there is state machine coverage driven by a methodology, generating use cases that cover all possible state paths of the bill of materials, including normal paths (creating a draft, submitting for approval, and approving publication) and abnormal paths (creating a draft, submitting for approval, and rejecting and returning to draft). Simultaneously, according to business rule three, negative test cases are generated, such as attempting to reference a bill of materials in a draft state, which the system should reject.
[0091] Secondly, it addresses key concurrency and other contextual scenarios in PLM construction. AI proactively identifies classic contextual concurrency risks, such as scenario one: two engineers simultaneously modifying different components of the same bill of materials (BOM), leading to data update conflicts; and scenario two: at the same moment the project manager approves the BOM, a design engineer withdraws their submission, resulting in a race condition in the approval status. For scenario one, a concurrency test script is automatically built. The precondition is the creation of a BOM simultaneously accessed by user A and user B. The test steps are: user A modifies component X and saves, and user B modifies component Y and saves almost simultaneously. The expected result is that the system should handle the situation correctly, for example, by employing optimistic locking mechanisms, providing clear prompts, and ensuring the integrity and accuracy of the BOM data.
[0092] The output of this step is a series of structured test cases, including JSON request bodies for API testing and automated scripts for user interface testing.
[0093] Step 4: Confirm synchronization The input for this step is AI-generated concurrent test cases, which are reviewed by test engineers. The test engineers focus on reviewing the AI-generated concurrent approval status race scenarios on the user interface to confirm their logical correctness. Subsequently, the engineer clicks "Confirm Synchronization" to perform association and storage operations: the new test case, such as a concurrent modification test of the bill of materials, is stored in the PLM test case library; a business tag is added to the test case, such as bill of materials, creation, concurrency, and state machine; and a verified association relationship is established in the knowledge graph between the test case and nodes such as the bill of materials business object and the design engineer role.
[0094] Step 5: Testing and Feedback Once confirmed, the test cases will be automatically executed. Upon receiving instructions to create and approve the test bill of materials (BOM), the system automatically searches the test case library for all test cases with the BOM and "create" tags, including the newly generated concurrent test cases. These are then assembled into a test suite and automatically executed via the CI / CD (Continuous Integration and Continuous Delivery) pipeline. For concurrent scenarios, the automated test client will run synchronously to simulate concurrent modification operations.
[0095] After execution, detailed results, including code coverage, performance metrics, and defect information, are collected. These feedback results are fed back to the AI generation engine and code analysis agent to dynamically adjust and optimize subsequent generation strategies. Based on the test results, the model can automatically optimize scene generation rules and risk identification rules, thereby achieving closed-loop learning and continuous evolution.
[0096] Figure 2 The structural block diagram of the PLM test case generation system based on knowledge base and intelligent agent provided in the embodiments of the present invention is shown below. Figure 2 The PLM test case generation system 200 based on knowledge base and intelligent agents includes: The information parsing module 201 is used to receive multi-source input information from the PLM system, parse the multi-source input information, extract business elements and technical constraints, and transform them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; The intelligent matching and recommendation module 202 is used to perform semantic retrieval based on the structured knowledge data, match candidate assets from the historical test asset library, sort the candidate assets, and output test case recommendation results related to the current requirements. The test case generation module 203 is used to automatically generate test cases through an AI generation engine based on the structured knowledge data and test case recommendation results, by integrating preset test methods and based on the identified specific risk scenarios in the PLM field. The execution and feedback module 204 is used to convert the generated test cases into executable test scripts and run them, collect test execution results, and structure the test execution results back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy.
[0097] The PLM test case generation system based on knowledge base and intelligent agent provided by the present invention is used to execute the PLM test case generation method based on knowledge base and intelligent agent provided in the foregoing embodiments. The PLM test case generation method based on knowledge base and intelligent agent has been described in detail in the above embodiments, and will not be repeated here.
[0098] In some embodiments of this application, the PLM test case generation system based on knowledge base and intelligent agent further includes: The code analysis module is used by a code analysis intelligence agent to perform static or dynamic analysis on the code repository, obtain code implementation details related to the current requirements, abstract the analysis results into code technology models and write them into a knowledge base, and establish a mapping with the structured knowledge data to guide the construction of test cases and the generation of complex scenarios.
[0099] The test case management module is used to review, confirm, and optimize the recommended test cases and new test cases generated by AI. The confirmed new test cases are saved to the test case library and a traceable association is established with the corresponding original requirements, technical design documents, non-textual requirement artifacts, and related code locations.
[0100] Figure 3 A structural block diagram of the electronic device provided by the present invention, such as Figure 3 As shown, the present invention also provides an electronic device, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 300 includes a processor 301 and a memory 302, wherein the memory 302 stores a PLM test case generation program 303 based on a knowledge base and intelligent agents.
[0101] In some embodiments, memory 302 may be an internal storage unit of a computer device, such as a hard drive or memory. In other embodiments, memory 302 may be an external storage device of a computer device, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 302 may include both internal and external storage units of the computer device. Memory 302 is used to store application software and various types of data installed on the computer device, such as program code for installing the computer device. Memory 302 can also be used to temporarily store data that has been output or will be output. In one embodiment, when the knowledge base and agent-based PLM test case generation program 303 is executed by processor 301, the following steps are implemented: The system receives multi-source input information from the PLM system, parses the multi-source input information, extracts business elements and technical constraints, and transforms them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; Based on the structured knowledge data, semantic retrieval is performed to match candidate assets from the historical test asset library; the candidate assets are sorted, and test case recommendation results related to the current requirements are output. Based on the structured knowledge data and test case recommendation results, the preset test methods are integrated, and test cases are automatically generated through an AI generation engine based on the identified specific risk scenarios in the PLM field. The generated test cases are converted into executable test scripts and run. The test execution results are collected and then structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and the matching recommendation strategy.
[0102] In some embodiments, processor 301 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 302 or process data, such as executing a PLM test case generation program based on knowledge base and intelligent agent.
[0103] This embodiment also provides a computer-readable storage medium storing a PLM test case generation program based on a knowledge base and intelligent agents. When the PLM test case generation program based on a knowledge base and intelligent agents is executed by a processor, it performs the following steps: The system receives multi-source input information from the PLM system, parses the multi-source input information, extracts business elements and technical constraints, and transforms them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; Based on the structured knowledge data, semantic retrieval is performed to match candidate assets from the historical test asset library; the candidate assets are sorted, and test case recommendation results related to the current requirements are output. Based on the structured knowledge data and test case recommendation results, the preset test methods are integrated, and test cases are automatically generated through an AI generation engine based on the identified specific risk scenarios in the PLM field. The generated test cases are converted into executable test scripts and run. The test execution results are collected and then structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and the matching recommendation strategy.
[0104] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A PLM test case generation method based on knowledge base and intelligent agent, characterized in that, include: The system receives multi-source input information from the PLM system, parses the multi-source input information, extracts business elements and technical constraints, and transforms them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; Based on the structured knowledge data, semantic retrieval is performed to match candidate assets from the historical test asset library; the candidate assets are sorted, and test case recommendation results related to the current requirements are output. Based on the structured knowledge data and test case recommendation results, the preset test methods are integrated, and test cases are automatically generated through an AI generation engine based on the identified specific risk scenarios in the PLM field. The generated test cases are converted into executable test scripts and run. The test execution results are collected and then structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and the matching recommendation strategy.
2. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, After outputting recommended test cases relevant to the current requirements, the method further includes: The code analysis agent performs static or dynamic analysis on the code repository to obtain code implementation details related to the current requirements. The analysis results are then abstracted into a code technology model and written into a knowledge base. A mapping is established with the structured knowledge data to guide the construction of test cases and the generation of complex scenarios.
3. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, After automatically generating test cases using an AI-powered engine, the method further includes: The recommended test cases and the new test cases generated by AI are reviewed, confirmed and optimized. The confirmed new test cases are saved to the test case library and traceable associations are established with the corresponding original requirements, technical design documents, non-textual requirement artifacts and related code locations.
4. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, The multi-source input information is parsed to extract business elements and technical constraints, and then transformed into unified structured knowledge data, including: Perform natural language processing on natural language requirements to extract business rules, functional points, user roles, and business processes; Analyze the technical design documents to extract technical constraints, interface definitions, data flow and state transition information; The non-textual requirement artifacts are parsed, including graphic structure recognition and text extraction for image artifacts, and speech recognition and keyframe extraction for video artifacts, in order to extract interface elements, operation steps and state change sequences. All parsing results are uniformly mapped into graph-structured data representing roles, business objects, operations, constraints, and state machines.
5. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, Semantic retrieval is performed based on the structured knowledge data to match candidate assets from the historical test asset database; The candidate assets are sorted, and test case recommendations relevant to the current requirements are output, including: The structured knowledge data and the content in the historical test asset library are vectorized using an encoding model, and the structural features of business object type, state machine identifier and module to which they belong are incorporated into the vectorization process. Initial candidate assets are obtained by using an approximate nearest neighbor retrieval method in the vector database; A re-ranking model is introduced to refine the initial candidate assets. The refinement combines structured features such as path length, state machine sharing relationship and defect pattern matching relationship in the knowledge graph to generate a comprehensive score. The recommendation results are then output after ranking based on the scores.
6. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, Based on the structured knowledge data and test case recommendation results, and integrating preset testing methods, test cases are automatically generated through an AI generation engine based on the identified PLM-specific risk scenarios, including: Based on the preset testing methods, basic test inputs and combinations are generated by combining the structured knowledge data; wherein, the testing methods include boundary value analysis, equivalence class partitioning, scenario-based testing, and decision table-driven testing. Generate enhanced test cases for different technical objects, including: test cases for the validity of interface parameters, boundary values and missing fields, test cases for database transactions such as transaction commit failure, abnormal rollback and concurrent update conflict, and test cases for business state machines that cover all state paths. The retrieval module obtains highly relevant content from the test case recommendation results as knowledge context, which is then input into the AI generation engine to assist in generating new test cases.
7. The PLM test case generation method based on knowledge base and intelligent agent according to claim 1, characterized in that, The test execution results are structured and fed back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy, including: The generated test cases are automatically assembled into test plans and mapped to automated test scripts, triggering the test execution framework to run. Collect code coverage data, performance metrics, and defect information during test execution. The defect information includes defect type, scope of impact, and associated business objects. The collected test execution results are structured and stored in a knowledge base, and synchronized to the AI generation engine and related intelligent agents to adjust the priority of test case generation, optimize risk scenario identification rules, and update the feature weights used for matching recommendations.
8. A PLM test case generation system based on knowledge base and intelligent agent, the system being used to execute the PLM test case generation method based on knowledge base and intelligent agent as described in any one of claims 1-7, characterized in that, The system includes: The information parsing module is used to receive multi-source input information from the PLM system, parse the multi-source input information, extract business elements and technical constraints, and transform them into unified structured knowledge data; wherein, the multi-source input information includes natural language requirements, technical design documents, and non-textual requirement artifacts; The intelligent matching and recommendation module is used to perform semantic retrieval based on the structured knowledge data, match candidate assets from the historical test asset library, sort the candidate assets, and output test case recommendation results related to the current requirements. The test case generation module is used to automatically generate test cases based on the structured knowledge data and test case recommendation results, integrate preset test methods, and based on the identified specific risk scenarios in the PLM field, through an AI generation engine. The execution and feedback module is used to convert the generated test cases into executable test scripts and run them, collect the test execution results, and structure the test execution results back to the knowledge base and the agent to optimize the test case generation strategy and matching recommendation strategy.
9. An electronic device, Its features are, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the PLM test case generation method based on knowledge base and agent as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the PLM test case generation method based on knowledge base and intelligent agent as described in any one of claims 1 to 7.