OpenAPI specifications are crucial in black-box testing. Yet, many services have no specifications, or the specifications are incorrect. Existing tools for specification generation read the source code or the documentation, but do not utilize the dynamic view of the system. We present OASIS, an OpenAPI specification generation tool that drafts a specification from the static source code and then validates and repairs it dynamically against the running service with an LLM agent. To evaluate specifications without a ground truth, we build a Scorer. It reads a specification as a set of claims and confirms or contradicts each claim with requests to the running service. We evaluate our approach on 30 services in seven frameworks and five languages, and against five baselines from prior work. OASIS finds 99% of the routes in the 30 services, and 97% of the claims that a request can test are true. OASIS produces better quality specifications than the baselines in 52 of 54 cases. It takes about one cent of API cost per route. A human evaluation finds the Scorer correct on 94% of its outcomes. Where the Scorer and the ground truth specifications disagree, the human finds the Scorer right in 107 of the 117 cases. Overall, our work shows that a specification generated from the source code and then validated and repaired dynamically with an LLM agent is more complete and more correct than one generated from the source code alone.


翻译:暂无翻译

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
280页PDF,全方位评估OpenAI o1,Leetcode刷题准确率竟这么高
《OpenAI o1大模型》中英文技术报告,44页pdf
专知会员服务
151+阅读 · 2024年9月15日
【CVPR2022】OakInk:理解手-物体交互的大规模知识库
专知会员服务
15+阅读 · 2022年4月6日
【CMU博士论文】开放世界目标检测与跟踪,168页pdf
专知会员服务
62+阅读 · 2021年6月14日
最新《监督机器学习可解释性》2020大综述论文,74页pdf
专知会员服务
130+阅读 · 2020年11月19日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
博客 | Github开源人体姿态识别项目OpenPose中文文档
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
论文浅尝 | 基于开放世界的知识图谱补全
开放知识图谱
11+阅读 · 2018年7月3日
论文浅尝 | Open world Knowledge Graph Completion
开放知识图谱
19+阅读 · 2018年1月30日
【每月好书】OpenCV算法精解
Python程序员
10+阅读 · 2017年11月21日
资源 | 清华大学开源OpenKE:知识表示学习平台
机器之心
10+阅读 · 2017年11月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《评估人机编队性能的标准指标》
专知会员服务
8+阅读 · 11月30日
《美陆军装甲排的自动化任务分配模型》59页
专知会员服务
6+阅读 · 11月30日
乌克兰海陆空无人力量
专知会员服务
3+阅读 · 11月30日
超越技术:美战争部的AI变革管理
专知会员服务
7+阅读 · 11月27日
北约400亿美元反无人机能力投资建设
专知会员服务
7+阅读 · 11月25日
反小型无人机系统方案评估(27页)
专知会员服务
15+阅读 · 11月25日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员