Test document updating method and device, electronic equipment and storage medium

By constructing a global traceability graph and a document generation intelligent agent, the problem of synchronous updating of test documents when software projects change is solved. This achieves real-time, automated synchronization of test documents and dynamic maintenance of traceability relationships, ensuring the timeliness and traceability of test documents.

CN122450484APending Publication Date: 2026-07-24BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2026-06-12
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, when software projects undergo changes, relevant test documents are difficult to update in a timely manner, resulting in outdated content, broken traceability relationships, and an inability to provide a reliable basis for project auditing, change impact analysis, and quality assessment.

Method used

By constructing a global traceability graph, the system automatically locates target entities affected by changes using project data and initiates corresponding document generation agents, enabling real-time and automated synchronous updates of test documents and the global traceability graph.

Benefits of technology

It enables real-time and automated synchronization of test document content, ensuring that the traceability relationship between documents remains dynamic and continuously authentic and effective, and guaranteeing the timeliness, consistency, and traceability of test documents to the actual project status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122450484A_ABST
    Figure CN122450484A_ABST
Patent Text Reader

Abstract

The application provides a test document updating method and device, electronic equipment and storage medium. The method comprises: acquiring project data related to a software project; constructing a project knowledge base and a global traceability graph based on the project data, wherein a node in the global traceability graph represents different entities in a test life cycle, and an edge represents a traceability relationship between entities; when a change event representing a change in the software project is monitored, the global traceability graph is used as an index to locate a target entity affected by the change event; based on the project knowledge base, at least one document generation agent corresponding to the target entity is started to update the test document related to the target entity; and the global traceability graph is updated according to the updated test document. The mechanism guarantees the timeliness, consistency and traceability of the test document and the actual state of the project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Software testing is a crucial step in ensuring software product quality and verifying the fulfillment of requirements. This process generates and relies on a series of interrelated documents, such as requirement specifications, test plans, test cases, defect reports, and test summary reports. As software development models evolve towards agile, continuous integration, and continuous delivery, software requirements, design, and code changes are becoming increasingly frequent, placing extremely high demands on the timeliness, accuracy, and synchronization of testing activities with the development process.

[0003] A typical existing technical solution utilizes natural language processing (NLP) technology to automatically analyze plain text-based requirements specifications. This solution extracts key entities and operational verbs from the requirements text and matches them with predefined test case templates or rule bases to automatically generate structured test case drafts or test scenario lists, thereby assisting test designers in completing the initial document writing work.

[0004] However, in such existing solutions, when software projects change, the relevant test documents (such as test plans and test cases) are difficult to update in a timely and synchronous manner. This causes the content of the test documents to gradually lag behind the actual state of the project, and the traceability relationship between documents is broken or invalidated as a result, making it impossible to provide a reliable basis for project auditing, change impact analysis, and quality assessment. Summary of the Invention

[0005] This application provides a test document updating method, apparatus, electronic device, and storage medium to solve the problem in the prior art that when software projects undergo changes, the relevant test documents are difficult to update in a timely manner, resulting in content lag, broken traceability relationships, and an inability to provide a reliable basis for project auditing, change impact analysis, and quality assessment.

[0006] Firstly, this application provides a method for updating test documents, including: Obtain project data related to the software project; Based on the project data, a project knowledge base and a global traceability graph are constructed. The nodes in the global traceability graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. When a change event that represents a change in the software project is detected, the target entity affected by the change event is located using the global traceability graph as an index. Based on the project knowledge base, at least one document generation agent corresponding to the target entity is activated to update the test documents related to the target entity; The global traceability graph is updated based on the updated test documentation.

[0007] In one possible implementation, the step of constructing a project knowledge base and a global traceability graph based on the project data includes: Multimodal information extraction is performed on the project data to obtain structured semantic information; The structured semantic information is stored in the project knowledge base, and the global traceability relationship graph is constructed based on the entities and relationships between entities in the structured semantic information.

[0008] In one possible implementation, the step of extracting multimodal information from the project data to obtain structured semantic information includes: Image recognition is performed on the images corresponding to the project data to extract text information from the project data and identify interface elements and layout relationships in the project data; Natural language processing is performed on the text information in the project data to identify the business entities, relationships between entities, and business constraints in the project data; The structured semantic information is generated based on the text information, the interface elements, the layout relationships, the business entities, the relationships between entities, and the business constraints.

[0009] In one possible implementation, the method further includes: Monitor change notification messages for multiple tools in the software project; The multiple monitored change notification messages are normalized to extract the change subject identifier and structured difference information; Based on the change subject identifier and the structured difference information, the structured change event is generated.

[0010] In one possible implementation, locating the target entity affected by the change event using the global traceability graph as an index includes: The change subject identifier is parsed from the change event; In the global traceability graph, the change node corresponding to the change event is determined based on the change subject identifier; Starting from the changed node, traverse along the traceability edges in the global traceability graph, and determine the node reached by the traversal as the target entity.

[0011] In one possible implementation, the step of activating at least one document generation agent corresponding to the target entity based on the project knowledge base to update test documents related to the target entity includes: Based on the type of the target entity, determine the type of agent that needs to perform the update task; The agent corresponding to the agent type is identified as the document generation agent to be launched; Configure task parameters for the document generation agent, wherein the task parameters include the structured difference information parsed from the change event; The document generation agent is activated so that it updates the test document related to the target entity based on the task parameters and context information retrieved from the project knowledge base.

[0012] In one possible implementation, updating the global tracing relationship graph based on the updated test document includes: Parse the updated test document to identify any new entities and / or changed traceability relationships involved in the test document; Based on the newly added entity and / or the traceability relationship, create new nodes and / or update the edges between existing nodes in the global traceability relationship graph.

[0013] Secondly, this application provides a test document updating device, comprising: The acquisition module is used to acquire project data related to the software project; The construction module is used to build a project knowledge base and a global traceability relationship graph based on the project data. The nodes in the global traceability relationship graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. The positioning module is used to locate the target entity affected by the change event when a change event representing a change in the software project is detected, using the global traceability graph as an index. The first update module is used to start at least one document generation agent corresponding to the target entity based on the project knowledge base, so as to update the test documents related to the target entity; The second update module is used to update the global traceability graph based on the updated test documents.

[0014] In one possible implementation, the building module is specifically used for: Multimodal information extraction is performed on the project data to obtain structured semantic information; The structured semantic information is stored in the project knowledge base, and the global traceability relationship graph is constructed based on the entities and relationships between entities in the structured semantic information.

[0015] In one possible implementation, the building module is further configured to: Image recognition is performed on the images corresponding to the project data to extract text information from the project data and identify interface elements and layout relationships in the project data; Natural language processing is performed on the text information in the project data to identify the business entities, relationships between entities, and business constraints in the project data; The structured semantic information is generated based on the text information, the interface elements, the layout relationships, the business entities, the relationships between entities, and the business constraints.

[0016] In one possible implementation, the apparatus further includes a generation module for: Monitor change notification messages for multiple tools in the software project; The multiple monitored change notification messages are normalized to extract the change subject identifier and structured difference information; Based on the change subject identifier and the structured difference information, the structured change event is generated.

[0017] In one possible implementation, the positioning module is specifically used for: The change subject identifier is parsed from the change event; In the global traceability graph, the change node corresponding to the change event is determined based on the change subject identifier; Starting from the changed node, traverse along the traceability edges in the global traceability graph, and determine the node reached by the traversal as the target entity.

[0018] In one possible implementation, the first update module is specifically used for: Based on the type of the target entity, determine the type of agent that needs to perform the update task; The agent corresponding to the agent type is identified as the document generation agent to be launched; Configure task parameters for the document generation agent, wherein the task parameters include the structured difference information parsed from the change event; The document generation agent is activated so that it updates the test document related to the target entity based on the task parameters and context information retrieved from the project knowledge base.

[0019] In one possible implementation, the second update module is configured to: Parse the updated test document to identify any new entities and / or changed traceability relationships involved in the test document; Based on the newly added entity and / or the traceability relationship, create new nodes and / or update the edges between existing nodes in the global traceability relationship graph.

[0020] Thirdly, this application provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute a test document update program stored in the memory to implement the test document update method described in any one of the first aspects.

[0021] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the test document update method described in any one aspect.

[0022] Compared with the prior art, the technical solution provided in this application has the following advantages: When a software project changes, the method provided in this application uses a global traceability graph constructed based on project data related to the software project as an analysis index to automatically locate target entities directly affected or indirectly related to the change, thereby accurately defining the scope of the change's impact and solving the problems of incomplete and inaccurate manual analysis. Next, based on the project knowledge base constructed based on project data related to the software project, a document generation agent matching the target entity type is activated in a targeted manner. This agent automatically performs the generation or updating of relevant test documents, achieving real-time and automated synchronization of test document content and effectively overcoming the lag caused by traditional manual update methods. Finally, based on the updated test document content, the global traceability graph is synchronously updated to ensure that the traceability relationships between documents can dynamically and continuously remain true and effective. Thus, the entire test document system can intelligently and collaboratively respond to project changes, ensuring the timeliness, consistency, and traceability of test documents to the actual project status from a mechanism perspective. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0024] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0026] Figure 1 A flowchart illustrating an embodiment of a test document update method provided in this application; Figure 2 A flowchart illustrating an embodiment of another test document updating method provided in this application; Figure 3 A flowchart illustrating another embodiment of a test document updating method provided in this application; Figure 4 A flowchart illustrating another embodiment of a test document updating method provided in this application; Figure 5 A schematic diagram of a test document end-to-end automated update system architecture is provided for embodiments of this application; Figure 6 A block diagram illustrating an embodiment of a test document updating device provided in this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, 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.

[0028] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0029] To address the technical problem in existing technologies where related test documents are difficult to update in a timely manner when software projects undergo changes, resulting in outdated content, broken traceability, and an inability to provide reliable evidence for project auditing, change impact analysis, and quality assessment, this application provides a test document updating method that enables the entire test document system to respond intelligently and collaboratively to project changes, thereby ensuring the timeliness, consistency, and traceability of test documents to the actual project status.

[0030] Figure 1 This is a flowchart illustrating an embodiment of a test document update method provided in this application. Figure 1 As shown, the method includes the following steps: Step 101: Obtain project data related to the software project.

[0031] Software project: refers to the sum of a series of planning, design, development, testing and maintenance activities carried out to realize a specific software product. Its outputs include runnable programs, related documents and data.

[0032] Project data refers to all original materials involved in the software testing lifecycle described above, which vary in modality and source. Specifically, it includes, but is not limited to: PRD (Product Requirements Document), User Stories, and other documents describing business requirements; UI (User Interface) or UX (User Experience) design drafts and other visual design materials; API (Application Programming Interface) definition files (such as Swagger, OpenAPI specification) and code files in the program source code repository; existing test case libraries, test plans, and other historical test assets; defect reports, statuses, and related information in defect management systems (such as Jira, Bugzilla); and dynamic information related to quality, such as user feedback and runtime logs.

[0033] In this embodiment, this step is implemented by deploying a unified input source adapter or interface. These adapters are configured for data sources of different sources and formats (such as document collaboration platforms, version control systems, project management tools, test management tools, and defect tracking systems) to collect or receive project data through polling, subscription, or push notifications, and then aggregate and convert it into a unified format that can be processed by subsequent modules, thereby providing a complete and original material foundation for building a comprehensive project knowledge base.

[0034] Step 102: Construct a project knowledge base and a global traceability graph based on the project data. The nodes in the global traceability graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities.

[0035] Project knowledge base: This refers to a storage system used to centrally store, organize, and manage structured semantic information extracted from project data. The knowledge base is designed to support efficient information retrieval, related queries, and knowledge reuse.

[0036] Global Traceability Graph: This refers to a knowledge network represented in graph structure, where nodes represent different types of entities in the software testing lifecycle (such as requirements, test cases, defects, etc.), and edges represent various semantic traceability relationships between these entities (such as verification, reference, triggering, etc.). This graph is one of the core components of the project knowledge base, used to explicitly depict and maintain the network of relationships between entities.

[0037] In this embodiment, the acquired project data is first subjected to information extraction and structuring processing to extract semantic information units such as entities, attributes, relationships, and constraints related to testing activities. Then, these semantic information units are systematically organized and stored to construct a project knowledge base. During this process, the system simultaneously constructs a global traceability graph, that is, based on the extracted entities and relationships between entities, corresponding nodes and edges are created in the graph database, thereby forming an initial graph reflecting the dependencies and verification relationships between test assets. This initial graph provides a crucial structured index foundation for subsequent change impact analysis and updates.

[0038] Step 103: When a change event that represents a change in the software project is detected, the target entity affected by the change event is located using the global traceability graph as an index.

[0039] Change events: These are structured event objects captured from the software project development and collaboration environment, processed through a standardized event pipeline, and representing changes to project content. They encapsulate the change subject identifier, structured differences in the changed content, change type, and timestamp.

[0040] Target entity: refers to the entity represented by the node in the global traceability graph that is determined to need to be re-evaluated, reviewed, or modified due to the occurrence of a change event.

[0041] In this embodiment, the system continuously monitors the status of the software project. When a content change is detected, it generates or receives a change event representing that change. Subsequently, the system uses a global traceability graph as its core analysis and indexing tool. Leveraging the network structure formed by the entity nodes and relationship edges established in this graph, it automatically performs analysis and queries. Specifically, based on the change content or subject indicated by the change event, the system locates relevant nodes in the graph and traverses or deduces along predefined traceability paths between nodes, thereby automatically and accurately locating all target entities that may be directly or indirectly affected by this change. For example, through graph analysis, it can determine which test cases verifying a certain requirement clause will be affected by a modification, and consequently, which test plans will be associated with it. This process transforms change impact analysis, traditionally reliant on human experience, into an automated computational problem based on a knowledge graph.

[0042] Step 104: Based on the project knowledge base, start at least one document generation agent corresponding to the target entity to update the test documents related to the target entity.

[0043] Document generation agent: refers to an intelligent program module configured to automatically perform tasks such as generating or updating specific types of test documents.

[0044] In this embodiment, after locating the target entity affected by the change in step 103, the system automatically triggers one or more document generation agents corresponding to the type of the target entity and / or the nature of the change event, based on the rich contextual information provided by the project knowledge base. These triggered agents are assigned the task of updating test documents related to the target entity. During runtime, each agent can access and utilize the structured semantic information stored in the project knowledge base (such as associated business rules, historical data, design constraints, etc.), and, considering the specific circumstances of the current change, autonomously generate new document content or revise, supplement, or reconstruct existing related test documents (such as test cases, test plans, test reports, etc.), thereby completing the synchronous update of the test documents. This mechanism achieves a closed loop from "identifying what needs to be changed" to "automatically executing modifications," transforming document maintenance from a passive, delayed manual operation into an active, real-time system behavior.

[0045] Step 105: Update the global traceability graph according to the updated test document.

[0046] In this embodiment, after at least one document generation agent completes the update of the relevant test document according to step 104, the system uses the result of this update as input and performs corresponding update operations on the global traceability graph accordingly. This update operation aims to ensure that the state of nodes and edges in the graph and their interrelationships can reflect the changes in project knowledge state brought about by this document update in real time and accurately. Through this step, the system realizes automatic feedback and adjustment from "document content change" to "traceability synchronization," enabling the global traceability graph to evolve from a static initial relationship record into a knowledge index that can dynamically track and reflect the overall picture of the project, thereby providing the latest and most accurate structured context for handling subsequent new change events.

[0047] The technical solution provided in this application, when a software project undergoes changes, utilizes a global traceability graph constructed based on project data related to the software project as an analysis index to automatically locate target entities directly affected or indirectly related to the changes, thereby accurately defining the scope of the changes and solving the problems of incomplete and inaccurate manual analysis. Next, based on a project knowledge base constructed from project data related to the software project, a document generation agent matching the target entity type is selectively activated. This agent automatically performs the generation or updating of relevant test documents, achieving real-time and automated synchronization of test document content and effectively overcoming the lag caused by traditional manual update methods. Finally, based on the updated test document content, the global traceability graph is synchronously updated to ensure that the traceability relationships between documents remain dynamic and continuously valid. Thus, the entire test document system can intelligently and collaboratively respond to project changes, ensuring the timeliness, consistency, and traceability of test documents to the actual project status from a mechanism perspective.

[0048] Figure 2 A flowchart illustrating an embodiment of another test document updating method provided in this application. Figure 2 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 201: Extract multimodal information from the project data to obtain structured semantic information.

[0049] Multimodal information extraction: refers to the process of automatically extracting computer-understandable structured information from project data of different forms and sources by comprehensively utilizing various information technologies such as OCR (Optical Character Recognition), NLP (Natural Language Processing), and static code analysis.

[0050] Structured semantic information refers to knowledge units organized in a uniform format and obtained through the extraction process. It includes business entities, entity attributes, relationships between entities, and business logic constraints identified from the raw data.

[0051] In this embodiment of the application, step 201 may specifically include the following steps: performing image recognition on the image corresponding to the project data to extract text information from the project data and identify interface elements and layout relationships in the project data; performing natural language processing on the text information in the project data to identify business entities, relationships between entities, and business constraints in the project data; and generating the structured semantic information based on the text information, interface elements, layout relationships, business entities, relationships between entities, and business constraints.

[0052] Image recognition: This refers to the use of computer vision technology to analyze pixel information in images or scanned documents to identify specific content, such as text and graphic elements. Interface elements: These are components in a user interface or design that have independent functions or visual identifiers, such as buttons, input boxes, menus, and icons. Layout relationships: These refer to the spatial and logical arrangement of different interface elements in the same interface or document view, in terms of position, hierarchy, or combination. Natural language processing: This refers to a series of technologies that enable computers to understand, interpret, and manipulate human language text. Business entities: These are key objects with clear concepts and attributes within a specific business domain, such as "user," "product," and "order" in e-commerce. Business constraints: These are specific restrictive conditions defined in business rules or requirements that affect system behavior, performance, or data, such as "the transaction must be completed within 5 seconds" or "the user's age must be greater than 18 years old."

[0053] In this solution, the system first calls the image recognition module (integrating optical character recognition and computer vision technologies) to process images, scanned documents, and UI / UX design drafts in the project data. This not only extracts text information but also identifies interface elements and their layout relationships, and understands the functional meaning of the elements. Simultaneously, the system calls the deep natural language processing module to parse all text-formatted data. It identifies business entities through named entity recognition, recognizes relationships between entities through relation extraction, and identifies business constraints through semantic analysis. Finally, the system associates, aligns, and merges the text information, interface elements, and layout relationships extracted by image recognition with the business entities, relationships between entities, and business constraints identified by natural language processing. This forms structured semantic information units with a unified format and metadata such as source and type, thus completing the transformation from raw heterogeneous data to structured knowledge.

[0054] This solution integrates image recognition and deep natural language processing technologies to achieve the collaborative extraction and understanding of visual information from images and semantic information from text. It not only overcomes the limitations of traditional methods that can only process plain text, enabling comprehensive analysis of multimodal project data including UI design drafts, but also generates context-rich structured semantic information by associating and integrating interface elements, layout relationships, business entities, and constraints. This provides a precise and complete data foundation for building a project knowledge base and traceability graph that truly reflects business logic and system design.

[0055] Step 202: Store the structured semantic information in the project knowledge base, and construct the global traceability relationship graph based on the entities and relationships between entities in the structured semantic information.

[0056] In this embodiment, firstly, the structured semantic information is stored in the project knowledge base. This includes converting it into a high-dimensional vector through an embedding model and storing it in a vector database to support semantic retrieval; simultaneously, the precise structured descriptions (such as API field types and requirement IDs) are stored in a relational database. Then, based on the entities and relationships between entities in the structured semantic information, a global traceability relationship graph is constructed: that is, each identified key entity (such as a requirement, a test case, or an API endpoint) is created as a node in the graph database, and directed edges are created between corresponding nodes according to the identified semantic relationships (such as "verify", "call", and "trigger"), thereby constructing an initial knowledge graph that reflects the multidimensional relationships between test assets.

[0057] Figure 2 The process described first transforms unstructured, multimodal raw data (such as images, text, and code) into unified, structured semantic information, resolving the problem of fragmented information formats. Then, it explicitly constructs these information entities and their relationships into a global traceability graph, transforming previously implicit or scattered document relationships into a queryable and computable structured network. This provides the entire system with a core knowledge foundation that is machine-understandable and reasonable, enabling subsequent automatic analysis of the impact of changes (step 103) and intelligent document updates (step 104), thereby fundamentally ensuring the consistency and traceability of the test document system.

[0058] Figure 3 A flowchart illustrating another embodiment of a test document updating method provided in this application. Figure 3 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 301: Listen for change notification messages for multiple tools in the software project.

[0059] Step 302: Normalize the multiple monitored change notification messages to extract the change subject identifier and structured difference information.

[0060] Step 303: Generate a structured change event based on the change subject identifier and the structured difference information.

[0061] For ease of understanding, steps 301-303 will be explained uniformly below: Change notification messages: These are original alerts or event messages that are automatically generated and sent by various tools in the software development and collaboration environment (such as code repositories, documentation platforms, project management tools, and continuous integration systems) when they detect content modifications or status updates.

[0062] Change subject identifier: refers to the encoded or referenced information used to uniquely identify the specific object that has undergone a change in the project context, such as requirement ID, file path, commit hash value, or interface endpoint.

[0063] Structured difference information: refers to incremental modifications described in a machine-readable format by comparing the content versions before and after the change, such as "a 'status' field has been added to the API request body" or "the acceptance criteria in section 3.2 of the requirement has been deleted".

[0064] In this embodiment, step 301 is specifically implemented by deploying a diverse set of listeners, including but not limited to: post-commit hooks integrated into code repositories (such as Git), network hooks subscribing to application programming interfaces (APIs) of document collaboration platforms (such as Confluence and Lark), plugins installed in project management tools (such as Jira and Tapd), and event listeners monitoring the build status of continuous integration / continuous delivery pipelines (such as Jenkins and GitLab CI). These listeners capture raw change notification messages from their respective tools. In step 302, the system normalizes the captured raw messages through an event normalization pipeline: first, feature extraction is performed to parse the change subject identifier from the message; then, a difference comparison algorithm is called to compare the complete content versions before and after the change (such as comparing Git commit differences or comparing document historical versions), generating accurate structured difference information, rather than simple text differences. In step 303, the system encapsulates the extracted change subject identifier, structured difference information, along with metadata such as change type and timestamp, into a unified, structured change event object for consumption by subsequent processing flows.

[0065] Figure 3The process shown transforms raw change notifications from various tools, often with disorganized formats, into standardized, semantically rich, structured change events. This establishes an efficient and reliable proactive change awareness mechanism. It not only enables real-time, comprehensive monitoring of all change activities across the project but also extracts change content into semantic descriptions that machines can accurately understand and process. This provides accurate and clear trigger signals and input data for subsequent knowledge graph-based intelligent impact analysis (step 103) and document updates (step 104), serving as a prerequisite for the initiation and reliable operation of the entire automated closed loop.

[0066] Based on the aforementioned embodiments, after the system generates structured change events, it enters the change impact analysis stage. Step 103 may specifically include the following steps: parsing the change subject identifier from the change event; determining the change node corresponding to the change event in the global traceability graph based on the change subject identifier; traversing along the traceability edges in the global traceability graph starting from the change node, and determining the node reached by the traversal as the target entity.

[0067] Change node: In the global traceability graph, a node whose attributes or identifier match the change subject identifier parsed from the change event represents the object directly affected by this change.

[0068] In this embodiment, step 103 is executed by the system's dynamic tracking change graph engine. First, the core change subject identifier is parsed from the structured change event generated in step 303. Then, using this identifier as the query basis, a search is performed in the global traceability graph to locate the node that precisely corresponds to it. This node is then identified as the change node of this change event. For example, if the change subject identifier is a requirement ID, then the corresponding requirement node is the change node. Subsequently, the system uses this change node as the starting point and performs traversal analysis along various predefined semantic traceability relationship edges in the graph according to preset graph traversal rules (such as depth-first or breadth-first algorithms). These traceability relationship edges represent the dependencies and verification directions between entities. For example, a requirement may be verified by a test case, and that test case may be referenced by a test plan. During the traversal, all downstream nodes reachable along such relationship chains (such as the test case node that verifies the requirement in the example above, and the test plan node that references these test cases) are automatically and accurately located by the system as the target entities affected by this change.

[0069] This solution automates and enhances the precision of change impact analysis by combining change events with a global traceability graph. It transforms the traditionally inefficient and inefficient process of impact assessment, which relies heavily on manual experience and is prone to omissions, into a deterministic computational process based on graph theory and network analysis. The system can automatically and comprehensively deduce all directly and indirectly affected test assets along the pre-defined semantic relationship chains in the graph. This significantly improves analysis efficiency and accuracy, ensures the comprehensiveness of change impact assessment, and provides a clear target list for triggering precise document update tasks.

[0070] Based on the foregoing embodiments, after accurately locating the target entity affected by the change, the system enters the intelligent document generation and update stage. Step 104 may specifically include the following steps: determining the type of intelligent agent that needs to perform the update task according to the type of the target entity; identifying the intelligent agent corresponding to the intelligent agent type as the document generation intelligent agent to be started; configuring task parameters for the document generation intelligent agent, wherein the task parameters include the structured difference information parsed from the change event; and starting the document generation intelligent agent so that the document generation intelligent agent updates the test document related to the target entity based on the task parameters and context information retrieved from the project knowledge base.

[0071] Agent type: refers to the category of agents generated based on the type of test document being processed (such as test plan, test case, test report).

[0072] Task parameters: refers to the set of input information provided to a document generation agent when it is started to perform a specific task, which is used to define the task objectives and constraints.

[0073] In this embodiment, step 104 is scheduled and executed by the system's traceability and update coordinator. First, based on the specific type of the target entity located in step 103 (e.g., a requirement entity, test case entity, or defect entity), the coordinator determines one or more agent types (such as a "test case agent" corresponding to requirement changes, or a "test report agent" corresponding to test execution failures) from a predefined mapping relationship. Then, the coordinator identifies the specific agent instance corresponding to the determined agent type as the document generation agent to be started. Before starting, the coordinator configures parameters specific to this task for the agent. These parameters include at least the structured difference information parsed from the change event that triggered this process, indicating the specific change content. After configuration, the coordinator starts the document generation agent. Once activated, the intelligent agent's workflow comprises two core actions: First, based on task parameters, it retrieves contextual information highly relevant to the target entity from the project knowledge base, such as relevant business rules, historical defects, and interface designs; second, it integrates this retrieved contextual information with the change details in the task parameters to autonomously generate new document content or revise and update existing test documents, thereby achieving intelligent synchronization between test documents and project changes.

[0074] This solution achieves precise distribution and efficient execution of document update tasks by introducing a type-based agent scheduling and task parameterization configuration mechanism. It combines general large-scale language model capabilities with specific test domain knowledge, project context, and change intent. Through retrieval-enhanced generation technology, it ensures that the generated or updated test documents not only maintain strict consistency with the changes but also possess high business accuracy and executability. This achieves a seamless automated connection from "identifying the impact of changes" to "producing updated documents," fundamentally solving the problems of delayed and incomplete test document updates, and significantly improving the quality and maintenance efficiency of test documents.

[0075] Figure 4 A flowchart illustrating another embodiment of a test document update method provided in this application. Figure 4 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 401: Parse the updated test document to identify new entities and / or changed traceability relationships involved in the test document.

[0076] Step 402: Based on the newly added entity and / or the traceability relationship, create new nodes and / or update the edges between existing nodes in the global traceability relationship graph.

[0077] For ease of understanding, steps 401-402 are explained uniformly below: New entities: refer to key business or test objects that appear for the first time in the updated test documentation and for which there is no corresponding node in the global traceability graph.

[0078] Changes in traceability relationships: This refers to changes in the type, direction, or status of the relationship between two or more existing entities described in the test document due to this document update. For example, it may change from "unverified" to "verified", or a new "reference" relationship may be added.

[0079] In this embodiment, step 401 is specifically implemented as follows: After the document generation agent completes its work and outputs the updated test document (such as a new test plan, revised test cases, or generated test report), the system parses the document content. This parsing process not only reads the text, but more importantly, identifies and extracts the structured semantic information contained in the document, especially the entities mentioned or implied therein and the relationships between entities. The system compares this parsing result with the current state of the global traceability graph to identify two types of key information: first, newly added entities mentioned in the document that do not yet have nodes in the graph; second, the relationships between entities described in the document that have changed compared to the existing records in the graph, i.e., the changed traceability relationships. Step 402 then performs corresponding update operations on the global traceability graph based on the above identification results: for each newly identified entity, a new node is created in the graph, and it is assigned attributes such as type and identifier; for each changed traceability relationship, the operation of creating a new edge, modifying the attributes of an existing edge, or deleting an existing edge is performed between the corresponding two entity nodes in the graph. For example, if the test case agent writes a new test case to verify a specific requirement, the system creates a new test case node and a "verification" edge from that node to the corresponding requirement node.

[0080] Figure 4 The process illustrated involves automatically parsing the document output generated by the intelligent agent and synchronously feeding it back to the global traceability graph. This transforms the graph from a static initial snapshot into a knowledge network that can evolve in real time with the latest project documents and actual status. This ensures the accuracy and timeliness of the graph as the core index of the entire system, providing a consistently reliable contextual basis for subsequent continuous change awareness, impact analysis, and intelligent updates. Ultimately, this guarantees the dynamic effectiveness and autonomy of the end-to-end traceability system for test documents.

[0081] To facilitate understanding of the technical solution of this application, the following will be combined with Figure 5This application provides a detailed description of a test document update method according to an embodiment. The method provided in this embodiment achieves a complete closed loop from project data perception to automatic generation and traceability maintenance of test documents by constructing a multi-level intelligent system. The system mainly includes a data input and extraction layer, a core processing layer, an application layer, and an output and presentation layer.

[0082] 1. Data Input and Multimodal Information Extraction The system first integrates various raw materials related to the software project—namely, project data—through a data input and extraction layer. This data specifically includes: product requirement documents, UI / UX design drafts, API interface definitions (Swagger / YAML), user stories, source code repositories, existing test case libraries, and data from the defect management system. Integration is completed through an input source adapter.

[0083] Subsequently, the multimodal extractor performs deep analysis and fusion of the project data. The OCR and image understanding module processes scanned PDFs and design drawings, extracting not only text but also UI elements, layout relationships, and understanding their business meaning (e.g., "This is a login button"). The deep NLP parsing module processes all text information, performing entity recognition (e.g., "user," "order"), relationship extraction (e.g., "user has orders"), and constraint recognition (e.g., "response time must be less than 100ms"). The code and interface analysis module statically analyzes the source code, extracting function signatures, inputs and outputs, and dependencies; it also parses API documentation to obtain endpoints, parameters, response models, and error codes. The above processes output fused structured semantic information.

[0084] 2. Construction and maintenance of the core knowledge base and traceability graph The extracted structured semantic information is fed into the core processing layer. The vectorization and indexing module transforms information fragments (text fragments, identified UI elements, API endpoint descriptions) into vectors through an embedding model, stores them in a vector database (such as Milvus), and includes metadata such as source and entity type. The system builds a dynamic project knowledge base, which is a fusion storage system that includes vector storage (for semantic retrieval), a graph database (for storing entities and relationship networks), and a relational database (for storing precise metadata and associated IDs).

[0085] Based on the structured semantic information, the system constructs and maintains a global traceability graph in the graph database. The nodes of this graph are fine-grained semantic units, such as: requirement nodes (attributes include ID, title, and status), test case nodes (attributes include ID, step, and expected result), defect nodes (attributes include ID, description, and the introduced commit hash), and API endpoint nodes (attributes include path and method). Edges define rich semantic relationship types, such as "validation" (test case node → requirement node), "reference" (test plan node → test case node), "trigger" (test case node → defect node), "coverage" (defect node → code commit node), and "dependency" (API endpoint A → API endpoint B). This graph is initially constructed through a one-time analysis during project import. The core processing layer also provides enhanced retrieval query capabilities, offering knowledge access interfaces for upper-layer applications.

[0086] 3. Change perception, impact analysis, and agent-based collaborative updates The system's intelligent response and execution are handled by the application layer. The traceability and update coordinator acts as the central scheduler, containing a proactive change perception engine and a dynamic change graph tracking engine.

[0087] The proactive change awareness engine monitors change notifications in real time through a diverse set of listeners (such as Git commit hooks, Confluence / Lark document webhooks, Jira / Tapd plugins, and Jenkins / GitLab CI event listeners). The engine's event standardization pipeline processes the raw notifications through: feature extraction (extracting unique identifiers of the change subject, such as requirement IDs), difference analysis (using a diff algorithm to compare old and new versions and extract structured differences, such as "API added status field"), and event encapsulation, ultimately generating standardized change events.

[0088] Upon detecting a change event, the dynamic change graph engine is activated. It first parses the change entity identifier and locates the corresponding change node (anchor point) in the graph. Then, starting from that node, it traverses the graph along specified relational edges (impact domain analysis). For example, when a requirement node changes, the system automatically finds all associated test case nodes along the "Verification" edge, and then finds the associated test plan nodes along the "Reference" edge. All nodes reached during the traversal are identified as the affected target entities.

[0089] The coordinator schedules the appropriate document generation agents from the document agent workshop based on the type of the target entity. The agent workshop contains multiple specialized agents: Test Plan Agent: Its workflow is as follows: 1) Retrieval: Retrieve plan templates and risk assessment entries for similar projects from the knowledge base; 2) Generation: Draft a plan containing test scope, strategy, resources, and schedule; 3) Tracking: Automatically associate the "test scope" in the plan with specific requirement nodes in the graph.

[0090] Test Case Intelligence Agent: Its workflow is as follows: 1) Retrieval: For a requirement point, retrieve relevant business rules, API constraints, UI designs, and historical defects from the knowledge base; 2) Generation: Generate detailed test cases that include preconditions, operation steps (down to which API to call and what parameters to pass), test data, and expected results; 3) Tracing: Automatically associate the test case with the source requirement and any subsequent defects that may occur.

[0091] Test Report Agent: Its workflow is as follows: 1) Retrieval: Aggregate all executed test case results, discovered defects and their status, and performance data from the knowledge base; 2) Generation: Automatically synthesize report chapters such as test overview, defect analysis, quality assessment, and risk warnings; 3) Traceability: The conclusions in the report can be drilled down to related test cases, defects, and original requirements.

[0092] The coordinator configures task parameters (including structured difference information) for the launched agent. Based on these parameters and the enhanced generated context retrieved from the project knowledge base, the agent automatically updates the test document.

[0093] 4. Traceability loop, result output and presentation After the document is updated, the system implements a self-updating closed loop: it parses the updated test document, identifies newly added entities (such as new defects) and changed traceability relationships, and updates the global traceability relationship graph synchronously (such as creating new nodes and updating edge relationships) to ensure that the graph is always synchronized with the actual content of the document.

[0094] Ultimately, all outputs are delivered through the output and presentation layer: outputting a set of structured test documents that are machine-readable (e.g., JSON) and human-friendly (e.g., Markdown); providing a visual traceability dashboard that dynamically displays the global traceability graph and supports drill-down; and automatically generating a change impact analysis report when requirements change, which lists the use cases that need to be modified, the defects that need to be reviewed, and the potential risk points.

[0095] In summary, this embodiment constructs a dynamic knowledge base and fine-grained traceability graph that integrates vector, graph, and relational data through multimodal extraction; it achieves fully automated generation and updating of test plans, test cases, and reports through event-driven change awareness, graph traversal analysis, and enhanced generation and collaboration by multiple specialized document agents; and it maintains the activity of the traceability graph through a closed-loop synchronization mechanism. This constitutes an intelligent system capable of adapting to project evolution and ensuring the timeliness, consistency, and complete traceability of test documents.

[0096] Figure 6 This is a block diagram illustrating an embodiment of a test document updating device provided in this application. Figure 6 As shown, the device includes: Module 61 is used to acquire project data related to the software project; Module 62 is used to build a project knowledge base and a global traceability graph based on the project data. The nodes in the global traceability graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. The positioning module 63 is used to locate the target entity affected by the change event when a change event representing a change in the software project is detected, using the global traceability relationship graph as an index. The first update module 64 is used to start at least one document generation agent corresponding to the target entity based on the project knowledge base, so as to update the test documents related to the target entity; The second update module 65 is used to update the global traceability graph based on the updated test document.

[0097] In one possible implementation, the building module is specifically used for: Multimodal information extraction is performed on the project data to obtain structured semantic information; The structured semantic information is stored in the project knowledge base, and the global traceability relationship graph is constructed based on the entities and relationships between entities in the structured semantic information.

[0098] In one possible implementation, the building module is further configured to: Image recognition is performed on the images corresponding to the project data to extract text information from the project data and identify interface elements and layout relationships in the project data; Natural language processing is performed on the text information in the project data to identify the business entities, relationships between entities, and business constraints in the project data; The structured semantic information is generated based on the text information, the interface elements, the layout relationships, the business entities, the relationships between entities, and the business constraints.

[0099] In one possible implementation, the apparatus further includes a generation module for: Monitor change notification messages for multiple tools in the software project; The multiple monitored change notification messages are normalized to extract the change subject identifier and structured difference information; Based on the change subject identifier and the structured difference information, the structured change event is generated.

[0100] In one possible implementation, the positioning module is specifically used for: The change subject identifier is parsed from the change event; In the global traceability graph, the change node corresponding to the change event is determined based on the change subject identifier; Starting from the changed node, traverse along the traceability edges in the global traceability graph, and determine the node reached by the traversal as the target entity.

[0101] In one possible implementation, the first update module is specifically used for: Based on the type of the target entity, determine the type of agent that needs to perform the update task; The agent corresponding to the agent type is identified as the document generation agent to be launched; Configure task parameters for the document generation agent, wherein the task parameters include the structured difference information parsed from the change event; The document generation agent is activated so that it updates the test document related to the target entity based on the task parameters and context information retrieved from the project knowledge base.

[0102] In one possible implementation, the second update module is configured to: Parse the updated test document to identify any new entities and / or changed traceability relationships involved in the test document; Based on the newly added entity and / or the traceability relationship, create new nodes and / or update the edges between existing nodes in the global traceability relationship graph.

[0103] like Figure 7 As shown in the figure, this application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the test document update method provided in any of the foregoing method embodiments, including: Obtain project data related to the software project; Based on the project data, a project knowledge base and a global traceability graph are constructed. The nodes in the global traceability graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. When a change event that represents a change in the software project is detected, the target entity affected by the change event is located using the global traceability graph as an index. Based on the project knowledge base, at least one document generation agent corresponding to the target entity is activated to update the test documents related to the target entity; The global traceability graph is updated based on the updated test documentation.

[0104] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the test document update method provided in any of the foregoing method embodiments.

[0105] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The 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.

[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0107] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0108] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement 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 claimed herein.

Claims

1. A method for updating test documents, characterized in that, The method includes: Obtain project data related to the software project; Based on the project data, a project knowledge base and a global traceability graph are constructed. The nodes in the global traceability graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. When a change event that represents a change in the software project is detected, the target entity affected by the change event is located using the global traceability graph as an index. Based on the project knowledge base, at least one document generation agent corresponding to the target entity is activated to update the test documents related to the target entity; The global traceability graph is updated based on the updated test documentation.

2. The method according to claim 1, characterized in that, The construction of a project knowledge base and a global traceability graph based on the project data includes: Multimodal information extraction is performed on the project data to obtain structured semantic information; The structured semantic information is stored in the project knowledge base, and the global traceability relationship graph is constructed based on the entities and relationships between entities in the structured semantic information.

3. The method according to claim 2, characterized in that, The process of extracting multimodal information from the project data to obtain structured semantic information includes: Image recognition is performed on the images corresponding to the project data to extract text information from the project data and identify interface elements and layout relationships in the project data; Natural language processing is performed on the text information in the project data to identify the business entities, relationships between entities, and business constraints in the project data; The structured semantic information is generated based on the text information, the interface elements, the layout relationships, the business entities, the relationships between entities, and the business constraints.

4. The method according to claim 1, characterized in that, The method further includes: Monitor change notification messages for multiple tools in the software project; The multiple monitored change notification messages are normalized to extract the change subject identifier and structured difference information; Based on the change subject identifier and the structured difference information, the structured change event is generated.

5. The method according to claim 4, characterized in that, The step of locating the target entity affected by the change event using the global traceability graph as an index includes: The change subject identifier is parsed from the change event; In the global traceability graph, the change node corresponding to the change event is determined based on the change subject identifier; Starting from the changed node, traverse along the traceability edges in the global traceability graph, and determine the node reached by the traversal as the target entity.

6. The method according to claim 4, characterized in that, The step of activating at least one document generation agent corresponding to the target entity based on the project knowledge base to update test documents related to the target entity includes: Based on the type of the target entity, determine the type of agent that needs to perform the update task; The agent corresponding to the agent type is identified as the document generation agent to be launched; Configure task parameters for the document generation agent, wherein the task parameters include the structured difference information parsed from the change event; The document generation agent is activated so that it updates the test document related to the target entity based on the task parameters and context information retrieved from the project knowledge base.

7. The method according to claim 1, characterized in that, The step of updating the global tracing relationship graph based on the updated test document includes: Parse the updated test document to identify any new entities and / or changed traceability relationships involved in the test document; Based on the newly added entity and / or the traceability relationship, create new nodes and / or update the edges between existing nodes in the global traceability relationship graph.

8. A test document updating device, characterized in that, The device includes: The acquisition module is used to acquire project data related to the software project; The construction module is used to build a project knowledge base and a global traceability relationship graph based on the project data. The nodes in the global traceability relationship graph represent different entities in the test lifecycle, and the edges represent the traceability relationships between the entities. The positioning module is used to locate the target entity affected by the change event when a change event representing a change in the software project is detected, using the global traceability graph as an index. The first update module is used to start at least one document generation agent corresponding to the target entity based on the project knowledge base, so as to update the test documents related to the target entity; The second update module is used to update the global traceability graph based on the updated test documents.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a test document update program stored in the memory to implement the test document update method according to any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the test document update method according to any one of claims 1-7.