arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.07073cs.SE
收藏

使用日志覆盖率评估REST API测试生成策略

Assessing REST API Test Generation Strategies with Log Coverage

University of Helsinki(赫尔辛基大学)

Nana Reinikainen, Mika Mäntylä, Yuqing Wang

AI总结:

针对黑盒REST API测试缺乏代码覆盖率的问题,提出日志覆盖率指标,并评估进化计算、LLM和人工编写三种测试生成策略在Light-OAuth2系统上的效果。

摘要:

在黑盒设置中评估REST API测试的有效性可能具有挑战性,因为缺乏对源代码覆盖率指标和多语言技术栈的访问。我们提出了三个指标来捕获平均、最小和最大日志覆盖率,以处理多次运行中多样化的测试生成结果和运行时行为。使用日志覆盖率,我们在Light-OAuth2授权微服务系统上实证评估了三种REST API测试生成策略:进化计算(EvoMaster v5.0.2)、LLM(Claude Opus 4.6和GPT-5.2-Codex)以及人工编写的Locust负载测试。平均而言,Claude Opus 4.6测试比人工编写的测试发现多28.4%的唯一日志模板,而EvoMaster和GPT-5.2-Codex分别发现少26.1%和38.6%。接下来,我们分析组合日志覆盖率以评估策略之间的互补性。将人工编写的测试与Claude Opus 4.6测试相结合,人工编写测试和Claude测试的总观测日志覆盖率分别增加78.4%和38.9%。当将Locust测试与EvoMaster结合时,相同增加分别为30.7%和76.9%,而与GPT-5.2-Codex结合时为26.1%和105.6%。这意味着这些生成策略执行了很大程度上不同的运行时行为。我们的未来工作包括将研究扩展到多个系统。

英文摘要:

Assessing the effectiveness of REST API tests in black-box settings can be challenging due to the lack of access to source code coverage metrics and polyglot tech stack. We propose three metrics for capturing average, minimum, and maximum log coverage to handle the diverse test generation results and runtime behaviors over multiple runs. Using log coverage, we empirically evaluate three REST API test generation strategies, Evolutionary computing (EvoMaster v5.0.2), LLMs (Claude Opus 4.6 and GPT-5.2-Codex), and human-written Locust load tests, on Light-OAuth2 authorization microservice system. On average, Claude Opus 4.6 tests uncover 28.4% more unique log templates than human-written tests, whereas EvoMaster and GPT-5.2-Codex find 26.1% and 38.6% fewer, respectively. Next, we analyze combined log coverage to assess complementarity between strategies. Combining human-written tests with Claude Opus 4.6 tests increases total observed log coverage by 78.4% and 38.9% in human-written and Claude tests respectively. When combining Locust tests with EvoMaster the same increases are 30.7% and 76.9% and when using GPT-5.2-Codex 26.1% and 105.6%. This means that the generation strategies exercise largely distinct runtime behaviors. Our future work includes extending our study to multiple systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑