基于模型的测试设计–面向复杂系统的软件与系统工程方法研究
Model-Based Test Design-Research on Software and Systems Engineering Methods for Complex Systems
DOI: 10.12677/mos.2026.152028, PDF,   
作者: 张 妍:西北工业大学计算机学院,陕西 西安;尹溶森, 孙 波:北京空间飞行器总体设计部,北京
关键词: 基于模型测试设计需求追踪覆盖度量测试数据判定逻辑(Oracle)持续集成Model-Based Test Design Demand Tracking Coverage Metric Test Data Decision Logic (Oracle) Continuous Integration
摘要: 基于模型的测试设计(Model‑Based Test Design, MBTD)并不是单一的“自动生成用例”技术,而是一种把需求、架构边界、行为语义与环境假设统一到可计算资产中的测试设计方式。它强调在测试设计阶段就把关键知识写清楚:需求要能追踪,场景要能复现,判定要能落地,证据要能回溯。与传统以文档解释和经验枚举为主的用例编写相比,MBTD更关注:(1) 把自然语言需求转为可判定的验收条件;(2) 把行为模型转为可执行的场景骨架,并将断言与观测点嵌入模型;(3) 以覆盖与风险为约束,在有限预算内构造信息密度更高的用例集合;(4) 将执行结果回写到模型与差距清单,使回归选择与后续迭代有据可依。本文在梳理相关标准与研究进展的基础上,给出一套更贴近工程实践的MBTD流程与关键技术要点,包括模型资产构成、用例包组织、覆盖度量与选择策略、测试数据与Oracle设计、以及与持续集成相结合的落地方法。
Abstract: Model-based Test Design (MBTD) is not a single “automatic generation of test cases” technique, but a test design approach that unifies requirements, architectural boundaries, behavioral semantics and environmental assumptions into computable assets. It emphasizes that key knowledge should be clearly stated during the test design stage: requirements should be traceable, scenarios should be reproducible, judgments should be implementable, and evidence should be traceable. Compared with the traditional use case writing mainly based on document interpretation and experience enumeration, MBTD pays more attention to: (1) converting natural language requirements into decidable acceptance conditions; (2) Transform the behavioral model into an executable scene skeleton and embed assertions and observation points into the model; (3) Constrained by coverage and risk, construct a set of use cases with higher information density within a limited budget; (4) Write the execution results back to the model and gap list to provide a basis for regression selection and subsequent iterations. Based on a review of relevant standards and research progress, this paper presents a set of MBTD processes and key technical points that are closer to engineering practice, including model asset composition, use case package organization, coverage measurement and selection strategies, test data and Oracle design, as well as implementation methods combined with continuous integration.
文章引用:张妍, 尹溶森, 孙波. 基于模型的测试设计–面向复杂系统的软件与系统工程方法研究[J]. 建模与仿真, 2026, 15(2): 1-8. https://doi.org/10.12677/mos.2026.152028

参考文献

[1] Utting, M. and Legeard, B. (2007) Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann.
[2] ISO/IEC/IEEE 15288:2015 (2015) Systems and Software Engineering—System Life Cycle Processes. ISO/IEC/IEEE.
[3] Object Management Group (OMG) (2019) OMG Systems Modeling Language (SysML) Version 1.6.
[4] ISO/IEC/IEEE 29119-1:2013 (2013) Software and Systems Engineering—Software Testing—Part 1: Concepts and Definitions. ISO/IEC/IEEE.
[5] ISO/IEC/IEEE 29148:2018 (2018) Systems and Software Engineering—Requirements Engineering. ISO/IEC/IEEE.
[6] Object Management Group (OMG) (2013) UML Testing Profile (UTP) Specification Version 1.2.
[7] Cederbladh, J., Cicchetti, A. and Suryadevara, J. (2024) Early Validation and Verification of System Behaviour in Model-Based Systems Engineering: A Systematic Literature Review. ACM Transactions on Software Engineering and Methodology, 33, 1-67. [Google Scholar] [CrossRef
[8] Apvrille, L., De Saqui-Sannes, P., Hotescu, O. and Calvino, A. (2022) SysML Models Verification Relying on Dependency Graphs. Proceedings of the 10th International Conference on Model-Driven Engineering and Software Development, 6-8 February 2022, 174-181. [Google Scholar] [CrossRef
[9] Koo, J., Saumya, C., Kulkarni, M. and Bagchi, S. (2019) PySE: Automatic Worst-Case Test Generation by Reinforcement Learning. 2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST), Xi’an, 22-27 April 2019, 136-147. [Google Scholar] [CrossRef
[10] Hansen, S.T., Gomes, C.Â.G., Najafi, M., Sommer, T., Blesken, M., Zacharias, I., et al. (2022) The FMI 3.0 Standard Interface for Clocked and Scheduled Simulations. Electronics, 11, Article 3635. [Google Scholar] [CrossRef