Multi-agent collaborative automated testing method and system based on trusted computing

CN123011724APending Publication Date: 2026-10-30BEIJING CREDIBLE HUATAI TECHNICAL SERVICE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611324520.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本申请实施例提供了一种基于可信计算的多智能体协同自动化测试方法和系统,以至少解决相关技术中UI层任务和代码层任务分开执行导致效率较低的技术问题

Benefits of technology

[0012]在本申请实施例中,测试系统包括:可信管理中心,用于提供安全策略和智能体的度量基准值;可信终端,包括防护部件和计算部件,计算部件中运行有主智能体和多个子智能体,主智能体用于将测试任务拆解为多个子任务并分别分配至对应的子智能体,汇总各子智能体返回的测试结果并进行跨层交叉验证,输出综合测试报告;子智能体用于执行对应的子任务并返回测试结果;计算部件中部署有可信代理,可信代理用于:根据度量基准值,对待启动的智能体进行完整性度量;若完整性度量通过,则允许启动,否则阻断智能体启动并向可信管理中心上报告警;根据安全策略,对执行测试任务的智能体发出的操作指令进行拦截与权限校验,进而解决了相关技术中UI层任务和代码层任务分开执行导致效率较低的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011724A_ABST
    Figure CN123011724A_ABST
Patent Text Reader

Abstract

The application discloses a multi-agent collaborative automatic test method and system based on trusted computing. The system comprises a trusted management center, which provides a security policy and a measurement reference value; a trusted terminal, which comprises a protection component and a computing component, wherein a master agent and a plurality of sub-agents are run in the computing component, the master agent splits a test task into a plurality of sub-tasks and respectively assigns the sub-tasks to corresponding sub-agents, collects test results returned by the sub-agents and performs cross-layer cross verification, and outputs a comprehensive test report; the sub-agents execute corresponding sub-tasks; a trusted agent is deployed in the computing component: according to the measurement reference value, integrity measurement is performed on an agent to be started; if the measurement is passed, the agent is allowed to start, otherwise the agent is blocked from starting and a warning is reported; according to the security policy, operation instructions issued by the agent are intercepted and authority verification is performed. The application solves the technical problem of low efficiency caused by separate execution of UI layer tasks and code layer tasks in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer security, and more specifically, to a multi-agent collaborative automated testing method and system based on trusted computing. Background Technology

[0002] This section is intended to provide background or context for the content set forth in the claims or specification, and the content described herein is not acknowledged as related technology simply because it is included in this section.

[0003] In the era of AI agents, the landscape of system development is undergoing profound changes. Application development is shifting towards a paradigm of autonomous execution. Developers describe requirements using natural language, and the agent can autonomously complete code writing, debugging, and deployment, significantly improving development efficiency. Simultaneously, software testing is also undergoing a paradigm shift: automated testing using agents focuses on moving from script-driven to intent-driven approaches. This involves describing test requirements using natural language, with the agent autonomously planning test paths, generating test cases, and executing verification. This shift reduces test case development time from days to hours, and regression testing cycles from days to hours, resulting in an order-of-magnitude improvement in iteration efficiency.

[0004] Currently, mainstream automated testing solutions for intelligent agents are mainly divided into two categories: one is black-box testing based on the UI interface, which verifies the correctness of the front-end functions by simulating user clicks, inputs and other operations; the other is testing based on the API interface, which verifies the correctness of data interaction by calling the back-end interface.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a multi-agent collaborative automated testing method and system based on trusted computing, which at least solves the technical problem of low efficiency caused by the separate execution of UI layer tasks and code layer tasks in related technologies.

[0007] According to one aspect of the embodiments of this application, a multi-agent collaborative automated testing system based on trusted computing is provided, comprising: a trusted management center for providing security policies and benchmark values ​​for agents; a trusted terminal including a protection component and a computing component, wherein the computing component runs a master agent and multiple sub-agents, the master agent for decomposing test tasks into multiple sub-tasks and assigning them to corresponding sub-agents, summarizing the test results returned by each sub-agent and performing cross-layer cross-validation, and outputting a comprehensive test report; the sub-agents for executing their corresponding sub-tasks and returning test results; and a trusted agent deployed in the computing component, the trusted agent for: performing integrity measurement on the agent to be launched according to the benchmark value; allowing launch if the integrity measurement passes, otherwise blocking the launch of the agent and reporting an alarm to the trusted management center; and intercepting and verifying the operation commands issued by the agent executing the test task according to the security policy.

[0008] According to another aspect of the embodiments of this application, a multi-agent collaborative automated testing method based on trusted computing is also provided, comprising: starting an agent that has passed integrity measurement in a computing component; decomposing a test task into multiple sub-tasks through a master agent and assigning them to the corresponding sub-agents for execution through a trusted proxy; during the execution of the test task, intercepting and verifying the operation instructions issued by the agent executing the test task according to a security policy, and allowing them to proceed after the verification is passed; and performing cross-layer cross-validation of the test results returned by multiple sub-agents through a master agent and outputting a comprehensive test report.

[0009] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the storage medium including a stored program that executes the above-described method when the program is run.

[0010] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the above-described method through the computer program.

[0011] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the embodiments of the methods described above.

[0012] In this embodiment, the testing system includes: a trusted management center for providing security policies and benchmark values ​​for intelligent agents; a trusted terminal including a protection component and a computing component, wherein the computing component runs a main intelligent agent and multiple sub-intelligent agents, the main intelligent agent for breaking down test tasks into multiple sub-tasks and assigning them to corresponding sub-intelligent agents, summarizing the test results returned by each sub-intelligent agent and performing cross-layer cross-validation, and outputting a comprehensive test report; the sub-intelligent agents for executing their corresponding sub-tasks and returning test results; and a trusted agent deployed in the computing component, the trusted agent for: performing integrity measurements on the intelligent agent to be launched based on the benchmark values; allowing launch if the integrity measurement passes, otherwise blocking the launch of the intelligent agent and reporting an alarm to the trusted management center; and intercepting and verifying the operation commands issued by the intelligent agent executing the test task according to the security policy, thereby solving the technical problem of low efficiency caused by the separate execution of UI layer tasks and code layer tasks in related technologies. Attached Figure Description

[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the architecture of a multi-agent collaborative automated testing system based on trusted computing, according to an embodiment of this application. Figure 2 This is a schematic diagram of the architecture of a multi-agent collaborative automated testing system based on trusted computing, according to an embodiment of this application. Figure 3 This is a flowchart of an optional multi-agent collaborative automated testing method based on trusted computing, according to an embodiment of this application. Figure 4 This is a schematic diagram of the dual-dimensional test fusion and collaboration mechanism according to an embodiment of this application; Figure 5 This is a schematic diagram of a multi-agent cooperative mechanism according to an embodiment of this application; Figure 6 This is a schematic diagram of a trusted management scheme according to an embodiment of this application; Figure 7 This is a schematic diagram of the test process according to an embodiment of this application; Figure 8 This is a structural block diagram of a terminal according to an embodiment of this application. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] After analyzing relevant technologies, the inventors realized that these technologies typically focus on a single dimension and lack a complete solution for deeply integrating UI and code layer testing. More importantly, while AI provides convenience, it also introduces security risks not present in traditional automated testing. Intelligent agents, due to their autonomous decision-making, tool invocation, and open input processing capabilities, face five major categories of security risks: prompt injection and command hijacking, privilege overreach and tool abuse, data privacy and leakage, uncontrollable behavior and hallucination risks, and supply chain and multi-agent collaboration risks. How to ensure that intelligent agents accurately understand vertical domain knowledge and functional requirements to generate scientifically sound and comprehensive test plans; how to ensure that the behavior of intelligent agents is controllable and does not trigger security risks during autonomous execution; and how to ensure the completeness and scientific validity of test plans, as well as the security of the testing environment and tools—these issues have become key bottlenecks restricting the large-scale implementation of automated testing for intelligent agents.

[0017] Currently, agent-driven automated testing technology has been initially explored in the industry, but several core technological shortcomings still exist. The following is a systematic review from four dimensions.

[0018] 1) The integration of trusted computing and automated testing Trusted computing technology can be introduced into the field of automated testing, using trusted platform modules or trusted execution environments to perform integrity measurement and protection on the testing platform itself, ensuring that the startup environment and execution process of the testing tools have not been tampered with; or trusted computing can be used in the generation of test cases to ensure the credibility of the test case source.

[0019] However, the trusted protection of this solution is limited to the test platform or test cases themselves, and does not extend the protection scope of trusted computing to the level of agent behavior. This solution does not perform trusted measurement and real-time control of the autonomous decision-making process of the test agent, and cannot ensure the compliance and interpretability of the decision-making process; it lacks trusted protection for agent input (prompts / instructions) and output (operation sequences / test data), and cannot effectively prevent malicious instruction injection attacks or sensitive data leakage; it does not involve minimal control over the agent's runtime permissions, and once an agent is granted excessive permissions, it may overstep its authority to operate the test environment or even production data during autonomous execution.

[0020] 2) Multi-agent collaborative automated testing By employing multi-agent collaborative UI testing schemes and testing methods based on large models and multi-agent interactions, different testing tasks are assigned to multiple agents to complete collaboratively, thereby improving testing efficiency through task decomposition and parallel execution.

[0021] However, this solution only targets the UI layer services and does not address interface penetration and mutation attacks at the code layer. Furthermore, the collaboration mechanism between agents is relatively loose, lacking a hierarchical task decomposition and result convergence architecture. Multiple agents may conflict or engage in redundant work due to inconsistent goals. More critically, the solution does not introduce a parent-child agent sandbox isolation mechanism. All agents run in the same environment, and an attack on any agent or its abnormal behavior (such as executing malicious instructions or repeatedly calling interfaces) can directly impact the entire test environment and other agents. In addition, the solution does not introduce trust metrics and behavior auditing during multi-agent collaboration, making it impossible to reliably trace information transmission and operation calls between agents. This poses a risk of "malicious collusion," meaning multiple agents may implicitly negotiate to achieve unintended collaborative attacks, exceeding the risk management scope of a single agent.

[0022] 3) Combination of black-box and white-box testing In the field of software testing, black-box testing (such as UI automation testing) and white-box testing (such as static code analysis and interface testing) are usually conducted separately. UI automation testing tools are used by the testing team, while interface testing tools are used by the development or test development team. The two belong to different stages and different toolchains, and the test results lack correlation analysis.

[0023] The combined black-box and white-box approach is geared towards the security penetration testing field. Its testing objective is to discover security vulnerabilities (such as SQL injection and XSS), rather than to perform complete end-to-end functional and business logic verification of the application system. In the functional testing field, UI-layer black-box testing only verifies "functions visible to the user," failing to discover logical defects in underlying interfaces, boundary stability issues, and system robustness defects under high-concurrency scenarios. While interface testing can verify the correctness of data interaction, it cannot verify the completeness of end-to-end business processes in actual user scenarios. The test results lack a cross-layer cross-verification mechanism. When the UI layer displays "operation successful" but the code-layer interface returns an exception status code or the database write fails, this approach cannot automatically identify such hidden defects of "normal interface but incorrect business logic." Furthermore, the execution entities, execution stages, and execution environments of black-box and white-box testing in this approach are different, making collaborative linkage under the same trusted foundation impossible.

[0024] 4) Security risk management of intelligent agents Intelligent agents face security risks such as prompt injection, tool abuse, and data leakage. Therefore, security filtering layers (input purification and output auditing) can be added during the agent's inference process, access control can be implemented for tools called by the agent, and the agent's execution environment can be run within a TEE (Transactional Environment). Standardization organizations have already published AI system security guidelines, incorporating agent security into their risk management frameworks.

[0025] However, intelligent agent security risk management solutions have the following key common defects: First, the protection scope is fragmented, with isolated protection for single risk points (such as only input filtering or access control). There is a lack of a full-link security architecture from the perception layer, decision-making layer to the execution layer. There is a lack of coordination and linkage between the protection points. Attackers can bypass single-point protection through cross-layer attacks, which can easily lead to risks such as cross-layer coordinated attacks and the overall failure of the defense system after a single point of breach.

[0026] Secondly, the solution lacks specific design for testing scenarios. The general-purpose intelligent agent security solution fails to consider the unique needs of automated testing, such as the need for the testing agent to operate the system under test, read and write test data, and invoke various testing tools. The solution does not provide an effective solution for ensuring security without compromising the flexibility and efficiency of test execution. This can easily lead to risks such as unauthorized operations on the testing environment due to overly coarse permission settings, and accidental leakage of sensitive test data.

[0027] Third, the lack of a runtime continuous verification mechanism, relying on static protection (such as startup measurement and pre-deployment approval), and the absence of continuous and reliable measurement and dynamic intervention capabilities for the runtime behavior of intelligent agents, makes it impossible to detect and promptly block behaviors that deviate from the preset path during the execution of intelligent agents. This easily leads to risks such as runtime instruction hijacking, state tampering, and malicious diversion of the test process to unexpected paths.

[0028] Fourth, the reproducibility issue remains unresolved. The randomness of large-scale model inference leads to inconsistent execution paths or results for the same test case multiple times. There is a lack of standardized sandbox environments to fix external dependencies and reproduce failures, and a lack of hierarchical memory mechanisms to effectively manage short-term session states and long-term business rules. This easily leads to risks such as context pollution causing state confusion and agents performing non-deterministic illusionary operations, which can result in service denial or data corruption.

[0029] In summary, the relevant technologies suffer from the following core gaps: There is a lack of an automated testing method that uses a hardware root of trust as a security foundation and achieves a deep integration of two dimensions—black-box traversal of the UI layer and white-box interface penetration of the code layer—through multi-agent collaboration. This method should ensure the security, trustworthiness, and controllability of the testing process, while also enabling end-to-end deep testing and cross-layer comprehensive assertions from front-end user interaction to back-end interface logic. Therefore, developers and testers urgently need to build an automated agent testing solution that combines a secure foundation with deep testing capabilities, improving efficiency while ensuring the trustworthiness and controllability of the testing process and the comprehensive accuracy of the test results.

[0030] According to one aspect of the embodiments of this application, an embodiment of a multi-agent collaborative automated testing scheme based on trusted computing is provided. This scheme enables deep automated testing based on trusted computing. The application constructs a secure foundation based on trusted computing and builds a four-layer trusted testing technology architecture from the perception layer, code layer, decision layer to execution layer. Through multi-agent collaboration, it achieves a deep integration of a two-dimensional testing scheme: "UI layer agent black-box traversal" and "code layer white-box interface perspective," forming a complete automated testing closed loop from front-end user interaction to back-end interface logic, generating a synergistic effect of "1+1>2." Throughout the testing process, all elements, including the system, model, knowledge base, agents, testing tools, testing system, test cases, test reports, scripts, API interfaces, datasets, prompts, instructions, and strategies, are protected by a hardware root of trust, deployed in a trusted execution environment, and subject to unified control and measurement by a trusted management center, ensuring the entire testing process is secure, trustworthy, and controllable. Simultaneously, the experience and knowledge generated during the testing process, such as effective test cases, mutation strategies, and defect patterns, are accumulated as Skills, continuously enriching the knowledge base and protected by the root of trust. Subsequent tests can reuse existing experience to achieve continuous evolution and intelligent closed-loop testing capabilities.

[0031] Optionally, in this embodiment, the above-described trusted computing-based multi-agent collaborative automated testing method can be applied to the trusted computing-based multi-agent collaborative automated testing system of this application. It includes: a trusted management center, used to provide security policies and benchmark values ​​for agents; a trusted terminal, including a protection component and a computing component, wherein the computing component runs a master agent and multiple sub-agents, the master agent is used to decompose the test task into multiple sub-tasks and assign them to the corresponding sub-agents, summarize the test results returned by each sub-agent and perform cross-layer cross-validation, and output a comprehensive test report; the sub-agents are used to execute the corresponding sub-tasks and return the test results; a trusted agent is deployed in the computing component, the trusted agent is used to: perform integrity measurement on the agent to be launched according to the benchmark value; if the integrity measurement passes, launch is allowed; otherwise, the launch of the agent is blocked and an alarm is reported to the trusted management center; and intercept and verify the operation commands issued by the agent executing the test task according to the security policy.

[0032] In the above scheme, the main agent is used to decompose the test task into a UI layer black-box traversal subtask and a code layer white-box interface perspective subtask. The UI layer black-box traversal subtask is distributed to the UI test sub-agent, and the code layer white-box interface perspective subtask is distributed to the code test sub-agent. The main agent is configured by a trusted proxy to only have permissions related to task decomposition and result collection, and not to have direct access to the system under test. Multiple sub-agents include a UI test sub-agent and a code test sub-agent. The UI test sub-agent is used to execute the UI layer black-box traversal subtask, which traverses and tests the UI interface of the system under test by simulating user operations, verifies the front-end functions, and returns the test results of the UI layer. The code test sub-agent is used to execute the code layer white-box interface perspective subtask, which parses the interface contract from the source code of the system under test and initiates tests on the functional interfaces based on the mutation strategy, and returns the test results of the code layer.

[0033] The main intelligent agent runs in the first trusted sandbox, the UI testing sub-intelligent agent runs in the second trusted sandbox, and the code testing sub-intelligent agent runs in the third trusted sandbox. The first, second, and third trusted sandboxes are forcibly isolated by a trusted agent. Network communication between the first, second, and third trusted sandboxes is prohibited. Outgoing connections of the first, second, and third trusted sandboxes all require authorization from the trusted agent. The first, second, and third trusted sandboxes are implemented based on resource-constrained lightweight containers or trusted partitions.

[0034] After completing the UI layer black-box traversal subtask, the UI testing sub-agent encrypts the UI layer test results using the encryption / decryption module and reports them to the trusted agent. After completing the code layer white-box interface perspective subtask, the code layer test results encrypts the code layer test results using the encryption / decryption module and reports them to the trusted agent. The trusted agent performs integrity verification on the UI layer test results and the code layer test results. After the verification is successful, the agent summarizes the UI layer test results and the code layer test results to the main agent. The main agent performs time-series alignment and cross-layer cross-verification on the UI layer test results and the code layer test results, and generates a comprehensive test report digitally signed by the trusted agent (by calling the encryption / decryption module).

[0035] The protection component includes a hardware root of trust, which serves as the source of trust for trusted terminals and provides identity authentication and integrity measurement. Based on the measurement benchmark value, the integrity measurement of the agent to be launched is performed, including: the trusted agent calling the measurement function provided by the hardware root of trust to perform hash calculations on the model weights, configuration files, prompt word templates, and knowledge base of the agent to be launched, comparing the calculation results with the measurement benchmark value. If the comparison is inconsistent, the integrity is determined to be compromised, the agent's launch is blocked, and an alarm is reported. If the comparison is consistent, the integrity measurement is determined to be passed, and the agent is allowed to launch.

[0036] In the above embodiments, according to the security policy, the operation instructions issued by the intelligent agent executing the test task are intercepted and their permissions are verified. This includes: a trusted proxy, acting as a security gateway, intercepts external operation instructions issued by the intelligent agent, parses the semantics of the external operation instructions, and compares them with a preset minimum permission whitelist; if the external operation instructions exceed the permission range represented by the minimum permission whitelist, the execution of the external operation instructions is blocked and an alarm is triggered; if the external operation instructions do not exceed the permission range represented by the minimum permission whitelist, the external operation instructions are allowed; the trusted proxy is also used to: monitor the running status of the main intelligent agent, multiple sub-intelligent agents, test tools, and processes, and if the status is abnormal, trigger a circuit breaker mechanism and report an alarm event to the trusted management center.

[0037] As an optional embodiment, the following is combined with Figure 1 and Figure 2 Further details of the technical solution of this application: To address the challenges of multi-agent automated testing scenarios, including insufficient understanding of vertical domain functional requirements leading to incomplete test solutions, high rates of hidden defects, uncontrollable behavior during autonomous execution, easy unauthorized operations, repetitive work in collaborative tasks, low efficiency, and security risks, this application provides a two-dimensional deep automated testing solution based on trusted computing. This solution constructs a trusted execution environment supported by a hardware trusted root and collaboratively deploys two types of test agents: "UI layer black-box traversal" and "code layer white-box interface perspective." This ensures the completeness and scientific rigor of the test solution and achieves proactive and secure control over agent behavior throughout the entire process. The overall solution is as follows: This application constructs a trusted execution environment (CRE) with a hardware root of trust as the source of trust, serving as the security foundation. Core components such as trusted proxies and encryption / decryption modules are pre-installed at the operating system layer and collaborate with a trusted management center. On this trusted foundation, a four-layer trusted testing architecture—"perception layer—code layer—decision layer—execution layer"—is built to achieve trusted measurement and security control throughout the entire testing process. The overall system architecture is as follows: Figure 1 As shown: The bottom layer (trusted foundation layer): serves as the security foundation. It provides integrity measurement, dynamic monitoring, cryptographic services, parent-child sandbox isolation mechanisms, etc.

[0038] The first layer (perception layer) is responsible for "understanding" the interface. It integrates computer vision (CV) and multimodal large models, and is responsible for UI element recognition and state extraction. At the same time, it performs reliable verification of the state of this layer's model and the agent.

[0039] The second layer (code layer): responsible for "understanding" the source code and interfaces. It integrates a large code parsing model, and is responsible for AST (Abstract Syntax Tree) analysis, interface contract extraction, mutation strategy generation, and simultaneous code-level trust verification.

[0040] The third layer (decision layer): The main intelligent agent operates at this layer and is responsible for task breakdown, scheduling, and result aggregation.

[0041] Fourth layer (execution layer): Sub-agents operate at this layer, connecting to the system under test through standardized protocols to execute specific test actions.

[0042] This application constructs a trusted execution environment based on a hardware root of trust, pre-configuring a trusted proxy, encryption / decryption modules, and a trusted management center as the operating base for all test components. This trusted base adopts a Trusted 3.0 dual-system architecture concept, designing the "security protection system" and the "test execution system" in parallel. Its constituent elements and collaborative functions are as follows: Figure 2 As shown: Hardware Root of Trust: As the source of system trust and proactive protection component, it provides hardware-level isolation and protection capabilities. Logically, the root of trust consists of three parts: TCM (Trusted Cryptographic Module), TPCM (Trusted Platform Control Module), and TSB (Trusted Software Base). The core functions of the root of trust include identity authentication, trust reporting, proactive measurement, trusted control, policy parsing, and secure storage (storing root keys, core policies, measurement benchmark values, and other key credentials). As the starting point of the trust chain, during the power-on boot phase, the root of trust performs integrity measurements on the BIOS, OS Loader, and operating system kernel at each level to ensure the absolute trustworthiness of the boot environment. During runtime, the root of trust is the foundation for proactive interception, cryptographic operations, measurement, verification, and control. Through trusted agents, it intercepts the dynamic behavior and sensitive calls of critical processes such as intelligent agents within the operating system, performing real-time integrity comparisons. Once it detects that the intelligent agent's running state or instruction sequence deviates from the benchmark, the TPCM immediately executes hardware-level circuit breaking and blocking, achieving proactive runtime immunity protection through "simultaneous measurement and control."

[0043] Trusted Agent: A core functional module deployed at the operating system layer of the computing component. Based on policies, it acts as the "enforcement tentacle" of the test terminal, extending trust from the system layer to the AI ​​agent application layer. It is responsible for receiving and executing security policies issued by the Trusted Management Center; for multi-agent concurrent testing scenarios, the Trusted Agent continuously measures and verifies the runtime state of the upper-layer main agent, sub-agents' process loading, model weight files, prompt word templates, etc.; crucially, the Trusted Agent acts as a "security gateway," intercepting and auditing all external instructions issued by the agents and implementing mandatory access control; it also reports measurement logs and security events to the Trusted Management Center in real time.

[0044] Encryption / decryption module: Based on a hardware root of trust (calling the TCM cryptographic engine), it provides high-performance national cryptographic (SM2 / SM3 / SM4) algorithm services, providing cryptographic support for all elements such as test data, model parameters, and agent communication, including data encryption, storage encryption, and transmission encryption. In multi-agent collaborative testing, it provides storage encryption (SM4) for all elements such as test case datasets, mutation policy parameters, and knowledge bases; it provides transmission encryption and integrity signature (SM2 / SM3) for communication messages between parent and child agents and interactive data between the test terminal and the system under test; it ensures that even if the test environment is illegally accessed, plaintext test logic and business data cannot be obtained, guaranteeing data confidentiality and integrity.

[0045] Trusted Management Center: Deployed at the security policy decision-making and auditing hub of the management network, it serves as the management brain for ensuring "controllable behavior and traceability" of test agents. It is responsible for formulating, distributing, and managing trusted policies for all controlled terminals and agents; centrally storing and managing baseline values ​​for various elements; receiving and analyzing measurement logs from trusted agents; and tracing and alerting on abnormal behavior.

[0046] Trusted Sandbox: An execution environment forcibly isolated by a trusted agent, serving as the key technological foundation for achieving "parent-child agent collaboration" while ensuring "mutual non-interference and prevention of lateral movement." Each agent instance is deployed in an independent, resource-constrained lightweight container or trusted partition. Network communication between sandboxes is prohibited by default, allowing only outgoing connections authorized through the trusted agent. This is used to achieve secure isolation between parent and child agents, preventing lateral movement by malicious actors.

[0047] On top of this trusted foundation, to achieve depth and breadth in testing, a complete technology stack from perception to execution is built, with the definitions and interactions of each layer as follows: 1) Perception Layer: Responsible for "understanding" the interface. Integrating computer vision (CV) and multimodal large models, its function is to perform real-time analysis of the interface of the system under test, identify UI elements (buttons, input boxes, text), layout structure, and dynamic state changes, and transform unstructured visual information into structured operational metadata that can be understood by the decision-making and execution layers. Models, sandboxes, and tools involved in this layer must undergo hash comparison through a trusted proxy before loading and are continuously measured during runtime. While ensuring the agent's trustworthiness, the model can "understand" the interface layout, button states, and dynamic content.

[0048] 2) Code Layer: This layer integrates a large code analysis model with a static / dynamic analysis engine, responsible for "understanding" the source code and interfaces. Its function is to "see through" the internal logic of the system under test at the source code level, automatically parsing interface definitions, parameter constraints, data flow, and business logic, and generating interface contracts accordingly, thereby driving the automatic generation of mutation strategies. Key components in this layer continuously undergo trusted verification by a trusted proxy.

[0049] 3) Decision Layer: The main intelligent agent operates at this layer, responsible for task breakdown, scheduling, result aggregation, comprehensive decision-making, and outputting comprehensive reports to ensure the compliance of decision-making logic. This layer introduces parent-child agent sandbox isolation and silent self-verification feedback loops. In the trusted execution environment, relevant policies, credentials, permissions, tasks, etc., are controlled by trusted components.

[0050] 4) Execution Layer: Sub-agents run at this layer, executing specific test actions. Based on trusted roots and trusted connections, they connect to the system under test through standardized protocols (such as MCP), enabling seamless cross-platform and cross-tool calls, ensuring the atomicity and traceability of test actions, and accepting management from trusted related components.

[0051] According to one aspect of the embodiments of this application, an embodiment of a multi-agent collaborative automated testing method based on trusted computing is provided. Figure 3 This is a flowchart of an optional multi-agent cooperative automated testing method based on trusted computing, according to an embodiment of this application. Figure 3 As shown, the method may include the following steps: Step S302: Initiate the agent that has passed the integrity metric in the computing component.

[0052] Step S304: The main agent breaks down the test task into multiple sub-tasks and assigns them to the corresponding sub-agents for execution through a trusted agent.

[0053] The sub-agents include UI testing sub-agents and code testing sub-agents. The main agent breaks down the test task into multiple sub-tasks, which are then distributed to the corresponding sub-agents for execution via a trusted proxy. This includes: the main agent breaking down the test task into UI layer black-box traversal sub-tasks and code layer white-box interface viewing sub-tasks, and distributing them separately. The main agent is configured by the trusted proxy to only have task decomposition and result collection permissions, and not direct access to the system under test; the trusted proxy distributes the UI layer black-box traversal sub-task to the UI testing sub-agent and the code layer white-box interface viewing sub-task to the code testing sub-agent; and the UI testing sub-agent is invoked to execute the UI layer black-box traversal sub-task. The system simulates user operations to traverse and test the UI interface of the system under test, verifying the front-end functionality and returning the test results of the UI layer. It then calls the code test sub-agent to execute the code layer white-box interface perspective sub-task, parsing the interface contract from the source code of the system under test and initiating tests on the functional interfaces based on a mutation strategy, returning the test results of the code layer. A trusted proxy performs integrity verification on the test results of the UI layer and the code layer; after successful verification, the test results of the UI layer and the code layer are aggregated to the main agent. Finally, the main agent performs time-series alignment and cross-layer cross-verification on the test results of the UI layer and the code layer, generating a comprehensive test report digitally signed by the trusted proxy.

[0054] Step S306: During the execution of the test task, according to the security policy, the operation instructions issued by the intelligent agent executing the test task are intercepted and their permissions are verified, and then allowed to proceed after the verification is passed.

[0055] During the execution of subtasks by the sub-agent, if the sub-agent fails to execute a subtask, the subtask is retried a limited number of times or the path is optimized. The operation log of the sub-agent is recorded throughout the process by a trusted agent, forming a complete metric log chain.

[0056] Step S308: The main agent performs cross-layer cross-validation on the test results returned by multiple sub-agents and outputs a comprehensive test report.

[0057] After the main agent performs cross-validation of the test results returned by multiple sub-agents and outputs a comprehensive test report, the main agent structures the valid test cases, mutation strategies, and newly discovered defect patterns from this test into reusable knowledge items. After the knowledge items are digitally signed by a trusted agent, they are stored in a knowledge base protected by a hardware root of trust for reuse in subsequent tests.

[0058] Through the above steps, an agent that has passed the integrity measurement is launched in the computing component; the main agent breaks down the test task into multiple sub-tasks and assigns them to the corresponding sub-agents for execution through a trusted proxy; during the execution of the test task, the operation instructions issued by the agent executing the test task are intercepted and their permissions are verified according to the security policy, and allowed after the verification is passed; the main agent performs cross-layer cross-verification on the test results returned by multiple sub-agents and outputs a comprehensive test report, which can solve the technical problem of low efficiency caused by the separate execution of UI layer tasks and code layer tasks in related technologies.

[0059] This application addresses key issues in automated testing schemes for intelligent agents, such as the lack of systematic security protection, low efficiency due to loose collaboration mechanisms, high incidence of hidden defects due to single testing dimensions, and security risks caused by uncontrollable AI behavior. It provides a multi-agent collaborative black-and-white box fusion automated deep testing method based on a trusted computing foundation.

[0060] As an optional implementation, this solution integrates the UI black box and the code white box. In particular, the code white box perspective and mutation strategy generation algorithm are key technologies at the code layer. Through a cross-layer cross-validation mechanism, it generates a synergistic effect that transcends single-dimensional testing. The following section combines... Figure 4 Further details of the technical solution of this application: 1) UI black-box traversal (front-end logic verification): The UI testing sub-agent focuses on verifying "front-end logic," solving the problem of "superficial functionality working." Based on the business requirements issued by the main agent, the UI testing sub-agent simulates real user operations to verify whether the "user-visible functions" are running correctly. Specific steps include: Multimodal state modeling: By learning from historical test cases, application interfaces and functions, the UI testing sub-agent transforms the application interface under test into a computable structured state model through the perception layer multimodal model.

[0061] Intent-driven script generation: Based on the intent of the test requirements and combined with business logic, the intelligent agent autonomously plans the test path and dynamically generates and executes TypeScript test scripts that simulate user behavior.

[0062] Sandbox execution and auditing: The test script runs automatically in the trusted sandbox, simulating mouse clicks, input, and other operations. During this process, the trusted proxy acts as a security gateway, intercepting and auditing all its operation requests to the DOM tree and system network to prevent unauthorized calls.

[0063] Front-end assertions: The agent verifies whether the front-end UI elements respond correctly and whether the business process flows as expected.

[0064] Results reporting: Output a test report and report it to the main AI agent.

[0065] 2) Code white-box analysis (backend defense verification): The code testing sub-agent focuses on "backend defense" verification, addressing issues such as "whether the underlying logic is correct" and "whether the boundaries are stable." For the target functionality, testing is completed through a combination of static analysis and dynamic attacks. Code fossil scanning: The code testing sub-agent parses the target system's source code through a static analysis engine, constructing an Abstract Syntax Tree (AST) and a Program Dependency Graph (PDG). Through code fossil scanning and learning, a complete code analysis is achieved, learning interface definitions, parameter constraints, and business logic at the source code level. Interface gene map extraction: Through AI parsing of interface contracts, information such as interface parameter types, boundary values, and dependencies is extracted; a structured "interface contract JSON" is formed.

[0066] AI-driven mutation strategy generation: Input the interface contract JSON into a large model, combine it with a historical defect knowledge base, and generate a targeted mutation test set. Mutation strategies include, but are not limited to: Boundary value mutation: Max+1 and Min-1 tests are performed on integer / string lengths.

[0067] Type mutation: Test deserialization robustness by replacing the expected Integer with a String or JSON object.

[0068] Null and Exception Injection: Injecting null values, SQL injection signature strings, and XSS payloads.

[0069] Concurrent Mutation: Based on the interface idempotency constraint, generate high-concurrency asynchronous call scripts to test the locking mechanism and data consistency.

[0070] Dynamic compilation and attack execution: The agent dynamically generates test scripts (such as Python / Go code) based on the mutation strategy, compiles and executes them within a trusted sandbox, and initiates real requests to the interface. This directly performs automated mutation attack testing on the functional interfaces, verifying the system's robustness under high concurrency, parameter mutation, and anomaly injection scenarios. Backend assertions: Collect API response status codes, response bodies, and database transaction logs to generate test results.

[0071] Results reporting: Output a test report and report it to the main AI agent.

[0072] 3) Cross-layer cross-validation (comprehensive decision-making by the main agent): The main agent receives and aligns the test reports from the UI layer and the code layer in sequence, executing cross-layer assertions. The business process is considered to have passed only if the assertion results from the UI layer and the code layer are consistently valid. The specific decision logic includes: Identification of hidden critical defects: For example, the UI layer displays "Operation successful," but the code layer detects that the interface returns an abnormal status code (such as 500) or the database transaction is rolled back. The system determines this as a "hidden critical defect of false success on the front end (data not written to disk)," rather than a simple "test passed."

[0073] False interception defect identification: For example, the UI layer displays "Operation failed," but the code layer detects "Operation successful" (interface 200 and data written normally). The system determines this as a "display defect of front-end state parsing error or cache not being refreshed," rather than a simple "test failed."

[0074] Precise root cause identification: By accurately aligning UI operation timestamps with API call logs, the main intelligent agent can not only identify defects but also output a comprehensive cross-layer report, accurately pinpointing whether the root cause of the defect is a "front-end rendering logic error" or a "back-end interface contract breach," providing the development team with directly usable repair basis.

[0075] 4) Unified and Trusted Foundation (All-Element Secure Collaboration): The two-dimensional testing involves not only the coordination of business logic but also the coordination of security mechanisms, with a unified and trusted foundation playing a crucial role in the integration process. Tamper-proof data fusion: Test data from both dimensions (logs, reports, and network packets) are encrypted and digitally signed by a trusted encryption and decryption module during transmission and storage, ensuring that the data is not tampered with or forged by a man-in-the-middle during the main intelligent agent's fusion analysis.

[0076] Permission boundary isolation and control: The trusted sandbox ensures strict isolation between UI sub-agents (with page DOM operation permissions) and code sub-agents (with source code reading and high-frequency interface request permissions), preventing cross-dimensional permission abuse or malicious instruction chaining.

[0077] Trusted Measurement Closed Loop: The trusted agent audits and records all agent behaviors throughout the two-dimensional testing process, forming a complete measurement log chain to ensure that the testing process itself is traceable and reproducible, meeting high-level security compliance requirements.

[0078] Multi-agent task decomposition and trusted collaboration mechanism: The parent-child agent (i.e., master agent and child agent) task decomposition and collaboration mechanism in this application is a key technology of the decision layer. A parent-child agent sandbox isolation mechanism is introduced in a trusted execution environment, solving the efficiency and security problems in multi-agent collaboration, such as... Figure 5 As shown: 1) Task decomposition and coordination mechanism: The main agent executes in an independent sandbox, responsible for task breakdown, strategy formulation, task allocation to sub-agents, and result aggregation; the sub-agents execute specific test operations (UI traversal or interface attack) in independent sandboxes, and are monitored in real time by a trusted agent; Task orchestration: The main agent receives natural language testing requirements and breaks them down into a two-dimensional task tree (DAG). For example, "order placement process testing" is broken down into: UI subtasks (browsing products -> adding to cart -> checkout -> payment) and code subtasks (product query API -> inventory deduction API -> order creation API -> payment callback API).

[0079] Distribution and isolated execution: Tasks are distributed to independent sandbox agents in the execution layer. UI sub-agents and code sub-agents work in parallel, performing atomic operations according to the tasks and reporting hash tags.

[0080] Silent self-verification feedback loop: If a sub-agent encounters a failure during execution, it does not directly throw an exception to interrupt the process. Instead, it precisely modifies the operation instructions through hash tags, performs a limited number of retries or path optimizations (such as waiting or finding an alternative path if the button is not loaded), thus avoiding invalid loops.

[0081] Cross-layer cross-validation (core collaboration): The main agent collects two-dimensional results for time-series alignment and cross-validation.

[0082] 2) Minimize permissions: The main agent only has the authority to decompose tasks, issue tasks, and collect test results, and is prohibited from directly accessing the system under test; the sub-agents only have the minimum permissions required to execute test tasks (e.g., only allowed to access the test database, prohibited from accessing the production database; only allowed to execute specific test scripts, prohibited from executing system commands).

[0083] 3) Command interception: The trusted proxy, acting as a logical "man-in-the-middle" mandatory access control point, intercepts all external commands issued by the parent and child agents, parses the semantics of the commands, and compares them with a pre-defined "least privilege whitelist." If a command exceeds the authorized permissions, it is immediately blocked and an alarm is triggered. It is also responsible for collecting test logs and forwarding them to the main agent.

[0084] 4) Isolation: The agents run in independent containers or trusted partitions. Each agent runs in an independent sandbox and is monitored in real time by a trusted agent. Network communication between sandboxes is prohibited by default, which effectively prevents malicious behavior from moving laterally and ensures that if a single sandbox is breached, it will not affect other agents.

[0085] Based on the logic of real-time monitoring and intervention of agent behavior using active immunity, this application extends the "active immunity" concept of Trusted 3.0 to the agent behavior level, constructing a full-link measurement and intervention mechanism from startup to operation and from static to dynamic, with its closed-loop management process as follows: Figure 6 As shown: 1) Trust measurement before startup: Before the agent is loaded, the trusted agent performs hash calculations on the agent's model weights, configuration files, prompt word templates, knowledge base, etc., and strictly compares them with the approved benchmark values ​​stored in the trusted management center. If an inconsistency is found, it is determined that the integrity has been compromised, the startup is immediately blocked, and an alarm is sent to the management center to prevent the agent / model / prompt word that has been tampered with or implanted with a backdoor from entering the running state.

[0086] 2) Runtime behavior measurement and intervention logic: Command Auditing and Filtering: A trusted agent acts as a "man-in-the-middle," intercepting every operation command (such as SQL execution, file deletion, etc.) output by the intelligent agent. It parses the command semantics and compares it with a pre-defined "least privilege whitelist." If the command contains sensitive operations (such as DROP TABLE, DELETE, or access to non-whitelisted IPs), it is immediately blocked.

[0087] Dynamic Intervention and Circuit Breaker: During testing, if an agent (main agent or sub-agent) attempts to perform an unauthorized operation (such as accessing a database outside the test environment or executing a DROP statement to delete production data), the trusted agent determines that the metric is out of bounds, immediately triggers the circuit breaker mechanism to block the execution of the instruction, and returns a "permission denied" signal to the main agent, guiding it to adjust its subsequent test path. Simultaneously, it reports an alarm event to the Trusted Management Center, guiding it to verify the permissions of the main agent and sub-agent. Meanwhile, the trusted agent continuously monitors the operational status of the main agent, sub-agents, tools, and processes. If any abnormal status is detected, the trusted agent immediately triggers the circuit breaker mechanism and reports an alarm event to the Trusted Management Center.

[0088] State tamper-proof: Test reports, temporary data, session tokens, etc. generated during the test are all encrypted and stored through the encryption and decryption module of the trusted base to ensure that the agent's context is not maliciously tampered with (preventing state hijacking) and to ensure the trustworthiness of the agent's decision chain.

[0089] 3) Comprehensive and trustworthy protection closed loop: The final test outputs, such as test reports and critical logs, are all digitally signed by a trusted agent to ensure their authenticity, integrity, and non-repudiation, forming a comprehensive protection loop from input to output. According to the policy, all inputs and outputs during the testing process must be digitally signed and subject to unified control.

[0090] This application provides a trusted closed-loop testing method covering the entire lifecycle of a test task, from inputting test requirements to outputting test results, and from task initiation to experience accumulation. This method uses a trusted foundation as its security base and parent-child agent collaboration as its core driving force. The complete process is as follows: Step 1: Test task input and trusted environment initialization.

[0091] Users describe their testing requirements in natural language (e.g., "Test the entire order placement process on the XXX platform"). The system initializes a trusted execution environment based on a hardware root of trust, confirming that the environment has not been tampered with. Once the environment is ready, the trusted agent performs pre-launch integrity measurements and verifications on key digital assets such as the main agent, sub-agent instances, testing toolsets, and knowledge base. If the verification matches, loading and startup are allowed; otherwise, the process is immediately blocked and an alarm is reported.

[0092] Step 2: Task decomposition and agent collaborative planning (decision layer).

[0093] The main agent starts and receives test tasks in an independent, trusted sandbox. It performs semantic parsing and task planning on the natural language requirements, intelligently breaking down the test tasks into sub-tasks in two dimensions: "UI layer black-box traversal" and "code layer white-box interface perspective," generating a task-cooperative directed acyclic graph (DAG). The main agent issues sub-task instructions, which are intercepted and parsed by a trusted proxy, comparing them with a pre-defined permission whitelist. After confirming compliance, the trusted proxy securely distributes the sub-tasks to the UI test sub-agents and code test sub-agents at the execution layer.

[0094] Step 3: Parallel Execution and Monitoring: The two sub-agents execute in parallel within independent sandboxes, under the real-time monitoring and behavior auditing of a trusted agent throughout the process. The UI agent writes TypeScript scripts to simulate a user; the code agent generates mutation strategy attack interfaces.

[0095] UI layer intelligent agent black-box traversal (perception layer + execution layer): The UI testing agent learns the interface layout, UI elements, and functional logic of the application under test, and simulates user behavior based on business requirements to automatically write test cases and TypeScript test scripts. The scripts run automatically in a trusted sandbox, simulating real user operations such as mouse clicks, text input, and element validation, completing a "black-box" test of the front-end functionality and business processes. During the testing process, every DOM operation and network request made by the agent is intercepted and audited by a trusted proxy to ensure compliance and traceability.

[0096] White-box interface perspective at the code level (code layer + execution layer): The code testing agent statically parses the interface definition, parameter constraints, and business logic at the source code level, constructing an Abstract Syntax Tree (AST) and a Program Dependency Graph (PDG). Through AI parsing of the interface contract, it extracts structured information such as interface parameter types, boundary values, and dependencies, forming an "Interface Contract JSON." Combining this with a historical defect knowledge base, the agent automatically generates mutation strategies, including boundary value mutation, type mutation, null value and exception injection, and concurrent mutation. After dynamic compilation, these mutation strategies are used to launch automated mutation attack tests on real functional interfaces within a trusted sandbox, verifying the system's robustness and defense capabilities under high concurrency, parameter mutation, and exception injection scenarios.

[0097] Step 4: Integration and comprehensive assertion of cross-layer test results (decision level).

[0098] After completing their respective tests, the two sub-agents encrypt their test reports, key logs, and other outputs using an encryption / decryption module before submitting them to a trusted agent for integrity verification. Upon successful verification, the test results are aggregated and sent to the main agent. The main agent performs time-series alignment and cross-layer verification of the UI layer and code layer reports, executing comprehensive assertions. For example, if the UI layer asserts "payment successful" but the code layer detects an abnormal status code returned by the interface or a database transaction rollback at the same time, the main agent automatically identifies this as a hidden serious defect: "the interface is normal, but the business logic is incorrect." Finally, the main agent generates a unified, digitally signed, trusted comprehensive test report.

[0099] Step 5: Accumulate experience and update the knowledge base.

[0100] After the entire testing process is completed, the main agent structures the validated test cases, high-value mutation strategies, and newly discovered defect patterns into reusable "Skills" knowledge entries. These experiences, after being reviewed by the Trust Management Center, are securely stored in a knowledge base protected by a hardware root of trust. Subsequent testing tasks can retrieve and reuse existing experiences from the knowledge base, enabling continuous evolution of testing capabilities and continuous improvement in testing efficiency.

[0101] This solution addresses multi-agent automated testing scenarios. The entire process, from submitting test requirements to automatically outputting test results, is summarized as follows: The user describes the test requirements using natural language; a trusted execution environment is initialized; a trusted agent performs trusted verification on the main agent; upon successful verification, the main agent starts and receives the test task; the main agent breaks down the test task into a "UI layer black-box traversal" subtask and a "code layer white-box interface perspective" subtask; the trusted agent intercepts and parses the subtask instructions issued by the main agent; if the instructions are compliant, the subtask instructions are distributed to the UI test sub-agent and the code test sub-agent respectively; the trusted agent performs trusted verification on the sub-agents. Verification; if verification is successful, the sub-agent starts and receives the test task; the sub-agent executes the test task and is monitored by the trusted agent throughout the process (key elements such as operations, strategies, scripts, tools, and the agent itself during the test process must be verified); the sub-agent completes the test and generates test reports, key logs, and other test result outputs; the test result outputs are encrypted and reported to the trusted agent for trusted verification; if verification is successful, the test results are summarized to the main agent; the main agent performs time-series alignment, cross-validation, and comprehensive assertion; the main agent outputs a cross-layer comprehensive report; all valid data and experience in the process are organized, converted into Skills, and stored in the knowledge base.

[0102] like Figure 7 As shown, the five core steps of the method in this application are fully presented. The process includes three key trusted verification nodes (pre-start baseline measurement, instruction compliance audit, and test result integrity verification), corresponding to triple protection of startup prevention, runtime interception, and result tampering prevention, respectively. This embodies the proactive immune dual-system protection concept. Furthermore, during the testing process, the trusted agent monitors the operational status of core elements such as the agent, tools, and processes throughout the entire process. If an abnormal status is detected, the trusted agent immediately triggers the circuit breaker mechanism, alerts the trusted management center, and simultaneously returns a "status abnormality" signal to the main agent.

[0103] This application can solve the following technical problems: 1) The lack of systematic security protection in automated testing of intelligent agents. Because intelligent agents possess autonomous decision-making, tool invocation, and open input processing capabilities, they face five major categories of security risks: prompt word injection and command hijacking, privilege overreach and tool abuse, data privacy and leakage, uncontrollable behavior and illusion risks, and supply chain and multi-agent collaboration risks. This solution lacks a full-link security control mechanism from hardware root of trust to runtime sandbox.

[0104] 2) The multi-agent collaborative testing lacks an effective hierarchical task decomposition and security isolation mechanism. In this scheme, the agent collaboration mechanism is loose; all agents run in the same environment, lacking parent-child agent sandbox isolation. An attack or abnormal behavior by any agent can affect the entire system. Furthermore, the lack of trust metrics and behavior auditing makes it impossible to reliably trace information transmission and operation calls between agents. This easily leads to risks such as agent goal conflict, redundant work, low collaboration efficiency, and malicious collusion.

[0105] 3) The automated testing solutions suffer from limited testing dimensions and insufficient coverage. UI-level automated testing only verifies "functions visible to the user," failing to uncover logical defects and boundary stability issues in underlying interfaces; while interface testing cannot verify end-to-end business processes in actual user scenarios. The lack of an automated testing solution that organically integrates both aspects makes it impossible to achieve complete verification from front-end to back-end.

[0106] 4) The security risk management solutions for intelligent agents suffer from fragmented protection, lack of test scenario specificity, and lack of runtime continuous verification mechanisms. Most related solutions provide isolated protection for single risk points, lacking coordination and linkage between these points; general security solutions are not specifically designed for automated testing scenarios, failing to balance security with test execution flexibility and efficiency; furthermore, they lack runtime continuous reliability measurement and dynamic intervention capabilities, making it impossible to promptly detect and block behaviors deviating from the preset path during test execution.

[0107] 5) The contradiction between the nondeterminism and reproducibility of agent test results. Large-scale model inference exhibits randomness, leading to inconsistent execution paths or results for the same test case across multiple executions, making it difficult to provide deterministic regression guarantees. Related solutions lack a standardized sandbox environment to fix external dependencies for fault reproduction, and lack a hierarchical memory mechanism to effectively manage short-term session states and long-term business rules.

[0108] 6) The problem of agent testing assertions remaining at the surface semantic level. Most solutions rely solely on text similarity or simple status code verification, lacking the ability to cross-validate with multi-source data. This makes it difficult to identify hidden defects such as "the interface is normal but the business logic is wrong"; after a test failure, the agent can only provide vague natural language explanations, lacking precise code-level root cause localization capabilities.

[0109] The main work done in the technical solution of this application is as follows: 1) A dual-dimensional intelligent agent collaborative testing architecture based on trusted computing, consisting of "UI black box + code white box".

[0110] In related technologies, UI layer testing and code layer testing are usually separated. UI automated testing tools (such as Selenium) and interface testing tools (such as Postman and JMeter) are performed by different teams and with different tools, resulting in a lack of correlation analysis of test results. This application proposes for the first time to organically integrate "UI layer intelligent agent black-box traversal" (verifying user-visible functions) and "code layer white-box interface perspective" (verifying underlying logic and boundary stability) in the same trusted execution environment through the collaboration of different intelligent agents, forming a complete testing closed loop from front-end to back-end.

[0111] 2) An automated deep testing method based on code fossil scanning and interface gene mapping By using intelligent agents to learn interface definitions, parameter constraints, and business logic from the source code level, interface testing tools are automatically generated. After compilation, functional interfaces are directly subjected to automated testing, and interface contracts are analyzed by AI, along with automated mutation attacks.

[0112] 3) A four-layer trusted testing technology architecture consisting of a perception layer, a code layer, a decision layer, and an execution layer. This application constructs a complete technical architecture from the perception layer (CV + multimodal large model to "understand" the interface), the code layer (static code parsing and interface contract extraction), the decision layer (parent-child agent sandbox isolation + silent self-verification feedback loop) to the execution layer (standardized protocol connection to the system under test). Each layer is deployed in a trusted execution environment with a Trusted 3.0 dual-system architecture and is protected by a hardware root of trust.

[0113] 4) A systematic protection scheme using "parent-child sandbox + real-time measurement circuit breaker" addresses the unique security risks of intelligent agents. Automated testing of intelligent agents commonly faces security risks such as prompt word injection, privilege escalation, data leakage, and uncontrollable behavior. This application systematically solves the security vulnerabilities of automated testing of intelligent agents through runtime parent-child sandbox isolation, the principle of least privilege, continuous boundary verification through adversarial testing, and complete operation audit logs. In particular, the "parent-child intelligent agent sandbox isolation" mechanism, where the main intelligent agent is responsible for task decomposition and result aggregation, while the child intelligent agent executes specific operations in an isolated sandbox, coupled with real-time interception of instructions and privilege escalation circuit breaker logic by a trusted proxy, effectively prevents the risk of a single intelligent agent having excessive privileges or being attacked and causing a global impact.

[0114] This solution achieves the following beneficial effects: 1) This application utilizes trusted computing to achieve systematic, end-to-end security protection for automated agent testing. It extends the protection scope of trusted computing from the testing platform and test cases to the agent's behavior level, performing end-to-end trusted measurement and real-time control over the agent itself, permissions, input commands, output data, and operational behaviors, thus achieving systematic security protection. For multi-agent collaborative scenarios, based on a hardware root of trust, it effectively prevents security threats such as keyword injection, permission violations, sensitive data leakage, and agent malfunction through security isolation, policy configuration, benchmark management, startup measurement checks, runtime real-time measurement, and complete operation audit logs. This addresses the lack of an end-to-end security control mechanism from the hardware root of trust to the runtime sandbox in related technologies.

[0115] 2) This application achieves hierarchical collaboration and secure isolation among multiple agents. It introduces a parent-child agent sandbox isolation mechanism based on a trusted computing environment. The main agent is responsible for task decomposition and result aggregation, while child agents execute specific operations within independent sandboxes. This effectively prevents the risk of a single agent having excessive privileges or being attacked and impacting the entire system. It also addresses the security and trustworthiness issues of AI agent testing (preventing loss of control and injection). Furthermore, through trust measurement and behavior auditing, it enables full-process trusted traceability of policy configuration, hierarchical task division, information transmission, and operation invocation among agents, resolving problems such as goal conflict, duplication of effort, malicious collusion, and low coordination efficiency in multi-agent collaboration.

[0116] 3) This application achieves a dual fusion of testing dimensions and a qualitative leap in testing depth. Under a trusted computing foundation, intelligent agents autonomously and collaboratively complete dual-dimensional testing of "UI layer black-box traversal" and "code layer white-box interface perspective," achieving, for the first time in a trusted computing environment, end-to-end automated testing from front-end user interaction to back-end interface logic. Through a dual assertion mechanism of "UI layer verification + code layer verification" and cross-layer cross-verification, it can automatically identify hidden defects such as "normal interface but incorrect business logic," achieving a leap in testing capabilities from "point-by-point" to "root cause analysis." This solves the problems of related solutions having single testing dimensions, insufficient coverage, and assertion logic remaining at the surface semantic level. It also addresses the bottleneck of testing depth (cross-layer cross-verification).

[0117] 4) A complete four-layer trusted testing architecture has been constructed. This application, targeting automated testing scenarios, constructs a complete trusted testing architecture from the "perception layer, code layer, decision layer, and execution layer." Based on core functions such as trusted roots, permission management, access control, transparent encryption / decryption, measurement mechanisms, verification mechanisms, and control mechanisms, it achieves trusted runtime environment, trusted sandbox, trusted agent, and secure and trusted agent behavior. It also ensures the security and trustworthiness of all elements involved in the testing process, including models, knowledge bases, testing tools, testing systems, test cases, test reports, scripts, API interfaces, datasets, prompts, instructions, and policies. This solves the problems of fragmented protection in agent security management solutions, lack of test scenario specificity, and lack of continuous runtime verification mechanisms.

[0118] 5) This application significantly improves the reproducibility of test results and testing efficiency. By using a trusted execution environment to perform end-to-end trusted measurement and solidification of test inputs, execution processes, and output results, it solves the problem of non-deterministic test results caused by the randomness of large model inference, ensuring consistency in execution paths and results across multiple executions of the same test case and providing deterministic regression assurance. Simultaneously, test case development time and regression testing cycles are greatly shortened, test quality is significantly improved, and the experience and knowledge accumulated during the testing process are deposited as Skills, continuously enriching the knowledge base and protected by a root of trust, enabling the continuous evolution of testing capabilities.

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

[0120] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0121] According to another aspect of the embodiments of this application, a trusted computing-based multi-agent cooperative automated testing apparatus for implementing the above-described trusted computing-based multi-agent cooperative automated testing method is also provided. The apparatus may include: A startup module is used to launch agents that have passed integrity metrics within the computing unit; The decomposition module is used to decompose the test task into multiple sub-tasks through the main intelligent agent and distribute them to the corresponding sub-intelligent agents for execution through a trusted agent; The verification module is used to intercept and verify the operation instructions issued by the intelligent agent executing the test task during the execution of the test task according to the security policy, and allow the operation after the verification is passed. The output module is used to perform cross-layer cross-validation of the test results returned by multiple sub-agents through the main agent and output a comprehensive test report.

[0122] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of the device, can run in a corresponding hardware environment, and can be implemented through software or hardware, wherein the hardware environment includes a network environment.

[0123] According to another aspect of the embodiments of this application, a server or terminal for implementing the above-described multi-agent cooperative automated testing method based on trusted computing is also provided.

[0124] Figure 8 This is a structural block diagram of a terminal according to an embodiment of this application, such as... Figure 8 As shown, the terminal may include: one or more (only one is shown in the figure) processors 801, memory 803, and transmission devices 805, such as... Figure 8 As shown, the terminal may also include input / output devices 807.

[0125] The memory 803 can be used to store software programs and modules, such as the program instructions / modules corresponding to the trusted computing-based multi-agent collaborative automated testing method and apparatus in this embodiment. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 803, thereby realizing the aforementioned trusted computing-based multi-agent collaborative automated testing method. The memory 803 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 803 may further include memory remotely located relative to the processor 801, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0126] The aforementioned transmission device 805 is used to receive or send data via a network, and can also be used for data transfer between the processor and memory. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 805 includes a Network Interface Controller (NIC), which can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 805 is a radio frequency (RF) module used for wireless communication with the Internet.

[0127] Specifically, memory 803 is used to store application programs.

[0128] The processor 801 can invoke the application program stored in the memory 803 via the transmission device 805 to perform the following steps: Launch an agent within the computing component that has passed integrity measurements; The test task is broken down into multiple sub-tasks by the main intelligent agent and then assigned to the corresponding sub-intelligent agents for execution by a trusted agent. During the execution of the test task, according to the security policy, the operation instructions issued by the intelligent agent executing the test task are intercepted and their permissions are verified, and the instructions are allowed after the verification is passed. The main agent performs cross-layer cross-validation on the test results returned by multiple sub-agents and outputs a comprehensive test report.

[0129] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0130] Those skilled in the art will understand that Figure 8The structure shown is for illustrative purposes only. The terminal can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 8 This does not limit the structure of the aforementioned electronic device. For example, the terminal may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 8 The different configurations shown.

[0131] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0132] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to execute program code for a multi-agent cooperative automated testing method based on trusted computing.

[0133] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.

[0134] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: Launch an agent within the computing component that has passed integrity measurements; The test task is broken down into multiple sub-tasks by the main intelligent agent and then assigned to the corresponding sub-intelligent agents for execution by a trusted agent. During the execution of the test task, according to the security policy, the operation instructions issued by the intelligent agent executing the test task are intercepted and their permissions are verified, and the instructions are allowed after the verification is passed. The main agent performs cross-layer cross-validation on the test results returned by multiple sub-agents and outputs a comprehensive test report.

[0135] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0136] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0137] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0138] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0139] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0141] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0143] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A multi-agent collaborative automated testing system based on trusted computing, characterized in that, include Trusted Management Center, used to provide benchmark values ​​for security policies and intelligent agents; A trusted terminal includes a protection component and a computing component. The computing component runs a main intelligent agent and multiple sub-intelligent agents. The main intelligent agent is used to decompose the test task into multiple sub-tasks and assign them to the corresponding sub-intelligent agents, summarize the test results returned by each sub-intelligent agent, perform cross-layer cross-validation, and output a comprehensive test report. The sub-agent is used to execute the corresponding sub-task and return the test result; The computing component is equipped with a trusted agent, which is used to: perform an integrity measurement on the agent to be launched based on the metric benchmark value; If the integrity metric passes, startup is allowed; otherwise, startup of the agent is blocked and an alarm is reported to the trusted management center. According to the security policy, operation commands issued by the agent executing the test task are intercepted and their permissions are verified.

2. The testing system according to claim 1, characterized in that, The main intelligent agent is used to decompose the test task into a UI layer black-box traversal subtask and a code layer white-box interface perspective subtask. The UI layer black-box traversal subtask is sent to the UI test sub-intelligent agent, and the code layer white-box interface perspective subtask is sent to the code test intelligent agent. The main intelligent agent is configured by the trusted agent to have the permissions to decompose the task and collect the results, but does not have the permission to directly access the system under test. The plurality of sub-agents include the UI testing sub-agent and the code testing sub-agent. The UI testing sub-agent is used to execute the UI layer black-box traversal subtask, which performs traversal testing on the UI interface of the system under test by simulating user operations, verifies the front-end functions, and returns the test results of the UI layer. The code testing sub-agent is used to execute the code layer white-box interface perspective subtask, which parses the interface contract from the source code of the system under test and initiates tests on the functional interfaces based on the mutation strategy, and returns the test results of the code layer.

3. The testing system according to claim 2, characterized in that, The main intelligent agent runs in a first trusted sandbox, the UI testing sub-intelligent agent runs in a second trusted sandbox, and the code testing sub-intelligent agent runs in a third trusted sandbox. The first, second, and third trusted sandboxes are forcibly isolated by the trusted agent. Network communication between the first, second, and third trusted sandboxes is prohibited. Outgoing connections of the first, second, and third trusted sandboxes all require authorization from the trusted agent. The first, second, and third trusted sandboxes are implemented based on resource-constrained lightweight containers or trusted partitions.

4. The testing system according to claim 2, characterized in that, After completing the UI layer black-box traversal subtask, the UI test sub-agent encrypts the test results of the UI layer using the encryption / decryption module and reports them to the trusted agent. After the code test sub-agent completes the code layer white-box interface perspective sub-task, it encrypts the code layer test results using the encryption / decryption module and reports them to the trusted agent. The trusted agent performs integrity verification on the test results of the UI layer and the test results of the code layer. After the verification is successful, the test results of the UI layer and the test results of the code layer are aggregated to the main agent. The main intelligent agent performs time-series alignment and cross-layer cross-validation on the test results of the UI layer and the test results of the code layer, and generates the comprehensive test report digitally signed by a trusted proxy.

5. The testing system according to any one of claims 1 to 4, characterized in that, The protective component includes a hardware root of trust, which serves as the source of trust for the trusted terminal and is used to provide identity authentication and integrity measurement. Based on the metric benchmark value, an integrity measurement is performed on the agent to be launched, including: the trusted agent calls the measurement function provided by the hardware root of trust to perform hash calculations on the model weights, configuration files, prompt word templates, and knowledge base of the agent to be launched, and compares the calculation results with the metric benchmark value. If the comparison is inconsistent, it is determined that the integrity is damaged, the agent is blocked from starting and an alarm is reported. If the comparison is consistent, it is determined that the integrity measurement is passed and the agent is allowed to start.

6. The testing system according to any one of claims 1 to 4, characterized in that, According to the security policy, the operation commands issued by the intelligent agent executing the test task are intercepted and their permissions are verified, including: the trusted proxy, acting as a security gateway, intercepts external operation commands issued by the intelligent agent, parses the semantics of the external operation commands and compares them with a preset minimum permission whitelist; if the external operation command exceeds the permission range represented by the minimum permission whitelist, the execution of the external operation command is blocked and an alarm is triggered; if the external operation command does not exceed the permission range represented by the minimum permission whitelist, the external operation command is allowed; the trusted proxy is also used to: monitor the running status of the main intelligent agent, the multiple sub-intelligent agents, the test tool and the process, and if the status is abnormal, trigger a circuit breaker mechanism and report an alarm event to the trusted management center.

7. A multi-agent cooperative automated testing method based on trusted computing, characterized in that, The test method, applied to the test system according to any one of claims 1 to 6, comprises: Launch an agent within the computing component that has passed integrity measurements; The test task is broken down into multiple sub-tasks by the main intelligent agent and then assigned to the corresponding sub-intelligent agents for execution by a trusted agent. During the execution of the test task, according to the security policy, the operation instructions issued by the intelligent agent executing the test task are intercepted and their permissions are verified, and the instructions are allowed after the verification is passed. The main agent performs cross-layer cross-validation on the test results returned by multiple sub-agents and outputs a comprehensive test report.

8. The test method according to claim 7, characterized in that, The sub-agents include UI testing sub-agents and code testing sub-agents. The main agent breaks down the testing task into multiple sub-tasks, which are then distributed to the corresponding sub-agents for execution via a trusted proxy. This includes: The main agent decomposes the test task into UI layer black-box traversal subtasks and code layer white-box interface perspective subtasks and assigns them respectively. The main agent is configured by the trusted agent to have the permissions to decompose tasks and collect results, but not to have the permission to directly access the system under test. The trusted proxy distributes the UI layer black-box traversal subtask to the UI test sub-agent and the code layer white-box interface perspective subtask to the code test sub-agent. The UI testing sub-agent is invoked to execute the UI layer black-box traversal sub-task, which simulates user operations to traverse and test the UI interface of the system under test, verify the front-end functions, and return the test results of the UI layer; the code testing sub-agent is invoked to execute the code layer white-box interface perspective sub-task, which parses the interface contract from the source code of the system under test and initiates tests on the functional interfaces based on the mutation strategy, and returns the test results of the code layer. The trusted proxy performs integrity verification on the test results of the UI layer and the test results of the code layer. After the verification is successful, the test results of the UI layer and the test results of the code layer are aggregated to the main intelligent agent. The main intelligent agent performs time-series alignment and cross-layer cross-validation on the test results of the UI layer and the test results of the code layer, generating the comprehensive test report digitally signed by a trusted proxy.

9. The test method according to claim 7, characterized in that, During the execution of sub-tasks by the sub-agent, the method further includes: If a sub-agent fails to execute a sub-task, the sub-task is retried a limited number of times or the path is optimized. The operation log of the sub-agent is recorded throughout the process by the trusted agent to form a complete metric log chain.

10. The test method according to claim 7, characterized in that, After performing cross-layer cross-validation on the test results returned by multiple sub-agents through the main agent and outputting a comprehensive test report, the testing method further includes: The main intelligent agent structures the valid test cases, mutation strategies, and newly discovered defect patterns from this test into reusable knowledge items. After the knowledge entry is digitally signed by the trusted proxy, it is stored in a knowledge base protected by a hardware root of trust for reuse in subsequent testing.