paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Enhancing Exploratory Testing by Large Language Model and Knowledge Graph

利用大语言模型与知识图谱增强探索性测试
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 该论文将 LLM 与知识图谱用于探索性测试场景生成,属于软件测试与软件工程方向,而非用户关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析;仅在“LLM 作为工具”这一点上与方法论有弱关联。引用 22 inbox
Yanqi Su, Dianshu Liao, Zhenchang Xing, Qing Huang, Mulong Xie, Qinghua Lu, Xiwei Xu
crossref: 2026-09-12

AI 速览

一句话:用 LLM 构建用户任务与故障知识图谱,并以思维链推理生成高可行性探索性测试场景。

探索性测试依赖测试人员的知识与创造力,从终端用户视角设计测试用例以发现系统级缺陷。已有工作基于系统知识图谱(从缺陷报告中抽取场景与判定知识)生成测试场景来支持探索性测试,但缺陷报告质量参差、表达风格多样,且生成的场景往往不可行,导致该方法难以落地。本文利用大语言模型的自然语言理解能力构建“用户任务与故障系统知识图谱”(SysKG-UTF),并借助图谱中的系统与缺陷知识以及 LLM 的逻辑推理能力,生成高可行性与高连贯性的测试场景。作者特别设计了思维链(CoT)推理,从 LLM 中抽取类人知识与逻辑推理,模拟开发者验证测试场景可行性的过程。评估表明该方法显著提升了知识图谱构建质量,尤其对低质量缺陷报告效果明显,生成的测试场景具备高可行性与连贯性;用户研究进一步验证其有效性:8 名参与者两小时内从 8 个种子缺陷中发现 36 个缺陷,显著优于最先进基线方法的 21 个。

问题
基于知识图谱的探索性测试场景生成受限于缺陷报告质量不一致、表达风格多样,以及生成场景不可行,难以实际采用。
方法
利用 LLM 的自然语言理解能力构建用户任务与故障系统知识图谱 SysKG-UTF,并设计思维链推理从图谱与 LLM 中抽取类人知识和逻辑推理,模拟开发者验证场景可行性的过程来生成测试场景。
评估
通过实验评估知识图谱构建质量(尤其低质量缺陷报告)与生成场景的可行性和连贯性,并开展用户研究:8 名参与者两小时内从 8 个种子缺陷中发现 36 个缺陷,超过最先进基线的 21 个。
原文摘要(Abstract)

Exploratory testing leverages the tester's knowledge and creativity to design test cases for effectively uncovering system-level bugs from the end user's perspective. Researchers have worked on test scenario generation to support exploratory testing based on a system knowledge graph, enriched with scenario and oracle knowledge from bug reports. Nevertheless, the adoption of this approach is hindered by difficulties in handling bug reports of inconsistent quality and varied expression styles, along with the infeasibility of the generated test scenarios. To overcome these limitations, we utilize the superior natural language understanding (NLU) capabilities of Large Language Models (LLMs) to construct a System KG of User Tasks and Failures (SysKG-UTF). Leveraging the system and bug knowledge from the KG, along with the logical reasoning capabilities of LLMs, we generate test scenarios with high feasibility and coherence. Particularly, we design chain-of-thought (CoT) reasoning to extract human-like knowledge and logical reasoning from LLMs, simulating a developer's process of validating test scenario feasibility. Our evaluation shows that our approach significantly enhances the KG construction, particularly for bug reports with low quality. Furthermore, our approach generates test scenarios with high feasibility and coherence. The user study further proves the effectiveness of our generated test scenarios in supporting exploratory testing. Specifically, 8 participants find 36 bugs from 8 seed bugs in two hours using our test scenarios, a significant improvement over the 21 bugs found by the state-of-the-art baseline.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11311,
  title = {Enhancing Exploratory Testing by Large Language Model and Knowledge Graph},
  author = {Yanqi Su and Dianshu Liao and Zhenchang Xing and Qing Huang and Mulong Xie and Qinghua Lu and Xiwei Xu},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3639157}
}