five

SymPrompt Focal Method Benchmark for Unit Test Generation

收藏
Figshare2024-02-23 更新2026-04-08 收录
下载链接:
https://figshare.com/articles/dataset/SymPrompt_Focal_Method_Benchmark_for_Unit_Test_Generation/25277314/1
下载链接
链接失效反馈
官方服务:
资源简介:
Benchmark focal methods for our paper <i>Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM</i>, to appear in FSE 2024. In this paper, we present SymPrompt, a code-aware prompting strategy for LLMs in test generation. SymPrompts's approach is based on recent work that demonstrates LLMs can solve more complex logical problems when prompted to reason about the problem in a multi-step fashion. We apply this methodology to test generation by deconstructing the testsuite generation process into a multi-stage sequence, each of which is driven by a specific prompt aligned with the execution paths of the method under test, and exposing relevant type and dependency focal context to the model. Our approach enables pretrained LLMs to generate more complete test cases without any additional training. We implement \approach using the TreeSitter parsing framework and evaluate on a benchmark challenging methods from open source Python projects. SymPrompt enhances correct test generations by a factor of 5 and bolsters relative coverage by 26% for CodeGen2. Notably, when applied to GPT-4, SymPrompt improves coverage by over 2x compared to baseline prompting strategies.
提供机构:
Ryan, Gabriel
创建时间:
2024-02-23
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作