Journal of Computer Applications
Next Articles
Received:
Revised:
Accepted:
Online:
Published:
Contact:
赵家豪1,边赟2
通讯作者:
Abstract: To address the problems of scenario omission and test case redundancy caused by the difficulty of parsing unstructured requirement documents and the fragmentation of contextual information in large language model (LLM)-driven automated test case generation tasks, a test case generation framework based on cross-modal semantic alignment and a closed-loop iterative mechanism was proposed in this study. First, a layout parsing engine, MinerU, was utilized to transform requirement documents into structured feature sequences, thereby solving the parsing difficulties. Second, relying on a multimodal large language model, a four-layer progressive intent mining was executed on visual elements (figures and tables). A quality control mechanism was also introduced to accurately extract testing logic while preventing low-quality parsing results from propagating downstream. Next, to tackle the isolation of textual and visual information, a cross-modal semantic alignment strategy integrating spatial layouts and semantic features was designed to achieve the precise synthesis of requirement fragments. Finally, a closed-loop iterative generation and hierarchical adaptive deduplication mechanism was developed. Initial test cases were produced by a generator based on the requirement fragments and were subsequently reviewed by an adjudicator across six dimensions, including requirement boundaries, to drive incremental generation. Afterward, the hierarchical adaptive deduplication algorithm was applied to filter the generated cases, ultimately achieving high coverage and low redundancy of the test cases. Experimental results on real-world project datasets demonstrated that superior generation effectiveness was achieved compared to the baseline methods: the requirement logic coverage reached 80.4%, and the F1 score reached 81.0%. Furthermore, it obtained high recognition in an expert double-blind evaluation (correctness: 6/7, completeness: 5.83/7, usability: 5.83/7). Ultimately, this framework effectively enhances the reliability of automated test case generation and provides a feasible technical path for engineering implementation
Key words: automated testing, test case generation, cross-modal semantic alignment, requirement document parsing, intent mining
摘要: 针对大语言模型驱动的自动化测试用例生成任务中,非结构化需求文档解析困难与上下文信息碎片化所导致的场景遗漏与用例冗余等问题,本文提出一种基于跨模态语义对齐与闭环迭代机制的测试用例生成框架。首先,通过版面解析引擎MinerU将需求文档转化为结构化特征序列,以解决文档解析困难问题;其次,依托多模态大语言模型对视觉元素(图、表)执行四层递进式意图挖掘,并引入质量把控机制,在精准提取测试逻辑的同时阻断低质量解析结果向下游传递;再次,针对图文信息孤立问题,设计融合空间布局与语义特征的跨模态语义对齐策略,实现需求片段的精准合成;最后,设计闭环迭代生成与分层自适应去重机制,由生成器基于需求片段生成初始用例,经裁决器对其从需求边界等六大维度审查并驱动生成器增量生成,再通过去重算法,最终实现测试用例的高覆盖和低冗余。在真实项目数据集上的实验结果表明,该框架在生成效果上优于各基线方法:需求逻辑覆盖率达到80.4%,F1分数达到81.0%,并且在专家双盲评估中获得极高认可(正确性6/7、完整性5.83/7、可用性5.83/7),有效提升了自动化测试用例生成的可靠性,为工程落地提供了可行的技术路径。
关键词: 自动化测试, 测试用例生成, 跨模态语义对齐, 需求文档解析, 意图挖掘
CLC Number:
TP391.1
赵家豪 边赟. 基于跨模态语义对齐与闭环迭代机制的测试用例生成框架[J]. 《计算机应用》唯一官方网站, DOI: 10.11772/j.issn.1001-9081.2026050579.
/ Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2026050579