基于多智能体规范的FMU仿真蜕变测试
Multi-Agent Specification-based Metamorphic Testing of FMU-Based Simulations
AI总结:
针对FMU仿真模型中缺乏显式预期输出导致传统测试方法受限的问题,提出一种基于LLM的多智能体工作流,从规范和接口中自动提取蜕变关系并生成测试用例,在润滑油冷却系统FMU上验证了其有效性。
摘要:
在许多工业领域中,功能模型接口(FMI)被用于跨不同合作伙伴使用各种建模工具交换仿真模型作为功能模型单元(FMU)。这为使用FMU进行基于仿真的验证和确认以确保系统行为可靠提供了可能性。然而,由于缺乏显式预期输出,为这些仿真模型推导有效的测试预言仍然具有挑战性。这限制了需要访问系统内部工作原理的传统测试方法的适用性。蜕变测试(MT)通过利用蜕变关系(MR)解决了这一限制,但从规范中提取此类关系在很大程度上仍然是手动且容易出错的过程。为了应对这一挑战,我们提出了一种基于LLM的多智能体工作流,用于对基于FMU的仿真模型进行基于规范的蜕变测试。该方法以功能和接口规范为输入,协调多个智能体提取需求并推导MR。这些MR使用Given-When-Then模式来表达输入条件(Given)、变换(When)和预期输出行为(Then)。然后利用这些关系生成蜕变测试用例,执行仿真,并评估多个会话间的输出一致性。我们在润滑油冷却系统FMU上评估了该方法,证明了其自动生成有意义的MR和相应测试用例的能力。初步结果表明,所提出的工作流能够通过减少手动工作并改进测试生成,有效支持动态仿真模型的系统化验证和确认。
英文摘要:
In many industrial domains, the Functional Mock-up Interface (FMI) is used to exchange simulation models as Functional Mock-up Units (FMUs) across different partners using various modelling tools. This opens up the possibilities for simulation-based verification and validation using FMUs for ensuring reliable system behaviour. However, deriving effective test oracles for these simulation models remains challenging due to the absence of explicit expected outputs. This limits the applicability of conventional testing approaches, which require access to the internal workings of the systems. Metamorphic testing (MT) addresses this limitation by leveraging metamorphic relations (MRs), but extracting such relations from specifications remains largely a manual and error-prone process. To address this challenge, we propose an LLM-powered multi-agent workflow for specification-based metamorphic testing of FMU-based simulation models. The approach takes functional and interface specifications as input and orchestrates multiple agents to extract requirements and derive MRs. These MRs are expressed using Given-When-Then patterns to structure input conditions (Given), transformations (When), and expected output behaviours (Then). These relations are then used to generate metamorphic test cases, execute simulations, and evaluate output consistency across multiple sessions. We evaluate the approach on a Lube Oil Cooling system FMU, demonstrating its ability to automatically generate meaningful MRs and corresponding test cases. Preliminary results indicate that the proposed workflow can effectively support the systematic verification and validation of dynamic simulation models by reducing manual effort and improving test generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。